DVD Authoring
From UCLUG
I've been making DVDs for quite some time now. I started on the Windows side, where you are limited to the functionality provided by the package purchased. I progressed to the Linux side to get away from Windows for several reasons. One of the best turned out to be the flexibility in DVD creation.
I wanted to have extremely customized menus. I started with 'Q' DVD-Author in August 2007. It is a good package that offers a good amount of flexibility. However, it still wasn't enough. I wanted more flexibility for the cursor graphics. I scoured the internet and looked at Varol's method in QDVDAuthor and ended up with the process below.
The goal was to:
- Edit video source files, saving certain pieces and discarding other pieces
- Create a DVD from separate video source files
- Create a custom, multi-level navigation menu for the DVD
It seems like a lot of different software and steps, which it is. However, it is actually pretty easy.
I wrote a GTK+ graphical helper program to issue the commands for me at the click of a button. Shell scripting could probably work here as well.
The Open Office presentation slides are here.
Contents |
Software Used & It's Purpose
MPlayer
- Accepts various source video formats - Navigate source video quickly to find time boundaries for trimming - Take video screen shots for navigation menu creation
MEncoder
- Transcode input video from original format to DVD format
Gimp
- Create menu backgrounds from screenshots - Create menu highlight and select subpictures - Use layers to create all the above in one file - Export different layer combinations to various image formats
mjpegtools
- Create a video sequence from a still picture - Multiplex video track and sound track together
spumux
- Use xml config file to add the navigation options to the DVD menu
DVDAuthor
- Create chapter marks - Assemble the DVD file system from the multiple transcoded videos and the menu(s)===Xine===
Xine
- Check the DVD file system on the hard drive for errors before burning to disc
growisofs
- Burn the DVD file system to a disc - Accepts volume names - Auto-detects burn rate
Process
MPlayer
- Use the arrow keys to quickly navigate
- Left, Right = jump ~10 sec
- Up, Down = jump 1 minute
- PgUp, PgDn = jump 10 minutes
- Use the on-screen display to find the time boundaries (i.e. cutting out commercials)
- Pause playback (press .)
- Take screenshot for menu background (press s)
MEncoder (copy)
- Use start time and clip length to trim the video
- Output in the source format by copying (fast)
- Quick way to verify that the trim times are correct
- I haven't found the times to be infinitely adjustable. This probably has something to do with the number of frames per second and intervals occurring on frame boundaries.
- Certainly 0.5s intervals work; I've had varying success with 0.2, 0.35, 0.5, 0.65 and 0.8 intervals (i.e. start time = 4:35.2 and trim length = 5:14.8).
Command line:
mencoder -oac copy -ovc copy -of mpeg -ss start_time -endpos clip_length -o output_fn input_fn
MEncoder (transcode)
- Transcode from source format to DVD format
- 4MB/s video bit rate produces good quality, however it can be increased or decreased as needed
- mp2 audio produces good output
- AC3 (Dolby Digital) is also available
Command line:
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -lavcopts
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=3999:keyint=18:
vstrict=0:acodec=mp2:aspect=4/3 -ofps 30000/1001 -ss start_time -endpos clip_length
-o output_fn input_fn
Note: If you don't want to deal with the command line for transcoding the source video, AVIDemuxlooks like a good editor. Check out the Wiki Docs for some good tutorials.
Gimp
- Create a 720x480 image (for NTSC Std Def)
- Import the screenshot as a layer for the menu background
- Create text items as layers for the menu options
- Create graphics items as different layers (and colors) for option select (if desired) and option highlight
- Create 3 separate output files:
- Background layer with menu option text layers
- Options linked to a sub-menu or chapters in the DVDAuthor file
- jpg format (i.e. menu.jpg)
- Highlight graphics object layers only
- Required for menu navigation
- options all in one color on a transparent background
- png format (i.e. menu-hi.png)
- Select graphics object layers only, all in a different color
- NOT Required for menu navigation
- all in one color, but different from highlight color used above
- Transparent background
- png format (i.e. menu-sel.png)
mjpegtools
- DVD menus are actually video clips w/ subtitles
- jpeg2yuv:
- Create a yuv video stream from a jpg picture
- Pipe the above output to mpeg2enc
- Convert the yuv stream to mp2 video file
- Save the file for use in the next step
Command line:
jpeg2yuv -n 30 -I p -f 29.97 -j menu.jpg | mpeg2enc -n n -f 8 -a 2 -o menu.m2v
- Multiplex the mpeg2 video with audio tracks of your choice (english, spanish, etc.)
- I chose silent menus
Command line:
mplex -f 8 -S 0 -M -o menu.mpg menu.m2v silence.mp2
spumux
- Add the highlight and select subpictures to the movie clip created in previous step
- Uses a xml configuration file
- Will automatically detect the menu buttons based on a composite of the highlight and select subpicture files
- I use a shell script to accomplish the mjpegtools & spumux steps
- Easiest since it requires the least input
- Otherwise the top-left and bottom-right coordinates must be explicitly specified for each button
- spumux config file menu.xml
<subpictures>
<stream>
<spu start="00:00:00" highlight="menu-hi.png" select="menu-sel.png" force="yes" autooutline="infer" autoorder="rows" >
</spu>
</stream>
</subpictures>
Command line:
spumux -m dvd menu.xml < menu.mpg > menu-buttoned.mpg
DVDAuthor
- Use a xml file to configure the DVD file system
- Assemble multiple video source files together to create a coherent stream (titleset), i.e. when a captured TV show is trimmed into several files to remove the commercials
- Create chapter marks in the video stream for points of interest or ease of navigation (i.e. every 6 min)
- The chapter marks can be linked to the custom menu buttons if desired
- Hard drive space requirement
- DVD file system output from DVDAuthor (up to 4.7GB for single-layer)
- DVD formatted source video from Mencoder Step 2 (same size as above)
- Actual source video (unknown size AVI, MPEG, MOV, other)
Command line:
dvdauthor -x path_to_dvdauthor_xml_file
Xine
- Another powerful video player
- Best part is it will play a DVD file system from a hard drive as if were already burned on a disc
- Use it to verify the quality of the DVDAuthor compilation before burning
- Menu buttons operate as designed
- Typos in menus
- Chapter marks at the correct location
Command line:
xine dvd://path_to_directory_containing_DVD_file_system
growisofs
- Burn the DVD file system to specified disc drive
- Will accept a volume label
- Substitute /dev/scd0 with your device location
Command line:
growisofs -Z /dev/scd0 -dvd-video -V 'label' path_to_directory_containing_DVD_file_system
My dvdauthor.xml control template
- This file creates a main menu that points to 5 submenus. Each of these submenus corresponds to chapter marks of a 30-minute TV episode.
- The submenu, the episode and the chapter marks are contained in the 5 <titleset> portions.
- Each episode consists of 4 video chunks due to the trimming out of the commercials. The video chunks are contained on the <vob> lines. Chapter marks are a comma-separated list of times with the format hh:mm:ss
<dvdauthor dest="/home/mike/DVD/ge01/disc">
<vmgm>
<fpc> g0=1024;
jump vmgm menu entry title;
</fpc>
<menus lang="en">
<video format="ntsc" aspect="4:3" resolution="720x480"/>
<pgc entry="title">
<pre> button=g0; g1=1024; </pre>
<vob file="/home/mike/DVD/ge01/main/menu-buttoned.mpg" pause="inf"></vob>
<button> g0=button; jump titleset 1 menu;</button>
<button> g0=button; jump titleset 2 menu;</button>
<button> g0=button; jump titleset 3 menu;</button>
<button> g0=button; jump titleset 4 menu;</button>
<button> g0=button; jump titleset 5 menu;</button>
</pgc>
</menus>
</vmgm>
<titleset>
<menus>
<pgc entry="root">
<pre> button=g1; </pre>
<vob file="/home/mike/DVD/ge01/sub1/menu-buttoned.mpg"></vob>
<button> g1=button; jump title 1 chapter 1;</button>
<button> g1=button; jump title 1 chapter 2;</button>
<button> g1=button; jump title 1 chapter 3;</button>
<button> g1=button; jump title 1 chapter 4;</button>
<button> g1=button; jump title 1 chapter 5;</button>
<button> jump vmgm menu;</button>
</pgc>
</menus>
<titles>
<pgc>
<vob file="/home/mike/DVD/ge01/sub1/part01.mpeg" chapters="0,4:23"></vob>
<vob file="/home/mike/DVD/ge01/sub1/part02.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub1/part03.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub1/part04.mpeg"></vob>
<post> call vmgm menu; </post>
</pgc>
</titles>
</titleset>
<titleset>
<menus>
<pgc entry="root">
<pre> button=g1; </pre>
<vob file="/home/mike/DVD/ge01/sub2/menu-buttoned.mpg"></vob>
<button> g1=button; jump title 1 chapter 1;</button>
<button> g1=button; jump title 1 chapter 2;</button>
<button> g1=button; jump title 1 chapter 3;</button>
<button> g1=button; jump title 1 chapter 4;</button>
<button> g1=button; jump title 1 chapter 5;</button>
<button> g1=button; jump title 1 chapter 6;</button>
<button> g1=button; jump title 1 chapter 7;</button>
<button> jump vmgm menu;</button>
</pgc>
</menus>
<titles>
<pgc>
<vob file="/home/mike/DVD/ge01/sub2/part01.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub2/part02.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub2/part03.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub2/part04.mpeg" chapters=","></vob>
<post> call vmgm menu; </post>
</pgc>
</titles>
</titleset>
<titleset>
<menus>
<pgc entry="root">
<pre> button=g1; </pre>
<vob file="/home/mike/DVD/ge01/sub3/menu-buttoned.mpg"></vob>
<button> g1=button; jump title 1 chapter 1;</button>
<button> g1=button; jump title 1 chapter 2;</button>
<button> g1=button; jump title 1 chapter 3;</button>
<button> g1=button; jump title 1 chapter 4;</button>
<button> g1=button; jump title 1 chapter 5;</button>
<button> g1=button; jump title 1 chapter 6;</button>
<button> jump vmgm menu;</button>
</pgc>
</menus>
<titles>
<pgc>
<vob file="/home/mike/DVD/ge01/sub3/part01.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub3/part02.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub3/part03.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub3/part04.mpeg" chapters=","></vob>
<post> call vmgm menu; </post>
</pgc>
</titles>
</titleset>
<titleset>
<menus>
<pgc entry="root">
<pre> button=g1; </pre>
<vob file="/home/mike/DVD/ge01/sub4/menu-buttoned.mpg"></vob>
<button> g1=button; jump title 1 chapter 1;</button>
<button> g1=button; jump title 1 chapter 2;</button>
<button> g1=button; jump title 1 chapter 3;</button>
<button> g1=button; jump title 1 chapter 4;</button>
<button> g1=button; jump title 1 chapter 5;</button>
<button> g1=button; jump title 1 chapter 6;</button>
<button> jump vmgm menu;</button>
</pgc>
</menus>
<titles>
<pgc>
<vob file="/home/mike/DVD/ge01/sub4/part01.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub4/part02.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub4/part03.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub4/part04.mpeg" chapters=","></vob>
<post> call vmgm menu; </post>
</pgc>
</titles>
</titleset>
<titleset>
<menus>
<pgc entry="root">
<pre> button=g1; </pre>
<vob file="/home/mike/DVD/ge01/sub5/menu-buttoned.mpg"></vob>
<button> g1=button; jump title 1 chapter 1;</button>
<button> g1=button; jump title 1 chapter 2;</button>
<button> g1=button; jump title 1 chapter 3;</button>
<button> g1=button; jump title 1 chapter 4;</button>
<button> g1=button; jump title 1 chapter 5;</button>
<button> g1=button; jump title 1 chapter 6;</button>
<button> jump vmgm menu;</button>
</pgc>
</menus>
<titles>
<pgc>
<vob file="/home/mike/DVD/ge01/sub5/part01.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub5/part02.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub5/part03.mpeg" chapters=","></vob>
<vob file="/home/mike/DVD/ge01/sub5/part04.mpeg" chapters=","></vob>
<post> call vmgm menu; </post>
</pgc>
</titles>
</titleset>
</dvdauthor>
Software Versions Used
- Mplayer 1.0-rc2 (includes Mencoder)
- Gimp 2.4.6)
- Mjpegtools 1.8.0)
- DVDauthor 0.6.14 (includes spumux))
- Xine 0.99.6)
- dvd+rw-tools 7.0.1 (genisoimage 1.1.6))
References
- Some thoughts on DVD authoring
- More detailed presentation
- Spumux and menu color limitations
- DVDAuthor reference
- An excellent dvdauthor.xml example
- Ways to create a DVD file system (their server went down on 10/17/08; however, this is a good reference that wil hopefully be back on line soon)

