DVD Authoring with DVDStyler
Written by Doug Bonnell
Posted on: 04.06.2007 at 03:38pm
Section: Tutorials


Fig. 1 DVDStyler's Startup Screen

Free software for mastering DVDs is starting to catch up with some of the commercial software in this genre. Command line tools have been available for some time, but GUI based tools have just started to become usable. One such GUI is DVDStyler.

DVDStyler provides for simple DVD menus based on static JPEG images. Currently, there is no support for animated menus, you might wish to look at QDVDauthor instead. However, DVDStyler provides a complete package for DVD authoring, creating an ISO image and burning to blank media. DVDStyler is available for both Linux and Windows.

Just click on the 'New' button to get a dialog box to start your project:


Fig. 2 Create new Project Dialog

DVDStyler supports both the North American NTSC and European/Japan PAL standards.

Next, click DVD->Add->vmMenu to add a Menu to the "Video Manager" layer of the DVD. This is typically the top menu that has options like "Play", "Chapters", "Audio Setup", etc.

Now click DVD->Add->Menu to add 'Menu 2'. DVDStyler includes a set of default background JPEGS. You can also add your custom backgrounds, just use the "Directories" tab on the left side to navigate to your own files.


Fig. 3 Project with a Video Manager Menu and two Titleset Menus

In this screen shot, I have selected "Main-Menu.jpg" as the background for the vmMenu and "Chapters-Menu.jpg" for Menu 1 and Menu 2. Just single click on the desired Menu and then double click on the desired background image:


Fig. 4 Project menus with backgrounds

The background images supplied with DVDStyler are all 720x576 to conform to PAL. If you make custom images, you can use 720x480 for NTSC only. These are for 16x9 aspect images. You might need to experiment with the image properties for 4x3. Just right click on the menu and click: Properties->Audio/Video->Aspect Ratio

Finally, bring in your MPEG2 file (or files). These will be used to create the Title Sets of the DVD as 'Title 1', 'Title2', etc.


Fig. 5 Project with all menus and one Title Set

All Title Sets must be MPEG2 files with the proper size for NTSC (720x480) or PAL (720x576). The audio must also be compatible with DVD, typically AC3 or MP2. Some DVD players also support PCM audio. Tools to convert various multimedia file formats (AVI, WMV, etc.) to MPEG2 DVD format exist for both Windows and Linux. Here some useful links:

User Guides at Doom9
Video and Audio Tools Guide for Linux

Now, add some buttons to your menus. Just click and drag the button type you want to use into the Menu image. There are text only buttons, bubble/text buttons, image buttons, arrows, etc.


Fig. 6 Dialogs to set button properties


Fig. 7 Button Focus section of Button Properties

Notice the section marked 'Focus'? Those four boxes correspond to the navigation buttons on your DVD player's remote control. If you have a nice grid, you can use 'Auto', otherwise, you can specify where the focus moves for each button on the menu.


Fig. 8 Buttons added to the Video Manager Menu


Fig. 9 Buttons added to the Title Set 1 Menu 1


Fig. 10 Buttons added to the Title Set 1 Menu 2

A final hint for the buttons. Each menu needs to have the 'focus' forced to a starting button. To do this, edit the properties for the menu and add a 'Pre Command' to force focus to the first button. A variable called 'button' is set to a multiple of the decimal value 1024, so if you want starting focus on button 2, use 2048 for the value:


Fig. 11 Forcing focus to button 1 with Pre Command

Finally, setup the time stamp values for the individual chapters in the Title Set. Right click on your Title Set at the bottom and select 'Properties'. You can then edit the chapters:


Fig. 12 Edit the Chapter time stamps for your video

Notice that after the Title finishes playing, the 'Post command' returns control to the Video Manager Menu. Now, double check all your buttons, making certain they all jump to the proper Title/Chapter, etc. and you are ready to master your new DVD! Just click File->Save As to save your project and then click File->Burn dvd... to start the mastering process.

The Burn dialog allows you to create an ISO disk image, burn to DVD burner, preview the DVD before burning it, etc.


Fig. 13 The Burn dialog

 

DVDStyler “Under the Hood”

DVDStyler is a GUI wrapper for a number of simpler tools. This section gives a bit of information about what goes on “behind the scenes” in order to complete the DVD mastering process.


Fig. A Configuration->Settings-Core

Your MPEG2 video file/files for the Title Sets already are setup with proper video and audio streams.  Each menu on a DVD is also an MPEG2 video/audio stream. DVDStyler uses the 'jpeg2yuv', 'mpeg2enc' and 'mplex' commands to convert the JPEG menu backgrounds into MPEG2 streams.  As currently configured, DVDStyler has a silent audio stream for the menus, there is no background sound when the menus are displayed.

If you check 'Don't remove temp files', you will see a set of files created for each menu during the mastering process. These files are created in the following order:

  • menu0-0.mpg_bg.jpg        The background JPEG
  • menu0-0.mpg_bg.m2v    The 'jpeg2yuv' + 'mpeg2enc' video stream
  • menu0-0.mpg_bg.mpg    The video/audio stream after 'mplex'

There is one final step to creating the finished menu MPEG2 files. The buttons are actually subtitles that are overlayed onto the menu video stream. The command 'spumux' creates the button overlays and places them at the proper positions for the menu being created. Spumux uses an XML file to know what button images to use as overlays, positioning, etc.

<?xml version="1.0" encoding="utf-8"?>
<subpictures>
 <stream>
   <spu transparent="080808" highlight="/home/doug/Fogerty/dvd/menu0-0.mpg_highlight.png" force="yes" start="00:00:00.00" select="/home/doug/Fogerty/dvd/menu0-0.mpg_select.png" image="/home/doug/Fogerty/dvd/menu0-0.mpg_buttons.png">
     <button name="button01" x1="229" x0="64" y1="220" down="button02" y0="168" up="button02"/>
     <button name="button02" x1="229" x0="64" y1="284" down="button01" y0="232" up="button01"/>
   </spu>
 </stream>
</subpictures>

Fig. B Sample XML config file for Spumux

Now, spumux is run on the file 'menu0-0.mpg_bg.mpg' with the XML config file and the result is the final menu MPEG2 file:

  • menu0-0.mpg

The menus are now complete. It's time to invoke 'dvdauthor' to create the AUDIO_TS and VIDEO_TS directories that hold the finished DVD files. Dvdauthor also uses an XML file to create the format of the DVD menu/title structures. 'VIDEO_TS.VOB' is the Video Manager Menu, 'VTS_01_0/1.VOB' are the Title Set Menus and 'VTS_01_2/3.VOB are the actual video stream.


Fig. C Sample XML config file for dvdauthor

The remaining commands allow the viewing of the DVD before burning and creation of the ISO file and actual burning of the DVD media. Below is a sample XML file for the dvdauthor command that ties all the menus and videos together to create the DVD.

<?xml version="1.0" encoding="utf-8"?>
<dvdauthor jumppad="1">
<vmgm>
<menus>
<video aspect="16:9"/>
<pgc entry="title">
<button name="button01">g0=1;jump titleset 1 title 1;</button>
<button name="button02">g0=0;jump titleset 1 menu;</button>
<vob pause="inf" file="/home/doug/Fogerty/dvd/menu0-0.mpg"/>
<pre>button = 1024;</pre>
</pgc>
</menus>
</vmgm>
<titleset>
<menus>
<video aspect="16:9"/>
<pgc entry="root">
<button name="button01">g0=0;jump title 1;</button>
<button name="button02">g0=0;jump title 1 chapter 2;</button>
<button name="button03">g0=0;jump title 1 chapter 3;</button>
<button name="button04">g0=0;jump title 1 chapter 4;</button>
<button name="button05">g0=0;jump title 1 chapter 5;</button>
<button name="button06">g0=0;jump title 1 chapter 6;</button>
<button name="button07">g0=0;jump title 1 chapter 7;</button>
<button name="button08">g0=0;jump title 1 chapter 8;</button>
<button name="button10">g0=0;jump vmgm menu;</button>
<button name="button11">g0=0;jump menu 2;</button>
<vob pause="inf" file="/home/doug/Fogerty/dvd/menu1-0.mpg"/>
<pre>button = 1024;</pre>
</pgc>
<pgc entry="ptt">
<button name="button01">g0=0;jump title 1 chapter 9;</button>
<button name="button02">g0=0;jump title 1 chapter 10;</button>
<button name="button03">g0=0;jump title 1 chapter 11;</button>
<button name="button04">g0=0;jump title 1 chapter 12;</button>
<button name="button05">g0=0;jump title 1 chapter 13;</button>
<button name="button06">g0=0;jump title 1 chapter 14;</button>
<button name="button07">g0=0;jump title 1 chapter 15;</button>
<button name="button08">g0=0;jump menu 1;</button>
<vob pause="inf" file="/home/doug/Fogerty/dvd/menu1-1.mpg"/>
<pre>button = 1024;</pre>
</pgc>
</menus>
<titles>
<pgc>
<vob chapters="00:00, 04:08, 07:29, 10:04, 13:57, 17:40, 21:03, 24:00, 28:47, 32:51, 36:16, 40:11, 42:32, 45:00, 47:43" file="/home/doug/Fogerty/JohnFogerty.mpg"/>
<post>call vmgm menu 1;</post>
</pgc>
</titles>
</titleset>
</dvdauthor>

Fig. D Sample XML config file for dvdauthor