My MythTV Setup

This page details my mythtv setup experience. I brought my first box up in a weekend (1/10/04). However, I fully intended it to be an ongoing project, and I'm collecting the information here.

Hardware Info | Tivo Comparisons | Why I built a MythTV Box | My Setup Experience

David Jeske ( jeske at chat dot net )


Hardware Info

My goal in all this experimentation is to figure out what hardware to buy to build my "real" box. Here are some possibilities:

2-tuner standalone

Total cost ~= $607 + tuner cards

playback front-end (iffy)

MythTV support for this box is barely there, so it's not ready for prime time yet. Still promising though. Total cost ~= $250 (no dvd), $300 (w/dvd), $380 (w/dvd & capture)

xbox playback front-end

Total cost ~= $220

Cases

Other interesting parts


Tivo Comparisons

Everyone wants to know how MythTV compares to commercial devices such as Tivo and replaytv. I'm going to share my opinions and observations so far:

Why I built a MythTV box

I'm a long-time tivo-user (and lover). I was interested in MythTV as a hobby project, and because of it's features. While using Tivo, I would occasionally think of features would be neat to add, if I had access to the source code. I also wanted two cable tuners, and the ability to playback music. However, my Tivo worked, so there wasn't much incentive for me to do anything.

Aside -- Ever since Tivo launched, I felt that they slightly missed the target market. Most of the people I know who own Tivo are people who care about their tv experience. They spent thousands on their entertainment centers. However, Tivo provided no way for those people to spend more money on Tivo. If you want another tuner or more space, you can't just buy another Tivo, because using the second tivo and managing its recording programs is annoying. They should have designed in multi-tivo support out of the box, so that their best customers could pay them more money. Years later, the Moxi Media Center is still not available, but MythTV is happily powering multi-backend, multi-frontend installations.
Ultimately, it was the death of my Tivo which was the kick in the pants I needed. I had already purchased a Tivo for my mother which broke twice (once in warranty). When my Tivo broke, it was three-strikes-and-your-out. It was at least worth a couple weekends to see if MythTV could replace my dead tivo. If it didn't work out, I knew I could always go buy a new one.

I was pretty conservative at first. I didn't want to run out and buy a bunch of equipment if I wasn't going to actually keep using it. So I grabbed an existing PC, a new hard drive, a tuner card, and went to work. It took 10 hours over one weekend to bringup MythTV on this initial PC. In just a few days it was obvious that the mythtv software could functionally replace my Tivo. Some things are not as nice as Tivo, but some things are much nicer, and the source is all available to hack away. If you want to know more, read my comparisons.

The PC I started with is big, and white, and noisy. Plus, one of my tuners, the PVR-250, is a newer rev which currently has an annoying audio hiss. So now the question is, what hardware will make a box which fits into the living room experience more like a Tivo. I'm still working on that part, and assembling the information on this page.


My MythTV Setup Experience

I installed RedHat 9 and started with the excellent redhat 9 instructions from Jarod Wilson (thanks!).

However, I recommend using his newer fedora core instructions, or one of the other install guides.

tv out

When I started, the machine already had an ATI Radeon 9500 w/tvout in it. I tried without success using atitvout, but I couldn't make it work for me. I finally gave up and bought an Nvidia geforce4 mx 440 w/tvout ($54), because that was one of the cards used in the howto. TV out was up on boot, and after the driver installed I had X up and running on my tv pretty quickly.

capture card

The only capture card they had in stock at the local computer store was a flyvideo 2000 fm. I figured it would work because I saw it listed in the bttv-card.c card list. However, there are many versions of this card. The older version is a bt8x8 card, but the version I bought seems to use the saa7134 phillips chip. After many attempts to try newer kernels, and newer driver versions, all ending in non-compiling modules, I gave up on the card. I remembered I had an ATI TV Wonder VE in the closet from over a year ago. I dropped that into the machine, and at least bttv knew what to do with it.

tuner config

After the tv wonder came online, I could startup xawtv and watch the glorious bluescreen. I read about tuner configs, and tried many different tuner settings to get it to bringup. This part of the process has been the most painful. From what I can tell, unloading and reloading the bttv/tuner drivers with new configs without rebooting does not actually work right. After lots of attempts, it mysteriously started working. Then I rebooted and it stopped working. Finally I found some modules.conf lines which seemed to bring it up with the default tuner 19 for this card.

I brought up mythtv. At first it was pretty unstable. Anytime I selected a channel which had lots of static, it would pause and lock up. Sometimes it came out of it, sometimes it didn't. There were lots of channels with static, because I had selected the wrong cable channel lineup. I selected the right one, and mythtv stopped locking up.

tuner channel offsets

At this point, the colors were washed out. I played with the hue/color/contrast settings, but it didn't fix it. I searched and found out this might be a tuning problem. I used the arrow keys to finetune in xawtv and sure enough the picture became vibrant and correct. I hardcoded a tune offset (+14) into every channel in the mythtv channel table and then it looked good in mythtv. However, I noticed that all the channels were off. After some messing around, I realized that I needed to finetune up a whole channel (+104), and then everything was great.

video jitter/stutter

At this point everything was pretty good. live tv worked, the channels and program information were populated. My IR keyboard was serving as a reasonable enough remote for now. However, the video playback would pause once every 2-3 minutes. The cpu was only 15-25% busy, so it seemed pretty unlikely it was a horsepower problem. After reading other experiences, I decided just to "nice -15 mythfrontend". This seems to have eliminated nearly all pauses. It still pauses occasionally if you hit mythweb or run an apt-get on the machine, but it doesn't pause while using it normally.

Now that things were working, I started watching tv and playing around. A Star Trek Voyager episode served as my guinnea pig as I learned the keyboard control keys. I noticed that there was lots of weave/feathering during action scenes caused by the conversion from interlaced to progressive scan. I remembered reading about some built-in deinterlacing support, but it took me a while to find the setting under playback setup. As soon as I turned it on the problem went away completely.

I spent a little more time playing with mythweather and making mydvd playback work.

Tada ... everything works great, and I'm pretty happy. This was the end of day two for me, and I'd spent about 10 hours so far. A good amount of that was trying (unsuccessfully) to get the phillips saa7135 based flyvideo 2000 fm working. At this point I was pretty confident that

bringing up two tuners

I only had enough drive space on the little drive for two or three shows. No fun, so I dropped by the store to get a 160gb drive. ($109 after rebate at Fry's!) I want to ultimately get two or three tuners working, so while I was there, I picked up two new tuner cards. As I had looked through the hardware database and posts, it seemed to me that people are using these cards (in rough order of frequency): Hauppauge PVR-250, AverTV, Leadtek winfast tv2000, Hauppauge WinTV [Go][Radio]. I picked up one PVR-250, and one Leadtek winfast 2000 xp deluxe.

When I got back home I dropped the new tuners into the machine. The winfast was detected, but xawtv just gave me the blue screen. I messed around with the tuner through several reboots, and then my patience waned. I dropped in the PVR-250, and put my ATI TV Wonder VE back in. Somehow my existing card didn't come up after reboot. After some messing around, I made it work with tuner=2 in modules.conf. This turned out pretty good, because now my finetune values were no longer necessary.

I started working on the ivtv driver install, but ran into an apt-get problem with the ivtv-firmware module. Eventually, I found these supplemental instructions from Jarod.

The PVR-250 came up pretty easily. However, I found that there was no audio. After some digging, I seem to have a rev of the card which has different audio connections. In order to hear audio, I have to run this command:

  /usr/local/bin/test_ioctl -v input=7,output=1
However, every time mythtv changes channels it changes the audio mux and the sound goes away. There is some implication that a newer ivtv driver might fix the problem, but there was one note that also said it might break sound until they roll in some new fixes. I'm not going to mess with something that mostly works, so I just wrote a hacky script to constantly reset the audio settings on the PVR-250:
[jeske@localhost bin]$ cat audiofix.sh
#!/bin/tcsh

while (1)
 /usr/lib/ivtv/test_ioctl -v input=7,output=1 > /dev/null
  sleep 1;
end;

dvd rip setup

I had a rental movie which was due, but I hadn't had a chance to watch. I decided this was a reasonable way to use dvd ripping. At first my transcoding daemon wouldn't startup. A quick check of the log showed that my /mnt/store/dvdrip directory was not writable, nor was my /mnt/store/mythvideo directory. After fixing this, the transcoding daemon started and began to rip away.

However, ripping put a toll on the system. While CPU usage was still nearly zero, video playback would stutter consistantly while a dvdrip was in progress. At first I thought this was due to IO saturation of the hard disk. However, a kind soul suggested I look at the dma settings on my DVD drive using hdparm. After looking here, I found that with the right settings, there are no playback skips, even while doing a dvdrip. Here's the line I added to my rc.local:

  hdparm -d1 -c1 -X34 -u1 /dev/hdc

TV Tuner Chart

Card Namecostvideoaudioother
AverMedia M179$80hardware mpeg2