obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
59.52k stars 7.88k forks source link

Glitching/distorted audio on DeckLink Quad 2 output #10731

Open pbelbin opened 4 months ago

pbelbin commented 4 months ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

30.1.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/tLPaxbIJtyP72JJa

OBS Studio Crash Log URL

No response

Expected Behavior

Audio should not glitch when playout is happening of video content

Current Behavior

Audio output exhibits seemingly random glitching / dropouts.

Steps to Reproduce

Windows claims the system audio is set to 48K sampling, as is OBS.

The OBS Settings -> Audio -> Advanced section has not got the low latency mode enabled, although I have tried it, and it appears to make no difference.

  1. Configure BMD Desktop Video outputs on the DeckLink Quad 2 to output with the following options

    • video standard: 1080p60
    • video playback: display black when not playing
    • during capture: video output displays playback video
    • color space: video is converted to y, cb, cr 4:2:2
    • 3g-sdi formats: output as smpte level A
    • 1080p HD and 2K: are output as 1080p progressive
  2. Open OBS Project

  3. Use the 'Tools -> DeckLink Output' and set the:

    • output device to the appropriate decklink output
    • mode to 1080p60
    • keyer to external
  4. Create a scene that plays out a video.

  5. Cut the scene into program and monitor the output audio

  6. After a while, observe that audio glitching is happening on a video downloaded from YouTube

If I play out the exact same video clip using CasparCG 2.4.0, the audio is not a problem. Sounds fine.

I have a BlackMagic WebPresenter 4K, and, observing the outputs from both OBS and CasparCG, I notice that the number of bits being used for audio are different between the two, with the OBS audio using fewer bits - ie: the first 8 bits seemingly being always showing 'L', while the CasparCG output shows only the first 4 bits constantly being 'L'.

Image of audio section of BMD WebPresenter 4K for the OBS audio:

IMG_20240525_131456575_HDR

Image of the audio section of BMD WebPresenter 4K for the CasparCG audio:

IMG_20240525_135724330_HDR

I don't know if that's the entirety of the issue or not, but, the OBS audio issue does come and go. It's not always distorted.

Here is a sample of the resulting audio:

distorted audio.zip

IF the audio is played out on the local computer monitor, it sounds just fine.

I also tried using Handbrake to re-encode the audio to use FLAC-16 at 48KHZ, but the result was the same.

So, perhaps this is not just about audio bit depth, but something else, like dropping audio data somewhere along the way.

Very strange. The issue persists.

Anything else we should know?

No response

CyBeRoni commented 4 months ago

I have had this same issue, I believe. The audio has very frequent, very short dropouts when it happens:

image

This screenshot is from a recording where I played a file using a media source (48KHz audio in the file, OBS also set to 48KHz) and output that scene through the decklink output (using the filter plug-in, though this happens also with the default output) and looped that output back over SDI and captured that input, while also recording the source audio directly to a second track. So the top track in the screenshot is the looped-back decklink output while the bottom track is the direct output of the media source in OBS's recording. (Obviously I set this loop up specifically to test this -- the problem also occurred with the signal sent elsewhere.)

Stopping and re-starting the output temporarily (for a few minutes) solves the problem.

It did not seem to happen to me when I swapped the media source's source file out for one with 44.1KHz audio, but this could be a coincidence as it doesn't always happen in general.

As for the CasparCG note: CasparCG outputs 32-bit audio while OBS outputs 16-bit audio.

pbelbin commented 4 months ago

Thank you for the confirmation and visual on what's happening @CyBeRoni

One other thing that's rather curious is that in both the outputs from CasparCG and OBS, neither of them seem to be setting the DeckLink configuration so that they report correctly the frequency, and 'Ch Status CRC' reports 'error'.

However, if I connect the output from an ATEM switcher into the WebPresenter's inputs, it correctly shows the frequency as 48kHz and the error status changes to being ok. So it seems there's something being omitted in configuring the DeckLink I'd guess.

No idea if that's related to the dropouts or not, but, it IS a bit concerning.

chakphanu commented 1 month ago

when video standard mismatch, audio output from sdi is bad.

QuestAndChaos commented 1 month ago

I am using a Decklink Quad 2. i have this audio issue on output 8. however, on output 7, i do not have this issue. I also had this issue in vMix with a similar setup. 8 had crackling, 7 was clean.