Log in

View Full Version : ripping multiple chapters at once


Arcon
20th July 2003, 19:08
i wanted to rip the bonus material of a dvd but since it has been split into ~60 chapters i didn't want to rip all chapters seperately. so i made a .d2v-file for the 3 vob-files that contained all the bonus clips with dvd2avi. i also let dvd2avi extract the ac3-track.

after encoding the video and sound and muxing them together i got massive synch problems. audio and video drift away the further i play the video. its no encoding problem, i even tried cbr for the audio.

my assumption is that every chapter from the vob got an av-delay of -80ms. and since i extracted the ac3 not chapter by chapter i got an delay error of 80ms for every chapter.

so my question is: how can i encode audio and video without splitting it to single chapters but with staying synched?

edit: the 'chapters' i spoke of are actually 'program chains' (at least in smartripper). therefore i can't let smartripper split the 3 vobs at each chapter. so if my assumption made above is correct i need a way to automatically split the vob's at their chains or split the ac3 file at the chains given in the vob.

oddyseus
20th July 2003, 21:10
Most probably each extra is followed by an audioless cell of 12 frames or so, that is adding its lenght to the audio offset. U can't do much about it but to rip by pgc and proceede from there.

If it where 8 or less, u could extract the audio separately and use the 8 audio positions for each one, but there is 60 of them :)

Arcon
20th July 2003, 21:22
hmpf :(

so what would be the easiest way to delay dozens of single ac3-files by -80ms and encode them to one mp3 stream?

i thought of delaying the single ac3-files first with besweet (can i do this without reencoding?), join them to one big ac3-file afterwards and then encode them.

oddyseus
20th July 2003, 21:39
if u have determined the actual offset of each single ac3 u can use Vitec Mpeg2Pro, the only app that I know of being able to add, cut ac3 files and make a synced ac3 that u can use for further proccessing.

Arcon
21st July 2003, 18:02
now i've ripped all pgc's, loaded all 47 vobs in dvd2avi and made one big d2v-file out of them. i've encoded that one and it doesn't fit to the audio.

i've tried that avi with:

- the audio from the 3 big vob-files from the dvd, extracted by dvd2avi to one ac3-file

- the joined ac3-files of the extracted individual pgc's vob files

- the delay corrected, then joined ac3-files of the extracted individual pgc's vob files

and all results are out of synch. what have i done wrong? i don't want to encode every 5sec. clip individually, calculating it's xvid-size based on the given size for all 47 clips together with mp3-audio.

there has to be a way to mux the audio somehow with an avi generated from several vob's, 'logically joined' with dvd2avi to one d2v?

oddyseus
21st July 2003, 18:21
what is the structure of each small vob?
Is it one or two pgc vob?

If it is two pgc vob, what is the length of the second pgc?

Arcon
21st July 2003, 18:27
2, the second one is 1 cell long (00:00:00:52) in smartripper. LBA goes from ...73-...77

Arcon
21st July 2003, 18:32
btw: setting the delay to -80ms for each ac3-clip seems to make the problem bigger, even if their names tell me to do so. if i set it to +80ms it looks better (i only encoded the first ~5 minutes) but it doesn't make any sense to me.

if it would be easier i could also post the ifo or parts of it.

Arcon
21st July 2003, 21:51
after encoding 2 pcg's individually, joining them and comparing them to the d2v-file, i think i'm missing 5 frames for each pcg. that would be a good reason why the sound can't be adjusted with the normal delay and gets worse pretty quickly.

i think the problem is the one described here (http://forum.doom9.org/showthread.php?&threadid=44150&perpage=20&pagenumber=1).

oddyseus
21st July 2003, 21:57
I don't think it would help, further more its against board's policy to publish copyrighted material. I can visualize the structure. Unfortunately its one of these cases where u have to walk the long road and no bus stop anywhere near.

The second pgc is audioless and just adds up to the delay.

idea: :)
d2v all the extras in one single file. that way u wont bother about the missing frames per session. U ll have only 5 missing from the whole set of vobs and not 5 from each pgc.
use the vfapi codec and frameserve to Premiere 6 or if u have 6.5 u may feed it directly the m2v.
cut every second pgc by its lenght and leave only its 1st frame.
when done u ll have a smaller video that u have to export again to avi and if u have cut ok, a synced audio.
u have to export audio as a wav file as well in order to check sync inside Premiere.

Would u do that or is it more work than proccessing each vob alone?

Arcon
21st July 2003, 23:26
>The second pgc is audioless and just adds up to the delay.

wouldn't that mean i would get correct files if i only rip the first chapter of each pcg and mux them with the full ac3? i tried that, too, but the audio didn't fit.

but right now i still don't understand how much delay i get exactly.

i think it would still be easier for me to alter all the audio tracks by removing/adding some delay so that the joined ac3 will fit to the picture.

Arcon
21st July 2003, 23:35
Originally posted by oddyseus
what is the structure of each small vob?
Is it one or two pgc vob?


i think i might be messing with the vocabulary. i've got

vts_03_1.vob
vts_03_2.vob
vts_03_3.vob

containing

title3
-Program chain 1
-chapter1 (e.g. 25-sec.) -> cell1
-chapter2 (e.g. 0.5-sec.) -> cell1

-program chain 2
.
.
-program chain 47

don't know if i explained it right in the first place.

Arcon
22nd July 2003, 15:03
the more i try to understand this the more confusing it gets:

according to the ifo e.g. in pgc 1, the lenght for

chapter 1 is 24.08 sec
chapter 2 is 00.13 sec

if i rip just chapter 1 with smartripper and convert it to a d2v with dvd2avi and open it in vdubmod i see 603 frames or 24.12 seconds.

the audio ripped from this chapter is 23.719 seconds (759 frames) long. it even has a "delay -80ms" in its name, so corrected to fit to the picture it would be 23.639 seconds long.

why is the audio shorter than the first chapter? why is the d2v longer than the ifo says? which of the various discrepancies is accountable for the av-synch problems i get?

killingspree
22nd July 2003, 15:20
i think it would help if you could post the whole ifo file somewhere...

iirc the discrepancies are (at least partially) caused by DVD2AVI...

steVe

Arcon
22nd July 2003, 16:19
well, i'm not sure if linking to the ifo is allowed or not. if it's not tell me and/or remove the link, but i don't think anybody could use this file without the vob's for anything usefull/evil, so here (http://mitglied.lycos.de/hoarzt/ifo/VTS_03_0.IFO) it is.

killingspree
22nd July 2003, 16:21
thanks i will have a look at it as soon as i get home (don't have ifoedit installed here)

this is perfectly ok. You are just not allowed to ask for ifo files if you do not own the DVD. since i do not have any use for the ifo and just want to see if i can help you there's nothing wrong :)

steVe

oddyseus
22nd July 2003, 16:25
the more i try to understand this the more confusing it gets:

according to the ifo e.g. in pgc 1, the lenght for

chapter 1 is 24.08 sec
chapter 2 is 00.13 sec

if i rip just chapter 1 with smartripper and convert it to a d2v with dvd2avi and open it in vdubmod i see 603 frames or 24.12 seconds.

the audio ripped from this chapter is 23.719 seconds (759 frames) long. it even has a "delay -80ms" in its name, so corrected to fit to the picture it would be 23.639 seconds long.

why is the audio shorter than the first chapter? why is the d2v longer than the ifo says? which of the various discrepancies is accountable for the av-synch problems i get?

Is it 24.08 secs or 24 secs and 8 frames. It is very crucial. I believe that it is the later.
So u have a chapter 1 of 24 secs and 8 frames or 608 frames and
a 2nd chapter that is audioless of 13 frames in length.
dvd2avi losses 5 frames so its lenght is 603 frames as reported from vdubmod.
Now the audio is ripped from this chapter comes out at 23.719 seconds. Audio is not running at 25 fps it runs at 75 as auenf reported elsewhere. So there r 1779 audio frames there. But that is irrelevant for now. For simplicity we will assume that audio is running at 25fps also. Main thing is that audio is shorter than video. Rounding up audio its length is 23.720secs and after correcting 23.640secs.
Now the way I see it u have a structure like this

--------------- video -----------------||---|
24:08 or 608frames 13 audioless frames 621 in total
--------------- audio ---------------| 23.620 or 590.5 frames

U have to add 621-590.5 = 30.5 frames of silence in this audio, that is 1.220seconds. The above figure is valid if u don't run the vob through dvd2avi if u do u have to subtract 5 frames or 5*0.040sec/frame = 0.200secs from the 1.220of silence.

If u rip only the 1st chapter of each pgc, insert all m2vs in Premiere 6.5 and add the correct amount of silence in each audio file u ll end up with a synced audio/video. This is a very tiresome approach to do.

Tmpeg author has the ability to accept vobs. Since u have demuxed already why don't u give it a try?

oddyseus
22nd July 2003, 16:30
Well the 1st pgc matches my calculations correctly. The figures r frame based timecode. ie the last 2 digits represent frame counting from 00 to 24, each one is equal to 0.040secs or 40milisecs

Arcon
22nd July 2003, 16:30
Originally posted by oddyseus
So there r 1779 audio frames there.

i took what "ac3 delay corrector" told me as length for the ripped ac3 for this pgc, so the frames should be audio-frames already. forgot to mention this.

oddyseus
22nd July 2003, 16:37
In Scenarist u can recreate this structure somewhat easily by creating the 1st chapters of each pgc and attaching as a second one the same 13 frames still image, as ifo suggests.

Anyway, apart for wanting to do it for academic reasons, have u considered including the originals to your backup. 5mins or so of video isn't big enough to justify all this mess they r giving u.

Arcon
22nd July 2003, 16:44
Originally posted by oddyseus
Audio is not running at 25 fps it runs at 75 as auenf reported elsewhere.

ac3 delay corrector says there are 32 frames/sec?

Originally posted by oddyseus
U have to add 621-590.5 = 30.5 frames of silence in this audio, that is 1.220seconds. The above figure is valid if u don't run the vob through dvd2avi if u do u have to subtract 5 frames or 5*0.040sec/frame = 0.200secs from the 1.220of silence.


well, i'm not sure this will work. while trying with multiples of 40ms i got some good results with ~120ms delay added to each ac3-track (it still runs out of synch, but for the first 5 clips it was ok) so i don't think something ~1 sec might be right?

Arcon
22nd July 2003, 16:48
Originally posted by oddyseus
In Scenarist u can recreate this structure somewhat easily by creating the 1st chapters of each pgc and attaching as a second one the same 13 frames still image, as ifo suggests.
attaching 13 frames of video? i thought the audio was too short, so i should add something to the audio or subtract something from the video?
Originally posted by oddyseus
Anyway, apart for wanting to do it for academic reasons, have u considered including the originals to your backup. 5mins or so of video isn't big enough to justify all this mess they r giving u.
you mean simply putting the original vobs to the backup? the problem is these vobs are 2.3gb and 2.8gb (the disc got a second set of vobs with the same problem) and i'm backing up to cdr with xvid :)

oddyseus
22nd July 2003, 16:59
Oh, I missed this one. I thought that u were backing up to dvd-r. Silly me :o

In this case my help wont be much. I guess u have to calculate each pgc's duration and estimate on size and encode each one separetely. Never fiddle with xvid, don't know how to help. Sorry!

Arcon
1st August 2003, 17:17
btw: another problem i'd got while being posessed with the idea of efficiently creating one movie-file for all pgc's was that mp3's and ogg's can't be split at any given time. i think the framerate/blocksize in theses streams is somehow lower than e.g. in an ac3-stream. that means i can't create clips where the audio got exactly the same length as the video unless i use ac3 audio.

the smallest error i could get was 8ms, nothing one would ever see in normal movies. but 47 times 8ms and the skew is visible for everyone.

in the end i had to encode all pgc's seperately and couldn't even join them because i didn't want to use ac3 audio.

so if anybody got a similar problem: don't try to find a short cut by being smart. there is no working short cut.