By now, you should have
assembled a script file in
PPML format,
encoded the video into an mpeg video file (in our example,
output.m2v
), and
extracted the audio to a
separate file (audio.ac3
in our example). The next step is to
combine the audio and video tracks into a single mpeg file, using
mplex
from the mjpegtools
suite:
mplex -f 8 -M -V -o output-%d.mpg output.m2v audio.ac3
By default, mplex
will split up files into chunks that are no
larger than 2GB. In the above example, the chunks will be saved as
output-1.mpg
, output-2.mpg
, etc. This behavior is an
outdated defensive tactic intended to protect against systems with
inadequate support for large files. Since modern linux is not
such a system, it is recommended to recombine the files into one large
output.mpg
file to simplify the next step:
cat output-*.mpg > output.mpg
Find or make a directory with lots of free space (such as
/dvd
), and run the following series of commands from the
dvdauthor
suite:
dvddirgen -o /dvd
dvdauthor -o /dvd -a ac3+ja output.mpg
dvdauthor -o /dvd -T
Replace ac3
with mp2
or pcm
if your audio track is one
of these formats, and replace ja
with the two letter language
code of the actual language used in the audio track (en
for
English, ja
for Japanese, fr
for French, de
for German,
and so on).
There are two ways to create a DVD having multiple chapters. The
simplest is to give multiple MPEG files on the dvdauthor
command
line, e.g.:
dvdauthor -o /dvd -a ac3+ja output1.mpg output2.mpg output3.mpg output4.mpg
The other way is to pass a list of comma-separated H:MM:SS.SS
times to
dvdauthor
using the --chapter
flag, e.g.:
dvdauthor -o /dvd -a ac3+ja --chapter 0:24:36.52,0:48:15.98,1:12:42.10 output.mpg
Make an ISO filesystem:
mkisofs -dvd-video -udf -r -o /dvd.iso /dvd
and burn it using dvdrecord
if you have a DVD-R drive:
dvdrecord -v -dao -speed=4 -dev=0,0,0 -driveropts=burnproof /dvd.iso
or using growisofs
if you have a DVD+R drive:
dvd+rw-format -f /dev/scd0
growisofs -Z /dev/scd0=/dvd.iso
You're done. Enjoy!