I am attempting to convert an mpg video which in any media player I play it in the lips match up.
The minute I try and use VirtualDub-MPEG2 or MeGui to attempt to convert it to a XviD AVI with LAME MP3, it suddenly has audio playing way ahead of the video, to where it's so noticeable no one would probably care to watch it.
+ Reply to Thread
Results 1 to 30 of 93
-
-
My first guess is that there is a audio offset in the original file that your programs aren't transferring when the video is re-encoded. If the sync error is the same the whole playback time, just add a offset with VD. You can use MPC and it's offset slider to determine the needed offset, then add it to the file before re-encoding.
-
Originally Posted by redwudz
I have MPC, but where is this offset slider? The closest I came across is offset in statistics at the bottom.
Wait a minute, MediaInfo is reporting a -579ms VIDEO DELAY, I never heard of a Video Delay, how do I use that in encoding programs? -
I've never heard it expressed as a video delay either. It's usually said to be an audio delay and I assume a video delay is the opposite of an audio delay. That is, if it's a -579 video delay it'll translate as a +579 audio delay. So, delay the audio by 579ms. Not so hard. Does the audio of your AVI play roughly half a second ahead of the video? Adjust the delay in whatever VDub version you use. Or, if the audio is AC3 remove the delay entirely using DelayCut before remuxing it with the video.
-
I have tried that over and over on the original and converted (messed-up video).
Nothing seems to work at all, I've tried numbers in the positive and negative, still the audio is WAY ahead of the video.
Has to be at least 1-3 seconds difference. -
Oh, 1 to 3 seconds. Then that's 1000 to 3000 ms, right? I use Media Player Classic Home Cinema, but it used to work the same way when Media Player Classic was my default player. Play the video and use the + and - keys on the right side of the keyboard to adjust the delay. You'll see the delay briefly to the lower left of the screen. If the audio plays before the video, you want a big positive delay. Once you get it right, make it permanent in VDub.
-
You can set the audio skew in VirtualDubMPEG2 in the Audio -> Interleaving dialog.
-
Thanks again everyone.
Though, I have tried the said solution over and over again and put the sync in both negative and positive with MPC.
Nothing.
Here is a sample of how bad the sync is.
http://adam.250free.com/sample.avi
It's a clip of an insurance commercial, and you actually hear the people before they even get on the screen and are still on the screen when they stopped talking. -
You've got roughly a +4300ms delay in that sample. Nothing so hard about that. Now follow the instructions you were given about how to make it permanent.
You couldn't even tell if it was positive or negative? -
Originally Posted by manono
I swear I was trying numbers around 4300 and still things were not looking right.
I guess I have to have more patience and test more when I am doing these kinds of things.
EDIT: Now that I think of it, I guess I was not trying high enough numbers. I think I went up to 3000 or so, but didn't realize I was honing in.
Why do videos get these high of delays anyway? I mean the original video had like -500 or so delay to begin with.
EDIT: I seen the A/V sync in MPC after using 4300, I then put that in to VirtualDub to the original final and even tried the bad A/V sync converted file, it seems according to testing and MediaInfo that VirtualDub must not be applying the 4300 skew after I put it right in Audio - Interleaving. -
Oh no, I found the source of my problems.
It looks like it must not be the same delay for every part of the video.
One part of the video I can use 3660 and the A/V be fine but I can fast forward and the A/V sync be bad again.
Yes on a 22 minute AVI, 3660 works perfectly then suddenly around the last 5 minutes, no A/V sync again.
How do I fix something like this?
I tested my theory some more and it seems every time I set a delay in MPC for one section, it doesn't work in another section.
I don't understand, I can record Analog Cable fine, yet this is recordings of ClearQAM which seem to be harder to convert. -
A lot of software doesn't deal well with transport streams. Try using a newer version of VirtualDub with an MPEG source plugin. Or try using DgMpgDec.
If you still can't get the audio and video lengths to match you'll have stretch of squish the audio. Many audio editors have such functions. Try Audacity. -
I figured out somewhat what is going on.
If I use WinTV6 to record analog cable, I get MPEG-PSes with NO video delay and VirtualDub has ZERO issues with converting.
Yet the minute I record ClearQAM which I have been doing, suddenly every MPEG-PS comes with a video delay of at least -500ms and suddenly VirtualDub or MeGUI does not want to convert them.
I tried audio skews but it seems like what fixes one part of the video screws up another.
Is there any way possible to take out the video delay then attempt to XviD/MP3? -
If the sync error changes as you play the video, then it's likely the video and audio are different lengths. You could also have a offset sync error combined with that, which will make it more complicated.
Check the length of the audio and video files to see if they are the same. You can adjust the audio length, as mentioned, in Audacity.
-
Originally Posted by RedPenguin
Originally Posted by RedPenguin -
It appears that there is a 9 sec duration difference, the video being the longer one.
I tried extending the audio 9 seconds with the time shift tool and nothing was fixed in VirtualDub.
Did I use the wrong method to change the audio duration? -
The time shift tool doesn't extend the audio duration. What it does do is change the starting point of the audio but either adding silence at the start to make it start later, or cutting some of to make it start earlier.
My preference is to use Media Player Classic to find the exact delay amount, then use AVI Demux to shift the audio.Read my blog here.
-
Originally Posted by guns1inger
-
Originally Posted by RedPenguin
or
Effect -> Change Speed (changes duration and pitch)
I wouldn't trust what any program tells you about the length of the audio and video. I would calculate the difference manually: determine how far off the A/V sync is at the beginning of the file, how far off it is at the end, then calculate a percentage change based on that.
It seems odd to me that your broadcast MPEG streams would have different audio and video durations. Maybe there's something wrong with your MPEG decoder -- like it's ignoring null frames. I would try using DgIndex and Mpeg2Source() from the DgMpgDec package. -
Originally Posted by jagabo
I still don't understand what's going on.
I am having the same issues trying to convert some MOV files to AVI, A/V sync.
It seems like every video I have will not sync to AVI. I used to convert like crazy with no issues, must have done at least 30-50 videos no issues. -
Originally Posted by jagabo
At this rate it's going to take me 20 years to convert every video and I record a new video every day, except Saturday. -
Originally Posted by jagabo
-
Originally Posted by RedPenguin
I have been trying to convert on both a Vista and XP Home machine to make sure one machine's codecs are not screwed up.
Nothing at all wants to work.
I may just have to stick with MPG at a much larger size instead of having AVIs.
Could I perhaps just convert to MPG of a lower quality, to make life any easier? -
Your problem isn't with VirtualDub, it's dealing with the source. So any other software is likely to have similar sync issues.
If you want to upload a moderate sized sample somewhere I'll take a look at it.
Similar Threads
-
Convert MPG (ts?) to mp4 (or anything) and stay sync'd
By hornetster in forum Video ConversionReplies: 30Last Post: 25th Jan 2012, 00:28 -
An app to visually sync audio to video similar to Subtitle Edit visual sync
By cinesimon in forum AudioReplies: 3Last Post: 6th Sep 2011, 07:54 -
mpg video conversion out of sync
By pettinej in forum Video ConversionReplies: 2Last Post: 14th Oct 2008, 20:49 -
Conversion to MPG puts video out of sync
By ral315 in forum Video ConversionReplies: 5Last Post: 5th Aug 2007, 19:18 -
converting an MPG file that has sync issues
By sepultura in forum Video ConversionReplies: 0Last Post: 13th May 2007, 17:54