After way too much time wasted trying to get this to work, the magical solution has finally been found (I hope...try it!). Read on.
Source video was a DivX .AVI movie. It was scanned in VirtualDub for bad frames and for correct a/v sync. The movie was fine - no bad frames, perfect a/v sync. However, each conversion (to VCD in my case) failed to preserve the correct sync! It would slowly drift out until near the end of the movie it was a full half-second out of sync (annoying enough to notice). After reading tons of posts and begging for solutions myself, I combined all the various info and _fixed_ the problem for good!
Step-by-step guide:
1. Scan the .avi for bad frames and correct a/v sync in vdub first. If it is wrong to begin with, this method probably won't help.
2. Extract the audio from the video in VirtualDub. You may be able to go to .WAV directly, but if the audio is AC3 format, you will need to take additional steps to get an uncompressed .WAV file. Use the guides here on vcdhelp or doom9.org. Get an uncompressed .WAV by whatever means necessary. You can downsample to 44.1KHz at this point, or let TMPGEnc do it (via SSRC) in a later step.
3. Load the .avi in VirutalDub. Select Audio->WAV Audio and load the uncompressed .WAV file you created in step 2. Ensure that Audio->Direct Stream Copy is selected.
4. Ensure Video->Direct Stream Copy is enabled. Select Video->Frame Rate and select the option "Change so video and audio durations match".
5. Select File->Save as AVI... You will end up with a very large .avi file (the original video and the uncompressed .WAV file interleaved together _with matching durations_). NOTE: If you play this .avi, you will probably notice that a/v has gone _out_ of sync! Don't panic.
6. Load up this .AVI in TMPGEnc. (You can also prepare a AVISynth script if you need to do resizing and/or TemporalSmoothing.. if you do this, load the .avs script in the 'video' box, and load the AVI created in step 5 for the audio).
7. Set your parameters in TMPGEnc as you prefer. Explaining TMPGEnc options is beyond the scope of this mini-guide.
8. While setting your TMPGEnc paramters, you MUST turn on the "Do not frame rate conversion [sic]" option in the Advanced tab. Ever wonder what this option was for? Notice how many TMPGEnc guides say "Gee, we have no idea why this is here so ignore it and never use it" . THIS is what it is for! In step 6, you created an avi that might not be perfect 23.976 or 29.976 FPS. TMPGEnc sees this and tries to correct for it - causing audio drift even though you supposedly lined things up in VDub.
9. Encode away. The result should be a perfectly aligned a/v MPG. Finally!
Caveat: This process hinges on the fact that we are no longer dealing with perfect frame rates. I've been lucky, and this hasn't seemed to affect playback on my standalone player. This may, however, be out of spec, and some standalone players may not be able to cope.
Caveat #2: In TMPGEnc, I use SSRC for sample rate conversion, and tooLAME for conversion from .wav to .mp2 (Via "External Tools" in TMPGEnc). This is the preferred way to handle audio in TMPGEnc, and I'm not sure if using TMPGEnc internal downsampling and conversion routines would guarantee the same results.
NOTE: It _is_ possible to do steps 1 and 2, then jump clear to 6 and achieve very close to the same results. It seemed just as accurate in WinDVD, but on my standalone player there was still an 'ever-so-slight' desync going on. A FAR cry better than before, but not as accurate as the lengthier mentioned above. This may be source or hardware dependent... try both if you have the time to burn :)
Good luck, and I hope this clears up sync issues for everyone. It is an amazingly common topic, and hopefully this serves as an answer.
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
I need to correct audio drift
By Djard in forum AudioReplies: 13Last Post: 30th Jan 2012, 17:32 -
Stretched duration after IVTC (sync issue: audio drift)
By ARTO65 in forum DVD RippingReplies: 11Last Post: 10th Jun 2010, 19:38 -
Can VirtualDub correct audio drift?
By Djard in forum EditingReplies: 9Last Post: 26th Oct 2009, 18:33 -
AME CS4 Audio drift but not in others?
By x2x3x2 in forum Video ConversionReplies: 2Last Post: 15th Jun 2009, 18:27 -
Pioneer DVR-531H-S Time Drift
By srt842 in forum DVD & Blu-ray RecordersReplies: 0Last Post: 6th Mar 2009, 12:05