My MythTV Install Experience

I have long wanted to make a MythTV box instead of paying a monthly fee for something like TiVo. I figured that if I made my own machine, I would be in control of my time shifting. I wouldn’t have to worry about some media company telling me what I can do, nor would I pay a monthly fee for the “privilege”. Also, the Broadcast Flag is apparently very hard to kill, and the media companies seem intent on getting it out there. I wanted to build my own digital video recorder sooner rather than later.

That said, I did not find the MythTV installation experience to be very smooth at all. I did not realize before starting this project that MythTV only recently hit v0.20 and is still very rough around the edges. I had done quite a bit of research, learning what hardware worked well and what problems people encountered. Somehow I manage to avoid finding all of the complaints and show-stopper problems people have encountered until after I had already purchased the hardware and made the decision to make this machine.

As I write this, I am watching live TV while recording another channel. Also, in about 10 minutes, the first recording will end, and another recording session on yet another channel is scheduled. Earlier this afternoon, my girlfriend wanted to watch two shows that were airing at the same time, so it was the perfect first test. That test failed, but I wasn’t home when it happened. I don’t know if there was an actual problem with the system or if there was a problem with the user interface. I think the database or the capture cards crashed. Either way, I wasn’t happy.

But let me start from the beginning:

The Initial Hardware Purchase

I made the decision to put together this machine at the beginning of December. In order to get everything ready in time for Christmas, I didn’t want to order the parts online and risk something going wrong in shipping. I went to Fry’s to purchase everything. My goals with this machine:

  • I wanted to be able to watch TV while recording something at the same time.
  • I wanted it to be quiet.
  • I wanted it to look like it belongs in the living room.

Of course, none of my preferred hardware was available, but I was mainly concerned with the capture cards. I picked out a small Antec case, a miniATX Abit motherboard with onboard sound and video (including integrated TV-Out), an AMD64-X2 processor that was energy efficient, and 2GB of DDR2 memory. From what I had read, I had way too much processing power and memory for my needs, but I figure that this machine might be able to do more in the future.

As I said, I couldn’t find my preferred capture cards. I wanted to find a Hauppauge PVR-500, which is one PCI card that has two inputs. I read that there are some slight problems with it, especially compared to the PVR-150, but they seemed to have workarounds or fixes. It seems that miniATX motherboards do not have more than two PCI slots, and so freeing up one slot would mean that air flow through the case would be unhindered as well as allowing upgrades to the machine in the future. Maybe I might want to get another capture card, or I might get a sound card if I find that the onboard audio isn’t sufficient.

Well, I couldn’t find anything by Hauppauge. The next thing I thought I could get was the ATI TV-Wonder card, which is not to be mistaken for the ATI All-in-Wonder card. The former is actually usable in GNU/Linux; the latter isn’t. I found the HD version of the TV-Wonder, but I was not sure if I could use it with standard cable. In the end, I settled for the Avermedia AverTV Go 007 FM. There were two of these cards, and both were discounted. I think I had read about it and knew that it was slightly tricky to get working, but it was doable.

I bought a 300GB Seagate SATA hard drive and a Samsung DVD writer. I bought the SATA drive because I wanted it to be quick, and I bought the Samsung because I had read that it was a quiet drive.

In the end, the total price came out to almost $900, which is $400 more than I expected a MythTV box to cost. Yeesh!

The First Problem

I put everything together on Christmas Eve, only to find that the capture cards wouldn’t fit in the PCI slots! At first I thought that it was a manufacturing defect of the PCI cards, but a few days later I found that the problem was with the motherboard. Apparently someone decided to put some tall capacitors right next to the PCI slots, and the capture cards have something sticking down. By the laws of physics, they can’t fit in the same space at the same time, so I had to bring back the motherboard and get a new one. Having already purchased a processor and memory, I needed to find a motherboard that was compatible. I managed to get an MSI miniATX board that allowed me to install the CPU, the memory, and the PCI cards. It didn’t have integrated TV-Out, but I didn’t really have a choice unless I wanted to order something online and wait for it.

More Hardware

When I was ready to start installing the software, I realized that I didn’t have a way to connect the machine to my television. I also didn’t have a cable splitter, so I couldn’t use both tuner cards either. After doing some more research, I found that I could get an external converter to connect VGA output to A/V inputs. I bought the converter, the cable splitter, and some high-quality cables.

The Software: First Attempt

My first choice was to try using Knoppmyth. It is basically a MythTV installation based off of the Knoppix distribution. I read that it is very easy to install MythTV with it, so I obtained the latest version, R5E50, and burned a CD.

I want to point out that the The Pamphlet of KnoppMyth never mentions how to select and create the four partitions it suggests. I kept getting strange errors about a drive being read-only, and I just assumed it was a problem with Knoppix/Knoppmyth not handling SATA correctly. No, it turns out that it is a problem of not letting me easily see what it was I was supposed to do. When you select Partition, you should also press SPACE to select the drive. If you don’t select the drive in this way, you will basically run cfdisk without any arguments, which gives the same error message. Of course, the UI should do a better job than highlight the entire line. It should highlight the spot that lets me see that I should put an asterisk in the ASCII box. Better yet, since I only had one drive anyway, it should automatically put one in there for me so that just hitting Enter should do the right thing. Interestingly, the boot-loader installation works by defaulting to one of the choices, so why not the do the same in the partition option? It took me over 40 minutes before I realized why I was having this issue.

Now that that headache is out of the way, I had to go through the install process multiple times. First, apparently because I was installing with the computer connected to the television, it wouldn’t start the X server correctly and I had nothing but a blank screen at startup. Then I had a strange problem of the drive being mounted by the installer and then preventing the installer from doing its job:

Error: Formatting of /dev/sda1 failed. Some messages
from mkfs.ext3: mke2fs 1.40-WIP (14-Nov-2006)
/dev/sda1 is mounted; will not make a filesystem here!

I got the above error at two different points in the installation process, and I found that it seems to happen after it is done copying files. At one point I decided to start over from scratch, making sure to read all of the directions carefully, and I finally got the nice message:

KnoppMyth was successfully installed to hd.

w00t! All it seemed to take was knowing that I had to press the spacebar at certain points.

So, the pamphlet says “Once complete, reboot the system.” Ok, but do I take the CD out? It seemed to make sense, but it would be nice if it was clearer on this point. Maybe it still needed the CD for further work? I had to hit the spacebar, so maybe it would make sense for it to need the CD again. I took my chances with removing the CD.

After staring at a blank screen for a few minutes, I decided that I needed to get a spare monitor in my living room. I knew there was a reason not to get rid of it yet. Of course, I still get disturbing error messages:

Mounting local filesystem .. mount: you must specify the filesystem type
FAILED

That FAILED part is in bright red, by the way.

And I still get a blank screen. Soooo….start over? Sure!

Except I still get a blank screen once the install is finished and I’ve rebooted. Well, there is a non-blinking white cursor at the top left, and the computer doesn’t seem to take any input from the keyboard except CTRL+ALT+DEL. I think that the X server was somehow running, but I wasn’t able to see anything. Hitting CTRL+ALT+DEL seems to let the installation actually shutdown correctly.

Knowing that something is working doesn’t make me feel better that the entire system isn’t working. Somehow, I only now found out that Knoppmyth is apparently not as easy as it is made out to be. I find a few articles about people experience problems with MySQL not starting correctly and incorrect default pathnames during setup. I also don’t know why the X server didn’t startup correctly. Knoppmyth is still a young project, and I look forward to using it in the future, but it just wasn’t going to work for me without a lot of manual effort. Effort defeated the purpose of using Knoppmyth in the first place, and so I decided to try something else.

The Software: Second Attempt

After reading about the success people had with Red Hat, Fedora, and Ubuntu, I decided to use Ubuntu. It is based on Debian, which is what I use on my desktop, so I could feel comfortable installing and maintaining the machine. I found an AMD64 version of the Ubuntu Edgy 6.10 install CD image, burned a copy, and set to work installing. I was amazed that it installed a complete desktop system within what seemed like minutes. It seemed like all of my hardware was detected, but I found that the nForce 410 chipset is not getting detected. I couldn’t get the onboard audio working, but it may have to do with the fact that the drivers are not available for the kernel version I have. Luckily, I had a spare USB audio device laying around. This Turtlebeach device would not install on a Windows 98 system sometime last year, but Ubuntu automatically detected it. It just worked!

Installing the packages for MythTV was actually fairly straightforward. Unfortunately, I ran into more trouble.

Even More Hardware

It turned out that the two Avermedia cards didn’t act the same. One of them worked fine, although I couldn’t seem to get audio working. I read that someone had to redirect /dev/dsp to another dsp device, so I wasn’t too worried. The other card, however, would not get detected correctly. lspci -v can tell me that it comes from Avermedia, but it sees it as an unknown device. I even tried using it in a different PCI slot and with the good card removed from the machine, but nothing seemed to work. Another frustrating thing? It turns out that the Avermedia cards weren’t hardware encoders. So I went to Microcenter and bought a Hauppauge PVR-150. I replaced the bad card, installed the ivtv drivers and firmware, and I was able to get video on both devices. While the PVR-150 worked great, the Avermedia card was still silent and video stuttered. I bought a second PVR-150, replaced the remaining Avermedia card, and now I am testing everything.

Those two cards cost about $100 each. Sorry, Wallet.

What’s Next?

The PVR-150 came with a remote control which is supposed to be easy to setup with the MythTV box. Right now, I have to use a keyboard to control the Myth frontend, and the keyboard does not reach all lthe way to the couch. The remote will make things more convenient.

I also want to try to install some Myth plugins. MythWeather, MythDVD, MythNews, and MythGame should be fairly self-explanatory. MythWeb would allow me to manage the recording schedule from a remote web browser.

General Issues

While I was trying to get the non-hardware encoder cards working, it was terribly unstable. The backend crashes, the MySQL database crashes, and the frontend crashes, and way too often to be usable. Sometimes the capture cards seem to get corrupted, requiring a reboot. It needs to be more stable to stay in the living room.

Now

I just finished recording two shows while I watched live TV. The well-supported hardware encoders really ease the load on my machine. Both shows seem to have recorded just fine, and I didn’t notice much more than a short stutter when it started recording the second show in the background. I am watching one of the recordings, and I am pleasantly surprised to find that it doesn’t have any strange video or audio problems. And it just automatically skipped a commercial break for me! Sweet!

If I were to do this project all over again, I would probably have saved some money by getting a cheaper processor. From what I understand, 1GHz might have been good enough, although I could probably spend only a few more dollars to get at least 2GHz. I may not have needed more than 512MB or 1GB of memory, so there could be some significant savings right there. I also would have bought a better motherboard that didn’t use an unsupported nForce chipset, and I would have bought the hardware encoder capture cards in the first place.

Hopefully this information will be helpful to someone who is looking to install MythTV. Basically, unless you have well-supported hardware, you will likely run into installation problems that remind me of what GNU/Linux installation was like years ago. Knoppmyth may work out of the box with the right motherboard and capture cards, but it may be easier to just install a different distro and install MythTV on top of it.

Follow GBGames on Google Plus and Facebook!

Association of Software Professionals

Twitter: GBGames