Bug Report Audio and Video desynched

maravilla

New Member
Hi, I've been testing OBS and found lots of good in it. :mrgreen:
When I record a video file or when streaming, audio and video go out of sync quickly. Enabling the sync fix does little to help, and I noticed it introduces some frame dropping. The fix actually brings sync for a little while, sometimes audio catches back but it doesn't last long. Audio lags behind for a fraction of a second and it's very noticeable.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Could you post your computer specs, or a log file? By "go out of sync quickly", do you mean that it continually goes more and more out of sync, or that it starts out of sync by a specific amount? And how much is it out of sync?
 

maravilla

New Member
Does OBS generate logs?
I'm running a Phenom X3 @ 2.3GHz, 4GB RAM on Win7, encoding 420kbps video and veryfast as CPU preset. CPU usage goes as high as ~70% during streaming. There are no visible frame drops when I disable the Audio synch fix but audio lags behind by much.

do you mean that it continually goes more and more out of sync
It goes out of synch by a varying amount but never much more than maybe half a second. In recorded files it can maybe catch up all of a sudden.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
If you used the installer you can access the logs via a link in your start menu that was added. If not, %AppData%\OBS\logs (logs of obs! wizard of oz!) is what you can type into start/run to get to the logs.

Post a log, if you would so kindly. I need a log to be able to see specifically all the details about your stream and your PC.

Also, you should not be off sync with the sync fix. It's designed specifically so that it doesn't even use your CPU timing.
 

bellenoir

New Member
I have some more info on this, just casted a 2 hour series. According to feedback I got, the audio was ahead by about 2-3 seconds than the video during live cast (and stayed the same the whole time), but in VODs afterwards the audio was less than a second off (I think it was actually behind). You might have to do testing during livestreaming, I guess, I you'd want to confirm it. Did not have the special A/V sync option turned on, stream was software capturing SC2 window.
 

bellenoir

New Member
Might have found the culprit. Once I turned off the "Use Send Buffer" off, my audience reported audio is completely in sync with video. Will do some more testing.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Thank you very much for doing testing. This is very informative. Instead of turning it off, you may just want to turn the send buffer down to a value such as 8192 and see what kind of results you get. I'll do some testing and tweaking and see if I can't improve anything.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Yes, I see now. I looked at the log that was posted, and you're doing a very low bandwidth stream, and the send buffer could cause issues with this. This is an oversight on my part honestly.

The send buffer functionality needs fixing. In fact, I may have to adjust the network system to ensure that packets do not stay queued up for too long and that everything is sent in a timely fashion. When using little bandwidth, or in low-bandwidth scenes, the send buffer can cause issues with data sent, so I'm going to make further improvements to the network system to ensure that all packets are sent out timely, and only buffered when able to.
 

maravilla

New Member
I've also been using send buffer on the highest setting, but I don't think this affects file recording? Was the info above useful?
edit: sorry i hadn't seen your last post. I still wonder if this send buffer problem is related to file recording.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Send buffer is only for the network output, file output is completely separate.

In the next version, I've altered the way data is sent to prevent any sort of latency issues, which should hopefully alleviate any problems that you guys have been having. My changes appear to have no affect on the improved throughput, so that's nice. I've just generally improved the network code further, so we'll see how it goes.

Will try to set up a "daily build" thing where people can use the latest versions if they're willing to use slightly less stable versions with the most up-to-date features.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Set up the daily build thing with some potential fixes for syncing and latency. You should see it at the top of the forum. Try it out again with send buffering on and see if it makes any difference, if you could please.
 

maravilla

New Member
Okay I've tried with 0.4141 and I have to say that it's been a great improvement.
I've only tried recording files and there's practically no out of sync. If there is, it's very rare, lasts too little and is very unnoticeable, like only a tiny fraction of a second.
Thanks and I hope you incorporate these changes in the stable build.

edit: oh and here's the log :D
http://privatepaste.com/27d7a6b3df
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
It will be. As well as fixing the normal timing sync problems, the "sync fix" option will also be a much more viable solution for everyone as well, I greatly improved the code for it so the output is more accurate and less jittery.
 
Top