Building your own DVR (December 17, 2007)

If you watch a lot of television, I highly recommend that you obtain a Digital Video Recorder (DVR). They let you channel flip among a whole week's showings instead of just what is playing right this moment. They let you take a commercial break precisely when you are ready to go to the restroom, not when the station decides to send you one. They really make television much nicer to watch.

I can also recommend that you not build your own DVR, because you will spend dozens of hours tinkering around with a computer to do it. Of course, dozens of hours tinkering with a computer sounds nice to some people, in which case have at it! Here are a few notes I can share for anyone trying. I did nothing weird, so this is more of a description of one common working DVR setup.

The main software you want is MythTV. All other open-source DVR software orbits around this software base.

For capture, I use a basic Hauppauge 150. It has one tuner, it has a hardware MPEG encoder, and it is very well supported by MythTV. There are fancier and wimpier capture cards out there, but this one is a basic workhorse.

For schedule information, I use SchedulesDirect. Someone with more time to spend on it than me could probably work out a way to screen scrape web sites to get this information, but I went with SchedulesDirect because it is cheap and my time is limited.

I had a hard time getting a remote to work. I first played with IRDA, thinking that surely an advanced infrared device would be able to handle basic consumer IR. While some people get that to work, it is real trouble. I then tried an ATI Remote Wonder, not version II but the original, and while the software worked fine the remote seems to be badly built and I only got about three feet of range. I finally settled on a common but expensive "MCE" remote, and the third time was the charm. I configured it using MythTV's built-in lirc support, which meant configuring lirc itself and then adding an lircrc file to ~/.mythtv for the user running the MythTV frontend.

Recording digital stations is a little tricky in the free software world. The DRM madness of our day means that you cannot just get a tuner that will receive digital cable. There is no technical reason for these problems. They are simply fallout from the trying to prevent the inevitable. What you can do, however, is use your existing set top box and have MythTV change its channels. If you have one of the popular Motorolla DCT2xxx devices (where xxx is any sequence of digits), then you can probably change its channels using a serial cable. Otherwise, you will have to fiddle with an IR blaster.

By the way, this kind of workaround is precisely the sort of reason that preventing copying is impossible. If there was no serial interface, and if an IR blaster did not work, someone could still make a device that physically pressed a remote control's buttons. Fundamentally, if a human can watch it, a computer can copy it. The legislatures can deny this reality but cannot change it.

Anyway, using the set top box is not perfect. In my house, at least, we only have one set top box, and we often want to use it ourselves instead of turning it over to the Myth box. To ameliorate this, I set up Myth to only use the set top box for premium channels, and then we only have it record from those in the middle of the night or in the middle of a work day. The approach I took is to set up two channel lineups on your SchedulesDirect account, one for analog input and one for digital input via the set top box.

That's about it. There are a lot of little details to take care of, but you will see for yourself. As one general tip, if you get MythTV via Debian or Ubuntu then it will come with a rich set of example configuration files in /usr/share/doc/myth*. Also, the Myth wiki is quite informative in general, even though some pages seem sketchy.

Finally, just one word of warning. If you put a computer in a common room of your house, you find yourself more concerned with how much noise the computer does or does not put out....

Lex Spoon