1. Read INSTALL and follow the instructions.

2. Put a DVD of your choice into your DVD reader device (assumed to be
   /dev/dvd). Use lsdvd to show titles, chapters, etc. on the
   DVD. E.g.

   lsdvd -x /dev/dvd

   gives you a real bunch of information. Decide on a title you would
   like to copy, e.g. the longest track (title) which is shown by
   lsdvd at the very bottom of its output. Assumed this it title #3.

   Furthermore decide on the audio and subpictures (aka subtitles) you
   would like to copy. Remember the audio and subpicture track numbers
   and all the associated attributes (language, format, etc.). You
   should also write down the title's total sectors. A DVD sector
   always holds 2048 byte, thus the title's full length is
   total_sectors*2kB.

3. You can now try to extract one chapter of the choosen title and
   evaporate it with vamps:

   vamps-play_title /dev/dvd 3 2 1 | vamps -E 1.5 -a 1,2 -s 3 -v > chap-02.mpg

   This gives you an MPEG-2 program stream in chap-02.mpg which
   contains

   - title 3, chapter 2, angle 1 of the DVD in /dev/dvd
   - with audio tracks 1 and 2 (-a 1,2) only, counting starts at 1
   - with subtitle 3 (-s 3) only, counting starts at 1
   - and is shrunk down to about 67% of the original program stream's size

   The -v option makes vamps show some statistics at the end.

   You can check the generated program stream with a soft player,
   e.g. mplayer. Note that all DVD related info like navigation, audio
   language, etc. is missing in mplayer. This is Ok. Anyway, video and
   audio should be fine.

4. Now you are ready to create an XML for dvdauthor. ct-dvd.xml makes
   a good starting point. You certainly will have to change:

   - the destination directory for the generated image (dest="")
   - everything in the menus section, omitting it completely is Ok,
     note that you *need* an empty vmgm section in any case
     (<vmgm> </vmgm>), see below for menu creation
   - the audio and subpicture attributes, lsdvd is your friend, please
     note that audio tracks are counted starting at 0, but subpicture
     tracks are numbered from 64 to 95!!!
   - the color palette, simply transform lsdvd's output to the format
     shown in the palette.yuv sample file
   - the <vob> items for all the title's chapters, you need one <vob> for
     each chapter

   Run dvdauthor like this:

   dvdauthor -x your-file.xml

   You may get some weird warnings from dvdauthor. Ignore them for now
   and go burn a disk and throw it into your standalone player and
   check the movie yourself. If you did not use a menu in the XML you
   will nevertheless be able to switch audio and subtitles by using
   the appropriate keys on the player's control.

   Please note that dvdauthor is currently work in progress and some
   of the latest alpha releases are reported to be broken by some
   people. Just try another version if you do not succeed. Or wait til
   Scott has fixed it ;-) BTW: Version alpha-680 should do most of
   what you want.

   Do not know how to burn a DVD? Try cdrecord-ProDVD. It can handle
   DVD-R(W) as well as DVD+R(W). You need a license key for it. But it
   is free for private, research and educational use.

   mkisofs -dvd-video -print-size -quiet /tmp/movies/ct-image

   gives you the number of sectors used on the disk. Let's assume we
   got 12345 sectors.

   mkisofs -dvd-video /tmp/movies/ct-image | cdrecord dev=0,1,0
     tsize=12345s speed=4 driveropts=burnfree fs=16M -v -

   You have to supply the SCSI ID for your DVD writer, which is 0,1,0
   above. Try

   cdrecord -scanbus

   Do *not* forget the trailing "s" with the tsize argument. Want some
   coaster?

5. If you did successfully get here you almost made it. What remains
   is a self-made menu. Try this approach:

   dvdgm.pl -H "The Sick DVD" -s "Please select" "Black Death"
     "Typhus" "Cholera" > menu.xml

   You can tailor dvdgm's other options in dvdgm.cfg. Note that you
   have to supply your own true type fonts. Search your disk or the
   net. Finally take a look at the three generated PNGs.

   Select a background image for the menu. It must have the correct
   size for the TV standard (PAL:720x576, NTSC: 720x480).
   E.g. penguin.jpg. Now use some utilities from the mjpegtools
   (V1.6.1.90 seems to work Ok, http://mjpeg.sourceforge.net, spumux
   comes with dvdauthor):

   jpegtopnm penguin.jpg | ppmtoy4m -n 1 -F25:1 -A59:54 -I t -L |
     mpeg2enc -f 8 -n p -o menu.m2v

   mplex -f 8 -o menu-tmp.mpg menu.m2v silence.mp2

   spumux menu.xml < menu-tmp.mpg > menu.mpg

   Now menu.mpg holds the program stream containing your menu. You can
   use it in the <vob> statement inside the <vmgm> section. For
   further reading regarding menus and navigation please refer to
   the documents that come with dvdauthor.

6. Write a nice Perl/Tk UI for everything above :-)
   ... as soon as there is some replacement for lsdvd which spits out
       easy to parse XML format
   ... not before dvdgm.pl also accepts its configuration in XML format
   ...
