April 25, 2007

HDTV reception and network streaming in a box

Author: Nathan Willis

I have been a TiVo owner since almost day one; seven years with a Series 1 box. But TiVo's elimination of lifetime subscriptions has made me plan on migrating to a do-it-yourself DVR, probably running MythTV. As I spec out hardware, I am increasingly frustrated at the paucity of PCI slots bestowed on us by motherboard makers today. I want good sound, good NTSC, FM, and HDTV, and hopefully multiple tuners, but there is scarcely a mobo in sight that has that much room in the interior. However, I found an alternative in Silicondust's HDHomeRun, a standalone, dual-tuner HDTV receiver that streams video over the network, and supports Linux right out of the box.

The $169 HDHomeRun is a slim 4x7x1-inch box with just four connectors on it: two coaxial input connectors, a 100Base-TX Ethernet port, and a power supply connector. You can plug an antenna or a cable TV input into each input port. Both tuners can tune over-the-air HDTV signals in 8VSB format or cable HDTV signals in QAM256 or QAM64 encoding, in 720p, 1080i, and 1080p resolution. When powered up, four LEDs on the front account for all of the status information: one for power, one for Ethernet, and one for each tuner. There is also an infrared sensor compatible with LIRC.

Getting started

To use the box, you simply connect one or both inputs to a signal source, connect the Ethernet to your LAN, and plug in the power. Silicondust provides a GUI tool for connecting to the HDHomeRun from Windows and an LGPLed command-line client for Linux and Macs. Download the libhdhomerun source code from Silicondust and compile it to get a standalone binary named hdhomerun_config that can be run from any location on your system. It is also a good idea to fetch the latest firmware update from the same download page, which you will then upload to the HDHomeRun using hdhomerun_config.

With your signal sources connected, you first run hdhomerun_config discover, which will report to you the device IDs of all HDHomeRuns on your network. If you have more than one, you will need to note their device IDs so you can send them commands individually. With just one HDHomeRun, you can specify the device ID or use the string FFFFFFFF as a wild card.

Step-by-step instructions are available at Silicondust's forum, but the basic usage of the HDHomeRun is simple. With hdhomerun_config, you can scan for channels on each tuner separately, set each tuner to a channel separately, and stream video from each tuner separately. The two tuners are identified in commands only as tuner0 and tuner1, and they are not labeled on the case itself; if you have different signal sources connected to each (such as one cable and one antenna), you will need to make a note of what channels are found on each tuner in order to connect to them properly.

HD via VLC. Click to enlarge.

The simplest way to test your setup is to use VLC; you stream video from one of your tuners to the IP address of the box you are watching, then choose "Open Network Stream" from the File menu in VLC. The default port is UDP 1234, and the HDHomeRun is smart enough to turn off the stream when you close VLC, so you don't have to worry about wasting bandwidth. Tuning in to an HDHomeRun stream worked for me on the first attempt.

I tested the HDHomeRun with both digital cable and terrestrial broadcast signals -- cable plugged into one tuner, a UHF antenna into the other. Once I got the antenna properly situated and oriented, both signal sources worked like a charm. The cable tuner can decode only unencrypted signals -- a limitation I believe to be present in all current PC HDTV tuners, though if I have missed one please speak up in the comments section -- but I was pleasantly surprised at how many HD signals my local provider was streaming.

In my area (the barren wilderness of West Texas) there are only three local channels broadcasting over the air in HDTV, and though the transmitters are close by, none is high-powered. Consequently I found it necessary to use a directional antenna and manually adjust its orientation for the best reception. The HDHomeRun command-line software can report signal strength and signal-to-noise information, so proper tuning is just a matter of perseverance. Once the antenna was lined up, the picture quality was just as good on the over-the-air channels as it was on the cable.

Beyond the command line

Of course, as exciting as watching that first 1080p episode of Oprah through VLC is, the innate slothfulness of a TV fan will soon well up, and he'll ask. "Why should I have to type in four hdhomerun_config commands by hand just to watch something? Isn't there any way to save my valuable time?" There are, in fact, several.

Browsing the Development forum, you can find several user-created enhancements for hdhomerun_config. There is a patch to add more command hooks, for instance, which lets you tune and select a program stream all in one command. Even better is Kent Loobey's tvlevel2, a set of bash scripts to simplify common tasks. Tvlevel2 scans and extracts channel information from the HDHomeRun's tuners and stores it in flat files, saving you the work of parsing the scan commands' output. Using that info, the tvat script lets you manually schedule recordings like a command-line DVR. It is handy and easy to use, and may pave the way for more full-featured Linux interfaces to come -- other forum members have already written an open source GUI for Mac OS X.

But if you really want scheduled recordings and other such niceties, the answer is open source DVR package MythTV. Here Silicondust has really gone the extra mile: not only do the folks there provide step-by-step instructions for configuring the HDHomeRun as a tuner for MythTV, they host an APT repository for their tested MythTV packages.

MythTV scanning for channels. Click to enlarge.

I am a MythTV newbie, but I encountered no problems configuring MythTV to connect to and record from the HDHomeRun. It is as simple as selecting the HDHomeRun as a video source in mythtv-setup, just as you would a Hauppauge WinTV card or any other capture hardware. MythTV masks the fact that the HDHomeRun is separate device on the network; the HD channels you receive appear in the program lineup just as they would with a PCI or USB connected tuner.

Despite never having installed MythTV before, I got my system up and running as a combined back and front end in under an hour, just in time to schedule and successfully record The Late Show in high definition (OK, maybe not the prettiest choice I could have made, but it works). The step that took the longest was waiting for MythTV to scan through all of the hundreds of potential channels the HDHomeRun's tuners can receive. In fact, the only problem I encountered was getting the Zap2It channel data to correctly match up with the HD channels I could pick up -- and the fault there is evenly distributed between Zap2It and my local broadcasters, who are not communicating with each other about the lineup.


As a hardware device, the HDHomeRun gets full marks. It is small and utilitarian in appearance and does just what it has to. You can stick it by your router or Ethernet switch and stop worrying about it. The reception is pristine. Including two tuners instead of just one is brilliant; for the foreseeable future, most HDTV viewers will need to combine over-the-air and cable signals.

I also appreciate the HDHomeRun's network connectivity. It solves the PCI-slot shortage problem, and it opens up the possibility of painlessly streaming programming to multiple devices.

It is true that the official software for Linux (and OS X) is a bare-bones command-line tool, and that may turn off some potential buyers. But Silicondust has done a far greater service to Linux users by releasing the source code to hdhomerun_config under the LGPL than it would have if it had spent time coding a GUI solution mimicking its Windows offering. In the short term, most buyers will probably use the device under MythTV, where Silicondust goes above and beyond by providing an APT repository. And in the long term, the source code is more valuable than any particular front-end tool. Already hackers are adding to it at the HDHomeRun forums, and whatever third-party apps grow out of their efforts will be community-owned and reflect what users actually want. Both Silicondust and its customers win.


  • Software
Click Here!