From: Alan J. Pippin Date: Sat, 13 Feb 2010 04:34:57 +0000 (-0700) Subject: Cleaned up description of handbrake cli vars. X-Git-Tag: 2_3~2^2~1 X-Git-Url: http://git.pippins.net/embedvideo/.git/static/images/%7Bupdate_month%7D?a=commitdiff_plain;h=1b45d633c67e15045b8a6ba6113913af08bc163b;p=rip_dvd%2F.git Cleaned up description of handbrake cli vars. Added check to ensure it can find the handbrake cli if the vars are not "" --- diff --git a/rip_dvd b/rip_dvd index ecf2f67..4b32238 100755 --- a/rip_dvd +++ b/rip_dvd @@ -281,6 +281,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 @@ -655,6 +657,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 --git a/rip_dvd.conf.dist b/rip_dvd.conf.dist index 6f6b80f..42504ac 100644 --- a/rip_dvd.conf.dist +++ b/rip_dvd.conf.dist @@ -53,10 +53,12 @@ trust_feature_title_autodetect_when_uncertain=0 # 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"