I use
mencoder to convert the files to .mpg and then I use
dvdauthor to create the DVD file structure. Once that's done, I use mkisofs and growisofs to create an iso and burn it.
Since I'm mostly just dumping out some stuff from my camera to give to a relative to look at, the following script does all I need:
Code:
#!/bin/sh
#
# Convert all of the .avi files (d/l'ed from camera) in a directory to
# mpg format for burning to DVD
#
# Settings
WORKING=./output
VOLUME=$(/usr/bin/date '+%F')
APPLICATION="Family videos"
PREPARER="Steve <steve@somewhere>"
COPYRIGHT="Copyright 2008 Steve"
ISO=dvd.iso
# Encode the .avi files to .mpg 2 format
for i in *avi;
do
ORIGINAL=`basename $i .avi`
NEWNAME=${ORIGINAL}.mpg
/usr/bin/mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:dc=10:vstrict=0:acodec=ac3:abitrate=192:aspect=4/3 \
-ofps 25 -o $NEWNAME $i
done
# Create header for dvdauthor.xml file
echo "<dvdauthor>" > dvdauthor.xml
echo " <vmgm />" >> dvdauthor.xml
echo " <titleset>" >> dvdauthor.xml
echo " <titles>" >> dvdauthor.xml
echo " <pgc>" >> dvdauthor.xml
# Populate dvdauthor.xml file
for i in *mpg;
do
echo " <vob file=\"$i\" />" >> dvdauthor.xml
done
# Create footer for dvdauthor.xml file
echo " </pgc>" >> dvdauthor.xml
echo " </titles>" >> dvdauthor.xml
echo " </titleset>" >> dvdauthor.xml
echo "</dvdauthor>" >> dvdauthor.xml
# Remove old DVD file structure, then create the DVD file structure
/usr/bin/dvddirdel -o $WORKING
/usr/bin/dvdauthor -o $WORKING -x dvdauthor.xml
# Create the DVD table of contents
/usr/bin/dvdauthor -T -o $WORKING
# Populate ~/.mkisofsrc
echo "VOLI=$VOLUME" > ~/.mkisofsrc
echo "APPI=$APPLICATION" >> ~/.mkisofsrc
echo "PREP=$PREPARER" >> ~/.mkisofsrc
echo "COPY=$COPYRIGHT" >> ~/.mkisofsrc
# Create and burn the stuff
/usr/bin/mkisofs -dvd-video $WORKING > $ISO
/usr/bin/growisofs -dvd-compat -speed=1 -Z /dev/hdc=$ISO
No doubt there are other ways to do it, depending on what other things you need to do...