Log in

View Full Version : Synch problems using DVD2AVI


The Belgain
18th February 2004, 00:04
I'm encoding a whole season of Alias into XviD + AAC in Matroska. For the first few episodes, I ripped the vobs using DVDDecrypter, and then demuxed with DVD2AVIdg. The ac3 files all came out with delay 0ms (for every episode), which I thought was slightly odd, but I though nothing of it.

After doing about a third of the season this way, I realised that I could just automate this all using Robit4Rip, and did so. This used DVD2AVI 1.76 (CLI version included in DVD2SVCD). The delay came out at -80ms for all the episodes.

I encoded the video using AviSynth framserving for VDubMod, and encoded the audio using foobar to frontend to Nero AAC encoder (using 5.1 HE-AAC). I replaygained the tracks with foobar, but performed no delay correction during audio encoding (as foobar doesn't support it).

For muxing, I'm using the latest mvkmerge package, with the included frontend. I'm entering the delay value that DVD2AVI gave me. I'm having synch problems with some of the episodes done with DVD2AVIdg. I've read this post in the FAQ, which seems relevant:


Q19: Should I process the audio in DVD2AVI at all?
A: Decoding and processing is better handled by BeSweet.
Demuxing can be done in DVD2AVI, but this will generate a number of files called Track01 DELAYxxxms.ac3 NOTE:This delay value has changed when you use DVD2AVIdg compared to older versions. Always use DVD2AVI to demux audio if you use DVD2AVIdg.
If you use older version it may be a better solution to use DVDdecrypter instead, as it will give you the same delay and name track with the language you demux.


This seems slightly unclear to me. Does that mean that I should only ever use the standard DVD2AVI version for audio? I still have the vob files on my HD for the eps I did with DVD2AVIdg. Does this mean I can just demux these with DVD2AVI 1.76, reencode the audio from the files outputed by v1.76, and then mux them with the video I already created (with the DVD2AVIdg d2v file)? Or do I have to redo the whole thing (video as well as audio)?

Help would be very much appreciated on this one. If I haven't expressed myself clearly, sorry and please ask for clarifications.

hakko504
18th February 2004, 14:19
Originally posted by The Belgain
I'm encoding a whole season of Alias into XviD + AAC in Matroska. For the first few episodes, I ripped the vobs using DVDDecrypter, and then demuxed with DVD2AVIdg. The ac3 files all came out with delay 0ms (for every episode), which I thought was slightly odd, but I though nothing of it.

After doing about a third of the season this way, I realised that I could just automate this all using Robit4Rip, and did so. This used DVD2AVI 1.76 (CLI version included in DVD2SVCD). The delay came out at -80ms for all the episodes.

I encoded the video using AviSynth framserving for VDubMod, and encoded the audio using foobar to frontend to Nero AAC encoder (using 5.1 HE-AAC). I replaygained the tracks with foobar, but performed no delay correction during audio encoding (as foobar doesn't support it).

For muxing, I'm using the latest mvkmerge package, with the included frontend. I'm entering the delay value that DVD2AVI gave me. I'm having synch problems with some of the episodes done with DVD2AVIdg. I've read this post in the FAQ, which seems relevant:


Q19: Should I process the audio in DVD2AVI at all?
A: Decoding and processing is better handled by BeSweet.
Demuxing can be done in DVD2AVI, but this will generate
a number of files called Track01 DELAYxxxms.ac3
NOTE:This delay value has changed when you use DVD2AVIdg
compared to older versions. Always use DVD2AVI to demux
audio if you use DVD2AVIdg.
If you use older version it may be a better solution to
use DVDdecrypter instead, as it will give you the same
delay and name track with the language you demux.
This seems slightly unclear to me. Does that mean that I should only ever use the standard DVD2AVI version for audio? I still have the vob files on my HD for the eps I did with DVD2AVIdg. Does this mean I can just demux these with DVD2AVI 1.76, reencode the audio from the files outputed by v1.76, and then mux them with the video I already created (with the DVD2AVIdg d2v file)? Or do I have to redo the whole thing (video as well as audio)?

Help would be very much appreciated on this one. If I haven't expressed myself clearly, sorry and please ask for clarifications.
Let me get your process straight first:
You use R4R to rip the DVD and demux the audio (thus using DVD2AVI v1.76CLI.
You create a D2V using DVD2AVIdg
You then encode the movie using AViSynth and mpeg2decdg.dll
You then mux the dg video with the audio from R4R
Is this right?

If so, then you are mixing audio from v1.76 and video from dg. This will create desynch. Not always (depends on clip), but quite often. What I'm trying to write in the FAQ is that if you intend to use DVD2AVIdg at any point in the process, it must be used for the whole process, both extracting audio [b]and[b] creating D2V. Never one or the other, but always both or not at all.

Your choises comes down to this: extract the audio again, this time using DVD2AVIdg and reencode the audio (will take a few minutes). Or recreate the D2V with v1.76 and reencode the video (will take a couple of hours depending on machine).

(I know what I would do.:D)


To put it another way: Never ever use DVD2AVI v1.76 for audio.

Today my recommendation is that unless you have a completely automated process (DVD2SVCD etc.), you should always only use DVD2AVIdg, for both audio extraction and video encoding.

The Belgain
18th February 2004, 16:35
Right. I haven't expressed myself very clearly. Some of the episodes were done in the following way:

1. Use Robot4Rip to rip the vob using DVDDecrypter, and DVD2AVI 1.76 CLI to demux audio and create d2v file.
2. Encode video using Avisynth with mpeg2dec3.dll
3. Encode audio from the extracted ac3 files.
4. Mux into Matroska using the delay in the filename of the extracted ac3.

The files done it this way have to synch problems (or any other problems that I can make out). The audio delay always came out at -80 in all files.


Unfortunately, some of the files were done before I found out about Robot4Rip. These were done as follows:

1. Rip vob using DVDDecrypter.
2. Extract audio and create d2v file with DVD2AVIdg.
3. Encode video using Avisynth with mpeg2dec3.dll
4. Encode audio from the extracted ac3 files.
5. Mux into Matroska using the delay in the filename of the extracted ac3.

Some (but not all) of the files done in this way have synch problems. The delay in the filename of the extracted ac3 always is 0ms.


So what could have gone wrong? I never mixed two different programs for audio and video. Is it to do with the fact that I've not used the modified version of mpeg2dec3.dll for the encodings with DVD2AVIdg d2v files?

hakko504
18th February 2004, 17:24
Originally posted by The Belgain
Is it to do with the fact that I've not used the modified version of mpeg2dec3.dll for the encodings with DVD2AVIdg d2v files? Yes, if you use DVD2AVIdg to create the D2V then you MUST use the mpeg2dec3.dll provided with DVD2AVIdg or you'll end up with audio desynch.

I think I must change Q19 so it clearly states that mpeg2dec3.dll also must be the dg version or problems will arise.

The Belgain
18th February 2004, 19:41
OK, thanks for that. I think it definitely would be a good idea to clarify that in the FAQ somewhere.

I guess the easiest thing for me to do is just to change the Avisynth script to use mpeg2dec3dg.dll, and re-encode the video, then just use the audio I'd aleady encoded (for the episodes which were done with DVD2AVIdg).

That should happily finish overnight I would have thought.

RB
19th February 2004, 14:20
Hakko, the audio files extracted by DVDecrypter, DVD2AVI 1.76 and DVD2AVIdg are always binary identical. It's just that DVD2AVIdg calculates the correct delay.

Matthaeus
24th February 2004, 14:32
I think dvd2avi's -80ms delay comes from the loss of the 2 B frames at the start of the movie (1 frame @25 fps = 1000/25 = 40ms)! Dvd2avidg solves this problem so the delay is 0 ms.