DVD Authoring On Linux

James Holden

WYLUG

11th April 2005

Contents

Tools of the Trade

Capturing and Editing

DVD Menu Structure

Creating the Menus

Configuring the DVD

Authoring and Burning

Tools of the Trade

A DV camcorder and lots of disk space

IEEE1394 Support (aka Firewire, iLink, DVLink)

Kino

Gimp

mjpegTools

jpegtopnm, ppmtoy4m, mpeg2enc, mplex, spmux

dvdauthor

mkisofs and dvdrecord

Captuning and Editing

Kernel modules

ieee1394, ohci1394 – transport and hardware

raw1394 – camera control

dv1394 – DV in/out

Use Kino to capture and edit

Export from Kino as:

MPEG file format 8 (DVD)

mp2enc option -r 48000

mpeg2enc option -b 4000-10000

DVD Menu Structure

Titleset

Highest level menu on disc, all discs have at least 1

Files for a titleset are VTS_nn*

Title

Single movie

Chapter

Defined during authoring process

One follows on from the next within a movie

DVD Menu Structure

Whole disk (VMGM) or titleset (VTSM)

VMGM menus can jump to:

Another VMGM menu

The first VTSM of a titleset

The beginning of a titleset

VTSM menus can jump to:

A different VTSM within the same titleset

The start of a title or chapter within the titleset

The first VMGM on the disc

Creating the Menus

Menus are a movie with a soundtrack

Might only be one frame, or a single frame repeated

Soundtrack might be silent

DVD PAL resolution is 720x576 both 4:3 and 16:9

Create a background JPEG

Create button PNGs for 3 states

Normal

Selected

Active

Create the Menu Using Gimp

Add The Buttons

Export the Backgound

Button Images

Export 3 separate PNG files

Indexed colour

Maximum 4 palette entries, including transparent

Building the Menu

Create an XML config file for spumux:

<subpictures>

<stream>

<spu

force="yes"

start="00:00:00.00"

image="normal_menu.png"

select="selected_menu.png"

highlight="active_menu.png"

autooutline="infer"

outlinewidth="6"

autoorder="rows">

</spu>

</stream>

</subpictures>

Combine All The Files

Use jpgtopnm, pnmtoy4m and mpeg2enc to create the backgound movie file:

jpegtopnm background_image.jpg | ppmtoy4m -F25:1 -n 1 -I t -A 59:54 -L | mpeg2enc -f 8 -n p -o menumovie.m2v

Multiplex in the audio:

mplex -f 8 -o menumovie_with_sound.mp2 menumovie.m2v menusound.mp2

Use jpgtopnm, pnmtoy4m and mpeg2enc to create the backgound movie file:

spumux -v 2 menu_config.xml < menumovie_with_sound.mp2 > finished_menu.mpg

dvdauthor Configuration File

XML Format

Contained within outer-level tags:

<dvdauthor dest=”/output/directory/”>

(menu entry)

(menu entry)

</dvdauthor>

dvdauthor Configuration File

VMGM (disc) menu:

<vmgm>

<menus>

<video format=”pal”></video>

<pgc entry=”title”>

<vob file=”mainmenu.mpg”>

<button>jump title 1 chapter 1;</button>

<button>jump titleset 1 menu;</button>

</pgc>

</menus>

</vmgm>

dvdauthor Configuration File

VTSM (titleset) menu:

<titleset>

<menus>

<pgc entry="root">

<vob file="titleset_menu.mpg"></vob>

<button>jump title 1 chapter 1;</button>

<button>jump title 1 chapter 2;</button>

...

<button>jump vmgm menu;</button>

</pgc>

</menus>

<titles>

<pgc>

<vob file="title1_chapter1.mpg"></vob>

<vob file="title2_chapter2.mpg"></vob>

...

<post>call vmgm menu;</post>

</pgc>

</titles>

</titleset>

Authoring and Burning

Run dvdauthor to build the files:

dvdauthor -x config_file.xml

Test the disc:

xine /output/directory

Burn the disc to DVD+R or DVD-R:

growisofs -Z /dev/scd0 -V VOLNAME -dvd-video
/output/directory
or
mkisofs -o /tmp/image.iso -dvd-video
/output/directory
dvdrecord-v dev=0,1,0 -useinfo
driveropts=burnfree -pad -dao /tmp/image.iso

2005-04-10T18:27:41