Add multitrack video dynamic bitrate support #12097
Open
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.
Description
Dynamic bitrate (or DBR to keep it short), is a beta feature enabled via Settings -> Advanced -> Network -> "Dynamically change bitrate to manage congestion (Beta)" in the OBS GUI. This feature automatically modulates the video bitrate based on network bandwidth to avoid dropping frames. Support for DBR with multitrack video had been disabled in OBS while it was being tested in the TEB (Twitch Enhanced Broadcasting) beta program. This PR adds support for multitrack video dynamic bitrate.
Note that this PR depends on 2 previous PRs, due to a shared common function
HandleIncompatibleSettings()
that requires changes in all 3 PRs:The dependent PRs were merged as of 2025.04.30 and this PR has been rebased against
master
.Motivation and Context
Multitrack video sends several video streams in parallel hence uses more overall bandwidth than sending a single stream. In some cases the streamers' available uplink bandwidth is not adequate for multitrack video, so modulating the bitrate on each stream is needed.
How Has This Been Tested?
Testing of multitrack DBR has been occurring for several months in the TEB beta program. In addition, it has been locally tested with NVIDIA GPUs, AMD GPUs (9070XT and 7800XT), and Intel Arc A770.
NVIDIA GPUs work well with multitrack DBR.
AMD GPUs also showed issues with DBR, however this PR introduces changes that forces IDRs on the appropriate frame without needing to flush or reinitialize the AMF pipeline to solve the issues.
The Intel Arc A770 test revealed an issue:
The failure to reconfigure resulted in all streams ceasing to transmit data and an eventual hang of OBS which needed to be terminated with Task Manager. The multitrack DBR feature checks if the encoder supports reconfiguration (it looks for
OBS_ENCODER_CAP_DYN_BITRATE
. It is possible that Intel Arc GPUs do not support reconfiguration but have the bit set. This requires further investigation and testing.Types of changes
Checklist: