Video recording, editing, creating DVD

Nothing like fiddling with MPEG packets on a rainy Saturday afternoon!

This post will be periodically updated, until a reasonably easy, scripted list of steps is documented, on how to make a DVD out of video recorded on a Linux system.

TV Receiver and MPEG2 Encoder: Hauppauge WinTV-PVR-150 (MCE Editon)
This is supposed to be for Windows Media Center Edition only, so will not install on any other Windows operating systems, but works fine on a Linux computer! There is something amazing about that sentence - will not work on Windows, works on Linux! How far has Linux come...

Software: dvdauthor, avidemux2, mkisofs, growisofs, ivtv-drivers, xine, etc
And running on a Fedora FC5 Linux system.

The goals of the steps are to use scripts to save MPEG encoded video, and then perform simple editing - cut out portions not needed, and create a simple DVD structure. Avoid transcoding of video - sure, it is technically possible to get lower bit rates from higher bit rate video, but the quality reduction using transcoding is pretty drastic (possibly because it is very complex with many possible ways to do this), so best to capture at rates desired, and make sure no intermediate step involves transcoding.

Procedure:

  1. Record video as needed, using the script shown elsewhere here - copy video for given duration. In the scheduled command, use ivtvctl commands to set bitrate, tune to correct channel. Choose a DVD-compatible bitrate, for example, I use 6Mb/sec CBR for capturing NTSC Standard-Definition video.
  2. Load up the clip in avidemux2, cut out all ads or portions that are not needed. The avidemux2 pages have good tips on how to make cuts that wll allow the video frames to be just copied - place both A and B marker on I-Frames of the MPEG stream, and then cut.
  3. After all cuts are done, in avidemux2, save the clip in DVD compatible format. For NTSC, I set the Video to be in "Copy" mode, Audio to be in "FFm AC3" mode, Format to be "MPEG PS A+V", and then run the File - Save - Save Video command.
  4. Create the DVD, the following commands will be make each given mpeg file a chapter, with no menu:
    dvdauthor -t -a ac3+en -o name-of-output-dvd-directory chap1.mpg chap2.mpg ...
    dvdauthor -o name-of-output-dvd-directory -T

    Creating menus is more complicated, applications like qdvdauthor can help, but getting this to work requires a lot of patience, and knowledge of dvdauthor XML file format.
  5. Test it using xine
    xine dvd:name-of-output-dvd-directory
  6. Burn it to a DVD!
    mkisofs -v -dvd-video -o path-to-dvd.iso name-of-output-dvd-directory
    growisofs -dvd-compat -Z /dev/hdd=path-to-dvd.iso
    (assuming /dev/hdd is the DVD writer).

All done, DVD is ready to play!