27 July, 2011

TV on HVR-900H under Ubuntu Linux


Adventures of a WinTV stick in Linux Lands

A while ago, I read a book that described the fight that the U.K. had to get their FreeView up and running. It was quite a good read, all things considered. At the time I read the book, New Zealand had barely heard of Freeview, but was already well on the way to a roll-out.

Fast forward to today—all analogue TV frequencies are set to be gradually turned off over the next year to be replaced by digital transmissions, which means you'll need either a modern television (with Freeview built in) or some sort of set top box, with or without recording capability. Computers have their own set of challenges that Hauppauge have addressed with their line of USB and PCI TV receivers.

I finally got the Hauppauge WinTV HVR-900H working under Ubuntu Linux 11.04! It seems I needed to modprobe tm6000_dvb and tm6000_alsa modules. In addition, I needed to download a firmware file that wasn't on my system. The link was easy enough to find, once I knew what I was looking for:

http://www.stefanringel.de/pub/xc3028L-v36.fw

An alternative URL is:

http://steventoth.net/linux/hvr1400/xc3028L-v36.fw

Observe the usual things about making sure this is the right file, and all that. Put this into /lib/firmware/ on your Ubuntu system—other Linux distributions may differ. Anyhow, it seems that the VideoLAN client will now play digital TV from the USB stick, once you point vlc at a dvb-t device, set up the frequencies you need to receive channels on, and of course have a decent signal. If you want to improve the picture somewhat (on my initial setup, I was getting all sorts of weird effects) you may want to turn on deinterlacing. Fiddle with the settings until you can't see any obvious blurriness when things move around fast on the screen.

Apparently mplayer can be set up to use the stick as well, though I've no idea how to get it to use the stick in just plain "start it, choose channel, watch like a drone" mode. At least VLC allows me to do that without any real magic commandline invocations.

Setting it all up

First off, you need to know what frequencies you're going to be receiving a digital signal on. Wikipedia is good for this, as they have a whole barrel load of information for various countries—New Zealand frequencies are included amongst them. For Christchurch, you'll need the Sugarloaf frequencies of 682 MHz, 698 MHz and 706 MHz. These frequencies are prone to change over the next wee while, as they work out just how much bandwidth each provider will need. For other regions in NZ, see this list of DVB-T frequencies. These are all owned by either TVNZ, Mediaworks or Kordia, and provide most channels available on the digital platform.

Once you have the local frequencies, you can then feed these into VLC once you start it up. Do note that I've included screenies from both the Windows and the Ubuntu version of VLC, as the same instructions aren't quite the same for each OS.

Screenshot of Media Dialog

First off, hit that Media menu, choose "Open Capture Device", and in the Capture mode dropdown, select DVB (DVB Directshow under Windows). In Device Selection, choose DVB-T. For Linux, make sure there's something in the "Adapter Card" box —Windows doesn't have that setting. Then set the Transponder/Multiplex frequency to the relevant frequency for the transmissions you want to receive. Set the symbol rate to 8MHz for NZ, I'm not sure what you need for other countries. You should be good to go. In Christchurch at least, you could add all three frequencies to a playlist like I did, that should cover all relevant broadcasts from Freeview/HD.

Oh yeah, hit Play. It'll take a few seconds to scan the frequency, and load up the first available program off the frequency. Other programs can be got to by choosing the Playback menu, skipping down to Program, and selecting from the list.

Troubleshooting

First off, figure out if you're close enough to the local transmitter. Odds are if you're receiving crap telly now, then digital TV simply won't work without an improvement in aerial. Don't use the aerial that Hauppauge provided unless you're less than 5 km from the transmitter. Use a better one—preferably a good external UHF aerial. I'm relatively lucky to be able to pull in my signal with bunny ears, but that's because I'm practically line-of-sight to the local transmitter. If you're not, then all you can do is try it and see. If you have the option of taking a feed directly off the roof aerial, then that's also worth a shot, but if you don't want the hit of putting in a signal splitter (typically drops received signal by at least 3db), then you may need to go to the expense of putting up a separate aerial. Roof aerials (if they're set up properly) are usually your best bet for the cleanest signal.

Then, double check your frequencies. If they're not correct, then you won't be receiving anything, because the transmitter you chose with those frequencies will be too far away. If you're sure you've got your frequencies right, and you're close enough to the transmitter—and you have a low-loss line to the USB stick, see what the signal strength software shows—this software was included on a CDROM if you bought the stick from a retailer.

Other than that, I can't honestly suggest anything much more to think of for troubleshooting. It's just the normal getting a television signal right, but a little more stringent on the requirements.

1 comment:

Jascanu Nicolae said...

Hi,
I have a WinTV-HVR-900-H stick and everything is ok on Windows. I'm trying to configure the tunner to work with Linux Mint Katya which is based on Ubuntu 11.04 and nothing seems to work. I don't have any led on. Could you please post all your steps for configuring the stick?