I needed to burn an XVid of one of my performances to DVD last night, remotely, as my MythBuntu box was being used by someone else to watch some crappy TV and I wanted to show off! It was a pretty simple process, just involving a bit of a wait during the transcode 🙂
First you will need to make install the relevent packages:
sudo aptitude install dvdauthor ffmpeg ~nlibav.+-unstripped.+
If you already have dvdauthor and ffmpeg installed, you must install the unstripped libav packages as they contain a tool called mpeg2video and it’s this that does the heavy grunt work!
Next we transcode the movie and create a DVD compatible MPEG. This is the part that takes the longest to do.
ffmpeg -i performance.avi -target dvd -aspect 16:9 -sameq performance.mpg
Now we create the DVD structure, the VIDEO_TS etc. etc.
mkdir DVD
dvdauthor --title -f performance.mpg -o DVD
dvdauthor -T -o DVD
Which results in a structure that looks a lot like this:
DVD
DVD/VIDEO_TS
DVD/VIDEO_TS/VTS_01_1.VOB
DVD/VIDEO_TS/VIDEO_TS.BUP
DVD/VIDEO_TS/VTS_01_0.IFO
DVD/VIDEO_TS/VTS_01_3.VOB
DVD/VIDEO_TS/VTS_01_2.VOB
DVD/VIDEO_TS/VIDEO_TS.IFO
DVD/VIDEO_TS/VTS_01_0.BUP
DVD/AUDIO_TS
Then we create an iso image from that structure which we can then use to burn to a blank DVD
mkisofs -dvd-video -o performance.iso DVD
There are a million ways to burn the iso image, I actually SCP’d it to my MacBook and used the Disk Utility tool to burn it, but from the Ubuntu CD DVD Burning documentation you can use a tool called wodim!
You will need to install wodim
apt-get install wodim
list available DVD writers
wodim --devices
wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
0 dev='/dev/scd0' rwrw-- : 'LITE-ON' 'DVDRW SOHW-1633S'
-------------------------------------------------------------------------
Insert a disk, then burn!
wodim dev=/dev/scd0 driveropts=burnfree -v -data performance.iso