Wednesday, January 12, 2005

Dual Input Hauppauge 250 PVR Card for Recording Digital & Analog Cable

Recording Digital Cable
I've been using the coaxial cable inputs at Tuner0 on both my Hauppauge 250 and my Hauppauge 350 thus far, but wanted to be able to record my digital cable as well. There's two problems to overcome for this task: getting the audio & video from my digital cable into MythTV, and changing the channel on my Motorola Digital Cable box. I'll start with the latter problem.

Changing the Channel on My Motorola Digital Cable Box
I bought myself a MyBlaster Serial IR Blaster from My.Tv store for $40 (plus tax & shipping). It's a pretty cool little box that I have sitting next to my MythTV box. It plugs into the computer's serial port, and faces the back wall of my family room.

I decided to go with this device rather than a simple short-range IR blaster that I could tape in front of the cable box because this one has a long range and I'd like to be able to control more than just the cable box. The signals are bouncing off of my back wall and back at the entertainment center without any problems.

I downloaded the user-contributed script for the MyBlaster, written by William Munson -- thanks William - excellent script. I made some small mods to it for my purposes -- I think the only changes I made were timing and device settings. The script one of several commands as the first parameter. For example, to turn on the device, use:

/usr/local/bin/IRBlaster_DigitalCable.pl power

or, to change the channel to channel 33:

/usr/local/bin/IRBlaster_DigitalCable.pl 33

So, I had to start by figuring out what my MyBlaster device code was, so I could enter that in William's script. I did some digging around, and found that this box wasn't actually made by Motorola, but by GE (as far as I can remember). The MyBlaster code for my cable box is "0276".

The script works great! I'm able to change channels on my cable box using MythTV without any problems. I'm very happy with my $40 purchase.


The Hauppauge 250's Inputs
This card has three video inputs it may choose from:
   * Tuner0 (coaxial cable)
   * Composite4 (A/V cables)
   * SVideo# (I haven't used this)

Tuner0 on the 250 has been working great to bring in the analog coaxial cable into the MythTV box, but I needed a way to bring the Digital Cable into the MythTV box. My digital cable box has two outputs: one for coaxial cable, and one for composite A/V cables. I did some rewiring so that the coax goes into the TV, and the composite A/V cables go into the Hauppauge 250's composite input. From trial and error, I found that this input is Composite4 (not Composite0, which would seem to make sense).


DataDirect for Digital Cable
Now that I have this new Video Source with several new channels, I have to tell MythTV what those channels are. To do so, I logged back into my DataDirect account, and added the new channel list. I had to unselect the channels I didn't purchase, including the HDTV channels and other premium channels. No reason to let MythTV think it can record a movie, only to tape 2 hours of "Premium Service Channel" error message.


Putting It All Together
I ran mythtvsetup to enter my new DataDirect channel list and map it to my Hauppauge 250. First, I entered the channel list in the "Video Sources" section. I named this new section "DataDirect Digital Cable" (the other was named "DataDirect"). Then, I mapped this new channel list to Composite4 on /dev/video1 (the Hauppauge 250 is my second card. If you only have one card, then you'll map to /dev/video0. If you have two cards, you'll have to figure out if it's /dev/video0 or /dev/video1 -- I think the standard is that /dev/video0 is the card closer to the AGP slot on your board. Here's also where you need to tell MythTV how to change channels using the IRBlaster script. I entered:

/usr/local/bin/IRBlaster_DigitalCable.pl

Since you can't splice digital cable like you can with analog, I'd like the Hauppauge 250 to use the coaxial analog cable whenever it can, and only hit the digital cable when absolutely necessary, so I can still use my digital cable box when it's taping something on network tv. There are two options for this:
* when setting up the DataDirect channel list, only select the channels that aren't on analog tv
* give the analog tv Data Source a higher priority than the digital cable source

I'm too lazy to unselect 78 checkboxes, so I chose the latter solution. If a recording is scheduled on ABC, MythTV will use the coaxial cable input. The preferences will probably also push off digital cable recordings if they're going to repeat on analog cable -- it's a great feature.


I then ran mythfilldatabase to go out and populate the database with the new channels and their line-ups. Last, but not least... I restarted mythbackend. If you don't do that, then the change-channel script won't be called. I'm not sure you'd even have access to the new channels if you didn't restart mythbackend.


Conclusions
Productive night... worth the extra work. I'm sure being able to tape all of my premium movie channels won't help my storage situation though...



** I'll include my IRBlaster_DigitalCable.pl script soon.

Monday, January 10, 2005

Quiet Case & Overheating

Initial Setup
I'll spare the details of my initial setup -- I followed Jarod's amazing HOWTO (thanks Jarod). I'm running Fedora Core 3, with the Linux 2.6.9-1.681_FC3 kernel grabbed from ATRPMS using apt-get.

Antec's Piano Black Quiet Media Case
I decided to get a new case that's not a tower, and looks a little better on top of my entertainment center. Noise is a big factor too - I wanted the box to be very quiet, so I settled on Antec's Piano Black Quiet Media Case. The 380W power supply is absolutely silent. It's even got a washable filter in front of the air intake to keep it clean -- NICE. And, there's two low-voltage power cables inside to power the quiet fans.

The only noise coming from the case was from the 4 hard drives and the processor fan. It was amazingly quiet -- until I started having overheating problems. I decided to give the outtake fan on the right of the box full voltage to bring some of the hot air out, because the processor was getting up over 60 degrees Celcius, and the hard drives could cook a slab of ground beef. I wasn't happy about this, but it was necessary. The box is still pretty quiet.

I bought rounded IDE cables to further help the air flow, since the cables were right in front of the outtake fan.

Hauppauge 350 Card Overheating
Since I've been up and running, I've had two full lockups -- the whole system froze. It's been years since Linux has completely frozen up for me -- it looks like an overheat of the Hauppauge 350 card. The heatsink on the Hauppauge 350 would get extremely hot, almost burning my hand. It's no surprise, I'm using the card for the TV Out for both the mpeg2 TV recordings and for X as my primary graphics card.

So, to bring more air across the heatsink on the 350 I dropped a big fan in the box, blowing air across the PCI cards at low voltage to keep it quiet. So far, so good, but we'll see over the next week if this helps.

Sunday, January 09, 2005

Building the ReiserFS LVM at /var/storage

450GB ReiserFS LVM
When you configure MythTV, you select your folder for storing recordings. That's great if you have one monster hard drive -- or, if you use LVM. In my case, I have both :)

Basically LVM lets you put several drives together, making it look like one drive. You can add new drives to the volume, and even (carefully) remove them. I'd recommend backing up anything you have that you need before trying this. I screwed up and ended up losing some digital camera photos. Since then I was able to rebuild most of the lost data, and retrieve partial images (they're each missing about 1/4 of the image). But, in any case -- backup, backup, backup... then experiment.

I used the LVM HOWTO to setup my drive array. I chose ReiserFS because I read it's much better than ext3, and that there are really good tools for managing ReiserFS drives (which I found out when trying to rebuild lost data). I meant to use ReiserFS version 4, but I think I got 3 -- it's whatever ATRPMS gave me.

My current volume contains three 160GB Western Digital 7200 hard drives which I got at Best Buy each for $30 after the insane rebates on Black Friday. I named the volume VGForMythTVStorage, and mounted it at /var/storage.

So far, it's working great - and, if 200 hours of recording time aren't enough, then I could always add another. Hopefully I'd come to my senses by then, and start cleaning off the old episodes of Three Stooges.