Here is a bash script I threw together a while ago to rip dvds, you can play with the commands if you like and use them.
Code:
#!/bin/bash
#
#
# Requires: zenity, mencoder, dvdauthor, dvd+rw-tools
#
#
IFS=$'\n'
TEMP_DIR='converted'
if [ "$1" == "" ]; then
zenity --error --text="No files were specified"
exit
fi
while [ "$DRIVE_NUMBER" == "" ]
do
DRIVE_NUMBER=$(zenity --entry --text="What dvd drive is the disc in" --entry-text="dvd://1")
done
FILE=$DRIVE_NUMBER
FOLDER="${FILE%/*}"'/'
FFILE="${FILE##*/}"
mkdir "$FOLDER$TEMP_DIR"
if [ $DEINTERLACE -eq 1 ]; then
nice -n 19 mencoder "$FILE" -ss 32 -ovc x264 -x264encopts threads=auto:pass=1:turbo:bitrate=1000:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:\
direct_pred=auto:keyint=300 -vf pp=md,scale=-10:-1,harddup -oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 -ofps 24000/1001 -o /dev/null 2>&1 | \
awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Complete :\\t\\t"$3"%\\nProcessing Rate :\\t"$4"\\nTime Remaining :\\t"$6"\\nEstimated Size :\\t"$7; fflush();}' | \
nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FILE##*/} (Pass 1 of 2)" --width=450
nice -n 19 mencoder "$FILE" -ss 32 -ovc x264 -x264encopts threads=auto:pass=2:turbo:bitrate=1000:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:\
direct_pred=auto:keyint=300 -vf pp=md,scale=-10:-1,harddup -oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 -ofps 24000/1001 -o "$foLDER$TEMP_DIR/${FFILE%.*}.avi" 2>&1 | \
awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Complete :\\t\\t"$3"%\\nProcessing Rate :\\t"$4"\\nTime Remaining :\\t"$6"\\nEstimated Size :\\t"$7; fflush();}' | \
nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FILE##*/} (Pass 1 of 2)" --width=450
else
nice -n 19 mencoder "$FILE" -ss 32 -ovc x264 -x264encopts threads=auto:pass=1:turbo:bitrate=1000:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:\
direct_pred=auto:keyint=300 -vf scale=-10:-1,harddup -oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 -ofps 24000/1001 -o /dev/null 2>&1 | \
awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Complete :\\t\\t"$3"%\\nProcessing Rate :\\t"$4"\\nTime Remaining :\\t"$6"\\nEstimated Size :\\t"$7; fflush();}' | \
nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FILE##*/} (Pass 1 of 2)" --width=450
nice -n 19 mencoder "$FILE" -ss 32 -ovc x264 -x264encopts threads=auto:pass=2:turbo:bitrate=1000:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:\
direct_pred=auto:keyint=300 -vf scale=-10:-1,harddup -oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 -ofps 24000/1001 -o "$foLDER$TEMP_DIR/${FFILE%.*}.avi" 2>&1 | \
awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Complete :\\t\\t"$3"%\\nProcessing Rate :\\t"$4"\\nTime Remaining :\\t"$6"\\nEstimated Size :\\t"$7; fflush();}' | \
nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FILE##*/} (Pass 1 of 2)" --width=450
fi
rm divx2pass.log divx2pass.log.mbtree
Bookmarks