MythTV: Easy personal video recording with Linux

57

Author: Rui Lopes

A few months ago, I started looking for an alternative to Windows Media Center Edition 2005, a personal video recorder (PVR) or digital video recorder (DVR) system. While other complete hardware/software combos, such as the popular TiVo, solve many of the headaches of having to build your own system and find out which hardware works and which doesn’t, they also lack a level of customization and user freedom; with TiVo, for instance, you have join one of the company’s monthly subscription plans. I decided to build my own system using open source software and carefully picked hardware. This proved to be much easier than I expected, thanks to MythTV.

MythTV lets users watch live TV and record shows, search TV listings, and burn recorded shows to a DVD. It’s easy to use, yet allows extensive tweaking of the settings.

MythTV uses a client/server architecture, which divides the application into two distinct parts: the front end, which provides the on-screen interface and the display of the media; and the back end, which deals with the recording of the shows and other background jobs. This means that you can have a high-end computer running the back end in the bedroom, recording all the TV shows, and a nice, quiet, small system connected to the television in the living room, running the front end and allowing viewers to watch live TV and DVDs. It’s even possible to have more than one front end connected to the back end, so that you could have people watching TV or listening to music in different places in the house, but all connected to the same source. In the traditional and most used setup, of course, both the back and the front ends run on the same machine.

You can get precompiled MythTV packages for a variety of Linux distributions, or you can compile it from source. You can also run it on FreeBSD, and even on an Xbox. There are ports for Windows and the Mac as well, but these only run the front end — you’ll still need a Linux box for the back end.

(Not so) hidden pearls

If you research your hardware well and choose parts that are known to work with MythTV, you’ll find the system to be extremely robust and stable. This is impressive, considering that MythTV is currently only in its 0.18.x release. But the real beauty of MythTV lies in its expandability. It has an ever-growing collection of plugins that allow users to turn their MythTV box from a simple PVR into the ultimate home entertainment system. You can listen to music, watch DVDs and rip them to your hard drive, surf the Web, check the weather, watch videos from other sources, create a playable DVD with your favorite recordings, and even play games. In addition, if you feel like it, you can change the layout of the menus to suit your needs, and the application is fully themeable.

The downside of using MythTV is that there are still some things that you have to set up by hand, such as the MySQL database MythTV uses, TV-out, and Lirc, if you plan to use a remote with MythTV. The DVD playback doesn’t work by default as well, for legal reasons (but it’s easy to enable, don’t worry). And since the plugins rely on external apps for their functionality (like MPlayer for video and DVD playback and Xmame for games), you also have to make sure that you have them installed. Sometimes, even for experienced Linux users, things can get tricky. But everything you need to know has been covered in the wikis and documentation sites, with lots of step-by-step guides to get MythTV up and running in a snap. MythTV has a growing community building around it, and even if you don’t find what you’re looking for in the official documents, the forums provide an excellent resource of information.

After trying MythTV on SUSE 9.1 Professional client, I found an even easier way to get everything running in less time. If you want to use your box exclusively as a media center, try KnoppMyth, a Linux distro based on Knoppix, aimed solely at providing an out-of-the-box system optimized for MythTV. The installation, although not graphical, is a no-brainer, and doesn’t take much time. When it finishes, KnoppMyth helps you configure most of the options for MythTV to get it up and running (though you still have to configure things such as Lirc by hand). Whenever the system boots, you’re presented immediately with the MythTV front end, so even someone who doesn’t know anything about computers can just grab the remote and get on with it, without having to know that the computer is running Linux. If you need to exit the front end for some reason, you’ll fall back into Fluxbox, the default window manager that comes with KnoppMyth. If you need to install something, just fire up Synaptic or use apt-get install.

Typical hardware requirements

Watching live TV while at the same time recording a show on another channel can consume a lot of computing resources. You’ll need at least 512MB of RAM and a processor running at 1.5GHz. You can use a machine running at lower CPU speeds (a 700MHz AMD Duron, for instance); however, in that case you’ll need a capture card that can do MPEG-1/2 hardware encoding and decoding, such as the Hauppauge PVR-350. If you have a fast system, then the PVR-350’s cheaper sisters, the PVR-150 and PVR-250, will be more than enough for your needs. The Hauppauge cards are the most frequently used with MythTV, probably because they have open source Linux drivers written for them, but a variety of other cards are reported to work nicely as well. For capturing HDTV transmissions, you’ll need a card like the Air2PC-ATSC-PCI or the HD-3000.

Regarding the hard drive, the more capacity the merrier, since one hour of recorded video can take up to 2GB of space. You’ll probably want a DVD writer as well if you intend to make personal backups or copies of your recordings for friends and family. Most capture cards come with TV-out capability, but you can also set the TV output to come from your graphics card (in my case, an Nvidia GeForce FX5200).

What about the case? Keep in mind where you plan to keep your PVR system. If you intend to set up a home entertainment system in your living room, with both front and back ends running in the same box, the last thing you want is the typical ATX tower making more noise than a Boeing taking off. Consider something like a Shuttle XPC system. They’re small, quiet, and cool (in every sense of the word!).

Normally, you’ll want to use a remote with your PVR system. The Hauppauge cards come with their own remotes, and seem to work well with MythTV and Lirc. Other remotes will also work well, but make sure to check whether they are compatible with Lirc. You’ll also need an “IR blaster” if you have a set-top box (such as a cable or satellite box), or if your capture card doesn’t come with an infrared receiver. Tried and tested blasters known to work with MythTV are the My Blaster and Irman. If you don’t mind doing a bit of manual labour, you can build your own; there are detailed instructions for it on the Net.

Ready for the masses?

Using KnoppMyth at home is a breeze. For a fraction of the price you would pay for commercial products, you can build your own entertainment system and have something to brag about to your friends. The only hassle (for some) is having to assemble the system yourself and compiling the odd driver or editing some text files by hand. The benefits are having complete control of what you see on your TV/monitor, and not being bound to any contract.

I hardly watch live TV anymore: I just search the on-screen listings for something that pleases me, schedule the recordings to be performed during the week, and happily let MythTV alone to get on with the job. The image quality, whether watching live TV or the recordings, is impeccable.

But does MythTV have a place outside of the world of computer geeks and hobbyists? Could it provide a viable commercial alternative to the TiVo? Apparently, yes. The people at Stormlogic LLC have a dedicated Web store for MythTV. Even better, they’re making their own commercial HDTV system running KnoppMyth, called the Dragon. The Dragon will be available in mid-July, and will be more expensive than the HD TiVo, but will offer more expandability, and doesn’t bind you to a monthly contract. Besides that, Stormlogic will provide the full specs of their machine at launch time, meaning that you can build your own, cheaper, Dragon system. That task may seem daunting for the average user, but don’t worry: this is only the first of many products of this kind. Expect to see a plethora of KRP-certified systems appearing on the commercial circuit, increasingly cheaper and offering more performance and features than the non-OSS solutions.

Other useful links

Tips and tricks for installing and running MythTV
Freevo, another OSS project similar to MythTV
Info about MythTV on Mac OS X
PVR hardware database
GB-PVR, a free alternative to MCE 2005 for Windows