UI: Disable NVENC lookahead if dynamic bitrate on
Lookahead causes playback issues when bitrate changes mid-stream. Bitrate can suddenly drop to 0, and other issues such as audio stuttering on Twitch have been observed. Turning off lookahead fixed the issue. Lookahead is normally off by default anyway.
This commit is contained in:
parent
70c9688e99
commit
b486cc6f9e
1 changed files with 7 additions and 0 deletions
|
|
@ -1229,6 +1229,10 @@ void AdvancedOutput::UpdateStreamSettings()
|
|||
{
|
||||
bool applyServiceSettings = config_get_bool(main->Config(), "AdvOut",
|
||||
"ApplyServiceSettings");
|
||||
bool dynBitrate =
|
||||
config_get_bool(main->Config(), "Output", "DynamicBitrate");
|
||||
const char *streamEncoder =
|
||||
config_get_string(main->Config(), "AdvOut", "Encoder");
|
||||
|
||||
OBSData settings = GetDataFromJsonFile("streamEncoder.json");
|
||||
ApplyEncoderDefaults(settings, h264Streaming);
|
||||
|
|
@ -1237,6 +1241,9 @@ void AdvancedOutput::UpdateStreamSettings()
|
|||
obs_service_apply_encoder_settings(main->GetService(), settings,
|
||||
nullptr);
|
||||
|
||||
if (dynBitrate && astrcmpi(streamEncoder, "jim_nvenc") == 0)
|
||||
obs_data_set_bool(settings, "lookahead", false);
|
||||
|
||||
video_t *video = obs_get_video();
|
||||
enum video_format format = video_output_get_format(video);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue