View Full Version : Correct audio demuxing (different delays)
I always done my DVD rips with DVD2AVI + avisynth like this:
1. Creating .d2v project and demuxing whole audio track
2. Encoding audio
3. Making avisynt script and encoding video
4. Mixing video + audio into AVI
Recently I made all this with DVD, containing a cartoon serial.
(16 series on DVD).
When I tested resulted AVI I found that audio at 2nd and further
series is out of sync.
I made another rip of DVD (I am using Smartripper)
First time I have ripped all movie.
This time I rip every cell (each cell contain one series on ths DVD)
This I made .d2v and audio demux for each series.
And what I see:
1st series have audio delay "-40ms", 2nd "-232ms", 3rd too
at 10 series delay is "-282ms".
I am very surprised with this issue.
Due to async problem I think, that DVD2AVI doesn't correct
resulting AC3 for whole movie with this delays ?
Is there a way to avoid such problem without ripping each cell separately ?
Or, may be, such changing of audio delay could happen not only
on cells boundary ?
jollytim
25th June 2002, 03:21
I'm not sure if this is what you are seeing but what I get with DVD2AVI 1.86 (converting audio to mp3) is that the video and audio start out ok but get progressively more out of sync as the video progresses. There are probably several ways to correct this but the fastest and easiest I've found is with a program called AVIinfo. I'm not sure what version is current but you just highlight the avi file, left click, select avi information, then go to the syncro tab. Select a frame rate of 23.9766 fps. This works for me about 95% of the time. Sometimes I get no sync problem (rare) and the rest is attributable to the audio on the DVD being out of sync to begin with (as was the case with Pi). Probably any program that adjusts the framerate will suffice. DVD2AVI even thought the frame rate of 23.976 is selected, doesn't seem to actually decode at that rate (perhaps it's been fixed) but this little work around only takes about 20 seconds so it's not really an issue. My apologies if I've taken this thread in the wrong direction.
cult
25th June 2002, 11:02
yes,avinfo is great.It shows u on the fly the result of ur changes when trying to resync a movie
Thank you for answers.
But there is problem in source ac3 track used for mp3 encoding.
AC3 track generated by DVD2AVI for this DVD is internally
asynced because of different delays for differents VOB cells.
A question to developers:
Is DVD2AVI adjusted generated AC3 track in such case ?
Or it gets only first audio delay ?
kilg0r3
27th June 2002, 07:58
Yeah i liked avinfo very much but migrating to win xp made it impossible to use. or, are you guys using it under winxp and i am the one who just didn't get to work?
btw it would be so great if someone could develop a similar tool for ogm. - anybody hear me?
frank
27th June 2002, 23:31
I speak about DVDAVI 1.76/1.77.
In EVERY case the showed values are ok!!
On wavs DVD2AVI compensates the delay automaticly.
On demuxed AC3 tracks you must do it yourself in the muxer.
Originally posted by frank
I speak about DVDAVI 1.76/1.77.
On wavs DVD2AVI compensates the delay automaticly.
On demuxed AC3 tracks you must do it yourself in the muxer.
That is about whole audio track.
Waht about internal audio shifting ?
Such different audio stream delays in different VOB cells - how
dvd2avi processes it ?
Il't try to make a test on that weekend, to understand how
dvd2avi works in such situation.
frank
28th June 2002, 13:31
Ok, that was the short answer.
But DVD2AVI has always right!!!
AC3 block length is not as MPEG blocks!!! The streams are muxed with the help of time stamps, so decoders can synchronize the elementary streams. DVD2AVI reads the time stamps, and cuts at the next I-frame.
The VOB cells divide the video stream (chapters) mostly ending with a closed GOP. AC3 blocks differ from MPEG and can start in the cell before or a bit later! You can't split an AC3 audio block where you want! But PCM WAVs can be cutted (or filled up with zeroes) after decoding, and that does DVD2AVI automatically.
You can trust DVD2AVI.
trbarry
28th June 2002, 15:12
You can trust DVD2AVI.
I think it was posted here earlier that there is one version of DVD2AVI 1.8x from somewhere that puts out film at 24.00 fps instead of the proper rate. I believe it was quickly fixed. But if you ever see 24.00 then switch to a different version.
- Tom
jollytim
28th June 2002, 16:39
I still use 1.86. I like the features. It does give you two options for fps, 24fps and 23.976 fps. Unfortunately, when the latter is chosen it actually decodes at 23.975 fps. This apparently is what causes the sound (which seems to decode properly) to become out of sync. I haven't changed from this version as I like to be able to strip the sound from the vob directly into mp3. Besweet is okay but takes a long time. This isn't what the original poster was referring to though, so I'll not devote anymore time to diverting this thread.
Originally posted by frank
But DVD2AVI has always right!!!
AC3 block length is not as MPEG blocks!!! The streams are muxed with the help of time stamps, so decoders can synchronize the elementary streams. DVD2AVI reads the time stamps, and cuts at the next I-frame.
You can trust DVD2AVI.
Thank you.
Now I am sure that dvd2avi does all right.
I also have done my tests at weekend and now I trust dvd2avi.
I used version 1.76.
WAV and AC3 for whole track are fully synced
partial chapters sound (with regard to AC3 delay).
So this is a DVD mastering error :(
I also written to Jackei about such issue.
I've got an answer.
He says that in case of separately encoded clips,
later joined, some gaps can appear and DVD2AVI will
lose synchronization.
So, if I prolong my test for further VOB cells
I can face to it.
He recommends make D2V for each episode in such
obscure situation.
frank
3rd July 2002, 08:56
No mastering errors!
You must understand that the DVD tracks are muxed and stored as ONE stream in ONE encoding step.
The cells are entry points.
So if you cut with DVDAVI (which starts at an I-frame) you'll ALWAYS get synched waves in the project.
On AC3 streams you have to set the delay in the muxing process.
I ever cut my (PAL) SVCD parts with DVD2AVI and never had sync problems!!! Yes, every part has a d2v project!
This is very important. MPEG2 is not a codec for cutting! (P-, B-frames)
For cutting purposes you should encode with MJPEG or Huffyuv (as editors do) on a high quality level, paste the parts and waves and at last step mux and encode.
Originally posted by frank
No mastering errors!
You must understand that the DVD tracks are muxed and stored as ONE stream in ONE encoding step.
The cells are entry points.
So if you cut with DVDAVI (which starts at an I-frame) you'll ALWAYS get synched waves in the project.
On AC3 streams you have to set the delay in the muxing process.
I understood this. For a movies it is certainly true!
But I am not sure about my case.
This DVD is a compilation of 16 cartoonz.
There are shooted within several years, on different equipment.
First 14 series are PAL non-interlaced.
Last 2 - interlaced.
And I have a reasons for doubt.
Then I've get every serie in separate VOB with SmartRipper.
I get different AC3 stream delays for different series.
However, if they are encoded as WHOLE this delay MUST BE
equal on all DVD length.
Also I trust Jackei Kuo (developer if initial DVD2AVI project)
when he says that there is such possibility to loose sync.
PS. Sorry for my bad English. May be I write too incomprehensible.
dvdguy_2002
6th July 2002, 19:50
Originally posted by frank
On demuxed AC3 tracks you must do it yourself in the muxer.
Excuse me, we have to note the delay time at the time of demux,
what I don't understand, (I haven't jumped into the water yet, trying
to get as much info as possible before I do) where do I use this
delay info, like the thread says at the muxing stage, but what
muxer or app is used to do the mux. I have SpruceUp, does it do the
job on it's own or do I have to feed the delay info somewhere ?
Please enlighten me.
Thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.