Guide to making Audio only DVDs with open-source tools in GNU/Linux
Due to an upcoming release involving a DVD I’ve had to figure out how to make a dvd from a couple of multichannel tracks. I’m using a mac and I wanted to use open-source tools. The road wasn’t that easy to travel, so I’m posting my findings for other travelers in the brave new world of Linux.
1 - You will need to use dvd-author and some other tools. I tried to install them in osx, but it was just to difficult, in the end I decided to just make a virtual machine in parallels and install ubuntu 9.10.
2 - After installing ubuntu, install dvd-author (from ubuntu software center) and aften (from synaptic).
3 - The files should be multi-channel interleaved wavs. If you have them as mono files, interleave them on osx with de-interleave or use sox.
4 - In dvds the files always need audio and video, so you need to have a background image. For pal these can ben 720×576 png files.
5 - Put the png files and the wav files in a folder in ubuntu. They should be named dvd1.png, dvd2.png and dvd1.wav, dvd2.wav, etc.
6 - Depending on how many tracks you have to make a dvd.xml file for dvdauthor like this:
<dvdauthor> <vmgm /> <titleset> <titles> <pgc> <vob file="dvd1.mpg" /> <vob file="dvd2.mpg" /> <!- etc --> </pgc> </titles> </titleset> </dvdauthor> |
7 - Then run this script on that folder and wait (one hour or so in my machine)
#!/bin/bash # Miguel Negrão 2009 for file in `ls *.png` ; do echo "File is $file" # name without extension name=${file%\.*} # number of samples in audio file SAMPLES=`sox --info -s "$name".wav` echo "Number of samples is $SAMPLES" # number of corresponding pal frames PALFRAMES=`expr $SAMPLES '/' 1920` echo "Number of pal frames is $PALFRAMES" echo "converting to ac3" aften -b 448 -smix 2 -dsur 1 -acmod 6 -lfe 0 -xbsi1 1 -dmixmod 2 -lorosmix 2 "$name".wav "$name".ac3 echo "making m2v from png" pngtopnm "$file" | ppmtoy4m -F 25:1 -A 59:54 -I p -n "$PALFRAMES" -S 420mpeg2 -r | mpeg2enc -a 2 -n p -f 8 -v 2 -o "$name".m2v echo "muxing m2v and ac3" mplex -f 8 -o "$name".mpg "$name".m2v "$name".ac3 done echo "Creating DVD structure" dvdauthor -o DVDFOLDER -x dvd.xml |
8 - to make a dvd image in osx that is compatible with dvd players type in the terminal:
hdiutil makehybrid -udf -udf-volume-name MYDVD -o MY_DVD.iso DVDFOLDER |
Tags: aften, dvd authoring, dvdauthor, linux, sox