Difference between revisions of "Dvd2Avi"

From ArchWiki
Jump to: navigation, search
(add template:stub)
m (move up description, add code template)
Line 1: Line 1:
 
[[Category:Scripts]]
 
[[Category:Scripts]]
 
[[Category:Audio/Video]]
 
[[Category:Audio/Video]]
{{Stub|Little more than script dump}}
+
{{Stub|Little more than a script dump}}
 
A simple Bash script for [[DVD Ripping|ripping DVDs]]; missing some of the more advanced features such as cropping, but aspect ratio is kept intact.
 
A simple Bash script for [[DVD Ripping|ripping DVDs]]; missing some of the more advanced features such as cropping, but aspect ratio is kept intact.
  
<pre>
+
Here is an explanation of the various quality levels:
#!/bin/sh
+
 
 +
* High: movie is 800px wide, audio is 320kbps mp3.
 +
* Normal: movie is 640px wide, audio is 160kbps mp3.
 +
* Low: movie is 320px wide, audio is 96kbps mp3.
  
# Dvd2Avi 0.2
+
To use the script, copy and paste it into an appropriately named file (such as {{ic|dvdrip.sh}}), and then execute {{Ic|chmod +x <file>}}. See {{Ic|man mencoder}} for more information.
# Only does one title at a time, but "avimerge" from Transcode
 
# can sort it from there.
 
  
# by yyz
+
{{bc|<nowiki>
 +
#!/bin/bash
  
 
echo -n "Enter the name of output file (without extension):"
 
echo -n "Enter the name of output file (without extension):"
Line 45: Line 47:
 
exit $?
 
exit $?
 
fi
 
fi
</pre>
+
</nowiki>}}
 
 
Here is an explanation of the various quality levels:
 
* High: movie is 800px wide, audio is 320kbps mp3.
 
* Normal: movie is 640px wide, audio is 160kbps mp3.
 
* Low: movie is 320px wide, audio is 96kbps mp3.
 
 
 
To use the script, copy and paste it into an appropriately named file (such as {{ic|dvdrip.sh}}), and then execute {{Ic|chmod +x <file>}}.
 
 
 
Hopefully the script is quite easy to understand so you can change it as needed. See {{Ic|man mencoder}} for more information.
 

Revision as of 09:24, 13 September 2014


A simple Bash script for ripping DVDs; missing some of the more advanced features such as cropping, but aspect ratio is kept intact.

Here is an explanation of the various quality levels:

  • High: movie is 800px wide, audio is 320kbps mp3.
  • Normal: movie is 640px wide, audio is 160kbps mp3.
  • Low: movie is 320px wide, audio is 96kbps mp3.

To use the script, copy and paste it into an appropriately named file (such as dvdrip.sh), and then execute chmod +x <file>. See man mencoder for more information.

#!/bin/bash

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/n/l)[[n]]:"
read Q

if [[ -z $Q ]];then 
    # If no quality passed, default to normal
    Q=n
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 -vf scale -zoom -xy 800 -o $FILE.avi
exit $?
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 -vf scale -zoom -xy 640 -o $FILE.avi
exit $?
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 -vf scale -zoom -xy 320 -o $FILE.avi
exit $?
fi