Audio getting out of sync after a while - not in streaming

dparpi

New Member
Hi,
I have a very strange issue with OBS, version 24.0.3. We use it on a local television for web streaming and video output for standard tv. We were using a Blackmagic Decklink Mini Monitor as video output, using the internal OBS plugin, but we were experiencing audio getting out of sync after sometime, please note that the web streaming works totally correct. We tried disabling the Decklink and using the OBS projector function, with a standard external monitor. It seems to work, but now after some hours the issue was the same: audio a bit out of sync but correct in streaming.

Here's the last log file: https://obsproject.com/logs/zpeVYzdOsOrf40lH

There's a solution for that?
Thanks in advance!
 

dparpi

New Member
Hi, there's anyone who can help me? I tried also changing the framerate in OBS and in the software that send video using NDI, it worked for one/two days but then the problem was the same
 

jfarre20

New Member
Exact same issue, exact same setup (mini monitor output to sdi), exact same situation. Are we the same person?
Only solution I've found is to restart obs every few hours.
Desync is on NDI/Decklink/Local Monitor. in the logs you see it adding audio buffering, which I suspect is causing this.
RTMP output and local recording seems to compensate for this, but preview/NDI/Decklink does not.

I've had some success connecting to the stream from VLC and using the decklink output plugin from there to output to the channel injection system, but this adds about 30 sec of latency which we cannot have as we have interactive programming that involves calling in. 30 sec delay would ruin that.

I've compiled and tried this experimental fix, scheduling audio/video on the declink - but it did nothing. https://github.com/obsproject/obs-studio/pull/1865

I suspect this will not be an easy fix.
 
Last edited:

rockbottom

Active Member
Stop using NDI, your network isn't up to the task.....
 

Attachments

  • adding-ndi-to-your-network.pdf
    198.8 KB · Views: 64

jfarre20

New Member
Maybe VLC is my issue as I use a local rtmp server. Maybe I can make a startup script that has FFMPEG connect and then output to the declink that way.

It would be nice if we could force a buffer on both audio/video at the start of the app so things dont drift. I had a special build where I blocked audio buffering from expanding, and it causes static and silence after a bit.

Full 1gbps full path for all my NDI sources. Idling at about 230mbps on my busiest trunk. NDI devices are magewell hdmi to ndi capture cards. Its perfectly fine on the stream, just not local/decklink/ndi output.
 

rockbottom

Active Member
jfarre, my comment was for the OP. You'll need to post a log.

Anyway OP, here's where things go sideways. I think you're just overloading your network by trying to use NDI & OBS starts buffering the audio from your camera. If you do have a Gigabit network, it could just be a bad ethernet cable.

04:00:28.585: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://fr.castr.io/static...
04:00:28.658: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Connection (7) I219-V (ethernet, 100 mbps)
04:00:29.197: [rtmp stream: 'adv_stream'] Connection to rtmp://fr.castr.io/static successful
04:00:29.202: ==== Streaming Start ===============================================
05:01:03.887: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: cam hikvision)
05:01:03.887:
05:16:43.670: adding 116 milliseconds of audio buffering, total audio buffering is now 162 milliseconds (source: cam hikvision)
05:16:43.670:
05:43:50.988: adding 69 milliseconds of audio buffering, total audio buffering is now 232 milliseconds (source: cam hikvision)
05:43:50.988:
06:10:56.353: adding 23 milliseconds of audio buffering, total audio buffering is now 255 milliseconds (source: cam hikvision)
06:10:56.353:
06:15:09.804: adding 23 milliseconds of audio buffering, total audio buffering is now 278 milliseconds (source: cam hikvision)
06:15:09.804:
06:26:27.163: adding 23 milliseconds of audio buffering, total audio buffering is now 301 milliseconds (source: cam hikvision)
06:26:27.163:
06:32:31.241: adding 139 milliseconds of audio buffering, total audio buffering is now 441 milliseconds (source: cam hikvision)
06:32:31.241:
07:16:26.343: adding 69 milliseconds of audio buffering, total audio buffering is now 510 milliseconds (source: cam hikvision)
07:16:26.343:
07:46:19.320: adding 185 milliseconds of audio buffering, total audio buffering is now 696 milliseconds (source: cam hikvision)
07:46:19.320:
08:24:22.149: adding 23 milliseconds of audio buffering, total audio buffering is now 719 milliseconds (source: cam hikvision)
08:24:22.149:
08:24:26.949: adding 208 milliseconds of audio buffering, total audio buffering is now 928 milliseconds (source: cam hikvision)
08:24:26.949:
08:24:27.936: adding 23 milliseconds of audio buffering, total audio buffering is now 952 milliseconds (source: cam hikvision)
08:24:27.936:
08:24:29.268: Max audio buffering reached!
08:24:29.268: adding 92 milliseconds of audio buffering, total audio buffering is now 1044 milliseconds (source: cam hikvision)
 

dparpi

New Member
Hi, thanks to everyone for the replies!

Exact same issue, exact same setup (mini monitor output to sdi), exact same situation. Are we the same person?
I actually think that we are really the same person!

Anyway OP, here's where things go sideways. I think you're just overloading your network by trying to use NDI & OBS starts buffering the audio from your camera.
The thing is that the NDI stream comes from a software in the same computer, and it's the NDI stream that become out of sync after a while... Could it still be a problem?

First change audio to 48kHz, why you use 44,1kHz in TV ?
I'll try this, then maybe I'll try with an RTMP server that actually could solve this, but I don't realize why the streaming is ok and the decklink output or the local monitor isn't right...
 
Top