Hello. This is not totally Ardour related, but useful to someone I hope. I do music for telly sometimes, and receive stuff on DVD. I make new music, sync it to picture myself and then send back a DVD so they can see if it works etc.
I mostly use Cubase to control xjadeo over midi to view picture, and Linux for all the video ripping/recombining. It’s all the same for using Ardour, just use jack transport instead of midi. This is a little bit terse, so I welcome improvements. If someone could tell me how to write pcm instead of ac3 to dvd I would be most grateful.
PART 1 Ripping and xjadeo.
Rip the video:
mencoder -idx -ovc lavc -lavcopts keyint=1 -nosound dvd:// -o dvdoutput_file.avi
Rip the audio:
mplayer dvd:// -vc null -vo null -ao pcm:fast
(this creates the file audiodump.wav)
Play the video synced over midi:
xjadeo -m 28 -f 25 -C dvdoutput_file.avi
xjadeo -m 28 -M 2 -f 25 -C dvdoutput_file.avi
(-m 28 specifies the midi port)
or with jack transport:
xjadeo -f 25 dvdoutput_file.avi
For non mencoded (keyframe every frame), this works for the moment:
xjadeo -K -f 25 sunmjpeg4.avi
xjadeo -K -f 25 -m 28 sunmjpeg4.avi
xjadeo -K -f 25 -m 28 -i 2 sunmjpeg4.avi
Edit soundtrack till happy.
PART 2 Recombining.
NOW EXPORT SYNC AUDIO AS A NEW AUDIODUMP.WAV from sequencer.
To make combined audio+vid output file:
ffmpeg -i audiodump.wav -i dvdoutput_file.avi -acodec copy -vcodec copy combina.avi
(works for full good quality copy! Won’t play on Windows. )
Or if new DVD is not required and target is Win.
ffmpeg -i audiodump.wav -i dvdoutput_file.avi -acodec copy -vcodec wmv1 combina.avi
(wmv1 for windows works!) low quality.
Replay the synched video:
mplayer -ao alsa:device=hw=2 combina.avi
PART 3 How to encode a dvd compatible mpeg with mencoder:
Low quality audio:
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:576,harddup -srate 48000 -af
lavcresample=48000 -lavcopts
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=4/3
-ofps 25 -o movie.mpg combina.avi
Better quality ac3 384kbps audio:
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:576,harddup -srate 48000 -af
lavcresample=48000 -lavcopts
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:acodec=ac3:abitrate=384:aspect=4/3
-ofps 25 -o movie.mpg combina.avi
PART 4 Make the DVD
Then make the dvd filesystem:
dvdauthor -o dvd/ -t movie.mpg
Then make the ifo file:
dvdauthor -o dvd/ -T
Then make the iso:
mkisofs -dvd-video -v -o DVD.iso ./dvd
Burn to DVD with K3b