Merge commit 'origin'
[rip_dvd/.git] / rip_dvd
diff --git a/rip_dvd b/rip_dvd
index 6b419f0d726e05908497fc8430849ad23ec110fa..04a32eff235f908794ae605dc9a577dfd880647e 100755 (executable)
--- a/rip_dvd
+++ b/rip_dvd
@@ -274,6 +274,8 @@ fi
 [[ ! -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 +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