Issue: Dynamic Audio Buffering Causing Video to Stutter and Fix

I just happen to find this in another forum. I don't know why it happens, but if the Audio Channel is set to Stereo alone (by default), then there is a maximum of 960 milliseconds of audio buffering and is dynamically being applied. After about 10 minutes or sometimes before that, the maximum buffer would be reached and video would start stuttering. Then it goes away only to return often.

I set my Audio Channel to 2.1 and enabled Low Latency Audio Buffering mode. This changed the audio to a fixed buffer of 21 milliseconds. I'll assume that it is using some of NDI's programming, however, this resolved the constant video stuttering. For a live Youtube stream, I had no issues in the video, so this Low Latency Mode helped.

The first log shows this dynamic audio buffering as I had the Low Latency option unchecked and Audio Channel set to Stereo. The second log reflects the fix in this picture and its not because I have Surround Sound enabled. I tested this on numerous audio hardware, so I want to share a fix.

1794766071835.png
 

Attachments

There is no evidence in the log that the max buffering was reached. Also, the session is less than the mentioned 10 minutes. Maybe wrong log was posted?

About overall setup.
Generally, it is not recommended to keep the devices selection at "Default", because newly connected devices may replace the current set of the global audio sources and mess up the mix.
Example:
Code:
21:15:23.869: Device for 'Audio Output Capture' source Desktop Audio is also used for audio monitoring.
...
21:15:23.869: [Loaded global audio device]: 'Desktop Audio'
...
21:15:23.874: WASAPI: Device ... failed to start (source: Audio Output Capture 2)
...
21:15:23.876: ------------------------------------------------
21:15:23.876: Loaded scenes:
21:15:23.876: - scene 'Scene 2':
21:15:23.876:     - source: 'Display Capture' (monitor_capture)
21:15:23.876:     - source: 'Audio Output Capture 2' (wasapi_output_capture)
21:15:23.876: ------------------------------------------------
...
21:15:24.000: WASAPI: Device 'Headphone (Realtek(R) Audio)' [48000 Hz] initialized (source: Desktop Audio)
...
21:15:38.896: WASAPI: Device 'Headphone (Realtek(R) Audio)' Terminated
21:15:38.909: WASAPI: Device '' Terminated
...
from this sequence of events I can assume that the "Audio Output Capture 2" never started to produce any useful samples. Instead, the headphones device was plugged-in and, thus, it substituted the one that was set for the global "Audio Output Capture" (from the screenshot - it was set at "Default" too, and named "Desktop Audio"). So, the "Audio Output Capture 2" - in this setup is useless, while the global "Desktop Audio" ("Audio Output Capture") changes in run.
 
This is how "max buffering" looks like in the log (example taken from the https://obsproject.com/forum/threads/unable-to-start-streaming.196800/ ):
Code:
18:27:29.141: Max audio buffering reached!
18:27:29.141: adding 917 milliseconds of audio buffering, total audio buffering is now 960 milliseconds (source: Desktop Audio)
Yea and I don't know why that should happen in the first place, but its making video tank and the encoder will try to restart very quickly, then it will fill up again. The capture pipeline is getting messed up because of this. I have the Realtek Audio, but its running the NVIDIA HD Audio as well. Not sure if its the plugin or the actual device.
 
I think, that the main idea behind the NVIDIA HD Audio was the pas-through to the display device (TV-set or monitor with a built-in speakers) to connect your PC with only one video cable (no audio cable needed). At least, for HDMI cables it was possible back in the days (in comparison to the D-sub VGA cables). Do you really using the "NVIDIA HD Audio" device in your setup (just wondering)?
 
Back
Top