[mythtv-users] Re: Ripping DVD's in a Mythvideo-compatible way?

mail mail at navet.co.uk
Fri Sep 3 14:29:21 EDT 2004

 Nate Carlson wrote:

> Hey all,
> I'd like to rip DVD's in a way that they will be fully compatible with
> Mythvideo (IMDB and all that stuff); prefer not to use the MythDVD
> frontend, if possible (I'd like to do it on my file server and my
> workstation, neither of which have any MythTV-related stuff installed).
> I'd also like to not preserve any of the special features or menus - just
> want the video itself.
> Anyone have a script to do this, perchance?

I use this script from www.mythtv.info that I have modified for my own use.
####Begin dvd-backup.sh####

#Which track number. Defaults to 0

## Grab DVD Name
dvd_name=`isoinfo -d -i /dev/cdrom`
dvd_name=${dvd_name#*Volume id: }

## Grab the .vob of the main feature
echo "Grabbing VOB from $dvd_name"
tccat -i /dev/dvd -T 1,-1 -L >dvd.vob
## Make fifo's for extracting audio and video simultaneously
mkfifo vid.fifo
mkfifo aud.fifo

## perform the extraction
echo Extracting audio $tracknumber and video from file1
tcextract -i aud.fifo -t vob -x ac3 -a $tracknumber > ofile1.ac3 &
tcextract -i vid.fifo -t vob -x mpeg2 > ofile1.m2v &
cat dvd.vob | tee aud.fifo vid.fifo >/dev/null

## Calculate the requantization factor
vsize1=`ls -l ofile1.m2v | awk '{print $5}'`
vsize1=`echo $vsize1 / 1048576 | bc`
asize1=`ls -l ofile1.ac3 | awk '{print $5}'`
asize1=`echo $asize1 / 1048576 | bc`
req=`echo "1.05 * $vsize1 / (4400 - asize1)" | bc -ql`
echo Requantizing at: $req

## Put the audio and video back together
echo "mplexing $dvd_name"
mplex -f 8 -S 0 -o $dvd_name.mpeg ofile1.m2v ofile1.ac3

echo "moved file mythvideo directory"
mv $dvd_name.mpeg /video/video

echo "Completed..Press a key to continue"
read > /dev/null
echo "removing old stuff"
rm *.fifo
rm *.m2v
rm *.ac3
rm *.vob

More information about the mythtv-users mailing list