Shrink several DVD titles |
back |
The situation: You have a DVD with is larger than 4.7GB, but you want to
backup it on a single layer DVD-R medium. lxdvdrip can do this, if you only
want the largest title (the main movie). But whats with bonus stuff, oder a
series dvd? Use the commands down below! You just need the title numbers and
the audio tracks you want to copy (look at this with dvdrip or something
like this).
Caution, you need really much space and time...
# enter titles to rip (here title 1-4, 6) # change this to your needs! # titles="1 2 3 4 6" # get the video for i in $titles; do tccat -i /dev/dvd -T $i -L | tcextract -t vob -x mpeg2 > t$i.m2v; done # get audio tracks (here: track 0 -> en, track 2 -> de) # you need one "tccat" line per audio track # change this to your needs! for i in $titles; do tccat -i /dev/dvd -T $i -L | tcextract -t vob -x ac3 -a 0 > a"$i"-en.ac3; tccat -i /dev/dvd -T $i -L | tcextract -t vob -x ac3 -a 2 > a"$i"-de.ac3; done # shrink the video (here: factor 1.5) # e.g.: video 6000mb, audio 300mb, # 4300 mb dvd-r -> 4000mb space for video # 6000/4000 -> 1.5 for i in $titles; do tcrequant -i t$i.m2v -o t"$i"_new.m2v -f 1.5; done # get video and audio together again: # you can only use two audio tracks # if you only use one, delete the "-s filename" flag for i in $titles; do tcmplex -i t"$i"_new.m2v -p a"$i"-en.ac3 -s a"$i"-de.ac3 -m d -o title$i.vob; done # create dvd structure, something like this:<dvdauthor> <vmgm /> <titleset> <titles> <pgc> <vob file="title1.vob" /> </pgc> </titles> <titles> <pgc> <vob file="title2.vob" /> </pgc> </titles> <titles> <pgc> <vob file="title3.vob" /> </pgc> </titles> <titles> <pgc> <vob file="title4.vob" /> </pgc> </titles> <titles> <pgc> <vob file="title6.vob" /> </pgc> </titles> </titleset> </dvdauthor># save this to something.xml # create dvd filesystem dvdauthor -o disc -x something.xml # record cd disc && growisofs -Z /dev/scd1 -R -dvd-video . # done. :)