Time to share an oldie but goodie - ripping movies from a DVD using Linux via the command line. This is useful if you're tired of pointing and clicking around GUI rippers, you're working on DVD ripping automation, etc.
This script will grab the largest track from a DVD (i.e. the actual movie) and convert the track to AVI (MPEG-4):
#!/bin/bash
main_feature=`lsdvd | grep "Longest track" | awk '{print $3}'` # Choose the largest track for the main feature
out_file="/home/cerberus/Videos/$1.avi"
if [[ $1 != "" ]]; then
mencoder dvd://$main_feature -nosub -noautosub -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate="1200" -vf scale -zoom -xy 720 -oac mp3lame -lameopts br=128 -alang en -o $out_file
else
echo "./rip_dvd_2_avi.sh <name_of_dvd>"
#echo "Available Tracks are: "
#lsdvd
fi
Save the file as rip_dvd_2_avi.sh and change the permissions using the following command:
chmod 755 rip_dvd_2_avi.sh
Now, create a Videos folder in your home directory OR change the path of the out_file variable found on line 4 in the bash script above:
mkdir ~/Videos
and last but not least execute your super awesome script:
./rip_dvd_2_avi.sh TheNameofYourDVD
That's it. Until next time peeps!
No comments:
Post a Comment