Authoring DVDs with dvdauthor

From CLUG Wiki

Jump to: navigation, search

newpage icon WARNING: This is a new page.

This is a new page, and might contain technically incorrect information. Please use at your own risk. If you are able to correct any errors or expand this document, please do so.


Contents

DVD Format

For a DVD, you will need lots of lovely MPEG2 video (or MPEG1, but who would want that?).

The sound can be PCM, AC3, MP3, DTS or a couple of other formats. However, not all players support all formats. Generally the best format to use is PCM or AC3 (48kHz, 16bit).

Subtitles and menus are also in MPEG2 format :-)

Basic menuless DVD

Tools you need

# apt-get install dvdauthor transcode sox mjpegtools ffmpeg vim

Video Encoding

Use your favourite video encoder (ffmpeg) to create MPEG2 video.

You are allowed to use any bitrate between 2Mbps and 8Mbps. Remember to leave enough space for the audio (maybe encode it first...)

You can find bitrate calculators to help you: http://dvd-hq.info/Calculator.html

$ ffmpeg -target dvd -b 5600 -minrate 2200 -maxrate 9250 input.avi ffmpeg-video.mpg
$ mplayer ffmpeg-video.mpg -dumpvideo -dumpfile video.m2v

Audio Encoding

Convert your audio to PCM wav format with sox if it isn't wav already:

$ sox audio.aiff audio.wav

Convert that into ac3:

$ ffmpeg -i audio.wav -acodec ac3 -ac 2 -ab <bitrate here> audio.ac3

You can choose any bitrate above 224. 512 sounds good if you have the space for it.

Multiplexing Audio & Video

We now need to combine the audio and video into one nice MPEG PS stream:

$ mplex -f8 -o movie.mpg video.m2v audio.ac3

Author Title

DVDAuthor likes a beautifully handcrafted xml file to tell it what to do. Here is *very* basic sample (this job could probably be done without the XML file, but I want to demonstrate the file anyway:

<dvdauthor>
  <titleset>
    <titles>
      <audio lang="en" />
      <pgc>
        <vob file="movie.mpg" chapters="0,5:00,12:35,30:27,50:00" />
      </pgc>
    </titles>
  </titleset>
</dvdauthor>

Now to build the DVD filesystem:

dvdauthor -o dvd-filesystem -x dvd.xml
dvdauthor -o dvd-filesystem -T

Burn to DVD

Pick yourself a DVD (see DVD Compatibility)

growisofs -Z /dev/dvdrw -dvd-video -V "My Film" dvd-filesystem

Go and get yourself a beer or two...

Links

Here some usefull documentation ;