Audio sync issue with BlackMagic capture cards in Win 10 21H1

pada

New Member
Hi,

Lately I've been having issues with OBS (both 26.1.1 & 27.0.1) where my audio and video is out of sync, and I suspect that it might have to do with Windows updates that came out in the last 3 months or so.
The reason why I suspect Windows updates is that I used to be able to use OBS to activate my BlackMagic capture card and then record the Audio separately in Audacity, but then after a Windows update the audio recording in Audacity suddenly became very glitchy as if the PC is no longer fast enough. The same audio glitches can be heard if I go to the Blackmagic Line input in Windows sound settings and activate "Listen to this device" instead of using Audacity.

Both my streaming PCs are having the audio delay issue and the amount of delay between the audio and video also seem to vary between different recording sessions. The delay might even change during the actual recording, but I have not had a chance yet to do a long video recording where I loop photojoseph's video sync tests to check the sync at the start & finish.

I have attached a diagram of my whole streaming setup, where I am delaying my audio from my LS9 sounddesk going to the ATEM Production Studio 4K by 50ms so that the embedded audio & video is in sync that comes out of the ATEM.

PC1 (obs log file attached):
  • Windows 10 2H1, OBS 27.0.1 (running as Admin), BlackMagic Desktop Video 12.1 driver
  • i5 7400 @ 3GHz, 8GB RAM, GTX1050 2GB
  • Blackmagic Device input source: Intensity Shuttle USB 3 (Input: HDMI, Audio: embedded, 1080i50, 8-bit YUV, Rec 709, Color Range: Partial, No buffering)
  • 1080i50 -> 1080p25 (Yadif deinterlacing)
  • Filters: OBS compressor, LoudMax64 VST 2 plugin, Apply LUT
  • Using NVENC H.264 (new) on High Quality
PC2:
  • Windows 10 2H1, OBS 27.0.1 (running as Admin), BlackMagic Desktop Video 12.1 driver
  • i7 920 @ 3.2GHz, 10GB RAM, GTX460 1GB
  • Blackmagic Device input source: Mini Recorder 4K (Input: SDI, Audio: embedded, 1080i50, 8-bit YUV, Rec 709, Color Range: Partial, No buffering)
  • Scaling down 1080i50 with Lanczos filter -> 720p25 (Yadif deinterlacing)
  • Filters: OBS compressor, LoudMax64 VST 2 plugin, Apply LUT
  • Using x264 CPU encoder on Medium
When I close OBS and record a video with the Blackmagic Media Express app, then the audio & video is in sync every time.

Lastly, I am not sure if this user is perhaps experiencing the same kind of issue: https://obsproject.com/forum/threads/audio-problem-with-blackmagic-video-capture-device.147628/

I suppose my next step might be to install an older version of Windows 10, such as 20H2 from before May 2021 and see if I can then record the audio just fine in Audacity and whether the audio & video would then be in sync too.
If it turns out to be due to a Windows update, what should my next steps be then? Report this as a bug on github for OBS?

Thank you in advance
 

Attachments

  • 2021-09-01 21-47-11.txt
    7.1 KB · Views: 12
  • Streaming Setup.png
    Streaming Setup.png
    257.2 KB · Views: 44

pada

New Member
I've installed a Nov 2020 copy of Windows 10 Pro and I still had the same stuttering audio issue (with Desktop Video 12.1 & OBS 27.0.1)
I then tried older BlackMagic Desktop Video 11.7 drivers and also OBS 25 and neither of those things fixed the issue.

I reckon my next step is to try some really old BlackMagic drivers (and possibly roll back the firmware version too) like the 10.11.4 and OBS 26.0.2 like this person used: https://obsproject.com/forum/thread...doesnt-work-on-obs-26-1-0.135528/#post-497995
 

pada

New Member
I still have not identified the real cause, however this past weekend I did a stream from a different PC in another location, again with a Blackmagic capture card (Declink SDI 4K) on Windows 10 with OBS 27, and this time round the audio was ahead by like 330ms.

Would the below log line in the OBS log explain why the audio was ahead of the video by that amount of approximately 330ms (which is what I had to delay the audio with on the receiving end of the Youtube video stream):
06:37:33.142: adding 320 milliseconds of audio buffering, total audio buffering is now 320 milliseconds (source: Blackmagic Device)

Is there someone that could explain why this is happening and how to address it?
 

Attachments

  • 2021-09-05 06-37-12.txt
    14.1 KB · Views: 7

konsolenritter

Active Member
Hi there.
Although you provided a really good lot of information it's still difficult to say something specific.
For instance in your logs we can't see at which audio rate your blackmagic device will be initialized and recording audio. Is it 48k then? The same for your monitoring device (onboard sound?).

Are all set in windows to default for 48k, too? Proof that all "windows sound enhancement/optimisation" is strictly turned off. Maybe some update switched something on again.

The buffer seen of 320ms just says that the capturing thread was delayed before, triggering OBS' building up more buffer to prevent underruns thereafter. That fits to the measurement that your obs-audio-thread maxed out at nearby 60ms (which is quiet long for the audio thread) and the graphics thread by display-rendering(!) maxes out by 850 ms once. Something is seriously delaying things (at least for a single moment).
 

pada

New Member
Hi @konsolenritter ,

Thank you very much for the feedback.

I can't specify the audio sample rate in OBS for the Blackmagic capture devices, however OBS is set to 48kHz in Settings > Audio.

The Global Audio devices are all disabled under Settings > Audio. The monitoring device is set to the onboard Realtek Audio, however I'm not actually making use of the onboard Audio, since the Blackmagic Device's Audio source in OBS is set to "Monitor Off".

In terms of Windows audio enhancements, I could only see "Enable audio enhancements" for the onboard Realtek Audio's "Speakers" output, which was enabled. I've now disabled it, restarted the PC and I did not notice any difference.
 

konsolenritter

Active Member
So if you can't specify or change something within OBS, you should check the sound settings in windows. There you can change the available/default samplerate for your audio device, even for your onboard realtek audio.

Disabling the "audio enhancements" is anyway a good step forward. You shouldn't expect one single step to solve all your problems at once. :)
 

pada

New Member
I'll see if I can log a bug via Discord for OBS, because I'm now at the point where my only option is to try paid streaming software, since I've tried virtually everything except that.
 
Top