Audio faster than video resulting in gaps

basvg

New Member
Hi,

I am having a problem which I am unable to figure out. Our audio is going slightly faster than the video, which means every couple of minutes it needs to wait for the video to catch up. This causes gaps in the audio of about 21 ms, which then sound like a hiccup.
Audio gap.png


The audio is coming in through a Behringer UMC 202 HD audio capture device. The cameras are connected using Magewell Pro Capture SDI cards.

When I do an audio recording using Audacity, it is fine, so the problem is only in OBS. It happens both in the stream and the recording.
The video stream is the correct speed, when I compare it to recordings made outside of OBS. So the audio is going too fast.

Things I have already tried:
  • Checking and unchecking the "Use device timestamps", no difference
  • Increasing the buffer of the Behringer device
  • Matching the Hz of all audio sources (even though all other audio sources are never active)
  • Updating the Behringer drivers
  • Installing the CoreAudio AAC encoder
  • Checking old recordings, but 2 years ago the same problem was present, even on an earlier version of OBS and a completely different PC (only the Behringer and the Magewell devices are the same)
Log: https://pastebin.com/pzMPckDk

Any suggestions?
 

KUCTech

Member
basvg: Have you tried adjusting the Sync Offset setting in the Audio source definition Advanced Properties?
 

basvg

New Member
basvg: Have you tried adjusting the Sync Offset setting in the Audio source definition Advanced Properties?

The sync offset is set to something like 30 ms to sync with the video. However this does not change the speed, so not effect on the problem.
 

rockbottom

Active Member
It's your set-up, not OBS. I had the same issue with my Z170 with a Asus Xonar Essence STX Soundcard. With my new Z690 I'm running on-board audio & my recordings are perfect. Just finished syncing a FL32/48 recording from Audacity with a 4k recording from OBS, it took minutes.

 

Lawrence_SoCal

Active Member
Is the audio offset consistent, or does it vary? if audio delay (offset) varies during a recording/streaming session, that would indicate to me a CPU processing issue? What does your real-time hardware resource monitoring indicate?
How are you connecting audio.. exactly? USB, analog?
side note- for security reasons, some folks will only look at logs posted here, using the OBS post log directions per the pinned post in this forum (linked in my .sig)

if audio connected over USB, I'd look into USB Root Hub drivers, and if overloading a given Root Hub (say with audio and video)
 

basvg

New Member
It's your set-up, not OBS. I had the same issue with my Z170 with a Asus Xonar Essence STX Soundcard. With my new Z690 I'm running on-board audio & my recordings are perfect. Just finished syncing a FL32/48 recording from Audacity with a 4k recording from OBS, it took minutes.


Thanks! I had not come across that topic before. It sounds very similar to my problem. According to the linked Github issue, it is a OBS problem, with only with certain hardware (somebody had the same problem using the UMC 404HD, so very similar to my 202HD). They are working on a fix, so hoping for the best.


Is the audio offset consistent, or does it vary? if audio delay (offset) varies during a recording/streaming session, that would indicate to me a CPU processing issue? What does your real-time hardware resource monitoring indicate?
How are you connecting audio.. exactly? USB, analog?
side note- for security reasons, some folks will only look at logs posted here, using the OBS post log directions per the pinned post in this forum (linked in my .sig)

if audio connected over USB, I'd look into USB Root Hub drivers, and if overloading a given Root Hub (say with audio and video)

It is not a consistent offset, but a slight difference in speed. So at the start it will be synced up, but then gradually drift more and more apart. After a couple of minutes it will pause the audio for a few ms to sync up again. And then it starts all over again.

Hardware resources are not a problem, typical CPU usage is around 20%, never above 30%.

Audio is connected through UBS, using a Behringer UMC 202HD. Video is coming in through a PCI Express card, so completely separate from the audio.

Regarding your note about security with the logs - that is actually why I uploaded it somewhere else, so I could anonymize it first and be able to delete it again if needed. But thanks for the tip.
 

Lawrence_SoCal

Active Member
Hardware resources are not a problem, typical CPU usage is around 20%, never above 30%.
Is that CPU # via OBS Stats window or via Task Mgr/PerfMon. What is really important to start with is the overall system CPU utilization (which with OBS stats window is NOT reporting)

You can copy/edit the OBS log on your PC, then do the normal log upload of the edited file.
 

basvg

New Member
Is that CPU # via OBS Stats window or via Task Mgr/PerfMon. What is really important to start with is the overall system CPU utilization (which with OBS stats window is NOT reporting)

Both. Overall usage is maybe a few % higher, but never very high. We do not have any other heavy software running.
 

star1uk

New Member
I have a similar problem. I am using PreSonas Studio Live Mixer that's connected to PC via USB. I have a webcam that's also connected to PC via USB which is my video capturing device. I live streamed on Facebook and checked my video and audio were out of sync and the video was kinda freezing! I did not see any dropped frames in OBS.
The audio is faster than the video. I tried the Sync offset option for both video and audio but none worked so far! How to sync both audio and video when live streaming to facebook/YouTube without freezing video?
 
Top