Authoring a DVD

I’m using DVDStyler to create a DVD of video I shot in Florida on vacation with the kids. DVDStyler (or any authoring software) needs a temporary directory:

# qtparted
Create 50 GB partition (/dev/hdb2)
# mkfs.ext3 -c -L temp /dev/hdb2
Add this line to /etc/fstab:
/dev/hdb2 /mnt/temp ext3 defaults 0 0
# mkdir /mnt/temp
# mount /mnt/temp

I edited the videos in Kino and output individual MPEG files for each chapter. I grabbed frames to use in the menus in DVDStyler. I have four sub-menus under the “scenes” menu. On the main scenes menu, I took one frame from each of the submenus as a button. On each submenu, that same frame was used as a background. So it didn’t get in the way of the buttons, I edited the frame in Gimp, set a grey (R=G=B=128) background and put the frame in a foreground layer with 25% opacity.

Each button is a rectangle with the image in it. The border is set to be normally transparent, but yellow when selected.

DVDStyler will either generate the DVD structure, an ISO or burn the DVD. I used the first while checking my menus, then the second when checking the DVD in a standalone player. I had trouble with the DVD player using a DVD+RW disk. My Sony DVD/VCR combo said:

This disc cannot be played.

Playback prohibit by area limitations.

DVD_ERRLOG5 00DF5108000000000007
05040728000800000100A7

That made me think the disk was generated with a non-US region code. Here’s a page on how to check the region code. I took the dvd.iso file and did this:

# mount dvd.iso /mnt/loop -t udf -o loop=/dev/loop3
$ cd /mnt/loop/VIDEO_TS
$ emacs VIDEO_TS.IFO

In Emacs, switch to hex mode with M-x hexl-mode RET. At offset 0x23, if the value is 0, there’s no region set. That’s what I saw.

$ cd /
# umount /mnt/loop

Thinking it must be the DVD+RW disk, I burned a DVD+R:

# growisofs -dvd-compat -Z /dev/dvd=dvd.iso

That failed too. The standalone player showed the same error. I found a bug in DVDStyler 1.5b6 and earlier that causes this on NTSC players. The workaround notes a page that doesn’t exist anymore, but there are files attached at the end of the bug report.

Then I got this error:

**ERROR: [mplex] Can't find next AC3 frame: @ 72192 we have 0a20 - broken bit-stream?
Error executing of command: mplex -f 8 -S 0 -M -V -o "/mnt/temp/florida-2007/dvd/menu1-0.mpg_bg.mpg" "/mnt/temp/florida-2007/dvd/menu1-0.mpg_bg.m2v" "/usr/share/dvdstyler/data/silence.mp2"

I found a page with instructions to generate silence.mp2:

$ arecord -f dat -twav -d 1 silence.wav
$ mp2enc -r 48000 -o silence.mp2 < silence.wav

That fixed the problem.