DVD2AVI + TMPGEnc: audio out of synch with progressive video

greenspun.com : LUSENET : Video CD : One Thread


I'm having audio trouble when encoding a project with TMPGEnc which I've created before with DVD2AVI: The WAV DVD2AVI outputs is shorter than the MPG TMPGEnc produces. Therefore the audio is out of synch with the video, and it's getting worse as the movie progresses.

Actually I didn't have that problem at first, when I left the "Preserve Film" option off in DVD2AVI. The material I'm encoding is from an NTSC DVD and quite clearly film, but DVD2AVI indentified it as "HYBRID." The Web pages told me I should switch "Preserve Film" off in such a case and rely on the "Inverse Telecine" algorithm in TMPGEnc instead to reconstruct the 24 progressive frames per second. I did that at first, but IVTC would result in a sequence of three correct frames and one screwed-up frame, with horizontal stripes in it.

That's when did the project again, this time with "Preserve Film" on in DVD2AVI, and this time the video portion of what TMPGEnc output looked flawless. But, alas, the WAV DVD2AVI produced is speeding ahead of the film, meaning I can't use the result.

Can anyone help? Thank you!

-- Ulrich Schreglmann (ulrich.schreglmann@t-online.de), December 13, 2000


Did you find an answer for the audio out of sync problem. I have been trying to find the answer for days. I have tried dvd2avi, flaskmpeg, dup-dvd, and some others not worth mentioning. I was wondering if you found it. THE ANSWER TO THE OUT OF SYNC PROBLEM.



-- Earl Vincent (vincent@vincentquest.com), February 24, 2002.

you can use virtualdub to extract wav file from avi then with tmpgenc open wav file in audio source.

-- tom (supertom1er@yahoo.fr), November 02, 2002.

I have also been scanning for solutions and the one that makes most sense to me is the dropped frames during the framerate conversion causing the length of the audio file to be longer than the length of the video file.

-- muadib (stoppots@rock.com), March 03, 2004.

This one has been a headscratcher. I have not had any success reinterleaving the WAV or MPA audio produced by DVD2AVI back into the MPG video produced by TMPGEnc. BUT, an examination of the audio and video indicates the audio is becoming stretched relative to the video. In my experience this is due to allowing the audio and video files to remain in isolated time domains through too much of the editing process. This can be observed when placing a VFAPI wrapper around the DVD2AVI output file and using VirtualDub or VirtualDub Mod to reintegrate audio into the video. When using direct stream merging of the audio and video streams it is easy to produce a video that appears to be perfectly synched. But the resulting AVI is not a REAL AVI file!! It is a direct stream perpetuation of the VOB decompression guideline file created by DVD2AVI. In essence, the original D2V and stripped audio are just being reinterleaved. It should look and sound perfect. However, when using TMPGEnc to process the DVD2AVI output file, the direct stream option is not available and the source video frames are actually decompressed, frame by frame, from VOB into AVI then recompressed into MPG2. Also, the audio actually gets recompressed again from WAV into some flavor of MPA. That's a lot of processing without the coordination of any synchronization timestamps in the source files and no guarantee that the same codecs have been used throughout the process on all files. No wonder things go haywire. What all of this means is that the DVD2AVI process is the first culprit since it must extrapolate/guess frame timestamps when reconstructing frames from the compressed VOB data. So what to try next? Here's a few options: 1. TMPGEnc prefers anything sourced from DVD2AVI output to be marked as progressive with "B" field first. IVTC has failed miserably without these settings. Strangely, if the same video was captured from a video card, the settings would have to be Interlaced with "A" field first. 2. Learn how to use the IVTC option in TMPGEnc. Fully automatic IVTC isn't perfect in any software but TMPGEnc affords the option to surgically fix the few areas where the pattern gets off by hand. The learning curve is harder than actually using the IVTC process correctly. 3. Try getting the audio reinterleaved with the video as early as possible in the process. Use VirtualDub's full processing options on the video and audio streams and create a REAL AVI file with the audio reinterleaved before too many unsynchronized audio/video processes can creaste a time domain delta between them. 4. Try the brute force approach and use Goldwave or Cool Edit to time compress the audio without changing pitch or music quality then reinterleave the MPG and WAV by re-rendering with a timeline editor. 5. Last statement: TMPGEnc does a great job with real AVI files but problems arise when a DVD2AVI D2V file is in the mix. Converting the DVD2AVI D2V file into a real AVI can reestablish A/V synch timestamps before sending to TMPGEnc for compression.

-- layer8 (rexbreeland@ieee.com), June 23, 2004.

Moderation questions? read the FAQ