You are here

Getting an HD Homeroom Plus to stream on the Internet

Backstory

 
I used to have a slingbox and I used to be able to access my local TV channels through my Cable TV Provider, then for some strange reason, it stopped working, I only could get three or four channels, this was before my cable provider started encrypting channels and required a DTA.
 
So I got one of the first gen HD Homerun units that allowed me to record TV shows, but the resulting files were huge so downloading was not a realastic option unless some transcoding was involved and also it would not stream.
 
But I recently got an HDTC-2US and the beauty of this unit was that it had
hardware based H.264 encoding which would make streaming over the Internet possible.
 
I scoured the Internet looking for a way to access my new HD Homerun Plus
remotely and came accross a promising way using http to get the stream.
 
Couple sites mentioned accessing the HDHR using VLC a free media player and
opening up the network stream and using something similar to this as the
video source
 
 http://192.168.1.11:5004/auto/v7.1?transcode=internet240
 
The 192.168.1.11 is the IP address of the device, 5004 is the TCP port the
device listens to on the network, auto says to use the next available tuner
(this setup has 2), the v7.1 means virtual channel 7.1 which is KIRO here in
Seattle, and transcode=internet240 is the quality and compression level of the
stream.
 
So I figured it should work if I port forwarded TCP 5004 from the Internet to
my HDHR.  But it did not work, I even spun up one of my older wireless routers
to see if UPNP would help, that did not work either. I asked on the Silicondust forums and they said
it was not supported also there is no username and password to protect you
from others accessing your HDHR.
 
I continued my search on the Internet for a solution but they required VPN which means that the device you are using will probably need a VPN client.
 
I thought about it for a bit and came up with a pretty nifty solution.
 

Solution

 
At other places, I have used an apache server on Linux to act as a reverse
proxy and was thinking this may work with this setup.  In fact the web server
you are reading this page from is an apache server.  I do have another web
server on the same network as my HDHR.
 
This particular setup was an apache 2.2.15 server on the CentOS 6
distribution of Linux which had the apache proxy module enabled.
 
Under /etc/httpd/conf.d I created a config filed named hdhr.conf and placed
this info in it
 
<Location /hdhr1>
    AuthName "HDHR Access"
    AuthType Basic
    AuthUserFile /etc/httpd/conf/htpasswd.hdhr
    Require valid-user
    ProxyPass http://192.168.1.11:5004/auto
    ProxyPassReverse http://192.168.1.11:5004/auto
</Location>
 
The location was set to hdhr1 so if I got more units in the future I could
expand with hdhr2, hdhr3 and so on.
 
The parameters AuthName, AuthType, AuthUserFile, and Require setup Basic
Authentication, to solve the problem of anonymous access on the Internet.
 
The ProxyPass and ProxyPassReverse parameters tell what IP address the HDHR
points to.  When I get more I will simply add more of these location entries
with the IP address of the other HDHR units.
 
So now I can simply open up a vlc media network stream and put in the IP
address or URL
 
  http://www.apolonio.com/hdhr1/v7.1?transcode=internet240
 
and access the live streaming feed from the Internet
 

Extending Security

One drawback of this setup is that the connection is cleartext meaning it is
http and not https.  So we have to find ways of mitigating that. The easiest fix is to upgrade vlc to the latest version, as of this writing 2.1.3 worked.
 
One way I have tried is to limit what IP addresses and domains with proper
reverse DNS can access this URL.  Here is an example
 
<Location /hdhr1>
    AuthName "HDHR Access"
    AuthType Basic
    AuthUserFile /etc/httpd/conf/htpasswd.hdhr
    Order deny,allow
    Allow from 127.0.0.1
    Allow from ::1
    Allow from .apolonio.net
    Allow from 198.51.100
    Require valid-user
    ProxyPass http://192.168.1.11:5004/auto
    ProxyPassReverse http://192.168.1.11:5004/auto
</Location>
But a cool way I am working on is to create a login page which randomly
creates a username and password, updates the /etc/httpd/conf/htpasswd.hdhr
password file, ollects the TV station you want to connect to and the feed
video quality.
 
Then it sends you a URL like
 
   http://larry:foobar@www.apolonio.com/hdhr1/v7.1?transcode=internet240
 
You can simply cut and paste that into your vlc software.
 
When you connect to that URL that tuner will be dedicated to you.
 

Conclusion

 
The VPN solution does work, but it is nice to be able to send a URL to a
friend or access the stream yourself and be able to watch your local shows.
 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer