Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Video errors causing out-of-sync audio (Read 5069 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Video errors causing out-of-sync audio

I've got this large (1.8 GB) mpeg file with MPEG-2 video and mp3 audio that I'm trying to transcode down to a DivX avi.  The problem is that there are video errors at some places, where VirtualDubMod wont open it directly but it can open it via avisynth.  I compressed it using DivX 5.2.1.  I extracted the mp3 audio using DVD2AVI and noted the delay, then muxing it in to create my 350 MB avi file.

Anyway, the audio is in sync for the 5 minutes but after that, it starts to get more and more out of sync with the video.  A friend of mine said that because there were video errors, some frames got dropped but the audio is still there, hence it gets out of sync.

Can anyone think of a way of solving this problem? 

On another note, when DVD2AVI extracted the mp3, the filename has the words "DELAY -472ms".  So in VirtualDubMod, in the Interleave option, am I supposed to put in -472 ms or 472 ms?

Video errors causing out-of-sync audio

Reply #1
Maybe you could try mplayer/mencoder. I find that they are way more tolerant to these kind of errors. Try to play your mpeg file with mplayer. If it plays with no sync issues, mencoder will do the transcoding job fine.

 

Video errors causing out-of-sync audio

Reply #2
Quote
I've got this large (1.8 GB) mpeg file with MPEG-2 video and mp3 audio that I'm trying to transcode down to a DivX avi.  The problem is that there are video errors at some places, where VirtualDubMod wont open it directly but it can open it via avisynth.  I compressed it using DivX 5.2.1.  I extracted the mp3 audio using DVD2AVI and noted the delay, then muxing it in to create my 350 MB avi file.

Anyway, the audio is in sync for the 5 minutes but after that, it starts to get more and more out of sync with the video.  A friend of mine said that because there were video errors, some frames got dropped but the audio is still there, hence it gets out of sync.

Can anyone think of a way of solving this problem?  

On another note, when DVD2AVI extracted the mp3, the filename has the words "DELAY -472ms".  So in VirtualDubMod, in the Interleave option, am I supposed to put in -472 ms or 472 ms?
[a href="index.php?act=findpost&pid=261133"][{POST_SNAPBACK}][/a]


Mp3 Audio with an Mpeg 2 video stream? How was it packed? Thats unusual to say the least. With regards to the audio delay, follow exactly the number. So for this "DELAY -472ms" type in -472.

There is an option inside VDubMod that you could give a try and see what happens, under frame rate 'change so video and audio durations match'. But of course, this will only have an effect if the video and audio durations are different.

Video errors causing out-of-sync audio

Reply #3
Quote
Mp3 Audio with an Mpeg 2 video stream? How was it packed? Thats unusual to say the least.


Oops, sorry.  I mean MPEG-1, layer 2 audio, not layer 3. 

Quote
There is an option inside VDubMod that you could give a try and see what happens, under frame rate 'change so video and audio durations match'. But of course, this will only have an effect if the video and audio durations are different.
[a href="index.php?act=findpost&pid=261187"][{POST_SNAPBACK}][/a]


I tried using that and it set the frame rate to 25.017 fps.  However, it didnt fix it.  What I've done is delay the audio so that it is in sync for about 80% of the file, so the first 20% will be about 0.5 seconds out of sync.  I guess that's the best compromise for now.

Video errors causing out-of-sync audio

Reply #4
Quote
I've done is delay the audio so that it is in sync for about 80% of the file, so the first 20% will be about 0.5 seconds out of sync.  I guess that's the best compromise for now.
[a href="index.php?act=findpost&pid=261298"][{POST_SNAPBACK}][/a]

Hmm, had a thought here. Is there a certain point if you watch the video with the audio synced properly from the start, that you really noticed it desyncs? Could possibly be a few scenes missing also, or a black screen? It almost sounds like someone joined two different mpeg video/audio streams but didnt correct the audio for the second part.

Just a thought, could be way off tho.

Video errors causing out-of-sync audio

Reply #5
The video was created by piping the stream from a tv capture card.  I'm not sure why there were so many errors created though I assume at such a high bitrate, the hard drive was having trouble keeping up?  But as I was watching the transcode video, it starts off out of sync, then a few error blocks, then towards the middle audio starts going into sync, then a few error blocks, and its out of sync again.  So it does appear to be the video errors causing this.

I played it in mplayer and it worked fine.  So perhaps I should look at using mencoder.  But the CLI scares me a bit. 

Video errors causing out-of-sync audio

Reply #6
I had very similar problem, except that I wasn't going to transcode the whole thing, but audio only (in fact I just wanted to convert stereo with 1 used channel to mono or to stereo with 2 the same channels). After demuxing & converting & muxing-back the audio, with time it got more and more out of sync with video, like it's frequency got few Hz lower or higher (can't remember) than before that processing. I tried many ways of making it how it should be, but I ended up with the ugly one - transcoding the whole thing (instead of audio only) with TMPGEnc. For some reason TMPGEnc was able to keep it synced then. So as a last resort you could try to transcode MPG to MPG with TMPGEnc (which should fix the errors), and then the resulting MPG transcode to AVI. I know it's an ugly way, but if nothing else will work...