Handbrake – my handy dandy .bashrc function

By | June 17, 2013

> type ripdvd
ripdvd is a function

ripdvd () 
{ 
    title=$(lsdvd -c | grep "Disc Title" | gawk '{print $3}');
    echo "The title is: $title";
    echo "Is this ok ? y/n: ";
    read answer;
    if [[ "$answer" == "n" ]]; then
        echo "Please give new name for the movie: ";
        read title;
    fi;
    HandBrakeCLI -i /dev/cdrom -o ~/Movies/${title}.mp4 -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 --detelecine --decomb --loose-anamorphic -m -O -x b-adapt=2:rc-lookahead=50
}