Change gddrescue to ddrescue in comments and README.
[rip_dvd/.git] / rip_dvd
diff --git a/rip_dvd b/rip_dvd
index e68012a3f237df2190c5053bbb67477ef8885fd6..6b419f0d726e05908497fc8430849ad23ec110fa 100755 (executable)
--- a/rip_dvd
+++ b/rip_dvd
@@ -3,7 +3,7 @@
 # Author: Alan J. Pippin (apippin@pippins.net)
 # Date: 05/17/2009
 #
-  REV=2.0
+  REV=2.2
 #
 # Description: This script wraps a number of linux utilities to
 # create a recipe for ripping protected DVDs, circumventing 
 # Known Issues/Limitations:
 # - Mirror mode is always done in ISO mode
 #
-# Package Dependencies (apt-get install these for example):
-# lsdvd dvdauthor gddrescue dvdbackup tovid mencoder mplayer genisoimage libdvdcss2
-#
-# Specific Executable (program) Dependencies (must be found in $PATH):
-# volname makexml lsdvd dvdauthor gddrescue dvdbackup mencoder mplayer mkisofs HandBrakeCLI
-#
-# Optional Dependencies:
-# lookup imdb info/posters for mythvideo: http://www.mythtv.org/wiki/Fill_mythvideo_metadata.pl
-#
+# See the README file for information about the dependencies
+# this script has.
 
 ##############################################################################################
 # Global Variables
@@ -475,6 +468,7 @@ function encode_vob_file_handbrake {
   typeset filetype=""
   typeset handbrake_audio_opts=""
   typeset hb_profile=""
+  typeset SIZE=""
 
   # Set a variable that we will use later to determine if we found a handler for $profile or not
   typeset -i found_profile=0    
@@ -487,6 +481,10 @@ function encode_vob_file_handbrake {
   # Set our DRC option
   DRC="-D $drc"
 
+  if [ $target_size -ne 0 ]; then
+    SIZE="-S $target_size"
+  fi 
+
   # Check the global force_onepass_mode. If it is set, change our variables appropriately
   # to force 1-pass encoding across all profiles.
   if [ $force_onepass_mode -eq 1 ]; then
@@ -647,6 +645,7 @@ function encode_vob_file_handbrake {
   handbrake_cmd_line_opts="$handbrake_cmd_line_opts $PASSES"
   handbrake_cmd_line_opts="$handbrake_cmd_line_opts $DRC"
   handbrake_cmd_line_opts="$handbrake_cmd_line_opts $SCALE"
+  handbrake_cmd_line_opts="$handbrake_cmd_line_opts $SIZE"
 
   # Execute the handbrake command to encode the video
   if [ -n "$hb_profile" ]; then