penguin

DVD Slideshow Authoring on Linux


Contents


Introduction

This HowTo describes the process for creating slideshow DVD disks, that is to say, still photos which have been put together into mpeg video streams. The photos are organized into titlesets, music background is added, and the entire set is packaged into a DVD with a navigation menu to select the particular titleset to view.

I have written this as there is little I could find published covering the entire subject currently out on the web. I did make use of 2 similar documents: February 2004: Hopefully this page will become moot in the not too distant future except for those who like to get under the hood. I recently discovered QDVDAuthor, a new GUI front end to much of what is described here. It is very much alpha software at this point but holds a lot of promise. So much so that I'm building RPM packages for RedHat and SuSE systems which are available on the Source Forge Project Page.

Required Software

The following software is necessary. Some of it is available from FreshRPMs if you run a Red Hat system. I have Red Hat 9 rpms available for the others.

Preparation

Create a working directory structure to build the DVD. For this illustration the following structure is used:

/backup/dvd
---------------/audio
---------------/dvd-build
---------------/dvdimage
---------------/mainmenu
---------------/photos
------------------------/titleset1
------------------------/titleset2
------------------------/titleset3

Prepare all the photos in the Gimp by sizing and cropping them to the correct size of 720 x 480 pixels for NTSC (720 x 576 for PAL). Select the audio file to be added to the titleset and note it's length in seconds. Knowing the length of the audio and the number of photos in the titleset, calculate the number of video frames for each photo based upon the NTSC standard of 29.97 frames/second (25 for PAL).

Create an mpeg stream for each individual photo. The following example creates a 150 frame stream:
jpeg2yuv -n 150 -I p -f 29.97 -j picture.jpg | mpeg2enc -f 8 -o picture.mpg
If you have many files to process you can automate it with this script.

Audio to be added must be in mpeg2 format at 48000 Hz. If your audio is in mp3 format first decode it to a wav file, followed by encoding as mp2:
mpg321 --wav audio.wav audio.mp3
mp2enc -r 48000 -o audio.mp2 -V < audio.wav


Create The Titlesets

Concatate all of the individual mpg slides for each photo in a titleset into a single mpg file:
cat *.mpg > video.mpg
Note that the order of the photos in the resulting stream will be in the order of directory sort. Run an ls command on the directory and rename the files to put them in the desired order.

Multiplex the audio into the stream:
mplex -f 8 -o titleset.mpg video.mpg audio.mp2
and place the resulting titleset video streams in the dvd-build directory.


Create The Menu

Create an xcf file in gimp with layers for the background image and for the buttons. Turn off anti-aliasing in text tool. Export the background layer as a jpeg file menu.jpg. Set the image mode to indexed for the button layer and export as a png file menub.png. Make sure you have no more than 4 colors in the png file.

Create the menu.xml file for spumux:

Create a 1 second mepg stream of background image and multiplex silent audio in and add subtitles with spumux:
jpeg2yuv -n 30 -I p -f 29.97 -j menu.jpg | mpeg2enc -n p -f 8 -o menu.m2v
mplex -f 8 -o /dev/stdout menu.m2v silence.mp2 | spumux -v 2 menu.xml > menu.mpg

Copy the resulting menu.mpg to the dvd-build directory.


Create the DVD

Create the dvdauthor control file dvd.xml and place it in the dvd-build directory with the mpg streams. Change to the dvd-build directory and create the DVD image:
dvdauthor -x dvd.xml

You can test the completed image with xine:
xine dvd:/backup/dvd/dvdimage/VIDEO_TS/
Note the trailing slash.

To burn the DVD, change to the /backup/dvd directory and:
growisofs -Z /dev/dvd -V VOLNAME -dvd-video dvdimage
where -Z specifies your DVD burner device and -V the volume name you want on the disk.

 

Copyright © 2004 D. Scott Barninger [barninger at fairfieldcomputers dot com]