Wed Apr 14 10:50:55 EDT 2010
One image + wave
Tools in previous post don't seem to do what I want, so let's hack it.
Goal: given a .jpeg and a .wav file, create a DVD with a track that
plays the audio, displaying the picture.
1. Prepare the image file such that its aspect ratio is 4:3.
The `transcode' script below performs scaling to the correct
resolution that incorporates standard DVD aspect rates (non-square
2. Get the time of the wave file using mplayer:
A: 0.9 (00.8) of 179.0 (02:59.0) 1.0%
Here it's 179 seconds.
Or use `wavinfo' (apt-get install wavbreaker)
3. Create a list of links to a single jpeg file:
for i in `seq -w 0 178`; do ln -s ../hatc/img_0156.jpg img$i.jpg; done
4. Use mencoder to bundle the images and the wave file into a single
MJPEG avi with raw wave.
mencoder -ovc copy -oac copy -mf fps=1:type=jpg 'mf://img*.jpg' \
-audiofile ../hatc/clock_finished.wav -o bundled.avi
5. Transcode that avi using mencoder (see the recode script). Note
that the intermediate file has an fps=1, which will be changed in
the transcoded step, using the "harddup" option.
recode dvd_ntsc bundled.avi out.vob
6. Use dvdauthor to convert the .avi to an image. See the vobs2iso
vobs2iso out.iso 1.vob 2.vob
7. Use the `burn.dvd' script
burn.dvd video out.iso
Some remarks. Tracks without audio don't seem to be such a good idea.
To create a silent wav:
dd if=/dev/zero bs=44100 count=`echo "4 $SECONDS * p" | dc` | lame -r -s 44.1 $IDS - -