The Mac mini as a digital video recorder

This text describes how I turned a Mac mini into a digital video recorder. Actually, the same procedure could easily be adapted to any other Linux-capable computer — the only Mac mini-specific parts are the prerequisites below, and the configuring of the Mac mini remote control.

The prerequisites are:

You don't of course need TV Output in order to just record video, but the rest of this text will assume that the Mac mini will also be used for viewing video in full-screen mode on some TV-like device.

Install video capturing hardware and Linux driver

I use a several years old version of a Hauppauge WinTV-PVR-USB2 device, which is a TV tuner and MPEG2 encoder that is connected via the USB bus. Before my Mac mini came along, the same device was attached to a Microsoft Xbox running Linux, which had the Hauppauge device encoding all the time (even while nothing is being recorded) because of driver issues in the primitive userspace driver I was using. As of April 2008 the device has been encoding constantly for more than four years, with occasional breaks only a few times per year for rebooting the Xbox. So this Hauppauge hardware has been very reliable.
Until August 3, 2008, when a thunderstorm zapped it, together with the Mac mini. Both are now replaced, and the new PVR-USB2 device is faster, less expensive, and brews better coffee than the old one. And it has an IR Blaster! Note: Hauppauge pays me way too little for plugging their product like this...

If you have some other capturing device, you're on your own for now, but you might want to skim through the rest of this page anyway since it also contains some general tips that may be useful.

The driver to use for the PVR-USB2 device under a 2.6+ kernel is Mike Isely's pvrusb2 driver, which is included in the official Linux kernel source. To get it working, do the following:

Install and configure LIRC

LIRC is the de-facto Linux standard interface for infrared and other types of remote controls. I have never been able to get along very well with LIRC, and in fact I think LIRC sucks really bad for several reasons. But until something better replaces LIRC, it's still the most portable option for remote controls in Linux. You want both? Sorry, not possible unless you choose all available drivers, including a bunch that won't compile unless you reconfigure your kernel. Configure the device and start the daemon:   A replacement for LIRC would be a blessing. I am seriously tempted to write a simple and easy remote control reader myself, but that will have to wait for a bit.

Install DVR software

Enable autologin for runlevel 4