MythTV FTW!

I have a TV mounted on the wall in the kitchen because I like to watch the local news while I’m in there (and because I kind of like to have some sort of background sound on even if it isn’t the news).  The problem is that there is no cable outlet in there, so I’ve struggled with OTA reception since the beginning.  However, since the introduction of digital TV the problem has gotten worse as digital is ‘all or nothing’ and in many cases the stations have moved to UHF, which tends to have less range than VHF.  The only channels I can receive in that position with even the best indoor antenna are 4 and 11, and even then they’re not reliable.  Any time we had high winds (or ice and snow) it changed the conditions just enough to cause channel 4 to fade in and out in a frustratingly random way (there was no way I could adjust the antenna to fix it).

If I’d wanted to continue to get OTA programming my only choice would be to mount an antenna on the roof and bring a line inside from it to the TV.  I didn’t really want to do that.  The next option would have been to tie into the FIOS service, but that would have required running coax cable to the location, and I also didn’t want to get into that kind of trouble or expense.

What changed the game recently was when I discovered a device called the HDHomeRun from a company called SiliconDust. It’s a network-attached ATSC tuner that will stream either OTA or clear-QAM channels to any computer on your network.  So when I found an older model on sale recently it gave me the idea that I could put a small computer in the kitchen running Linux and  MythTV and wirelessly stream the TV signal from the HDHomeRun.  And since the HDHomeRun could tune clear-QAM signals, it meant that I could tune the 23 non-encrypted channels that Verizon includes in the FIOS “Local” package without need of another cable box or an external antenna.

For those not familiar with it, MythTV is a free, open-source, software DVR.  It has a distributed network architecture and can work with a variety of computer-connected tuner and capture devices.  It can loosely be thought of as a roll-your-own TiVo.  It consists of two main components: a backend, which handles all the video capture duties; and a frontend, which is what displays the available streams.  It also has a pluggable architecture, so you can add additional features like the ability to view videos and photos, listen to music, browse the web, and view local weather forecasts.

Over the weekend I finally went ahead and set the whole thing up.  I installed MySQL and the MythTV backend on my desktop PC (which is a quad-core 3GHz Athlon with 8GB of RAM) and the MythTV frontend on a Foxconn NetBox-nT330i that I happened to have kicking around (it has a 30GB SSD and 2GB of RAM; it’s nearly silent–the only moving part is the processor fan).  Both systems are running Ubuntu 10.04 (LTS). The only glitch was that the version of MythTV included in the Ubuntu 10.04 repositories (v0.23) had issues with locking up when changing channels on the HDHomeRun.  I installed the Mythbuntu repository updater and updated to the latest revision of V0.24 which fixed it.

One of the neat features of the NetBox is that it’s so small that it can be mounted to the back of an LCD monitor using the VESA mounting holes and an included bracket.  For this setup I mounted it to the monitor and put the monitor on the shelf I’d been using for the TV.

So, at this point, whenever I want to watch live TV, the backend takes control of the HDHomeRun’s first tuner (the second is not yet connected to anything), streams the data to a disk buffer and feeds the buffered stream to the frontend.  This allows for pause and rewind of live TV.  An added benefit of all this is that I now have a full program guide as well as the ability to schedule recordings (via the frontend or via web browser), which the backend will handle and make available to the frontend on request.  I also have the ability to browse the web thanks to the MythTV browser plugin, which I think will come in handy for pulling up recipes.

It probably sounds more complicated than it actually is, but it really wasn’t that much effort.  But it’s the sort of thing that appeals to my inner geek.  Further, I already had all the equipment, other than the HDHomeRun, so it didn’t cost too much to set up (the HDHomeRun dual-tuner was on sale for $80 when I bought it; setting up a decent OTA outdoor antenna would likely have cost that much or more).

I still have a few things to do to smooth out the rough edges, though, as it’s not ready for use by non-geeks.  I have an infrared remote control hooked up to the frontend, and while you can do enough with it to tune live TV and watch videos, it still requires a keyboard to do a lot of stuff, so I need to get the IR mapping cleaned up enough to make it intuitive for those used to using a DVR.  I also am planning to take the NetBox off of the monitor and install an arm in place of the current shelf, which was originally installed for a small tube TV.  I’ll also route the wires better and make it a clean installation when I do.

6 Comments

  1. Scott says:

    When you get your IR stuff figured out, let me know. I’ve given up on Linux remote controls, and reverted to keyboard & mouse for my living room box. It seems like the only remotes that work are $100 or more.

  2. I’m using an El-Cheapo Chinese-made remote:
    http://www.dealextreme.com/p/driver-free-universal-usb-ir-media-remote-controller-for-pc-2-aaa-14380

    The neat thing about it is that it’s designed for PC’s and it’s a USB HID which acts like a combination mouse and multimedia keyboard. Ubuntu recognized it without any configuration on my part, and most of its are mapped to sensible options.

    So it can be used a lot like the keyboard, as it has Up, Down, Left, Right, Escape, and Enter on the bottom of the keypad. The main rough edges right now are volume, info, and menu access. For volume MythTV uses ‘[‘ and ‘]’ while the volume key on the remote is being mapped to the system master volume control. But I think I will set the default volume in the frontend to 90% and just use the system master volume, which removes one rough edge. As for info and menu, I’m contemplating mapping the Windows key and the MyPC key. It just depends on what makes sense and what I will remember later.

    I also have to explore what the Fast Forward, Rewind, Next, and Previous buttons are mapped as. It appears that FF and RW do what they are supposed to. Not sure what Next and Previous do yet.

  3. … and most of its *keys* are mapped…

  4. Scott says:

    I’ll give it a try — my lashup is so hokie, it’s ridiculous, but I’d love to have something like that for browsing purposes. I’ve been running XBMC rather than MythTV. Myth intimidates me from the old days when I started this project.

    Next and Previous are next & previous DVD chapters?

  5. It could be. This machine doesn’t have a DVD connected, so I haven’t been able to try it.

  6. epi 1:10,000 says:

    Nice hard core Technolust Aubrey!!!!!!!

    I use irexec and irxevent to start and stop mythtv/programs with my remote. U can use all those unpaed keys fro whatever you want.

    http://www.mythtv.org/wiki/Setting_A_Button_On_Your_Remote_To_Restart_mythfrontend

    Next you could run a little OpenVPN sever so you can acces your mythtv from anywhere.