Showing revision 8
Difference (from revision 8 to revision 8) (minor diff, author diff)
(The revisions are identical or unavailable.)
Nifty script for burning DVD's.

#!/bin/bash -x
# burndvd.sh

# Figure out a Volume Lable - either parameter or use the curent dir
if [ -z $1 ]; then
        VOLLABEL=`basename $PWD`

# Setup the mkIsoFS options - same get used to get size and then again

# if this is a 'video DVD' add the switch
if [ -d video_ts ]; then mv video_ts VIDEO_TS; fi
if [ -d VIDEO_TS ]; then MKISOOPTS="-dvd-video $MKISOOPTS"; fi

# Make a md5 of all the files, in all the dirs.
if [ ! -f index.md5 ]; then
        find ./ -type f -not -name index.md5 -exec md5sum {} \;|tee index.md5

# Figure out the size, and abort if mkisofs fails
if ! SIZE=`mkisofs -print-size $MKISOOPTS`s; then
        echo mkisofs error!
        eject /mnt/dvd

mkisofs -v $MKISOOPTS\
        | cdrecord -v \
        tsize=$SIZE \
        -sao \
        dev=/dev/hdb \
        -eject \
        driveropts=burnfree \
        -ignsize -

# check the md5s of the burn - save the results in the source dir.
mount /mnt/dvd
cd /mnt/dvd
if md5sum --check index.md5; then echo md5sum is A-OK;else echo md5sum is hosed; fi 2>&1 |tee $SRCDIR/check.md5
eject -v /mnt/dvd

I need to define the burner drive and mountpoint at the top.

cdrecord will look to a config file for burner device and options, that would make this more portable.

Transcode Wiki | Recent Changes | Preferences
Password required to edit | View other revisions | View current revision
Edited December 29, 2004 10:33 pm by CarlK (diff)