[BUG] Broken ratecontrol with --tune 3 and --mbr specified
krakoi opened this issue · 3 comments
If max bitrate and tune 3 is set, then the encoded video has heavy compression artifacts in the first few seconds, the encoder allocates too low bitrate to the start of the video. Later parts are fine.
Tune 0 has no such issue, nor tune 3 without a max bitrate cap.
Short example video and encoded variants illustrating the issue:
https://gofile.io/d/UQkYDK
CMD for encoding the above videos:
# test_tune0_mbr36.mp4
... | SvtAv1EncApp -i stdin --input-depth 10 --passes 2 --progress 3 --crf 48 --mbr 36m --preset 4 --tune 0 --lookahead 120 --tile-rows 1 --tile-columns 2 --variance-boost-strength 0 --variance-octile 0 --color-primaries 1 --transfer-characteristics 1 --matrix-coefficients 1 --color-range 0 --chroma-sample-position 1 -b "test_tune0_mbr36.mp4"
# test_tune3_mbr36.mp4:
... | SvtAv1EncApp -i stdin --input-depth 10 --passes 2 --progress 3 --crf 48 --mbr 36m --preset 4 --tune 3 --lookahead 120 --tile-rows 1 --tile-columns 2 --variance-boost-strength 0 --variance-octile 0 --color-primaries 1 --transfer-characteristics 1 --matrix-coefficients 1 --color-range 0 --chroma-sample-position 1 -b "test_tune3_mbr36.mp4"
# test_tune_3_no_mbr.mp4:
... | SvtAv1EncApp -i stdin --input-depth 10 --passes 2 --progress 3 --crf 48 --preset 4 --tune 3 --lookahead 120 --tile-rows 1 --tile-columns 2 --variance-boost-strength 0 --variance-octile 0 --color-primaries 1 --transfer-characteristics 1 --matrix-coefficients 1 --color-range 0 --chroma-sample-position 1 -b "test_tune_3_no_mbr.mp4"
Current master ( c233913 ) is used for encoding the example videos.
I've experienced the same issue. even using crf 1 and all the boosting at max strength and mbr at 5x source bitrate it generates garbage. but for me, this continues through the whole video. ffmpeg reports that svt is pretty much pinned at q=63 with occasional drops. I'm also on latest master.
Thanks for bringing this up, someone from our team will be looking at this ASAP.
Hi @JaitinPrakash, just following up here. Are you able to observe the same issue when using Tune 1 & 2? Furthermore, is Tune 2 able to use a bitrate cap in the first place?