Bug Report Buffering remains enabled for capture device's audio even after disabling buffering

alraz

New Member
Logs:
https://gist.github.com/anonymous/7c968c3b901e6625e2958fbbeea53d4e


Hi

I think I've found the root cause of a problem that I've been dealing with for quite a long time. I believe it is due to a bug that causes buffering to remain enabled for audio while being disabled for video, but I will explain the whole situation and let you decide that :)

The problem:
If buffering is disabled on my capture device (Blackmagic design Decklink), and I record for very long times, the audio from the capture device progressively lags behind the video.

Take a look at this example video:

Notice how from 00:55 to 1:42, the audio and video are in perfect sync. However, the sound gets very slowly, but very steadily out of sync with the video. By the time you get to 1:58:00 (almost 2 hours), you'll notice that the sound from the game is about 2 or 3 seconds behind the video.

While it is not done on the sample video, if I add a microphone source, that microphone and the video remain in sync.

If I enable buffering on the capture device, the game's audio and video remain in perfect sync even for very long periods of recording; but the additional microphone will be out of sync: the mic source will be getting progressively ahead of the game. That's why I believe this is a problem related to buffering (maybe exclusive to blackmagic devices?)

Things that I've tried:
-OBS classic does NOT have this problem.
-Adding either "Video capture device" and "blackmagic device". The issue still occurs.
-Mute the capture device's audio and adding a "audio input capture" source with the capture device's audio device. The issue still occurs.
-Redirecting the audio from the capture device to an output device and adding an "audio output capture" on that output device. The issue still occurs.
-Played with all sorts of default vs custom configurations of the encoding plugin (AMD AMF). Nothing seemed to make any diference.
-Tried different versions from 18 up to 20. The issue still occurs.
-Increasing or reducing resolution doesn't seem to have any effect.
-41Khz and 48Khz in audio settings both cause the issue.
-Added different audio and video filters to the capture device, none made any difference
-I don't recall if I tried the h.264 codec alone, I could give it a go if that helps
 
Last edited:
Did you test with a different encoder? Not sure why you'd use AMF in that system and I'm curious if x264 has the same issue.
 
Did you test with a different encoder? Not sure why you'd use AMF in that system and I'm curious if x264 has the same issue.

I just did another test to be completely sure: the issue happens with x264 too :(
Here is the log file:
https://gist.github.com/d18d4dd604b7f77a7212aa4194b87591

Also, I was looking through the code and noticed that the SDK used for blackmagic devices is 10.8.0, which is almost a year old:
https://github.com/jp9000/obs-studio/tree/94b6943f27d45fb0b0dd2e1a7167c7ca987c3543/plugins/decklink

The newest version available from Blackmagic's website is 10.9.5, posted on Jul 20th. So... could it be that this particular version has a bug?
 
So, I tried installing the driver version 10.8, but seems like support for my particular capture card was added in the 10.9 series of the driver because with anything older than that, the blackmagic control panel won't recognize the card.

Is it possible to update the SDK in OBS to the newest version?
 
Back
Top