Computing Center

  1. Home
  2. Electronics & Gadgets
  3. Computing Center

Build a Flag-Free HD Personal Video Recorder

Now's the right time to build your own digital TV recorder. We show you how.

Richard Baguley

Richard Baguley is a freelance writer who watches a lot of TV. KnoppMyth forum users XSecrets and Cesman also assisted in the creation of this article.

There are many reasons why you might want to record a TV program on your PC. You might be building a media server that stores all of your digital audio and video, or maybe you just want to save a favorite program to DVD to watch it later. Whatever the reason, you have a right to record and keep the TV you watch, and the PC is a perfect tool to do this.

Such recording becomes even more compelling when you add digital TV to the mix. TV stations are moving over to a digital format, where shows are transmitted digitally at HDTV resolutions. Forget snowy, grainy, analog TV: Digital TV provides crisp pictures and clear, digital sound that your PC can record and play back. But the new ability of viewers to record and duplicate exact digital copies of TV shows and of movies shown on TV is a nightmare scenario for the TV and movie companies, since it's also an opportunity for unlimited copying, or piracy. By now, you've probably heard about the FCC's response to this issue--mandating that devices recognize a so-called "broadcast flag" to limit copying. We covered the broadcast flag issue in "TV Limits Copies" from our June 2005 issue. On May 6, however, an appeals court struck down the FCC's broadcast flag mandate. That ruling might be appealed to the Supreme Court, or Congress could step in, so the broadcast flag may only be delayed, not dead.

Either way, until the broadcast flag is in force, it's perfectly legal to buy a non-broadcast flag receiver, install it, and use it to record digital TV programs. What you do with the programs after that is up to you, but remember that copyright laws still apply: If you illegally distribute a TV program, you may still be prosecuted.

Several PC tuner cards can receive the digital TV signal and save it to disc--the ATI HDTV Wonder and the PCTV HD-3000, for example. In this article we'll show you how to build a digital TV PVR using a digital TV tuner and a PC.

(NOTE: PVRs are also called digital video recorders (DVRs)--PC World's preferred expression. But in this case, the DVR we're going to build records digital TV. Devices like TiVo and Replay TV are also DVRs, because they record analog video in a digital format, but they don't capture and record digital TV signals. For that reason, and to avoid duplication with the "digital" in digital TV, we'll refer to our device as a PVR.)

Digital TV PVR Questions & Answers

Q: Will it be legal to use a non-broadcast flag receiver after any flag requirement comes into force? A: Yes. We aren't lawyers, but the consensus seems to be that there is nothing illegal about using a digital TV receiver that doesn't take notice of the broadcast flag after that date. It may, however, be illegal to distribute or sell such a card.

Q: Will I need to upgrade my PC to work as a digital TV PCR? A: A fairly recent one, with at least a 2-Ghz Pentium 4 or Athlon 2800+ processor or higher, at least 512MB of RAM, and an 80GB or bigger hard drive will probably be fine. For our step-by-step guide, we used a 2.6-GHz Pentium 4 system with 1GB of DDR333 RAM, but an even faster processor would have made some things (such as converting the recorded files to different resolutions) quicker and easier. ATI recommends at least a 1.2-GHz processor and 256MB of memory for its HDTV Wonder card, but frankly, that's a bit low.

Q: Do I need a special antenna to receive digital TV signals? A: No, but you might need to get a better one. Digital TV signals are in the same frequency band as the existing signals, so (despite what the nice salesman at the store told you) you don't have to buy a new one. But you might want to think about it: Digital TV signals tend to require a better antenna than analog signals. If you live close to a transmitter, you may not need more than a small antenna that sits on top of the TV. For instance, in the PC World office, we were able to pick up signals using the small set-top antenna that ATI bundles with its HDTV Wonder card, but that was because we could see the transmitter from the window. PC World Staff Writer Alan Stafford was able to get only a couple of stations from his home in San Francisco (a hill comes between his house and the transmitter); at my home 20 miles or so from the transmitter, I was unable to receive any stations with a set-top antenna. But with a good-size antenna in the attic, I picked up every area station that was transmitting digital TV. The FCC has a Web site that, when you enter your address, will show you which local stations are transmitting in digital format, and what type of antenna you might need to pick them up.

Q: Can I use these PC tuners to record HD programming from satellite or cable TV? A: Generally speaking, no. Satellite TV companies transmit their channels in a digital format, but they use their own methods of encrypting the signal, and we aren't aware of any PC tuner that can decrypt and record these signals. Also, most HD satellite tuners have either a DVI or a component video output, and we don't know of any consumer-level cards that can capture and record such signals. Some cards can work with a digital cable TV standard called QAM, but most cable companies either don't use it or encrypt such signals, forcing you to use the set-top decoder box that you rent from them.

Q: What kind of software will I need to build the digital TV PVR? A: For this step-by-step, we chose to use KnoppMyth, a combination of Knoppix Linux and the Linux PVR software MythTV. It's the simplest way we've found to build a dedicated digital TV PVR, and MythTV has a huge range of features: It can search for programs by title, actor or description, read RSS news and weather feeds, show your digital photos, and play internet radio stations. Plus, KnoppMyth installs from a single CD, so you don't need to know Linux to install and run it.

Q: I'm not sure I'm ready to build a dedicated Linux box to record digital TV. Is there a Windows alternative? A: Yes. ATI includes software with its HDTV Wonder card that can view and record digital TV signals, including HDTV ones. You can schedule recordings and pause live TV; the card also includes an analog TV tuner. We've tested it and found it was able to record digital TV signals with relative ease, although it did require a fairly fast PC to be able to record and play back HD video. Another alternative is the AccessDTV Digital Media Receiver, a PCI card that includes software that can record and display digital TV in Windows. We haven't reviewed this device, though.

Prepare to Build a Digital TV PVR

In this step-by-step article, we'll show you how to build a dedicated digital TV PVR using KnoppMyth. You'll need a PC, a keyboard, a mouse, a monitor, a digital TV tuner card, an antenna, and a DSL or cable Net connection.

1. Build or Set Up Your PC.

First, we'll need a PC to install the PVR software on. I built my test system from a combination of new parts and parts scavenged from an older PC, including a Pentium 4 2.6-GHz CPU, 1GB of DDR333 RAM, a 160GB Maxtor ATA hard drive, a GeForce FX52000 graphics card, a rewritable DVD drive, and a SilverStone PC case, which is designed to look like a Hi-Fi component. I'd recommend these specs and components as the minimum to consider building with, but the faster the processor and the more hard drive space, the better.

If you want to build a computer from scratch, check our article, "Your Ideal PC." Although MythTV is designed to work with a remote control only and to output the TV signal to a TV, it is best to start it off displaying the video on a PC monitor. You'll also need a keyboard and mouse during the setup.

If you're building a digital TV PVR out of an existing PC, take note: The step-by-step procedure in this article will completely and irreparably overwrite anything that is already on its hard drive. Although it is possible to have Linux and Windows living happily alongside each other on a PC, KnoppMyth doesn't support such a dual-OS setup. So make sure nothing important is on the PC before you start, or buy a new hard drive and install KnoppMyth on that instead.

Whether you use an existing PC or build your own, you must get the system to the point where it boots up and runs its self tests successfully, and of course connect the monitor, keyboard, and mouse.

2. Add the Digital TV Tuner Card

You'll need to get a digital TV tuner card to receive the signal and convert it to a format the PC can play back. KnoppMyth supports a number of cards, but the one it seems to like best is the $170 HD-3000 from PCHDTV. Plug the card into an empty PCI slot, and then connect your antenna to the TV connector on the rear. Don't worry about the other connectors--we aren't going to use them.

3. Download KnoppMyth.

KnoppMyth can be downloaded from any of these mirror sites. It's a sizable file (about 550MB), but it contains everything you'll need. The download arrives as an ISO file--a bit-by-bit image of a CD. Burn it out to a CD-R disc using a CD authoring program. If you don't have a program that can read ISO files, download and install ISO Recorder and follow its instructions. This will create a CD that contains everything needed for the installation.

NOTE: For this story, we used the R5A512 version of KnoppMyth. Subsequently, a newer version has been released (called R5A515.1). However, it has some problems with digital TV that have not, at the time of writing, been fully resolved. The creators of KnoppMyth are working on fixes; check the forums on the KnoppMyth site for more details. In the meantime, we recommend you use the older R5A512 version.

4. Subscribe to the TV Listings Service.


Set up your channel lineup through the Zap2it Web site.

Our digital TV PVR won't be much use if we don't know what time the TV shows are on, so before you install KnoppMyth, go to Zap2it and subscribe to their free service through the "New User? Sign-Up" link. When asked for a certificate code, enter ZIYN-DQZO-SBUT. This code identifies you as a MythTV user. Zap2it provides this service for free, and it covers all US and Canadian zip codes. Make a note of the username and password you enter: You'll need them later on.

After you subscribe, you'll be asked to add a lineup, which determines which channels you receive. Answer the questions in turn (remember that we are going to record local broadcast channels); then when you get to the list of channels, choose only those that end in "DT" (such as KRONDT) and have a two part channel number (such as 4-1). This means that they are digital channels; the others are analog ones that we don't want. If you wish, start with just a few stations you know you want to watch--you can add others later on. Depending on your lineup, it may be easier to click on "Unselect All," then pick the ones you want. Some stations transmit several channels, such as my local PBS station, which has four. These are identified by channel names that end in DT2, DT3, and so on (such as KQEDDT4).

Install and Test KnoppMyth

Now comes the actual installation of KnoppMyth.

5. Install KnoppMyth

Put the CD we created in step 3 into the CD-ROM drive of the PVR PC and turn it on. The system will boot up, and you'll see a KnoppMyth splash screen. Press Enter, and the system will boot into Knoppix. Linux is a lot more verbose than Windows: It will show lots of text as it checks your PC and sets everything up.

If everything boots correctly, you'll see a screen headed "KnoppMyth Main-Menu." Choose Option 2: Auto Install. This will set up the hard drive and install KnoppMyth. Next, it will show you the current time and date. Don't worry if these are incorrect, as we'll reset them later on. You'll then be shown a warning screen. MythTV is written by volunteers, so they don't guarantee that it will work. But let's trust them and click Yes.

Next, you'll be asked a series of questions that will set up several accounts the system needs. One will be for you, and another one will be called root (root is the user who gets total control of a system and can do anything, while other users get limited control); the system will automatically create a third account, called mythtv, that runs the MythTV software. You can name your account whatever you like, so feel free to use the same name you picked for your zap2it registration, but don't choose the name MythTV. That account gets created automatically. Make a note of the account name you choose. You'll need it later on.

Now you must create passwords for the user and root accounts. Don't worry if you don't see anything on the screen when you type: For security, the characters don't appear on the screen. You'll also have to enter a hostname to identify the system on a network. Finally, you'll see a screen that shows all the details you entered. Press Y if you're happy with what you've put in.

Next comes another warning that the system wants to reformat the hard drive, deleting everything on it. Press Y to proceed, and Y again to confirm, and the process will begin. This may take several minutes or longer, depending on the speed of your drive. Eventually, you'll see a message that tells you that everything has been installed. Press Enter to carry on. You'll see some system messages at the bottom of the screen (which is Linux telling any open programs that it is time to reboot, rather like shutting down Windows). Eject the disc from the CD-ROM drive when requested, and press Enter to reboot.

6. Reboot and Test the TV Tuner

The system will then boot into Linux from the hard drive. Again, you'll see a lot of text scrolling past during this process. Don't worry if you see the odd error or a warning about something not being present: Linux tries to install all sorts of devices every time it starts up and produces warnings if this fails because they aren't present.

Eventually, you'll reach a screen showing the Linux penguin sitting on a couch watching TV. This is the X Window System, a graphical interface to Linux. At the top right is a text window asking for the root password. Leave that for the moment and right-click somewhere on the background. From the menu that appears, select XShells, then XTerm. A new text window will appear, with a prompt such as sh-3.00$. This is a terminal window, where you can type in commands. In X Window, if you move the mouse out of the window, the things you type won't appear in that window, so keep the mouse in there.

The first thing we are going to do is to test the digital TV tuner and see if we are getting good signal strength. Make sure you are in the window we just opened, type su, and press Enter. Then type the root password we created earlier (not the user password). This makes you a SuperUser, which means you can change pretty much any aspect of the system. The prompt will change to something like root@mythtv:/home/mythtv#.

In the same window, type dtvscan /dev/dtv0 > channels. This tells the system to scan for digital TV channels, using the digital TV tuner, and to write the list out to a file. As the system scans, it will show a list of the TV channels it finds, something like this:

  • Channel = 18
  • Channel = 19
  • Signal: 04 ####
  • Look For Sync
  • PAT found Ckets
  • Channel = 20
  • In this example, the system didn't find anything on channel 18, but it found a digital TV station on Channel 19. Don't worry if you don't see that many; remember, we are only picking up digital stations here, not analog ones. If you get an error message, try changing dtv0 to dtv1: This refers to the digital TV tuner card, and it may not always be dtv0. Now, let's look at the list of stations it found: Type cat channels. You should see something like this:

  • KBWB-HD: :20.1 :19: 3:0
  • KBWB-SD: :20.2 :19: 4:0
  • KGO-DT : : 7.1 :24: 3:0
  • KGO-DT : : 7.2 :24: 4:0
  • The first item is the call sign of the station, the second is the digital TV channel, the third is the analog channel, and the last is the subchannel. One of the joys of digital TV is that a single analog channel (that is, a single frequency) can carry several channels, which is how one station can have only one analog channel, but several digital ones. Look through the list until you find a name you know, and write down the analog channel number.

    Now type in dtvsignal /dev/dtv0 [channel], replacing [channel] with the channel number noted above. For instance: I entered dtvsignal /dev/dtv0 19. This will produce a graph that shows you the signal strength. For the best quality, the strength number should be 80 or above. You may be able to get away with less, but it's worth making some adjustments to get the best signal strength. You can use this display to adjust your antenna if required: As you move the antenna, the display will update. When you're done, press Ctrl-C to get out of the signal strength display. You can repeat this process with different channels to check the signal strength for each, but remember that not all of the channels will be coming from the same location. When you've tried a couple of channels, make a note of the call sign of one with a strong signal: You'll need that later on.

    Set Up Your PVR

    Now that we know that we have a good signal and that the digital TV tuner is working, we can go on and configure MythTV.

    7. Configure MythTV


    MythTV is configured through a series of screens like this that determine where the program gets the signals, what the channel lineup is, and so on.

    Close the window we opened (by clicking in the top right corner on the cross), go back to the other window that has been waiting patiently, and enter the root password. You'll be given another warning about how MythTV might trash your system. Press Enter to continue. When asked, set the time zone and check the time and date: This is important, as scheduled recording will not work if the time zone is not set properly. When asked about DHCP, make sure your PC is connected to your network or DSL router, and click Y. For the next question (about KnoppMyth modules), select option 6. The next question, about i686 modules, deals with remote control support. Ignore it for now by pressing Enter (we will come back to this later), and don't panic when a lot of text goes scrolling by your screen: This is MythTV setting everything up.

    Next, you'll see a full screen that asks about capture card settings. We are now in MythTV. Press Enter to choose the default options on this screen and the next screen, and you'll be taken to the main configuration screen. Now, we are going to run through configuration settings for MythTV. You can accept most of the default options on the first four configuration sections, except as noted below. Remember that you can't use the mouse here since the interface is designed for use with a remote control. Instead, move through the options using the up and down cursor keys, and change them with the left and right keys. Once you have made the changes, go back to the Next button (at the bottom of the screen) and press Enter. Make sure you go through all of the screens, even if you aren't changing anything, as the changes won't be saved if you skip a screen. To exit from each of the sections and save the changes, select Finish on the final screen.

    You'll need to modify the following settings:

    In 1. General setup, under the screen called "global backend setup," change the TV format from NTSC to ATSC and the channel frequency table from us-cable to us-bcast.

    In 2. Capture cards setup, select New capture card, then change the capture card to pcHDTV Capture card (HD-2000, HD-3000). Where it says video device, enter /dev/dtv0.

    In 3. Video sources, select a new video source and enter the source name HDTV DTV. Lower down on the screen, enter the Zap2it username and password you created earlier in the username and password boxes. Now select retrieve lineups, and the name of your TV channel lineup should appear below in the box named DirectData lineup. If this stays blank, make sure you entered the username and password correctly and that you are connected to the Internet.

    In 4. Input Connections, select [ HDTV : /dev/dtv0] Television->none, and then go to the box named video source. Select HDTV DTV from the list.

    These changes make sure that MythTV will try to grab the digital TV signals, not the analog ones. Once you've made all of those changes, press Esc in the main configuration screen (the one with the five sections), and you'll go back to the desktop screen. Again, you'll see a lot of text go scrolling past as MythTV downloads your channel lineup and program guide. This will take some time. The system tries to download a couple of weeks' worth of program data to start with.

    Once that's all done, you'll be taken to the MythTV main screen. But before we can watch TV, we need to do one more thing. Pres Esc, and select yes when it asks you if you want to quit MythTV. The shell window we used will close, so open a new one by right-clicking on the desktop and selecting XShells, then Xterm. In the shell, type Mythtv-setup. Answer No to the first two screens, then in the main configuration screen, go into 5. Channel Editor and scroll down the list of channels, looking for the call sign of the station with the strong signal that you picked. To the right of the call sign is the digital TV channel, which will look something like 9_1. Make a note of this and press Esc.

    Next, go into 4. Input Connections, select [ HDTV : /dev/dtv0] Television->HDTV DTV, and then go to the box named starting channel. Enter the digital TV channel of the station with a strong signal that you picked from the channel list For example, I picked channel KQEDDT, which has the channel number 9_1. Make sure that you go to the Finish button at the bottom of the screen and select it to save the change. MythTV will sometimes crash if the first station it tries to tune into has a weak signal, so completing this step makes sure it goes to a nice strong signal.

    Setup is now complete, so let's get ready to see if the system works: Press Esc a couple of times to exit the setup program; then in the shell, type mythfrontend.

    8. Watch Some TV


    This is the main screen of MythTV, where you access all of the program's powerful features.

    Now comes the moment of truth: Select Watch TV from the MythTV main screen, and in a few seconds, you should see the TV channel appear. Congratulations! You are now watching digital TV. You can change channels by using the up and down cursor keys, and go back to the main menu by pressing Esc. If you don't see anything after waiting at least 30 seconds and the system doesn't respond, try turning off the power, restarting, and checking the starting channel as described above: the system may have tried to view a nonexistent or weak channel and crashed.

    To choose a program to record, select Manage Recordings, then Schedule Recordings and Program Guide. Highlight the program you want to record and press Enter. You can also search by title or record every occurrence of a show by using the built-in search functions of MythTV to search for a particular title, actor, or word from the program description.

    You may be a bit disappointed by the quality of the image, but don't despair. Remember that your PC is simultaneously recording the video and then playing it back, a process that can tax many slower systems. Shows will look much better if you record and then watch them later on. And much like Windows when you first install it, Knoppix uses a general set of drivers for the graphics card that doesn't take full advantage of the clever stuff the card can do. You'll need to install the right driver for your graphics card: Check the Web site of the graphics card manufacturer for more details. Both ATI and NVidia produce Linux drivers for graphics cards based on their GPUs.

    Once the system is up and running, you can look at things like adding a remote control, connecting to a TV, and adding the software that lets you transfer recorded shows to DVD. The KnoppMyth forum is a great place to search for more information (lots of common questions have been answered there already), and the KnoppMyth Wiki site also has a good list of how-to files for configuring and getting the most from this incredibly powerful program.

    Explore Computing Center

    About.com Special Features

    Computing Center

    1. Home
    2. Electronics & Gadgets
    3. Computing Center
    4. PCW
    5. Products
    6. Consumer Advice
    7. Electronics
    8. Personal Video Recorders
    9. Build a Flag-Free HD Personal Video Recorder

    ©2009 About.com, a part of The New York Times Company.

    All rights reserved.