SHA256
Fix NVENC Falling Back To VBR In CBR Mode
This commit is contained in:
1 file changed
+8
@@ -1080,6 +1080,14 @@ namespace ADOFAIRenderer.Util.FFmpeg
|
||||
{
|
||||
TrySetOption("x265-params", "hrd=1:strict-cbr=1");
|
||||
}
|
||||
// NVENC: without "rc", nvenc_setup_rate_control selects CONSTQP when "qp" is set and VBR otherwise;
|
||||
// bit_rate and rc_max_rate being equal does not select CBR. "rc=cbr" selects NV_ENC_PARAMS_RC_CBR.
|
||||
// Reference: https://github.com/FFmpeg/FFmpeg/blob/release/8.0/libavcodec/nvenc.c (nvenc_setup_rate_control),
|
||||
// https://github.com/FFmpeg/FFmpeg/blob/release/8.0/libavcodec/nvenc_h264.c ("rc" option, "cbr" constant)
|
||||
else if (encoder.Kind == EncoderKind.NVENC)
|
||||
{
|
||||
TrySetOption("rc", "cbr");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in new issue
Block a user