LIP SYNC PROBLEM

Mark X

New Member
I have one PTZ camera that is connected to a Win 10 lap top via two different signal paths.

The primary signal is via coax SDI to an AVMatrix UC1118 SDI to USB 3.0 converter into a USB capture source. The USB plugs directly into the lap top.

The secondary signal path is video over IP, the PTZ camera and lap top are on the same switch. Input via a media source.

The key feature of this system is that the audio is fed to the camera and encoded by the camera so the audio and video travel TOGETHER via SDI/USB or via IP to the lap top. This was done to avoid lip sync issues.

This system worked well for many years using mostly the SDI path/ USB capture source path.

A few months ago I updated OBS to 30.2.3 in order to add the advanced scene switcher feature. I also added ANYDESK remote desktop access to the laptop at this time.

Ever since this upgrade, I have had a lip sync problem. When I start OBS, the lip is OK but gradually over time, the audio and video drift apart to as much as over 30 seconds apart. I can get it back by stopping and starting a source. The lap top shows very low CPU usage, under 20%. I have tested with both software and hardware encoding. The present log capture is with software encoder, but the same thing happens with hardware encoding. The USB path drifts out of lip sync in a few minutes.

I have a fundamental question about OBS buffering architecture. Since the audio and video arrive together into the PC, via the same USB capture card input, if the buffer were increasing due to whatever reason, would not the video and audio delay increase equally and therefore not create a lip sync problem. Does the lip sync drift problem indicate that there are DIFFERENT buffering paths within OBS for the audio and video. Why would it be designed this way? In order for lip sync to be stable, to two buffer paths have to remain consistent with each other?

The IP path also has the lip sync problem but not as bad. My work around for the last several months is to use the IP signal path and reset the input every 15 minutes or so. But I would prefer to fix this correctly.

I have a low frame rate = 20FPS, thats all I need, for talking heads
My streaming resolution is 720



Any ideas how to solve this problem?

Recent log file https://obsproject.com/logs/CuLOjvBso4Jo9i1d

Thank you.
 
I have one PTZ camera that is connected to a Win 10 lap top via two different signal paths.

The primary signal is via coax SDI to an AVMatrix UC1118 SDI to USB 3.0 converter into a USB capture source. The USB plugs directly into the lap top.

The secondary signal path is video over IP, the PTZ camera and lap top are on the same switch. Input via a media source.

The key feature of this system is that the audio is fed to the camera and encoded by the camera so the audio and video travel TOGETHER via SDI/USB or via IP to the lap top. This was done to avoid lip sync issues.

This system worked well for many years using mostly the SDI path/ USB capture source path.

A few months ago I updated OBS to 30.2.3 in order to add the advanced scene switcher feature. I also added ANYDESK remote desktop access to the laptop at this time.

Ever since this upgrade, I have had a lip sync problem. When I start OBS, the lip is OK but gradually over time, the audio and video drift apart to as much as over 30 seconds apart. I can get it back by stopping and starting a source. The lap top shows very low CPU usage, under 20%. I have tested with both software and hardware encoding. The present log capture is with software encoder, but the same thing happens with hardware encoding. The USB path drifts out of lip sync in a few minutes.

I have a fundamental question about OBS buffering architecture. Since the audio and video arrive together into the PC, via the same USB capture card input, if the buffer were increasing due to whatever reason, would not the video and audio delay increase equally and therefore not create a lip sync problem. Does the lip sync drift problem indicate that there are DIFFERENT buffering paths within OBS for the audio and video. Why would it be designed this way? In order for lip sync to be stable, to two buffer paths have to remain consistent with each other?

The IP path also has the lip sync problem but not as bad. My work around for the last several months is to use the IP signal path and reset the input every 15 minutes or so. But I would prefer to fix this correctly.

I have a low frame rate = 20FPS, thats all I need, for talking heads
My streaming resolution is 720



Any ideas how to solve this problem?

Recent log file https://obsproject.com/logs/CuLOjvBso4Jo9i1d

Thank you.
Can anyone explain how the OBS dynamic buffer system works? How can you maintain lip sync with different dynamic buffers for the sound and video?
 
In the media (stream of the 0 and 1 from the device) all data interleaved. By block of video data follows block of audio data. These blocks named "frames" (no matter if this is audio or video data). There is timestamp linked with given data. Synchronization possible by retrieving timestamps.
Some additional info can be found in this post (devices may not take into account timestamps or may produce inaccurate timestamps):
 
In the media (stream of the 0 and 1 from the device) all data interleaved. By block of video data follows block of audio data. These blocks named "frames" (no matter if this is audio or video data). There is timestamp linked with given data. Synchronization possible by retrieving timestamps.
Some additional info can be found in this post (devices may not take into account timestamps or may produce inaccurate timestamps):
Thank you, I will try the low latency mode and report back.
 
I found a SOLUTION to my lip sync problem! I am using a USB3 capture device to capture both audio and video together via a VIDEO CAPTURE DEVICE.. One would expect this would be the best way to maintain lip sync. However, any slight load on the PC would cause the audio to be delayed more and more with no real limit. THis happen despite the fact that the CPU loading was under 10%. The audio could be minutes out of sync until I reset the source. I used a VIDEO CAPTURE DEVICE type of source which created both a video and audio source. I spent a year trying to get this to work and maintain lip sync. This is what finally resolved the problem. I created an AUDIO CAPTURE DEVICE source attached to the same USB capture device. I then had 2 audio sources available in the audio mixer both from the same capture device. Amazingly, the audio via the Audio capture device remains in sync while the audio via the video capture device drifts out of sync. So I simply disable the audio from the video capture device and use the audio from the audio capture device. I'm happy this is finally resolved!

However, this does not seem to be the expected behavior. Can someone explain why the audio input via the audio capture device which is actually the same usb hardware device remains in sync with the video while the audio captured via the same video source as the video, drifts out of sync. I hope this post can help others with this frustrating problem. Mark
 
Back
Top