February 3, 2004

A happy MythTV user shows the way

Author: Tom Walsh

While I agreed with many points in Lee Schlesinger's article Easy personal video recording for Linux? It's a myth, I am well satisfied with my MythTV setup. I do agree that a MythTV setup is not economically cheaper than a TiVo unit and that the MythTV project is a rather advanced Linux project. But if you have the experience and are willing to put in the time and persevere, you can be as satisfied with the result as I am.

For myself, I have become tired of the endless commercials constantly interrupting my TV viewing. TiVo didn't seem the right answer, though; I had chatted with TiVo users and listened to them complain of things that they were unable to change about their TiVo setup. Mostly what bothered me about a TiVo was the question of getting a TiVo unit that I could modify properly and integrate with my other Linux systems. I was spurred onto the MythTV solution after reading Joe Stump's article The State of Home-Brew PVRs on Linux.

I started by purchasing a cheap bt878 card at a computer show. I installed Windows 98 on a machine and tried the card out to make sure it worked, then wiped the system clean and installed a stock Mandrake 9.2 system. Now the fun (confusion?) begins. The bttv site is very confusing as to what exactly you have to do to get bttv drivers installed into a kernel. I ultimately figured out that I needed to goto ftp.kernel.org and get a stock kernel that matched their patchfiles.

After stumbling around for a while patching, compiling, patching, and compiling, I took a hard look at the stock Mandrake kernel source (2.4.22-10mdkcustom) and found that it had the 0.7 bttv drivers already included! I discarded the bttv patches and went with the Mandrake stuff. This enabled me to run tvtime and gave me a taste of what was to come.

After reading through the archives at MythTV, I decided that the way to go was to purchase a couple of the high-end Hauppauge PVR-250 / PVR-350 cards. I picked up an OEM version of the PVR-250 (special Windows Media Center) on eBay for $88 and ordered a PVR-350 retail version for about $200.

It is important to note that any video card works for a mythtv box. A lot of people seem to be using cards with TVOUT features. Since I an running the TVOUT from the PVR-350 card, I have a junk video card in the mythtv box. My intended system was to run the MythTV application while using the TV set as the output for the video.

Next I needed a motherboard. I won't regale you will the insane lockup problems I had with the ASUS A7N8X-Deluxe board; let's just say I ended up using a Tyan S2465AN motherboard, Athlon 2800+ CPU, and a gigabyte of PC2700 DDR (approximate cost $350). The VIA KT400 chipset of the Tyan motherboard still needs the noapic nolapic pci=noacpi acpi=off statements in LILO as it has some DMA problems with ivtv. All the hardware went into a $148 Antec Overture desktop case, along with 40GB, 120GB, and 160GB hard drives. Finally, I ordered a $200 Plextor PX-708A DVD writer to round the whole thing out. Upon reflection, the Athlon 2800 XP was really overkill; I would expect that an 1800 would do just as well.

I started out by installing the KnoppMyth distro. It was a big disappointment; I could not get MythTV to work. So, I went with what I knew and installed a Mandrake 9.2 system on the mythtv box.

I next downloaded the ivtv-0.1.9.tar.gz tarball and extracted that. Since I was running Mandrake, the MythTV document was invaluable in getting the ivtv driver configured, compiled, and installed (see the section entitled "Hauppauge PVR-250/350 hardware MPEG-2 encoder"). After installing the ivtv module, I tested it by following the ivtv TVOUT-HowTo. Run all the tests; it is important that you get the expected results and confirm that the basic hardware is running correctly.

After getting my ivtv working, I followed the MythTV docs by installing lame, lircd, mysql, libqt-mysql, and others. Eventually, I reached the point where the documentation tells me to run the MythTV setup (/usr/src/mythtv-0.13/setup/setup). I had some trouble understanding that I had to do all the setups, not just the ones I thought needed to be done. For example, after you configure your cards and install a video source, you have to logically connect a video source to the card (Input Connections). Also, once I ran the mythfrontend, I had to configure the playback to use the PVR-350's video out (TVOUT) by going to Setup | TV Settings | Playback and turning that on.

A highly customized XF86Config-4 file finishes the installation along with new entries in /etc/modules and /etc/modules.conf. I use the autologin feature of Mandrake along with the appropriate /etc/inittab entry to bring the machine up into the X desktop with the mythtv user logged in. KDE automatically starts mythfrontend from a symbolic link within /home/mythtv-user/.kde/Autostart to /usr/local/bin/mythfrontend. Mythbackend is started from a provided script placed into /etc/init.d and activated with chkconfig.

There is a lot of confusing information in the documentation, and some of it is out of date. My impression is that the MythTV and ivtv stuff is very much bleeding edge and the documentation is lagging behind the software. But then, I have been running Linux for about 8 years now and am no longer surprised, or annoyed, by this state of affairs. I have found the #ivtv-dev IRC channel on irc.freenode.net to be a great help. There are people there that will help you through some of these issues. However, there is nothing like RTFM to get you most of the way there.

Ten days and $1,200 later, I installed the mythtv box into my entertainment center. It occupies the shelf where the CD player used to be. While the journey has been fraught with frustration and confusion, I am pleased with the results. The mythtv box reaches out to the Internet once a day to update the TV program guide, and keeps 8 days of TV listings for me to choose from. Once a day I tag the movies I might want to see. I also have several TV series that I follow; these are set up to automatically record "all shows on any channel," never duplicate, and auto expire oldest show when maximum number of shows is reached. The whole setup is controlled by a Radio Shack 15-2116 remote control.

I now have the pleasure of living my life without being tied to the TV schedule. When I wish to watch TV, I have a large selection of shows that interest me, pre-recorded. And when I encounter the hated four to six minutes of commercials that infest these TV shows, I simply digitally skip ahead 30 seconds at a time to get back to viewing my show!

Would I say that anyone could put together their own PVR? No! It takes a level of competency and comfort with Linux to attempt such an undertaking. You need a good deal of patience with often time-confusing documentation. But if you persist, ask questions of those in IRC, and purchase high-end hardware, I am confident that you too will be satisfied with your results.

Tom Walsh has been doing embedded systems work for more than 25 years, first as a programmer on Z80 systems and most recently with ARM720 and SA-1100 systems. He is a consultant to industry and makes a living writing software and designing embedded hardware systems, some of which run Linux!

Category:

  • Linux
Click Here!