Video DVDs
Making Video DVDs with Linux
By: Andy Stewart
March 23, 2005
Introduction
- Video source = TV capture card (NTSC)
- Simple video editing with avidemux2
- cut out commercials
- save a frame for DVD menu
- save an audio clip for DVD menu
- DVD menu
- your own background music
- your own background graphic
- multiple videos up to 4.7GB space limit of DVD
- View the DVD files with xine/mplayer
- Burn the DVD – it'll work on any DVD player
Required Software
- avidemux2 – for simple video editing
- version = 2.0.38rc1 + “mpegpatch”
- mjpegtools – version 1.6.2
- dvdauthor – to create the DVD files and dirs
- dvd+rw-tools – provides growisofs
- gimp – to create DVD menu graphics
Hardware Requirements
- LOTS of disk space needed
- minimum 10GB per DVD
- (ok, maybe that's not so much these days...)
- I/O intensive – use fast disks and controllers
- CPU intensive – use a fast processor, or be prepared to wait patiently...
Video Source
- TV capture card (for this talk)
- Hauppauge 350 creates .nuv files
- Actually, any video source can be used
Video Editing
- avidemux2 is used for (simple) video editing
- File->Open_Video
- Load file – indexing may take a long time
- Cut out commercials, etc.
- Set output format to “Mpeg video”
- File->Save->Save_Video as file.m2v
Audio->Save_Audio as file.mp2
Save files for menu
- Find a frame and save it for DVD menu
- File->Save->Save_Images->Save_JPEG_Image
- save as jpeg file: menu.jpg
- Find some audio and save it as menu.mp2
Mplex audio and video
- avidemux2 created separate audio and video files. Check file types with “file” command
- video = MPEG Video Stream data
- audio = MP2, 384 kBits, 48 kHz, Stereo
- Run mplex to create one file with audio/video
- mplex -f 8 -O 100ms -o file.mpg file.mp2 file.m2v
- -f 8 indicates DVD format
- -O indicates a/v time skew
- beware audio out of sync with video
- view file.mpg with xine/mplayer and check a/v sync
- -o file.mpg is the combined a/v output file
DVD with no menu
- DVD with no menu, one program:
- Run dvdauthor:
- dvdauthor -o DVD file.mpg
- dvdauthor -T -o DVD
- -o DVD puts files in newly created DVD directory
- -T = table of contents
- Try it before burning it to DVD:
- xine dvd:/your_full_dir/DVD/VIDEO_TS/
- Burn it:
- growisofs -Z /dev/scd0 -dvd-video DVD
- Result: a DVD that starts playing the video automatically
Create the DVD menu
- Find a JPEG image for the DVD background
- use avidemux2 and save one (menu.jpg)
- Create a video file from this one image
- jpeg2yuv -n 50 -I p -f 29.97 -j menu.jpg |
mpeg2enc -n n -f 8 -o menu.m2v
- Create some audio for the background
- use avidemux2 and save an audio clip (menu.mp2)
- create silence:
- dd if=/dev/zero bs=4 count=2000 |
toolame -b 128 -s 48 /dev/stdin menu.mp2
Create the DVD menu
- Merge menu audio and video:
- mplex -f 8 -o menu.mpg menu.m2v menu.mp2
- Use xine/mplayer to see if menu.mpg is OK
- Use Gimp to create menu selections overlaying the menu background graphic (details omitted)
- Create the menu.xml file
- Create final menu file:
- spumux menu.xml < menu.mpg > menu_final.mpg
Create the DVD
- Create the dvd.xml file
- This ties the menu choices to the video files
- Create the DVD files and directory structure:
- Test the resulting files:
- xine dvd://your_full_dir/DVD/VIDEO_TS/
- Burn the DVD:
- growisofs -Z /dev/scd0 -dvd-video DVD
- Test the DVD with xine/mplayer
- Test it in your home DVD player
Other Tools
- QDVDAuthor
- an alpha quality GUI for DVD creation
- much easier to create menus than with Gimp
- My limited experience: DVD doesn't quite work in home DVD player, OK on computer, need to play more with this...
- kino – video capture and editing
- useful for Firewire (IEE 1394) devices
- Cinelerra – professional quality tool
Conclusion
- The tools have many options not explored
- Make your own DVDs at home