Changed rip_dvd and rip_dvd.wrap to take advantage of this.
Introduced concept of a local config file rip_dvd.conf that a user
can create, that isn't tracked by GIT, to override the defaults.
+----------------------------------------------
+INSTALL
+----------------------------------------------
The following steps should be followed to pull this code project
into a local GIT repository (local directory):
> cd rip_dvd
> git pull origin
+----------------------------------------------
+CONFIGURATION
+----------------------------------------------
+You'll need to copy the rip_dvd.conf.dist file to a local copy of the
+file called rip_dvd.conf. This way, you can customize the settings
+needed by the script in a file that isn't tracked by GIT. The conf
+file tracked by GIT (rip_dvd.conf.dist) will then contain the defaults
+the script needs to run. You can override these in your own rip_dvd.conf
+file you create locally. This will allow you to get updates from my
+GIT repository at a later point in time without blowing away your
+local settings.
+
# Known Issues/Limitations:
# - Mirror mode is always done in ISO mode
#
-# Package Dependencies:
-# lsdvd dvdauthor gddrescue dvdbackup makexml tovid mencoder vlc mplayer genisoimage
+# 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
#
# Optional Dependencies:
# lookup imdb info/posters for mythvideo: http://www.mythtv.org/wiki/Fill_mythvideo_metadata.pl
#
-###############################################
-# Local Machine Settings - EDIT THIS SECTION
-
-# Specify the device path to the DVD drive
-dev=/dev/dvd2
-
-# Specify the path to the log directory
-logdir=/var/log/ripdvd
-
-# Specify the path to the tmp rip directory
-tmpdir=/myth/video/DVDs/.ripdvd
-
-# Specify the email address to send job notifications to
-mailto=ajp@pippins.net
-
-# Setup the path to the tools needed by this ripper
-PATH=/etc/mythtv/bin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:.:$PATH
-
-# Use mplayer dumpstream to create the main VOB file
-# If set to 0, cat and other utils will be used to make it instead.
-# Using mplayer dumpstream is by far the best way to create the main VOB file
-# The only thing this doesn't work for are DVDs with the 99 title copy protection.
-# The script will autodetect these types of disks, and change this to 0 if necessary.
-# If this is set to 0, other methods will be employed to get the DVD VOB dump.
-use_mplayer_dumpstream=1
-
-# 2-channel AVI encoding audio bit rate
-audio_bitrate=224
-
-# If set to 1, this script will call another script to fill in the mythvideo metadata
-# If you don't use mythtv, set this option to 0. If you use mythtv, and have downloaded
-# the fill_mythvideo_metadata.pl script shown above, you can leave this option set to 1.
-fill_mythvideo_metadata=1
-
-# If the 99 titleset copy protection scheme is detected, trust the autodetection or abort.
-# The autodetection may work, but it probably won't in this case. Set to 0 by default.
-# Override to 1 if you want the script to wing it, and hope it picks the right feature title.
-# Otherwise, you will need to rerun the script providing the feature title with the -t option.
-trust_feature_title_autodetect_when_uncertain=0
-
-# specify the number of threads that mencoder should use when encoding the video (AVI mode)
-# an optimal setting for this should be the number of cores you have times 2
-# note: you have to have an mplayer version that has been compiled with multi thread support.
-# if you don't, this will have no effect, but won't hurt anything to have it set otherwise.
-mencoder_threads=8
+##############################################################################
+# 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
if [ $trust_feature_title_autodetect_when_uncertain -eq 0 ]; then
echo "-E- Unable to determine the feature title due to the 99 title copy protection scheme" | tee -a "$logfile"
echo " You will need to determine this yourself and rerun the script with the -t option" | tee -a "$logfile"
+ echo " You can google this DVD to find out what it's feature title is, or you can play it in a conventional DVD player to find it." | tee -a "$logfile"
invalid_feature_title=1
else
echo " Falling back to non mplayer dumpstream methods to copy the DVD" | tee -a "$logfile"
--- /dev/null
+###########################################################################################
+# configuration file for the rip_dvd script:
+# - rip_dvd.conf.dist = contains default values (tracked by GIT)
+# - rip_dvd.conf = contains localized overrides to the default values (not tracked by GIT)
+# should initially be created by copying the rip_dvd.conf.dist
+###########################################################################################
+
+# specify the path to the rip_dvd script
+ripcmd="/myth/video/bin/rip_dvd"
+
+# Specify the device path to the DVD drive
+dev=/dev/dvd2
+
+# Specify the path to the log directory
+logdir=/var/log/ripdvd
+
+# Specify the path to the tmp rip directory
+tmpdir=/myth/video/DVDs/.ripdvd
+
+# Specify the email address to send job notifications to
+mailto=root
+
+# Setup the path to the tools needed by this ripper
+PATH=/etc/mythtv/bin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:.:$PATH
+
+# Use mplayer dumpstream to create the main VOB file
+# If set to 0, cat and other utils will be used to make it instead.
+# Using mplayer dumpstream is by far the best way to create the main VOB file
+# The only thing this doesn't work for are DVDs with the 99 title copy protection.
+# The script will autodetect these types of disks, and change this to 0 if necessary.
+# If this is set to 0, other methods will be employed to get the DVD VOB dump.
+use_mplayer_dumpstream=1
+
+# 2-channel AVI encoding audio bit rate
+audio_bitrate=224
+
+# If set to 1, this script will call another script to fill in the mythvideo metadata
+# If you don't use mythtv, set this option to 0. If you use mythtv, and have downloaded
+# the fill_mythvideo_metadata.pl script shown above, you can leave this option set to 1.
+fill_mythvideo_metadata=0
+
+# If the 99 titleset copy protection scheme is detected, trust the autodetection or abort.
+# The autodetection may work, but it probably won't in this case. Set to 0 by default.
+# Override to 1 if you want the script to wing it, and hope it picks the right feature title.
+# Otherwise, you will need to rerun the script providing the feature title with the -t option.
+trust_feature_title_autodetect_when_uncertain=0
+
+# specify the number of threads that mencoder should use when encoding the video (AVI mode)
+# an optimal setting for this should be the number of cores you have times 2
+# note: you have to have an mplayer version that has been compiled with multi thread support.
+# if you don't, this will have no effect, but won't hurt anything to have it set otherwise.
+mencoder_threads=4
+
+###########################################################################################
\ No newline at end of file
#!/bin/bash
##############################################
+# COMMAND LINE PROCESSING
+
# get the dvdtype from the command line
dvdtype=$1
# of the args to be passed directly to the rip_dvd script.
shift 1
-# specify the device path to your DVD drive
-dev=/dev/dvd2
-
-# specify the path to the rip_dvd script
-ripcmd="/myth/video/bin/rip_dvd"
-
-# get the name of the DVD from the DVD disk
-dvdname=`volname $dev | awk '{ print $1 }'`
-dvdname=${dvdname%.} # remove trailing '.' character
-
##############################################
if [ -z "$dvdtype" ]; then
echo "-E- $0 <dvdtype>' is a required option"
usage
fi
+##############################################
+# get the name of the DVD from the DVD disk
+dvdname=`volname $dev | awk '{ print $1 }'`
+dvdname=${dvdname%.} # remove trailing '.' character
+
##############################################
# Find out what type of DVD we are ripping
-# And set our destination directory appropriatel
+# And set our destination directory appropriately
# dvdtype parameter:
# - netflix = DVD ripped as an entire ISO image
# since these are only kept around until we watch them,
xterm -T "Ripping->$dvdname" -geometry 72x15+20+10 -bg black -fg white -e "/bin/bash" -c "$ripcmd -d $dest $rip_opts" &
##############################################
-# OR run the script directly without displaying a progress window
+# OR display the script output directly in the terminal it's called from
#$ripcmd -d $dest $rip_opts
##############################################