#!/bin/sh echo -n "Enter the name of output file (without extension):" read FILE echo -n "Enter the title you wish to rip:" read TITLE echo -n "Select a quality level ([h]igh/[n]ormal/[l]ow/[c]ompatiable/[d]ump)[[n]]:" read Q echo -n "Do you wish to only rip a chapter? (y/n) [n]:" read chapter_ask if [[ $chapter_ask = y ]];then echo -n "Chapter:" read chapter if [[ -z $Q ]];then # If no quality passed, default to normal Q=n fi if [[ $Q = d ]]; then #If passed dump vob mplayer dvd://$TITLE -dumpstream -dumpfile $FILE.vob -chapter $chapter-$chapter exit 0 fi if [[ $Q = c ]]; then # If c passed, use this custom quality mencoder dvd://$TITLE -alang en -oac pcm -ovc lavc -lavcopts vcodec=mjpeg:vhq -vop scale -zoom -xy 800 -o $FILE.avi -chapter $chapter-$chapter exit 0 fi if [[ $Q = h ]]; then # If h passed, use high quality mencoder dvd://$TITLE -alang en -oac mp3lame -lameopts br=320:cbr -ovc lavc -lavcopts vcodec=mpeg4:vhq -vop scale -zoom -xy 800 -o $FILE.avi -chapter $chapter-$chapter exit 0 fi if [[ $Q = n ]]; then # If n passed, use normal quality (recommended) mencoder dvd://$TITLE -alang en -oac mp3lame -lameopts br=160:cbr -ovc lavc -lavcopts vcodec=mpeg4:vhq -vop scale -zoom -xy 640 -o $FILE.avi -chapter $chapter-$chapter exit 0 fi if [[ $Q = l ]]; then # If l passed, use low quality. not really worth it, # hardly any smaller but much crappier mencoder dvd://$TITLE -alang en -oac mp3lame -lameopts br=96:vbr -ovc lavc -lavcopts vcodec=mpeg4:vhq -vop scale -zoom -xy 320 -o $FILE.avi -chapter $chapter-$chapter exit 0 fi fi if [[ -z $chapter_ask ]]; then chapter_ask=n fi if [[ $chapter_ask = n ]] ;then if [[ -z $Q ]];then # If no quality passed, default to normal Q=n fi if [[ $Q = d ]]; then #If passed dump vob mplayer dvd://$TITLE -dumpstream -dumpfile $FILE.vob exit 0 fi if [[ $Q = c ]]; then # If c passed, use this custom quality mencoder dvd://$TITLE -alang en -oac pcm -ovc lavc -lavcopts vcodec=mjpeg:vhq -vop scale -zoom -xy 800 -o $FILE.avi exit 0 fi if [[ $Q = h ]]; then # If h passed, use high quality mencoder dvd://$TITLE -alang en -oac mp3lame -lameopts br=320:cbr -ovc lavc -lavcopts vcodec=mpeg4:vhq -vop scale -zoom -xy 800 -o $FILE.avi exit 0 fi if [[ $Q = n ]]; then # If n passed, use normal quality (recommended) mencoder dvd://$TITLE -alang en -oac mp3lame -lameopts br=160:cbr -ovc lavc -lavcopts vcodec=mpeg4:vhq -vop scale -zoom -xy 640 -o $FILE.avi exit 0 fi if [[ $Q = l ]]; then # If l passed, use low quality. not really worth it, # hardly any smaller but much crappier mencoder dvd://$TITLE -alang en -oac mp3lame -lameopts br=96:vbr -ovc lavc -lavcopts vcodec=mpeg4:vhq -vop scale -zoom -xy 320 -o $FILE.avi exit 0 fi fi