Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Broken ratecontrol with --tune 3 and --mbr specified #32

Open
krakoi opened this issue Mar 4, 2024 · 3 comments
Open

[BUG] Broken ratecontrol with --tune 3 and --mbr specified #32

krakoi opened this issue Mar 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@krakoi
Copy link

krakoi commented Mar 4, 2024

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.

@krakoi krakoi added the bug Something isn't working label Mar 4, 2024
@JaitinPrakash
Copy link

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.

@gianni-rosato
Copy link
Owner

Thanks for bringing this up, someone from our team will be looking at this ASAP.

@gianni-rosato
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants