Approaches to a Linux PVR
I have been looking into how to set up a Linux personal video recorder, or PVR. I don't have one working yet, but I have learned a few things. Here are notes on the two approaches that look best for a Linux PVR.
My goal is to have the option of full-quality capture. Thus, I am not interested in any solution based on USB; no USB solution can capture full-size frames at full speed. USB 1.1 simply doesn't have the bandwidth for real-time video capture, even with compression. USB 2.0 does have the required bandwidth, but I haven't seen any USB 2.0 TV capture devices. Also, I am not interested in any solution that cannot capture stereo sound.
However, the capture does not necessarily have to be highly compressed. A two-step capture process would be perfectly adequate. It could, for example, capture in some easy, low-compression format and then automatically (in the middle of the night) re-encode the video to something more space-efficient for long-term storage.
Ideally, the video will be in an open format at all times. Although some devices permit video capture in MPEG-2 in real time, the patent issues encumbering MPEG-2 make me reluctant to use it in a Linux PVR.
The standard format for a DVD is MPEG-2, though. In order to make a standard DVD, some sort of legal MPEG-2 encoder is required. A hardware device that handles the MPEG-2 encoding would be a convenient way to get a legal MPEG-2 encoder on a Linux system.
The Ogg Theora Project holds great promise as an open video format, and it's currently in a pre-alpha development stage. It is based on VP3, but all the patents on VP3 have been signed away, so Theora can be fully open and free. Naturally, Theora uses Vorbis for the soundtrack.
If disk space isn't an issue, you could leave the video in the same format in which the PVR software originally saved it.
The simplest way to build a Linux PVR probably would be to get MythTV working. MythTV looks nice in the screenshots, it appears to have some very nice features and the folks who use it rave about it.
The major obstacle is to find a TV capture card that will work with MythTV. Which card is best? The MythTV web page simply says that you can use "any TV card supported by Video for Linux". I studied various web pages and figured out that what I want is a card based on the Brooktree 878 chip. The 878 supports audio capture, in stereo, using the btaudio kernel driver.
Older TV cards usually require that you connect an audio-out jack on the TV card to an audio-in jack on your sound card. The major problem with this connection is the clock on the audio card may be subtly out of sync with the clock on the TV card. Thus, the video capture stream and the audio capture stream may drift out of sync. Even a tiny difference, adding up over an hour-long TV show, may result in sound and video being annoyingly incongruous. Obtaining the audio and video streams from the same 878 chip should avoid this problem.
I also wanted to know if it is possible to set up a PVR that has multiple TV cards. I am not sure how much CPU time it takes to capture video, but I suspect that two TV cards would be workable on an Athlon XP or a Pentium 4 system. Obviously, it would be easier to plug in two TV cards than to plug in two TV cards and route audio cables into one or two sound cards. If you plan to capture and play back on different computers, however, with an 878-based TV card your capture computer won't even require a sound card.
Okay, we want a TV capture card based on an 878 chip--which card is that? If we want a solution simply works, we probably want an older TV card. The ATI TV Wonder looks viable, and I plan to try one soon. The ATI TV Wonder VE, on the other hand, is not a good choice. Although it does use an 878 chip, direct audio capture is enabled on the VE card; you must connect an audio-out jack with your sound card. And it doesn't support stereo sound.)
I bought a Pinnacle PCTV Pro card, on sale at CompUSA, because I had determined it had a Conexant 878 chip. I figured this would be compatible with the Brooktree 878 chip, and it should work easily. This turned out not to be the case, however; the card is too new to be recognized by the version of the bttv driver module bundled with the 2.4.20 kernel. I upgraded my bttv driver module to the latest version, and the Pinnacle card was detected correctly, but it did not actually work. I plan to set the module for maximum verbose logging, collect the logs and ship them to the bttv driver folks. Hopefully, in the near future the PCTV Pro card might work and be a good choice. Meanwhile, I am ordering an ATI TV Wonder to try. I'm hoping it will work with the bttv module bundled with the 2.4.20 kernel.
MythTV captures in NuppelVideo format, an open standard that has good free software support. Tools are available to transcode it, and MPlayer has support for directly playing NuppelVideo files.
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Use Linux as a SAN Provider
- diff -u: What's New in Kernel Development
- NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance
- Numerical Python
- RSS Feeds
- Tech Tip: Really Simple HTTP Server with Python
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep