As I mentioned briefly before, I’ve been setting up a MythTV system at home. MythTV is a Linux-based open-source PVR system. Used properly, you’ll end up with something TiVo-like. Used improperly, you’ll end up with a massive headache and a sore throat from screaming at your computer.

I should start with a bit of background. I have two TiVos, and I love them, mostly. I loved them a lot more before the hardware on one box started flaking out, and before they started sucking up to the TV networks. What I really want is a way to record the TV shows that I watch and then share them between our two TVs, so I can watch the same show on either TV, and then delete it when I’ve finished watching it. With newer TiVos, you can copy shows between TiVos, but it’s just a copy–if I record it upstairs, then I can copy it downstairs and watch it, but I’ll need to delete it in both places once I’m done with it. I’d also like to be able to listen to music and watch DVDs on the same hardware; the ability to rip DVDs would be nice. I’d like the ability to expand my storage is critical–I have roughly 1 TB of disk space in my house, and I’d like to be able to use as much of that as possible for storing video. Finally, and really most importantly, I’d like to have the ability to fix things when they break–I haven’t had any luck with that with TiVo–one system crashes daily, and there’s nothing that I can do to fix it, short of spending hours sitting on hold with their tech-support system.

What I really want is the TV equivalent of iTunes–I want to be able to take the big mound of DVDs that I have sitting around, RIP them, and move them to the basement, next to the big mound of CDs that I used to listen to. I want to be able to pick and choose from upcoming TV events and add them to the library, just like DVDs. I want to be able to watch the movies on any TV in my house without remembering where it’s stored or worrying about the kids scratching the fragile little things. I’d really like it to Just Work, just like iTunes and the iPod, or like TiVo usually does. And I’d like it to work for me, not for network companies, record producers, or movie studios.

The closest that I can come to this today is MythTV. It supports recording TV, playing and ripping DVDs, playing MP3s, and displaying digital images. It networks nicely. It’s open-source and expandable.

It’s also a complete bitch to install. Once it’s installed, using it isn’t exactly a walk in the park, either.

I’m certainly not afraid of Linux in any of its incarnations, but I’d had a number of people tell me what a pain MythTV is to install, so I decided to try KnoppMyth, a Linux distribution customized for MythTV. It’s based on Debian, my favorite Linux distribution, and it comes with MythTV pre-installed and configured. I figured it wouldn’t be too hard to use KnoppMyth to take MythTV for a quick spin. I even had a spare small-form-factor system with a Celeron 2.4, a Bt878-based TV capture card, and a DVD drive sitting around.

Here’s a short list of what went wrong: 1. The KnoppMyth installer locked up in the middle of the install when I told it to do an automatic install. 2. When I tried again with a manual install, it didn’t default to installing onto any particular hard drive partition. I had to monkey with it briefly to tell it to install onto the boot partition that I’d just created. If I skipped through with just the defaults, I got an error later on when it tried to format a drive named ‘’. 3. Once it had finished installing, even though it had formatted two partitions for /myth and /cache, it failed to mount them. This resulted in errors that I had to fix by manually editing /etc/fstab. 4. The MythTV setup procedure consists of an xterm that asks a handful of questions. Without a mouse, it’s non-obvious how to select the xterm so you can type into it (Alt-Tab, space, if I recall correctly), and then it’s not obvious what to do–I had to re-run the installer repeatedly to get my channel listings correct, for example, because nothing said that I needed to go to, register, and get a username and password. 5. Once MythTV was running, I was still unable to access the DVD drive at all–putting in a disk and hitting ‘Play DVD’ would cause the menu to flicker slightly, but it didn’t play the DVD or return an error. A bit of digging showed that the /dev/scd* devices weren’t owned by the cdrom group, so MythTV couldn’t access them. Once that was fixed, DVDs played correctly (plus or minus CSS problems, but we’ll ignore that little issue–it’s political, not technical). 6. DVD ripping complained about the transcoding daemon not running, and never seemed to actually do anything. 7. Dropping video files into /myth/video didn’t seem to make videos visible to MythTV. 8. Live TV video worked, but recording TV produced files that were way too dim to view. Live TV audio didn’t work, even though it should have been available directly from the Bt878 decoder chip, but loading the btaudio driver doesn’t seem to produce any effect that I can see.

Most of these are just stupid integration issues; there’s no reason for them to exist in any even slightly polished product. KnoppMyth is at version 4r5; you’d think the CD ownership settings would have been fixed by now, right?

At this point, it had taken me about a half day to get MythTV to work, and all I could do was watch broadcast TV via rabbit ears and play DVDs. I could have accomplished the same thing by plugging the rabbit ears into a TV and buying an $18 DVD player (that was the cheapest “black friday” ad that I saw this year).

I probably would have dropped the project if an InFocus X1a projector hadn’t fallen into my hands. The InFocus is a 800x600 DLP projector that works with composite, svideo, HDTV, or VGA sources, but it’s happiest with VGA. So I had a project–mate the MythTV box to the projector. A few quick tests with MythTV’s DVD player shows that it looks way better then the same DVD via NTSC from my old RCA DVD player. Finding Nemo was gorgeous.

So, here’s all that I’ve had to do to get this to work right: 1. Go to Fry’s on Black Friday to find a 25-foot stereo 18” plug to RCA cable. 2. Pick up the cheapest USB remote control gizmo they had there. 3. Recompile LIRC to support the StreamZap remote that Fry’s had sent me. This required re-creating KnoppMyth’s patched kernel so that the StreamZap patches would build. 4. Figure out how to debug LIRC problems. Hint: use irw, because strace on lircd is pointless. 5. Set up key mappings for MythTV and mplayer for the new remote. Half of the keys aren’t mapped to anything right now, because I can’t find the right feature to map onto. 6. Set up NFS so I can store videos and music on my home file server. 7. Copy 15 GB of music out of iTunes and into MythTV. 8. Point MythTV to my home picture library. 9. Upgrade like half of the software on the box to get MythPhone and Torrentocracy to compile. I ended up hand-patching Torrentocracy, and it still crashes MythTV whenever I try to use it. 10. Figure out how to import videos. It turns out to be trivial–just copy the file into /myth/video, then go to the “Utilities/Setup” menu, then “Video Manager,” and then edit the metadata so the video has a reasonable name. Once you’ve done that, it’ll show up in the menu under “Media Library”/“Watch Videos”. Yes, this is a new meaning of the word “trivial” that you haven’t seen before.

Things that still don’t work: 1. Playing DVDs or DVD rips with AC3 audio produces really quiet audio. 2. Ripping DVDs doesn’t always work right. Of my two test disks, one just fails silently in the middle of the process, while the other seems to work, but has video from the “making of” feature combined with audio from the main feature. 3. Recording TV is still broken, I think. 4. TV audio is still broken. 5. Playing DVDs results in frame drops, which produces jerky video. Playing the same DVD ripped to the hard drive works fine, which leads me to suspect DVD read speed issues. 6. I can’t skip chapters in DVDs, but I can fast forward and rewind several minutes at a time. 7. DVD menus don’t work. 8. Image gallery slideshows are weird–they overlay the image on top of the menu’s background, when a black background would make a lot more sense. The image gallery in general doesn’t look quite right, but that might just be a theme issue.

So, what does work?

  1. I can play DVDs with audio, if I turn the stereo up really loud.
  2. I can watch live TV, if I can lip-read.
  3. I can listen to MP3s.
  4. I can watch .avi files that have come from various sources.
  5. I can browse JPEGs.
  6. I can do all this using a remote control instead of a keyboard.

Not a whole lot in other words. But I’m making progress–I’ve had a couple suggestions that might fix the DVD audio problem, and I suspect that the DVD ripping problem isn’t much harder. Once that’s done, at the very least I’ll be able to import a handful of the kids’ shows and have something useful.

I have a huge usability rant to make here, but I’m going to put it off a few days–I actually have some hope for MythTV, ever though it’s proving to be a massive time sink. It’ll take a few days to get all of my ducks in order, though–I need to finish a couple minor projects and do a few little tests. Fundamentally, I want to believe that MythTV can be fixed, but it’s so far from usable today that I’m amazed that it has the number of users that it does.