#!/bin/bash
# Mplayer plays the first track on the dvd to mount it and to check that
# it is the right track before we start, press q to stop playback
# If it is not press control + C and try combinations
# mplayer -dvd 2 or mplayer -dvd 3
# The dvd menu system set up on the dvd does not always put the tracks in
# the expected order
mplayer -alang en -dvd 1
echo “What is the first track of the DVD you want to play?”
read track1
echo “What is the second track of the DVD you want to play?”
read track2
echo “what do you want the first file to be saved as?”
read filename
echo “what do you want the second file to be saved as?”
read filename2
# please note that a width of 480 and bitrate of 800 gives a file size of
# about 650Mb and reasonable quality
echo “what do you want the width of the film to be in pixels?”
read width
# The bitrate must be entered, 800 is mplayer’s default; however the script requires one be entered
echo “what do you want the bitrate of the film to be (default is 800)?”
read bitrate
# note also that I have mp3 bitrate at 256, this is high for good quality, lowering it does not seem to give a smaller file size
mencoder -alang en dvd://$track1 -vop scale -zoom -xy $width -o /home/owner/films/$filename -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=$bitrate -oac mp3lame -lameopts br=256 echo “finished $filename part 1″|mail -s “$filename part1 done” owner@example.com
mencoder -alang en dvd://$track2 -vop scale -zoom -xy $width -o /home/owner/films/$filename2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=$bitrate -oac mp3lame -lameopts br=256 echo “finished $filename2″|mail -s “$filename2 complete” owner@example.com
echo ” -alang en dvd://$track -vop scale -zoom -xy $width -o /home/owner/films/$filename -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=$bitrate -oac copy
echo “finished $filename”|mail -s “$filename” owner@example.com” >> rip.log
#The rip log is useful in case you are doing a trilogy etc and forget what
#quality the others were done at. For my favourite films I will increase the
#width to 512 and the bitrate to 1400 or more. This gives a file size of about 1G