Hello, I wrote a small wrapper script to burn DVD, it works very well for files smaller than 2Gb but the big one are readable in a "funny" way : if they are video files for example, mplayer can plan them, but not seek in those files ???
Could someone with more knowledge tell me what I should change in my wrapper ? Thank you very much, -- Grégoire FAVRE http://gregoire.favre.googlepages.com http://www.gnupg.org http://picasaweb.google.com/Gregoire.Favre
#!/bin/bash if [ -z "$2" ]; then echo "usage : $0 DVD_title DVD_dir [write speed]" echo "That will write a DVD with video structure if there a VIDEO_TS." echo "And without video structure if without VIDEO_TS dir" exit fi UDF=`find $2 -size +2G|wc -w` unlock() { cdrdao unlock --device 5,0,0 --driver generic-mmc && sleep 1 } sync ulimit -l unlimited if [ $UDF -eq 0 ]; then COM="-f -J -r -graft-points " if [ -z "$3" ]; then COMCD="-v dev=5,0,0 -dao fs=1000m " else COMCD="-speed=$3 -v dev=5,0,0 -dao fs=1000m " fi VIDEO=`ls $2|grep -i VIDEO_TS 2> /dev/null |wc -w` if [ $VIDEO -eq 0 ]; then OPTS=$COM SIZE=`mkisofs -f -J -r -graft-points -quiet -print-size -V $1 $2` else OPTS="$COM -dvd-video" SIZE=`mkisofs -f -J -r -graft-points -quiet -print-size -dvd-video -V $1 $2` fi mkisofs $OPTS -V $1 $2|cdrecord $COMCD tsize="$SIZE"s - else COM="-iso-level 3 -f -J -r -graft-points " if [ -z "$3" ]; then COMCD="-v dev=5,0,0 -dao fs=1000m " else COMCD="-speed=$3 -v dev=5,0,0 -dao fs=1000m " fi VIDEO=`ls $2|grep -i VIDEO_TS 2> /dev/null |wc -w` if [ $VIDEO -eq 0 ]; then OPTS=$COM SIZE=`mkisofs -iso-level 3 -f -J -r -graft-points -quiet -print-size -V $1 $2` else OPTS="$COM -dvd-video" SIZE=`mkisofs -iso-level 3 -f -J -r -graft-points -quiet -print-size -dvd-video -V $1 $2` fi mkisofs $OPTS -V $1 $2|cdrecord $COMCD tsize="$SIZE"s - fi unlock eject /dev/sr1 sleep 1 eject -t /dev/sr1 cdDir=0 while [ "$cdDir" == "0" ]; do sleep 1 mount /mnt/cdrom2 && ls -alh /mnt/cdrom2 && DF && umount /mnt/cdrom2 && cdDir=1 done sleep 1 #eject /dev/sr1 OPTIONS="delete reburn exit" select opt in $OPTIONS; do if [ "$opt" = "delete" ]; then RM $2 exit elif [ "$opt" = "reburn" ]; then echo $0 $* exit elif [ "$opt" = "exit" ]; then exit else echo bad option fi done