MythTV
In the summer of 2005, I put together a computer, connected it to
my television, and made it operate as a DVR (digital video recorder,
a.k.a. a TiVo). I have been running it ever since (albeit after replacing
the motherboard when it died). Although there was certainly some effort involved, by and
large it was not that difficult.
- The computer uses a Hauppauge PVR-150 card to record analog television.
This card includes a built-in MPEG-2 encoder, relieving the computer
from the hardest part of recording TV.
- I chose an nVidia graphics
card for several reasons. One, they offer TV-out (over S-Video)
support in Linux. Two, if you use the proprietary drivers you also get
XvMC, i.e. hardware MPEG-1 and -2 decoding.
- Beyond those two items, the rest of the computer does not
particularly matter. 512 MB of memory is the minimum to get by
efficiently. Plenty of hard drive space is also a must.
- The Hauppauge card comes with a remote control; if you do not have
a remote, I encourage getting one so you can use your rig like a
purpose-built DVR.
I use MythTV, an extremely
complete Linux-based DVR software which does just about anything you
would want it to.
- MythTV has a backend/frontend architecture: the backend records
TV, and the frontend plays it. You may have multiple computers running
backends cooperatively, and each backend may run multiple capture
cards. A frontend can be run on any computer, so I can watch TV on my
desktop computer.
- MythTV can be set up to automatically detect and skip commercials.
(This is perhaps one of the most compelling reasons to run your own
OSS DVR, in my opinion.) The commercial detection is not perfect, but
99% of the time it is spot on or only fails to skip past a short
bumper ad. My 1.4 GHz system can run commercial detection
significantly faster than real-time, and commercial detection is
ordinarily run in parallel with the recording.
- Like any competent DVR, MythTV obtains advance TV listings (two
weeks worth is standard in North America) and uses this to schedule
recordings. In most cases, I simply tell it "Record this show at any
time on this channel" and it does the right thing without any
intervention. It remembers which episodes have been recorded and does
not record duplicates. Conflict resolution is handled automatically by
optionally assigning priorities to shows, stations, capture cards, and
recording types; you can of course also override it manually.
- Since September 2007, there are no free listings available in the
U.S./Canada (without resorting to screen scraping). A new OSS
collaboration now provides listings at $20/year, which is still a
bargain.
- MythTV also comes with many plug-ins. I have plugins to:
- Play video files not recorded from TV. I have it use MPlayer to
play all files.
- Play, rip, and transcode DVDs. I have it use Xine to play DVDs; the transcoding is very automated but I think depends on ffmpeg to do the work.
- Play music. (Good for parties, especially with the trippy
visualizations turned on.)
- Show pictures.
- Launch games/emulators. This works particularly well with ZSNES;
other emulators are not as cooperative.
- Display the current weather.
Aside from MythTV, I also run the following on my system.
- LIRC, to handle the remote
control. (This works with MythTV, MPlayer, Xine, and a handful of
other things.)
- Apache, to host a web
interface to MythTV (used to manage the backend and schedule
recordings, not watch TV (although that is in the development pipeline!)).
- NFS and Samba, to share the non-TV video directories over the
network. (MythTV streams recorded TV from the backend to the frontend
on its own, but the external video plugin does not have this
capability.)
- NTP, to keep my clock correct
automatically. (Not that millisecond accuracy is important, since most
stations are not so well-timed. I choose to keep my clock correct, and
ask MythTV to add a 15-second buffer on either end of recording.)
My only complaint is that while MythTV handles digital television
with just as much elegance, my
unfriendly cable provider does
not: they encrypt all their streams, and there is not yet a computer
capture card that has a way to decrypt them. Although the problem is
technologically trivial, untested legal issues abound, and it remains
to be seen whether someone will produce and sell such a card that will
work with OSS. (There is already a daring company
that produces an HDTV capture card which ignores the
broadcast flag,
but they do not have one that decrypts encrypted streams yet.)