I tried searching the how to's about this but couldn't find any real information about converting mpeg to avi. It's easy to find tons of info going the other way though.
Currently I am trying to convert mpeg to avi using virtualdub. For audio I convert to Lame MP3 at 96kBits/s, 32,000Hz, Stereo. For video I usally use divx or xvid at about 700kbps.
Now after I've set everything I save the avi file and it begins the conversion. Sometimes this works great, but quite often it causes serious syncing issues. The futhur into the video file you get the more out of sync the sound is.
I've tried using diffrent settings for both audio and video but on files that give me these errors it just doesn't seem to help. I've even tried doing the conversions in Dr.Divx and it produces the same syncing errors.
Also, just to be clear the original mpeg files play just fine and are perfectly insync before the conversion.
+ Reply to Thread
Results 1 to 14 of 14
-
-
Try converting the audio to something similar to the source format - probably 44,100 or 48000 Hz and at least 128Kbs.
Remux the audio and video with AviMux. Cross your fingers. -
From VirtualDubMpeg save the audio as a WAV file (File -> Save WAV). Then use that WAV file as the audio source (Audio -> WAV Audio).
-
I can try converting to something closer to the source format.
However, just as a note, I have tried just saving the wav and using that before. Immediatly after I save the wav file (unconverted) its length changes and for a 40 minute of audio it usually will make a 400 meg wav file. Although the video file it comes from to begin with is usually about 400 megs itself. It's as though it saves it uncompressed. It seems that basicly anything I do to the audio (even if left untouched ruins the syncing with the video) -
Originally Posted by CocodaMonkey
-
Oh I wasn't worried about the size. I was just trying to give all the information.
I have now tried converting to other formats but the audio is still messed up. The second I do anything with the audio it seems to mess up the syncing. I mean even if I use that 400 meg wav file exactly as it is, it doesn't sync with the video. It won't even sync with the mpeg video. For some reason even extracting it changes it and I just can't find anyway at all to resync it to the video stream. -
It sounds like your source MPEG file is missing some frames (dropped while capturing?). So maybe the audio is the right length and the video is coming up short?
If you have VirtualDubMod and AVISynth you can try opening the MPEG file using the AVISynth Directshow filter. Use File Open as usual, but select DirectShowSource at the bottom of the Open Video File dialog.
If you can't fix it at the source (ie, before converting to AVI), and you don't need to have a specific video frame rate, you can use AviFRate to change the video frame rate. If the audio is 1 percent longer than the video decrease the frame rate by 1 percent. If the missing frames are too sporadic you will still have sync issues here and there in the film.
The other possibility is to change the length of the audio by extracting it, changing the length, then putting it back in. Many audio editing programs have the ability to change the length of an audio file without changing its pitch. CoolEditPro, GoldWave etc. -
I tried using the directshow filter thing to open it. I assume once I've done that I'm just suppost to set the compression and then save it right?
At any rate that is what I did, I end up with the same result, well except for the fact that when I open it with the directshow filter it doesn't see any audio tracks, so I have to add that in later, and if I do it is still very messed up.
I've previously tried adjusting the audios length to the video and then adding it back in. Doing that did not work very well. It did sync them at some points but at other points it was more then 1 second out of sync, and it moves around throughout the whole film.
Is there anyway to just save the audio exactly as it is in the mpeg?
For example the mpeg file (which works) has a runtime of 41:29. If I just open up virtualdub and save the wav it will save it to a file that has a runtime of 41:20. For some reason it creates a 9 second diffrence.
Also, when I was in virtualdub mod I tried pressing the demux button (I don't know what it does) and saved the file. But I have no idea what I could possibly use this file for. I can't play it and goldwave doesn't recognize it. -
It sounds like you've tried all the usual things. I had the exact same problem converting a Real Media file to AVI recently. As far as I can tell, there were groups of dropped frames at odd intervals in the video and VirtualDubMod wasn't compensating for them.
If I extracted the audio as a WAV file and played it side-by-side with the original video I could hear the audio was fine. But when I played the RM file along side the converted AVI file I could see the two pictures get out of sync. When I adjsted the frame rate of the AVI file or the length of the audio file I could get the sync right at the beginning and end but it would be off in the middle. In the end I tried using another program (EO Video) and that worked (although, in the past I've seen exactly the opposite happen -- EO Video would get A/V sync errors and VirtualDubMod wouldn't).
If you convert just a small section near the middle or end of the video is the audio out of sync? If not, you could convert the video in short segments and join the little pieces later (via Virtualdub direct stream copy).
You might try using a different program for the conversion. Like I mentioned above, EO Video worked for my RM to AVI conversion. Since you're starting from an MPEG file you could try Tmpgenc or some other program. -
I'll give tmpgenc a try.
I knwo I could do it in sections. I mean maybe 5 to 7 mins at a time seems to work out OK, but that's a lot of effort, espicially since I have this problems with a lot of files.
Currently I'm just trying to play the working mpeg file and record it directly to a wav. Which I think will work but I'm a little unhappy with this solution since it means I have to do all the conversions in real time.
Maybe tempenc will work better for me. -
Originally Posted by CocodaMonkey
-
You're right it is the video.
Although the audio I record isn't exactly the same as the other. At least it comes out as the correct length.
On to tmpenc it seems. Really wish virtualdub did it right. -
Thank you for all the help junkmalle. It seems to work OK if I do the conversion in tmpenc.
-
Originally Posted by CocodaMonkey
Similar Threads
-
Please Help with converting AC3 in an AVI to an AVI with MPEG-1/MPEG-2
By twin1701 in forum Newbie / General discussionsReplies: 4Last Post: 13th Jul 2010, 14:11 -
converting mpeg to avi or to wmv
By stevenr2 in forum Video ConversionReplies: 4Last Post: 11th Jan 2010, 15:56 -
Converting from xvid avi to mpeg-2
By busbee2 in forum Video ConversionReplies: 5Last Post: 12th Dec 2009, 23:44 -
converting mpeg to avi
By extremebeat in forum Video ConversionReplies: 1Last Post: 24th Feb 2009, 13:07 -
converting avi to mpeg-1 help plz??
By darealest1 in forum MacReplies: 5Last Post: 12th Jul 2007, 21:43