Repository navigation
Conversation
Member
|
Thanks @icp4u, this fix is correct. It's merged as #63, rebased onto current master with your authorship kept. I split it into a test commit and a fix commit, and registered the test through the |
zackees
pushed a commit
to nathan-v/obs-studio
that referenced
this pull request
Oct 10, 2026
Configure the AV1 encoder through the production av1_update() with real FFmpeg options and check what reaches svtav1-params: CBR must deliver rc=2 with pred-struct=1, without the obsolete bias-pct or a tbr in the wrong units; VBR, CQP, custom options and AOM keep their behaviour; an option failure fails initialization. A small synthetic encode runs the corrected CBR configuration. Skips (77) without libsvtav1. Rebased from obs-rust#27 onto the cmocka-tests aggregate target. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Selecting CBR for SVT-AV1 could silently configure VBR because OBS passed
its private parameter dictionary to the nonexistent
svtav1_optsAVOption.Use
svtav1-paramsand remove obsoletebias-pctand the redundant,incorrectly scaled
tbr. FFmpeg receives the target bitrate through bit_rate.Apply custom options first, then fill in missing OBS defaults while keeping
explicit user values. For example,
svtav1-params=tune=0now retains CBR andlow-delay prediction;
rc=1:pred-struct=2still explicitly overrides them.If dictionary retrieval, merging, or assignment fails, free partial state,
log the failure, set the localized encoder error, and fail initialization.
The merged
svtav1-paramsstring is now logged after the encoder settingsblock, so a log shows exactly what SVT received next to any SVT error.
References: obsproject/obs-studio#13849
Behavior change: selecting CBR now enables the intended low-delay prediction
instead of the accidental VBR/random-access configuration. SVT disables TPL
in low-delay mode, which can affect quality at the same bitrate. No quality
comparison or guarantee of perfectly flat instantaneous bitrate is claimed.
Because CBR now really applies, custom SVT tuning that needs random-access
prediction or CRF is no longer silently accepted under CBR. With SVT 4.2.0,
svtav1-params=tune=2(SSIM) makes the encoder fail to open ("Tune SSIM onlysupports CRF rate control mode"), and
tune=0(VQ) is forced to PSNR bySVT in low-delay mode. Before, these worked only because CBR was silently
VBR. Users who need such tuning should select VBR or CQP.
Add eight headless cmocka tests covering CBR/VBR/CQP, unrelated custom tuning,
explicit overrides, AOM behavior, error reporting and factory cleanup, and
an eight-frame real SVT encode. The smoke test uses the exact production
dictionary without adding an lp parameter. Existing C tests, public headers,
and exported signatures are unchanged.
Validation:
Both report CBR / 6000 Kbps with low-delay prediction.
configurations ran all eight cases without skips.
Thanks to liying-official for the report and to Jia-ben00 (#13901) and
lnuxe (#13959) for the prior analysis in their closed upstream proposals:
obsproject/obs-studio#13901
obsproject/obs-studio#13959
Prepared with assistance from Codex (GPT-6). Claude Opus reviewed the initial
patch; its feedback is addressed in this revision. Human review is pending.