X-Git-Url: http://git.pippins.net/embedvideo/.git/static/gitweb.js?a=blobdiff_plain;f=rip_dvd;h=754cda7c6d16746f3b8161ab17a32563d8bc9059;hb=e2d5d785cc746bb0b093cbcb91a7870265cba022;hp=afa9aa853f90e2544151c14a9436477c3ef180c0;hpb=a980685c30abde0264bdafc2d3ff2f5f5ac43180;p=rip_dvd%2F.git diff --git a/rip_dvd b/rip_dvd index afa9aa8..754cda7 100755 --- a/rip_dvd +++ b/rip_dvd @@ -25,20 +25,8 @@ # lookup imdb info/posters for mythvideo: http://www.mythtv.org/wiki/Fill_mythvideo_metadata.pl # -############################################################################## -# Local Machine Settings: -# Sources both the "default" conf file tracked by GIT (rip_dvd.conf.dist) -# and the local conf file created by each local machine (rip_dvd.conf) -# Copy the rip_dvd.conf.dist file to rip_dvd.conf and edit the later. -# This will allow you to override all the default values to meet your needs -# in a way that won't get clobbered when you pull updates from my GIT repo. -############################################################################## -config="${0%/*}/rip_dvd.conf" -[ -e "${config}.dist" ] && . ${config}.dist -[ -e "${config}" ] && . ${config} - ############################################################################################## -# Command line processing +# Global Variables ############################################################################################## typeset cmd="$0 $*" typeset dvdname="" @@ -72,6 +60,21 @@ typeset -i invalid_feature_title=0 typeset -i feature_title_override=0 typeset -i mplayer_dumpstream_incompatibility=0 +############################################################################## +# Local Machine Settings: +# Sources both the "default" conf file tracked by GIT (rip_dvd.conf.dist) +# and the local conf file created by each local machine (rip_dvd.conf) +# Copy the rip_dvd.conf.dist file to rip_dvd.conf and edit the later. +# This will allow you to override all the default values to meet your needs +# in a way that won't get clobbered when you pull updates from my GIT repo. +############################################################################## +config="${0%/*}/rip_dvd.conf" +[ -e "${config}.dist" ] && . ${config}.dist +[ -e "${config}" ] && . ${config} + +############################################################################################## +# Command line processing +############################################################################################## while (($#)) && getopts 12mvifkxht:n:d:b:s:t:a:p:e:j: opt "$@" do case $opt in @@ -395,7 +398,7 @@ function encode_vob_file { if [ "$profile" == "xvid" ] || [ "$profile" == "xvidhq" ] || [ "$profile" == "xvidvhq" ]; then found_profile=1 final_output_file="$dest/$dvdname.avi" - mencoder_general_opts="-quiet $lang_opts $passlogfile_opt" + mencoder_general_opts="$lang_opts $passlogfile_opt" mencoder_output_opts="-ofps 30000/1001 -ffourcc DIVX" mencoder_video_filter_opts="-vf pullup,softskip,hqdn3d=2:1:2$CROP$SCALE" mencoder_video_encoder_opts="-ovc xvid -xvidencopts $pass_opt" @@ -449,10 +452,11 @@ function encode_vob_file { fi # MP4 encoding profiles + # These are currently in BETA. They don't work that great. A new recipe is needed, for the audio. if [ "$profile" == "mp4" ] || [ "$profile" == "mp4hq" ] || [ "$profile" == "mp4vhq" ]; then found_profile=1 final_output_file="$dest/$dvdname.mp4" - mencoder_general_opts="-quiet $lang_opts $passlogfile_opt" + mencoder_general_opts="$lang_opts $passlogfile_opt" mencoder_output_opts="-ofps 30000/1001 -sws 9 -of lavf -lavfopts format=mp4" mencoder_video_filter_opts="-vf harddup$CROP$SCALE"; mencoder_video_encoder_opts="-ovc x264 -x264encopts $pass_opt" @@ -531,7 +535,7 @@ function encode_vob_file { SCALE=",dsize=320:240:0,scale=-8:-8" fi final_output_file="$dest/$dvdname.mp4" - mencoder_general_opts="-quiet $lang_opts $passlogfile_opt" + mencoder_general_opts="$lang_opts $passlogfile_opt" mencoder_output_opts="-ofps 30000/1001 -sws 9 -of lavf -lavfopts format=mp4" mencoder_video_filter_opts="-vf harddup$CROP$SCALE"; mencoder_video_encoder_opts="-ovc x264 -x264encopts $pass_opt" @@ -592,7 +596,7 @@ function encode_vob_file { fi # Concatenate the encode log to our main log file, greping out unwanted lines - cat $encodelog | grep -v "Pos:" >> "$logfile" + cat $encodelog | grep -v "^Pos:" | grep -v "duplicate" >> "$logfile" done }