Adam Cooper Wood

Web Developer

HDHR Prime, MacBookPro, VLC and me

[ Networking ]
[ HDHR Prime ]

My primary means of serving TV to my MacBookPro is via MythTV, which has served me well for the past 5 or 6 years.
I recently acquired an HDHR Prime into which a CableCard can be plugged. This eliminates the need for a settop box,
and the rather bizarre Linux Remote Control (LIRC) hoops one must dance through to "blast" infrared channel changing signals
from a Linux box to a cable box. The HDHR Prime plus CableCard setup also upgraded my signal quality considerably.

There are times, however, when MythTV is a bit bulky for my TV viewing needs (live events come to mind-
Saturday morning British Premier League soccer in this house). Enter VLC.

There are two ways to connect VLC to your Prime's stream: HTTP or UDP. I have had more stability with UDP, but I haven't
played too much with the HTTP stream. To connect your Mac to your Prime via http is pretty simple. The stream URL looks like this:

http://<prime ip>:5004/<tuner>/v<channel>?duration=<seconds>

<prime ip> is the ip address of the prime

<tuner> is auto for auto select else tuner0, tuner1, or tuner2

<channel> is the virtual channel number - note the v that precedes it

<seconds> (optional) is the length of time to stream

Drop this into the Network URL on VLC (File, Open Network):

Similarly, to connect via UDP, drop

udp://@:1234

into the Network URL box on VLC. This will tell VLC to look for an incoming UDP signal.
We will send the signal to it using the hdhomerun_config command line tool. That will look like this:

The first line tells the Prime (the one with the unique ID 111111A8) to send it's signal to my IP address
at port 1234 and the second line tells the Prime to tune to channel 67, which happens to be Comedy Central in my area.
To make this slightly easier, I really geeked out and made a simple bash function to do all of this.
As a hack, I made an .m3u playlist which connects to the UDP stream that I put in my Documents folder.
I couldn't find a way to connect directly to the stream from the command line.