Well, I've got a real doozy of a problem here. I had an mpeg file, with sound and video completely in sync. I then authored it into a VOB file. Then I extracted the sound and video again (I have my reasons, trust me). Having worked with the video, I find that remuxing the sound and video makes the audio out of sync with the video.
Here's the crazy part. I have all the tools to fix it, but I CAN'T! The sound and video are exactly the same length, yet the sync swings from one to the other (at first the sound is delayed, but gradually it takes over and arrives first). I was led to believe this could only be fixed by making the sound/video files the same length, but as they already ARE that way I don't know what to do! Obviously using ac3 delay corrector is useless, as pulling/pushing the sound only corrects part of the file.
Does anybody have any idea what this is, and/or how to fix it??? I'd appreciate any responses.
+ Reply to Thread
Results 1 to 15 of 15
-
-
How did you create the original MPEG file? Audio PTS errors in the original file have been known to cause this type of sync problem.
+ -
I'm sure audio errors are the reason for this, I just wonder if it's possible to fix it. Here is a rundown of what I did, and why:
1) I had a long VOB file that needed converting into several tracks to work with.
2) I demuxed the entire file, and then re-muxed it into one long mpeg2 file.
3) I used an mpeg splitter to extract a chunk of this file. So far, so good.
4) I then wanted to work with the video/audio separately, so I demuxed this new, shorter file (the chunk of the old one) into m2v and mp2.
5) I tried to convert the mp2 into wav format (with headac3he), but found that the file was corrupted. This happened no matter how many times I repeated the above steps - for some reason it was unavoidable, and I don't know why. I used Goldwave to open up the file, and then saved it as a wav file.
6) I then used Nero Wave Editor to work with the file, before using ffmpegui to convert it into AC3 format.
7) I remuxed the new sound with the old video, and found that I needed to use AC3 delay corrector (about -800ms) to sort it out. The mpeg DID work properly at that point - I checked through the whole file.
8) I used TMPGEnc DVD Author to quickly convert it into a VOB file, simply to use its features for trimming the video to the exact section I wanted. I didn't want the hassle of trying to match the sound and video when trimming separately. I know I could have used another program to work with the mpeg2 file, but as they'd all been giving me previous errors, I wanted to try this method (which I find very easy). It worked, no problem, and the resulting VOB file was fine.
9) Now I wanted to work with the video, so I demuxed the VOB file and used TMPGEnc to re-encode the video how I wanted it. This was also successful.
10) I finally remuxed the new video file with the audio, and... BAM! It now was out-of-sync as I described (the delay changing throughout), apparently unfixable due to the sound/video being the same length.
It's crazy, but perhaps the sound file stayed corrupted throughout the process? I would have thought that saving it through Goldwave, opening, editing, and saving with Nero, and then using ffmpegui would ensure that any corruption would be fixed - especially as the first mpeg2 file I created worked okay after I corrected the initial delay.
Any ideas, anyone? Any suggestions for me to do this an easier, more sure way (considering the probable corruption of the mp2 file)? -
I would probably convert the file to avi, do all the
audio edits, then convert back to mpeg.
Not entirely sure, but I think that when you demux, remux mpeg
files, the "padding" is what tends to throw things out of whack. -
Okay, I can certainly try that. Do you mean to convert the initial (large) VOB file to avi, or the first mpeg2 file I created (after editing the sound) that worked okay after I corrected the AC3 delay?
If you mean convert the initial VOB file to avi, I am unaware how to do this - what would I do? -
The solution is actually pretty simple. You need to CHANGE the audio file to a different length than original either longer or shorter. How much out is it?
You need to remove whatever amount of audio at the beginning of the file to get it into sync, then time stretch or shrink the audio to sync properly. For example, I had a project where the audio was 200 ms out of sync at the beginning of the video, but by the end of the video it was synced. Big problem right? No. I time stretched the file to be 200 ms longer, then removed 200 ms off the beginning of the file and had a perfectly synced project. -
Okay... so what you are saying is to remove time at the start of the sound (e.g. 800ms) in order to get the file to START in sync, then check how long the resulting sound file is and stretch THAT to be the same length as the video?
-
Yes that is what I am saying. But it depends. suppose you remove 800 ms from the beginning of the file, but the sound is still say 200 ms ahead by the end of the video. Then you have to time stretch the file -200 ms. BUT you MUST ADD 200 ms to the end of the file AFTER you time stretch it to preserve the exact length of the file, you NEED to have the video and audio file exactly match in time. So in the example above, you can just copy 200 ms from the very end of the audio file and paste it right on the end. Or you can paste 200 ms of silence it does not really matter. I hope I am being clear.
Just think of whatever it takes to get the file in sync, even if that means making the file the wrong length, either too short or too long it does not matter. Once the file is synced then you add or remove a small portion of audio to get it back to the original time. It could be either at the end of the beginning of the file. If U post specific details on what the file needs to be in sync I will tell you how to exactly do it. -
I'm not sure exactly what it needs, because it's difficult to eyeball it and work out the times involved. However, I think I was a little confused earlier. Are you saying that after I cut from the beginning of the file to start it in sync, I then need to work out how much out-of-sync it is by the end of the file and stretch it by THAT amount of time, NOT stretch it to be the same length as the video file? And then I would add silence at the end to make the lengths match at that point.
If so, this will be trickier than I thought, because I'll somehow have to work out the exact amount that the sound goes out-of-sync. Are you aware of any methods to work this out? -
I will post this example, just change the times to what you have and it will work. This is an example only.
File 1:20:000
800 ms audio is slow at beginning
200 ms too fast at the end.
edit file to remove 800 ms from the start of the file. Time warp file to 1:19:800. Add 200 ms of silence to the end of the file.
Result: file is 1:20:000 with perfect sync.
remember, video is expressed in 1/30th of a second, audio usually in 1/1000th of a second.
p.s. I hope this is correct it can be very confusing. -
Are you saying that after I cut from the beginning of the file to start it in sync, I then need to work out how much out-of-sync it is by the end of the file and stretch it by THAT amount of time, NOT stretch it to be the same length as the video file? And then I would add silence at the end to make the lengths match at that point.
-
The method is to cut whatever you need at the beginning to bring it in sync, then play the audio/video file at the very near end and estimate how much the sound is out. That is how you determined how much you need to correct the file. It is not easy and takes practice. Anything over 100 ms looks off but not horrible, 500 ms looks goofy and difficult to tell who is talking, 1000ms and nothing makes sense in relation to mouth movements and gestures.
edit: forget about the length of the file until you have it in sync, THEN correct the final length. If you worry about the length matching the video before you have it synced you will never succeed. -
Silly question here [newbie] but what program do you to shrink and expand the audio?
-
ah thanks that helped my problem. Found that when i converted audio to .wav i lost 1 whole minute of audio for some reason so i just stretched it out by a minute, now just have to deal with a .5 second delay throughought the whole movie somehow.
Similar Threads
-
Are these VHS tapes fixable? youtube sample included.
By kcr in forum RestorationReplies: 11Last Post: 29th Sep 2010, 07:37 -
DVD central ring is cracked - fixable?
By ecc in forum Off topicReplies: 1Last Post: 21st Jul 2009, 22:39 -
Is a U61 Error with Panasonic DVD Recorder Fixable
By wolf01 in forum DVD & Blu-ray RecordersReplies: 1Last Post: 17th Apr 2008, 07:34 -
Audio out of sync on MP4 file. Fixable?
By liverkick in forum Video ConversionReplies: 2Last Post: 26th Feb 2008, 14:01 -
Coloured blocks in movie,fixable?
By demonwarrior in forum Newbie / General discussionsReplies: 6Last Post: 2nd Jul 2007, 01:43