mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Add new nvenc options to legacy ffmpeg path
This commit is contained in:
@@ -638,6 +638,7 @@ namespace video {
|
||||
{ "tune"s, NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY },
|
||||
{ "rc"s, NV_ENC_PARAMS_RC_CBR },
|
||||
{ "multipass"s, &config::video.nv_legacy.multipass },
|
||||
{ "aq"s, &config::video.nv_legacy.aq },
|
||||
},
|
||||
// SDR-specific options
|
||||
{},
|
||||
@@ -658,6 +659,7 @@ namespace video {
|
||||
{ "tune"s, NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY },
|
||||
{ "rc"s, NV_ENC_PARAMS_RC_CBR },
|
||||
{ "multipass"s, &config::video.nv_legacy.multipass },
|
||||
{ "aq"s, &config::video.nv_legacy.aq },
|
||||
},
|
||||
// SDR-specific options
|
||||
{
|
||||
@@ -681,6 +683,7 @@ namespace video {
|
||||
{ "rc"s, NV_ENC_PARAMS_RC_CBR },
|
||||
{ "coder"s, &config::video.nv_legacy.h264_coder },
|
||||
{ "multipass"s, &config::video.nv_legacy.multipass },
|
||||
{ "aq"s, &config::video.nv_legacy.aq },
|
||||
},
|
||||
// SDR-specific options
|
||||
{
|
||||
@@ -1698,6 +1701,12 @@ namespace video {
|
||||
}
|
||||
else {
|
||||
ctx->rc_buffer_size = bitrate / config.framerate;
|
||||
|
||||
#ifndef __APPLE__
|
||||
if (encoder.name == "nvenc" && config::video.nv_legacy.vbv_percentage_increase > 0) {
|
||||
ctx->rc_buffer_size += ctx->rc_buffer_size * config::video.nv_legacy.vbv_percentage_increase / 100;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user