Free not as in time

As JWZ says, Linux
is only free if your time has no value. Amply proven by the
time-gobbling effects of trying to make DVDs using Linux, as I’ve
discovered over the last week.

My goal: a DVD with posh front-end for the output of Avaragado

I like a challenge. I wanted to use “free” Linux software like
dvdauthor to generate the DVD menus, as I’d read that it’s much more
flexible than the PC GUIs generally available. Certainly the Roxio “DVD
Builder” software bundled with my DVD drive didn’t let me do what I want.

The plan… Use my existing PC tools to spit out suitable mpegs and
graphics for the menus to a Samba share. Use dvdauthor (and its
legions of supporting tools, gathered like brothels by a Roman fort)
to munge these and the content (the mpeg movies themselves) into the
approved DVD directory structure, menus all belled and whistled to my
desires. Then finally use mkisofs to convert that to a filesystem
image, and return to Windows for the burn.

First, dvdauthor. With the help of the newly installed apt-get,
several web sites and Google, I conquered the dependencies of
dvdauthor and its cohorts. Least shocking news of the day: dvdauthor’s
is unfinished and confusing. (Want to know what the
“cell” element’s for? “Foo”.) Still, I figured out how to do what I
wanted, just about. Using stub files instead of full movies helped
here: every time you “build” your DVD directory structure it processes
every last byte of your mpegs. (Good Thing: if you refer to a movie
more than once, it only processes it once.)

I used Photoshop (6.0) and Premiere (6.5) to design and produce the
menus. Both are Adobe products, of course, and Premiere trumpets its
ability to “seamlessly integrate” or some other marketese with
Photoshop files, “including layers”. Yes, well, up to a point. When
you import a Photoshop file into Premiere, you choose whether to
import one layer alone or all layers merged. You can’t import multiple
layers at once (I wanted to); it ignores any layer effects (which I
used); and helpfully labels the resulting imported blob with the
filename – thus making it indistinguishable from every other layer
you’ve imported from the same file. My workaround for these problems
was to use multiple Photoshop files, starting with a “master” design
which was then Save As’d into multiple copies, each of which was then
individually mangled (layers deleted and merged) to ensure I ended up
with a single layer that looked as I wanted. What a mess. Thankfully,
Premiere respected the original alpha channels. (The new Premiere Pro
apparently does this better, and also imports PNG. But I don’t have
that. I wonder what Final Cut {Pro,Express} is like on the Mac?)

OK, menus done, tick. With a suitable XML configuration file,
dvdauthor spat out the appropriate directory structure. mkisofs turned
that into an image, which I copied back to the PC to burn a test
disk, which worked fine. Helpfully both PowerDVD on Windows and xine on Linux can read
the dvdauthor output to let you test without burning.

Leaving out several iterations due to stupidity and rethinks, the
menus work. I can even type “make dvd” and get a DVD, now that I’ve
learned GNU make’s pattern-matching malarkey. I’m on nodding terms
with spumux for adding subtitles (which are the core of DVD menus) to
MPEG streams, and mplex for multiplexing multiple video and audio
streams into one file (which is how you do multi-angle DVDs and
multiple audio tracks – but before you ask, I didn’t do that).

Now the content. I sucked in my high quality versions from the
backup DV tapes, and rendered them out again as MPEG-2 straight to
Linux via Samba. Files on a DVD are limited to a gig, apparently, so I
split a couple of the videos into two. No problem, I thought:
dvdauthor lets you recombine them later – in the lingo, a DVD title
is a “pgc” comprising multiple “vob”s, which are the individual files.

Sadly dvdauthor barfs semi-randomly at these. The Malta video – two
700MB files – caused dvdauthor to segfault when writing out the DVD
index file. The workaround I found was to make each file a title, and
make the first jump straight on to the second. dvdauthor was happier
with that. Good thing too, I had to use that trick three times in
all. (The “proper” way worked once, when I used stubs for many titles
to save build time during testing. With all true files in place, the
same thing segfaulted. Bah.)

Menus and content in place, sticking plaster holding things together.
Now to make the DVD image file. Except… no disk space. (Ex-work box,
you see. Old, underpowered.)

Before you say anything, I’d planned for that. My PC’s got lots of
disk. I’d mount a PC share as smbfs and write to that using
mkisofs. What could possibly go wrong?

A 2 gig filesize limit on smbfs, that’s what would go wrong. At
precisely 61.66% progress writing the image file, to be exact.

Backup plan… Now I’d got the DVD directory structure, I didn’t need
the original mpegs processed by dvdauthor. I could delete
those. Except if I did that, I couldn’t rerun dvdauthor if something
was broken on the DVD. No problem. I copied the original mpegs back to
the PC (“118 minutes remaining”), and deleted the copies on Linux. If
I needed to rerun dvdauthor, I could do that over smbfs as all
the files were under a gig…

Then finally, I could build the final ISO image. And then I spent
another two hours copying that back to the PC over SMB and my harassed
wireless link. A short burn later, and I had my DVD.

Except it doesn’t play properly in my DVD player. I’ve updated the
DVD player’s firmware, and it claims to support DVD+RW, but it doesn’t
like this one. The menus work, and the first movie works, but the
other movies play noise instead of sound (and one of them crashes the
DVD player). Sigh. Maybe I’ll try a DVD-R, or DVD-RW, or maybe
DVD+R… or build a DVD using the simple Roxio tools and see where
that gets me…

At least it plays fine from my PC drive. If you ignore the interlacing.


1 Comment

Filed under Random

One response to “Free not as in time

  1. Anonymous

    No begining of fun

    I did some software that took jpgs and made a VCD out of them. (I wanted to put my photo albums on something that could just be placed in a DVD player and viewed simply). It was a somewhat similar experience, but did work in the end. The major problem was that many DVD players in the US do not play VCD well, or they ignore keystrokes sometimes etc. So I gave up. I did want to do it using DVD formats (you can write a DVD iso to a CD if it is less than 700MB), but there were no appropriate tools.

    Now if you could update your scripts etc so I can just point it at a Gallery server and have it replicate the site, that would be really cool (and what I ultimately want).

    On the filesystem side, consider Microsoft’s Services for Unix 3.5. It is a free download and had both NFS client and NFS server. I can’t tell what NFS version it has (IIRC v2 is limited to 2GB files as well but v3 should support any size).

    You might also want to update your wireless network to 802.11g. All the rage here are the “SuperG” ones which abuse the spec in order to run two channels and give you 108Mbps.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s