Merge commit 'origin' carl/master
authorCarl Baldwin <carl@ecbaldwin.net>
Sat, 13 Feb 2010 05:09:53 +0000 (22:09 -0700)
committerCarl Baldwin <carl@ecbaldwin.net>
Sat, 13 Feb 2010 05:09:53 +0000 (22:09 -0700)
1  2 
rip_dvd
rip_dvd.conf.dist
rip_dvd.wrap

diff --combined rip_dvd
index 6b419f0d726e05908497fc8430849ad23ec110fa,4b3223865d79d429311a2ea44a742d4ad94b277a..04a32eff235f908794ae605dc9a577dfd880647e
+++ b/rip_dvd
  # 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
@@@ -274,6 -281,8 +274,8 @@@ f
  [[ ! -x `which makexml` ]] && echo "-E- missing dependency: makexml" && exit
  [[ ! -x `which dvdauthor` ]] && echo "-E- missing dependency: dvdauthor" && exit
  [[ ! -x `which mkisofs` ]] && echo "-E- missing dependency: mkisofs" && exit
+ [[ -n "$handbrake_xvid" ]] && [[ ! -x `which $handbrake_xvid` ]] && echo "-E- missing handbrake xvid encoder, set in rip_dvd.conf to: $handbrake_xvid" && exit
+ [[ -n "$handbrake_mp4" ]] && [[ ! -x `which $handbrake_mp4` ]] && echo "-E- missing handbrake mp4 encoder, set in rip_dvd.conf to: $handbrake_mp4" && exit
  [[ "$encoder" == "handbrake" ]] && [[ "$profile" =~ "xvid" ]] && [[ ! -x `which $handbrake_xvid` ]] && echo "-E- missing encoder: $handbrake_xvid" && exit
  [[ "$encoder" == "handbrake" ]] && [[ "$profile" =~ "mp4" ]] && [[ ! -x `which $handbrake_mp4` ]] && echo "-E- missing encoder: $handbrake_mp4" && exit
  [[ "$encoder" == "handbrake" ]] && [[ "$profile" =~ "ip" ]] && [[ ! -x `which $handbrake_mp4` ]] && echo "-E- missing encoder: $handbrake_mp4" && exit
@@@ -648,6 -657,8 +650,8 @@@ function encode_vob_file_handbrake 
    handbrake_cmd_line_opts="$handbrake_cmd_line_opts $SIZE"
  
    # Execute the handbrake command to encode the video
+   # I have to copy-n-paste the code below to handle the 2 conditions, 1) hb_profile (mp4) 2) no hb_profile (xvid)
+   # The problem is the -Z "$hb_profile" option. I have to quote the "$hb_profile" due to spaces in it, forcing me to call it out explicity.
    if [ -n "$hb_profile" ]; then
      echo -e "\n   Encoding: $handbrake_cli -i \"$vobfile\" -o \"$final_output_file\" -Z \"$hb_profile\" $handbrake_cmd_line_opts $handbrake_audio_opts $handbrake_video_encoder_opts >> $encodelog 2>&1" >> "$logfile"
      $handbrake_cli -i "$vobfile" -o "$final_output_file" -Z "$hb_profile" $handbrake_cmd_line_opts $handbrake_audio_opts $handbrake_video_encoder_opts >> $encodelog 2>&1
diff --combined rip_dvd.conf.dist
index 74e65221375bb4d576babaa3dd885be1f288a6b1,42504ace84954ea47c901f6c05e23896f3332376..53949a33d4a19431215877a2457834cbbfb71ded
@@@ -6,9 -6,8 +6,9 @@@
  # NOTE: You can override ANY of the global variables listed in the top of rip_dvd here
  ###########################################################################################
  
 -# specify the path to the rip_dvd script
 -ripcmd="/myth/video/bin/rip_dvd"
 +# specify the path to the rip_dvd script (no need to do this if rip_dvd is in
 +# the same directory as the rip_dvd.wrap script (which is likely).
 +# ripcmd="/myth/video/bin/rip_dvd"
  
  # Specify the device path to the DVD drive
  dev=/dev/dvd
@@@ -54,10 -53,12 +54,12 @@@ trust_feature_title_autodetect_when_unc
  # note: the xvid codec seems to be fastest with threads set to 2.
  mencoder_threads=2
  
- # handbrake parameters
- # handbrake version 0.9.3 was the last one to support xvid encoding
- # handbrake version 0.9.4 is all about mp4 encoding
- # handbrake executable name (must be found within your PATH)
+ # HandBrakeCLI Executable Name:
+ # HandBrake version <=0.9.3 was the last one to support xvid encoding.
+ # HandBrake version >=0.9.4 is all about mp4 encoding.
+ # The HandBrakeCLI executable names below must be found in your PATH.
+ # Set the handbrake_* variables below to "" for any you don't want to use.
+ # The rip_dvd script will complain if they are not "" and it can't find them.
  handbrake_xvid="HandBrakeCLI-0.9.3"
  handbrake_mp4="HandBrakeCLI-0.9.4"
  
diff --combined rip_dvd.wrap
index e9e8544b938eef68cdeee1dca32868389b63ad5c,128581d602842ee745303ed081ae561ee3b2ddfe..76fcb3ccd62883d2b6f136cf562beaa69939c350
@@@ -1,4 -1,9 +1,9 @@@
  #!/bin/bash
+ # The purpose of this script is to encapsulate the calls
+ # made to the rip_dvd script. This is done to help distribute
+ # the resulting ripped files to the proper folders. This
+ # script is called from the mythtv menus for example with a
+ # smaller set of options.
  
  ##############################################
  # COMMAND LINE PROCESSING
@@@ -16,18 -21,6 +21,18 @@@ if [ -z "$dvdtype" ]; the
    usage
  fi
  
 +mydir=$(cd $(dirname $0) && pwd)
 +if [ -z "$ripcmd" ]
 +then
 +  if [ -x "$mydir/rip_dvd" ]
 +  then
 +    ripcmd="$mydir/rip_dvd"
 +  else
 +    echo >&2 "Cannot find your rip_dvd command!"
 +    exit 1
 +  fi
 +fi
 +
  ##############################################################################
  # Local Machine Settings:
  # Sources both the "default" conf file tracked by GIT (rip_dvd.conf.dist)