I Make Projects . com
On the right project, some bad rust looks better than some good paint.

Main | Projects | About | Contact and Services

This is an older site. For my professional site and contact information, visit AE Innovations. You can also visit my new site at It Came From The Workshop.

The MythTV HOWTO I Wish I Had

When I made my MythTV Box in April 2006

(And if you're reading this today, be comforted in the fact that nowadays the install is much easier with some of the latest builds.)

This is the document I wished I had when I started building my MythTV box.

I recently decided I wanted a PVR (Personal Video Recorder - also called a DVR for Digital Video Recorder) in my living room to make TV watching more efficient. I gathered hardware to make an appliance-like MythTV box. Unfortunately the install was far from smooth. Took too long and encountered too many gotchas.

I took pains to record what I had to do to make it work. So, should you want the same thing I have (which is a pretty straightforward setup, I think) you can follow this guide to be up and running in a minimum of time assuming you are using the same hardware as me (if you are making a brand new box this should not be an issue. Everything I used is pretty ordinary.)

Since some parts of this guide depend on software hosted by other people elsewhere, I can't guarantee any particular version availability or results with them. But it worked for me.

What I Made (and what this is a HOWTO for)

  • "Headless" MythTV box (no computer monitor)

  • IR remote control (no keyboard hanging on the coffee table, thanks)

  • Cable TV input to MythTV

  • S-Video output from MythTV to my TV

  • Audio output from MythTV to my stereo

  • Wireless ethernet for MythTV (note: this part is not yet working for me so you're on your own and I'm currently stuck with a cable. See Appendix A at the end of this document for details.)

I wanted to build it in an off-the-shelf no-OS system, and upgrade later to silent fans, etc if needed. Pretty straightforward, I thought. But as mentioned it wound up taking too long and I needed to go through a lot of problems needlessly.

Here is the guide I wish I had when I started. If you get the software I did, the hardware I did, and follow my directions you should be able to have a MythTV appliance up and running in a minimum of time. It will be functional enough to be an effective PVR - the rest (all other configuration and tweaking) will be up to you.

UPDATE: Here's something else I suggest you do if you are serious about a MythTV box. Register to the KnoppMyth Forums. The *real* documentation is on the forums - something I didn't realize until I had already finished with my box.

This HOWTO is still a working beginning-to-end guide for the hardware I used and so far as I can tell the effort isn't duplicated better elsewhere. But there *are* other ways to go about setting up KnoppMyth and there is a lot of info on those forums, so it is worth checking out.

Materials and Requirements

If you are using other hardware, I hope this is still of some use but you're on your own. This is not the ideal hardware configuration - it's just what worked for me and how I did it.

Go out and buy this system hardware, or hardware similar to it:
AMD Semperon 2600+, Serial ATA (SATA) hard drive**, 512MB RAM, onboard Ethernet, CD drive (to boot from)

** Whether the hard drive is SATA is significant during the install. (Just know whether you have it.) If you have the choice between ATA and SATA drives, you should probably actually go with ATA.
** The rest of the specs are not TOO important; any reasonably modern machine should do. As for HD space, the bigger the better. I wouldn't recommend less than 80 GB which is what I used.

Get this capture card:
Hauppauge PVR-350 (with silver remote) - my box says 'model 990'

**The silver remote might not be too significant, but you need the PVR-350 if you're going to follow my guide. It produces great-looking video, by the way.

Get this software:
KnoppMyth R5Beta7 CD (download it from mysettopbox.tv and burn it to CD)

This distribution is some excellent work, despite the fact that my MythTV building experience was far from plug-and-play. Things would have been even rougher without this distribution. If you use this guide and find KnoppMyth useful, please donate to them with either your money or your brain power (by supplying documentation updates or bug reports/fixes). The KnoppMyth forums have plenty of useful information for alternate hardware, too.

Also make sure you have:
. A monitor (needed for installation; after things are up and running you will use only your TV).
. An ethernet cable with access to a functioning Internet connection.
. The ability to use vi to make small edits to config files.
. A working knowledge of Linux and stuff.
(If "cfdisk", "kernel module", "xterm", "vi", and so forth leave you scratching your head, then you are out of your league for this particular project until you learn more.)

First - Why make ANOTHER MythTV Guide?

I looked around and followed guides I could find, but I still wound up with a lot of hassle. Quite frankly, had I not been so determined I would have just thrown in the towel. So I decided to write the guide I wish I could have had when I sat down to do this.

If you follow what I did and have hardware identical (or identical enough) to mine, these directions will get you to what I was aiming for.

This document assumes you are in Canada or the USA.

Pre-Setup (IMPORTANT!)

Sign up for a Schedules Direct account (it was Data Direct when this guide was originally written, but after a long time providing an important service, they are no longer around for use with MythTV.)

Schedules Direct is where your TV listings will come from.


Set your hardware and materials up like this:

1. Put the PC by the TV with a Monitor, a Keyboard, a mouse, and an ethernet connection with Internet access.
2. Plug your coaxial cable connection into the PVR-350's tuner input.
3. Plug the S-Video out of the PVR-350 into your TV with an S-Video cable.
4. Plug the L and R audio out of the PVR-350 into your TV or stereo system with an appropriate cable.
5. Put the batteries from the PVR-350 remote into the remote and keep it nearby.
6. Plug the IR receiver into the PVR-350 and place it somewhere where it can see the remote.
7. Make sure everything has power.
8. Plant your butt down in front of it all with a notepad and pencil.

WARNING: All of the directions below (and the output from the install programs) are important. Please make sure to read carefully both the instructions as well as output from the screen.

For the steps below, keep these two things in mind:

  1. Follow all on-screen instructions or directions unless I specify otherwise. (This means that if you are asked for something in the course of the install and I don't mention it, then either choose the default, or pick something else if you know what you're doing.)

  2. If I don't mention some option at all, then you do not need to mess with it to do this install. (You can fiddle all you want later once things are working.)

Phase 1 - Install From CD-ROM

Boot the computer from the KnoppMyth CD. Begin with:

[4] Manual Install
(Because I had an SATA hard drive, I need to do this manually according to the documentation for KnoppMyth. If you are not using an SATA hard drive you can probably use the normal install as per the KnoppMyth docs, but I didn't.)

Perform time adjustments, and timezone selection as directed. This is important.

[3] Partition
This uses cfdisk. For this I will quote loosely from the KnoppMyth documentation:

Create 4 partitions using cfdisk.
The first (/dev/sda1) will be '/', the second (/dev/sda2) for swap, the third (/dev/sda3) '/cache' and fourth (/dev/sda4) '/myth'.


sda1: 2.5 gigs minimum. I used 2.5 but wish I had used 3 gigs for room to install other crap later in life, or keep big logfiles.


sda2: Should be roughly 1.5 times memory.


sda3: Is used for the live tvbuffer. I'd recommend 3 to 10 gigs depending on your tuner card and hard drive size. (I used 10.)


sda4: Use the rest of the drive for /myth.

Ensure the first partition (/dev/sda1) is bootable.

Write the partition table and quit cfdisk.

Once the partitions have been created, press CTRL-ALT-F2 to get another terminal. Then initialize the swap partition with: mkswap /dev/sda2 && swapon /dev/sda2

Then format /dev/sda3 and sda4 with your desired filesystem types. ext2 is recommended for the live buffer (/dev/sda3) and ext3 is recommended for the data (/dev/sda4) - a journalling filesystem is highly recommended for the data due to its need to manage and quickly delete very large files.

You can create these filesystems with:

mke2fs -O sparse_super -m0 -i8000000 -L cache -M /cache /dev/sda3
mke2fs -j -O sparse_super -m0 -i8000000 -L myth -M /myth /dev/sda4

Once that is complete, hit CTRL-ALT-F1 to return to the installation.

This next bit is to fix a bug in the knoppmyth-sata file on the CD. The correct HD_MAP line in the SATA configuration file is commented out. If you do not do this part, your big fat partition 4 (intended for /myth) for recordings will never be used for recordings!

ALT-F2 to get a new terminal

    cp /KNOPPIX/knoppmyth-sata /

    vi /knoppmyth-sata

    Uncomment the line #HD_MAP with /cache on sda3 and /myth on sda4
    Comment out the line HD_MAP with sda3 on /myth only
    Save and exit

ALT-F1 to go back to the install.

[4] Load Configuration
Change /KNOPPIX/knoppmyth-sata to /knoppmyth-sata, then OK. (We will read our "corrected" version and not the version on the CD).

[1] Configure Install

[2] Start Install

When it is done and you are back at the prompt, use the command "reboot" and remove the CD when told to.

When the system comes back up, the installation will continue.

Phase 2 - Configuration

The next part you will be asked about will be the configuration of LIRC (the remote control software). The remote control should be included with the PVR-350, mine was silver. This is selected with [16] Hauppauge, then [c] for Silver Remote. If you have a different color remote with your PVR-350, you are on your own but you should find an appropriate option for it.

After this, you will be asked for what kind of modules to use for LIRC, XvMC, XvMC-VLD. I used i686.

Now the graphical install will start. You can use the keyboard (arrow keys up and down select field, arrow keys left and right change options. Space bar selects and ESC backs out) or the remote.

CAPTURE (Option number 2)
New Card: The card type is MPEG-2 encoder. The card is a PVR-x50. Default input should be tuner0. Finish. The card should now be on the list. ESC to go back to the main menu.

VIDEO (Option number 3)
New source. Name is "Cable Input". Enter your username and password for DataDirect in the provi ded boxes. Select RETRIEVE LINEUP. Finish, then ESC back to main menu.

INPUT (Option number 4)
Select Tuner0. Name is "Cable". Source is "Cable Input". Select "Fetch from listings" - this will fetch your listings from DataDirect (zap2it.com) and will take a few minutes - be patient. Hit ALT-TAB to see the progress if you wish but remember to ALT-TAB back to the install. Finish, and then ESC to go back to main menu.

Hit ESC, then OK. You will exit the graphical setup tool and setup will continue.

Enter your postal code (or zip code if you are in the USA) when prompted. (I don't know if it matters but I did not include a space in my postal code when I entered mine).

You will then get the MythTV interface on your monitor (the display will not be on your TV screen yet).

Phase 3 - Test Video, and More Configuration

Select WATCH TV (either use the remote or the keyboard). You should get live TV on your monitor. The PVR-350 will provide nice, smooth, great looking video. Sound out from your stereo speakers (ie the sound from the PVR-350) will not yet work.

After verifying that the video works, press ESC (or the back/cancel button on the remote) to exit back to the menu.

The default fonts for the UI are too big to see all option text properly. The following change will help you later:
Go to UTILITIES -> Setup -> Appearance -> Next -> Next -> Next -> Next. You will be at the font selection. Change the defaults to:
Small: 8
Med: 12
Large: 20
Then hit Next -> Finish.

Phase 4 - Test TV-Out, and More Configuration

Go to TV Settings -> Playback (there are two called "Playback"; pick the first) -> Next -> Next -> Next -> Next. Check off these options (checkmark toggle is left/right arrow):

 [X] Use PVR-350's TV-Out
 [X] TV-Audio through PVR-350 (this option shows up after you check the previous)

then Next -> Next -> Next -> Next -> Finish.

Then hit ESC twice to get back to the main menu.

Hit CTRL-ALT-F2 to get to a terminal window. Log in as "root" with the administrative password you entered during the ins tall from the CD.

At the prompt, type "modprobe ivtv-fb". You should get no errors.
ALT-F7 to get back to the MythTV front end.

Now turn on your TV and select WATCH TV again. Video should come out of your TV, and sound should be coming out of whatever you plugged the sound into. Again, notice how the PVR-350 gives great video.

But we are not done yet! You may have noticed that while Video and Sound are going to the TV, the user interface is still going through your Monitor (hit ESC to exit Live TV and you'll see what I mean.) With a bit more work we will have MythTV automatically displaying the UI as well as the video output on the TV.

Now, if you don't mind having the UI displayed on the monitor, and video displayed to the TV, then you can stop here. (But you will need to add "ivtv-fb" to the end of /etc/modules to make sure it is loaded at every reboot. You only need t o do that if you are stopping here. If you are not, then go straight to the next section.)

But if you want the UI *and* Video to both go to the TV we have more to do.

Phase 5 - Enable TV-Out for both Interface and Video

Again, it is very important to do this next part carefully. Read all the directions and do not attempt to jump ahead. Starting at the MythTV interface:

ESC -> Exit MythTV
You should be at an Xwindows screen.

Right-click somewhere on the screen. Select XShells -> New XTerm.
Type 'su - root' (note the spaces between) and enter the root (administrator) password.
Now do the following:

cd /usr/local/bin

(This command will fetch some software and manage the installation thereof, but it will need some help.)

At the "does this look proper?" prompt, answer 'no'. Enter the following: 'http://dc1.snapperworld.net/files/mythtv/pvr.pl'. Then continue with the install). Once it's done, run the downloaded file with:

perl ./pvr.pl

NOTE: This (especially the next parts) all worked for me as of April 1st, 2006. The file you are running "pvr.pl" is downloaded from the Internet by "getpvr.pl". If the author changes this file, these directions may no longer work. If that happens to be the case, you can try running the author's new version (which may work even better) or if you wish to follow what I did instead, the exact pvr.pl file I downloaded and ran during my installation is here.

pvr.pl will detect KnoppMyth version R5 Beta 7. When it asks if this is correct, answer NO (even though it is in fact correct ).

Next you will be directed to pick the version manually. Choose R5A30.2 (number 7). This will download the appropriate script for you to run in the next step.

Afterwards, enter the following commands:

cp R5Alpha30.2-pvr350.pl /root
cd /root
perl ./R5Alpha30.2-pvr350.pl -i

NOTE: Again, if the author changes this file, these directions may no longer work. If you need the same file I used, you can get it here.

Complete the installation, let it run but once it's done DO NOT HIT ENTER TO REBOOT (yet).
Review the output first. You may notice that the actions the script attempted failed (for example, on mine it failed to "make install" some components). I had to proceed with the following to perform it manually:

Leaving the window you were in alone, right-click on the desktop and select XShells -> New XTerm.
Enter "su - root" (note the spaces) Log in with the root password. Enter the following commands:

cd /usr/src/
tar zxf ivtv-0.4.3.tar.gz
cd ivtv-0.4.3/driver
make install
cd ../utils
make install

The above should happen without errors.

Go back to the original window (the one that says "Press ENTER to reboot now...") and press ENTER to reboot.

After the system is back up:
ESC -> Exit MythTV

Right-click -> XShells -> Xterm
su - root (provide root password) then run the following commands:

cd /root
perl ./R5Alpha30.2-pvr350.pl -i

Yes, that's not a typo - we're doing it again. After it completes, type 'reboot' to reboot.

Almost Done!

When the system comes back up, you should have the UI on the TV! Go to "Watch TV". You should have TV output, but no sound! The sound is the last thing we need to get back up and running.

Either SSH to the MythTV box (hope you know its IP...) as root, or exit MythTV again (ESC at main menu -> Exit MythTV) and use the mouse to open an XTerm again (Right-click -> XShells -> XTerm) and 'su - root' again. You're probably getting good at that part by now.

Once you are logged in as root (either by local XTerm or SSH) then do the following:

vi /etc/mythtv/modules/ivtv

Comment out the line that contains "simple=1" (it should look like "options msp3400 once=1 simple=1").
Save and exit.
Then issue the command 'reboot' for the last time.

Your box should come back up with:
- The UI on the TV screen
- "Watch TV" plays on the TV screen
- TV audio plays properly (sound now comes from the PVR-350's R and L outputs. See Appendix B for a note.)

You can now disconnect your Monitor! But note that the TV output doesn't happen until everything is up and running - so if you ever run into a problem you migh t need to haul the monitor out to get to the console.

Now that your PVR is working, you can read the KnoppMyth forums, the MythTV docs, and fiddle with the settings!

I will leave you a couple tips:
1. Probably you will want to visit the SETUP menus and play with the screen Height, Width, and X and Y offsets to make the PVR-350's output match your particular TV screen.
2. Go to the MythTV box's IP in a web browser. The web interface is quite good, actually it's incredible. It's very effective for setting up and managing recording schedules.

Remember to check out KnoppMyth and MythTV for tips and usage information.

Happy MythTV-ing!

Appendix A and B

Appendix A:
For my attemped wireless connection, I had a DWL-G122 USB 802.11 Wireless-G Adapter (Rev B1) -- This did not work and probably won't until the next release of the r2x00 drivers (beta 4). NOTE the different revisions of the DWL-G122 are in fact different hardware! This will explain why when you search for install directions for Linux you get different answers. Not all DWL-G122s are alike! The Rev B1 (rec ent as of March 2006) contains the RALINK 2750??? hardware inside. RALINK has Linux drivers on their site but I was unable to get them working. So as of yet I need to keep my ethernet cable.

Appendix B:
Sound out from the PVR-350 is only video sound (ie from recordings and live TV). Computer sound - such as from MP3s - comes from your computer's sound card or speakers.

Main | Projects | About | Contact and Services

Original Content - Copyright 2010 (Except where specified)