Understanding audio syncing

Notinasnaid

New Member
Thanks for any insight. Not entirely sure this is the right place to post. I'm working to understand and fix a strange issue with audio syncing in OBS output. I have an audio source that needs a sync offset of +250ms applied to produce a synchronised recording. OBS does this, the resulting MP4 looks fine in QuickTime Player, it looks fine in Premiere Pro, frame by frame. But it does NOT look fine in the Windows 10 default movie player, called (I think) "Films & TV". It is as if Films & TV is ignoring the sync offset. (If the video is resaved from Premiere Pro without adjusting the timeline, Films & TV shows them in sync.) Since I cannot control the video player used by the recipient, I wish to make this problem go away with as little per-video work as possible. So here are my questions:
1. Is it the case that video is synchronised to audio by OBS adding some kind of marker, which some faulty video viewers might ignore? Rather than, say, by delaying the writing of one of the audio/video streams so they arrive in sync (if this is even a meaningful concept)?
2. If so, what is the terminology for this (so I can research more).
3. If this is a well understood problem, is there an option in OBS to write videos without this feature? Or some simple way to reprocess each video as it is output to sort out the synchronisation?
4. Or have I guessed completely wrong about why I am seeing out of sync video in Films & TV, that resaving, unedited, in Premiere Pro sorts out?
 

Notinasnaid

New Member
Well, here is an update in case anyone finds the same problem, after much digging in video files and wild guessing.
Almost any kind of video editor fixed it (fixed = "Films & TV" did not show a sync problem). But I didn't want to have to do anything manual (generating a lot of clips).
This discovery used ffmpeg to rebuild the file. It does not decode the audio or video, just takes it out and rebuilds it with 1 second added to all the timestamps (yes, 1 second added to both audio and video). So it is quick and lossless (as far as I know).
ffmpeg -itsoffset 1.0 -i "$in" -itsoffset 1.0 -i "$in" -vcodec copy -acodec copy -map 0:0 -map 1:1 "$out"
I have a nagging feeling that, if I understood how OBS used ffmpeg options, then I could cause it to write the file this way in the first place, but I am happy now...
 

nottooloud

Member
Thanks for bringing back an answer yourself. Have you tried writing in a different format, like MKV or MOV? Or a different encoder?
 
Top