Recording using HTTP download - HDHomeRun Prime

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
jasonl
Silicondust
Posts: 16810
Joined: Sun Oct 28, 2007 9:23 pm
x 60

Post by jasonl »


bluebike
Posts: 5
Joined: Thu Feb 18, 2010 2:16 am

small http-server for older hdhomeruns

Post by bluebike »

I wanted easy way to use hdhomerun from vlc with http.
So I made small program in c to run in my old nslu2-linux box.
Tested only with Euro dvb-t/c box in Helsinki Welho/DNA network in Finland.

It can be called like http://host:port/channelName from vlc.

Sources: http://baileys.doa.fi:8085/hdhomerun/hdhomerun_httpd.c

Program should be run with xinetd/inetd.

Sammy2
Posts: 642
Joined: Wed Jun 06, 2012 11:49 am

Post by Sammy2 »

Okay. I'm late to the game but what does this all mean for me, a HDHR Prime user with extended basic, sports and no premiums?

Is this a way to retrieve PPV or OnDemand content?

jasonl
Silicondust
Posts: 16810
Joined: Sun Oct 28, 2007 9:23 pm
x 60

Post by jasonl »

No, it is a way to access live streams directly from HDHomeRun PRIME. It could be used with something like wget to handle recordings from a script on something like a NAS box.

kgeissler
Posts: 51
Joined: Tue Sep 06, 2011 4:56 pm

Post by kgeissler »

Is it possible for this to work over the internet? I have it working on my local network, but for some reason it times out over the internet. I have port 5004 forwarded to my Prime in my router, but it keeps timing out. Are there other ports that need to be forwarded besides 5004?

jasonl
Silicondust
Posts: 16810
Joined: Sun Oct 28, 2007 9:23 pm
x 60

Post by jasonl »

No, it will not work over the internet. The data rate for even SD channels is far higher than what 98% of home internet connections are capable of uploading, and there are ttl limits prescribed by the various specifications the HDHomeRun PRIME supports that limits it to work only within a home network.

kgeissler
Posts: 51
Joined: Tue Sep 06, 2011 4:56 pm

Post by kgeissler »

jasonl wrote:No, it will not work over the internet. The data rate for even SD channels is far higher than what 98% of home internet connections are capable of uploading, and there are ttl limits prescribed by the various specifications the HDHomeRun PRIME supports that limits it to work only within a home network.
That sucks...I was really hoping to get rid of my Slingbox. :(

Crispin
Posts: 4
Joined: Fri Jan 11, 2013 2:11 pm

Post by Crispin »

It seems to me like it would be trivial to create a Windows app that could transcode these mpeg2 streams and serve them back out as h.264. I've been testing it successfully with VLC but lack the programming knowledge to take it further than that.

You'd just have a service read the lineup.xml, parse that into links to the streams, then listen for a request. Plex or XBMC would seem to be an ideal platform to get this working.

tguless
Posts: 15
Joined: Tue Aug 30, 2011 7:24 am

Re: Recording using HTTP download - HDHomeRun Prime

Post by tguless »

I've been trying to do the on the fly tanscode thing with subsonic server. Unfortunately ffmpeg chokes on the streams being served up from HDHomeRun - the end goal here being Slingplayer style locationfree / placeshifting TV access:

[1/28/13 4:41:46 PM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\tvheadend.bat) [ac3 @ 02137900] frame sync error
[1/28/13 4:41:46 PM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\tvheadend.bat) Error while decoding stream #0:1: Error number -1 occurred
[1/28/13 4:41:47 PM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\tvheadend.bat) av_interleaved_write_frame(): Invalid argument

See this thread for all my and others' efforts on this:
http://www.silicondust.com/forum2/viewtopic.php?t=9648

karog
Posts: 529
Joined: Wed Sep 23, 2009 12:54 pm

Re:

Post by karog »

jasonl wrote:The tuner is automatically selected from the available tuners.
This is fine if no tuner is specified but why not also allow optional specification of the tuner? Why not allow tuner=N in the url options?

Also, why is the channel part of the url path rather than an option? That seems like an odd choice.

I run myth which chooses its tuners at time of scheduling. So when I want to watch something live on the fly I currently use the SAVE command and choose the highest tuner (ie 2 on my prime and 1 on my dual) so as to reduce the chance myth will stomp on that. I have myth setup to choose tuners from lowest to highest. Then I start VLC on the saved file. This gives me a simple live tv with rewind buffer.

Online
nickk
Silicondust
Posts: 20163
Joined: Tue Jan 13, 2004 9:39 am
x 376

Re: Re:

Post by nickk »

karog wrote:
jasonl wrote:The tuner is automatically selected from the available tuners.
This is fine if no tuner is specified but why not also allow optional specification of the tuner? Why not allow tuner=N in the url options?
You can specify the tuner rather than using auto:
http://<ip addr>:5004/tuner0/v2

On our todo list is to add resource lock support to MythTV so auto-tuner operations do not interfere with MythTV.

Nick

jrandym
Posts: 1
Joined: Thu Aug 18, 2011 9:12 am

Re: Re:

Post by jrandym »

That would be awesome. Lack of resource locking in MythTv is what has kept me from using the new functionality of HDHR firmware. :D
nickk wrote:
karog wrote:
jasonl wrote:The tuner is automatically selected from the available tuners.
This is fine if no tuner is specified but why not also allow optional specification of the tuner? Why not allow tuner=N in the url options?
You can specify the tuner rather than using auto:
http://<ip addr>:5004/tuner0/v2

On our todo list is to add resource lock support to MythTV so auto-tuner operations do not interfere with MythTV.

Nick

karog
Posts: 529
Joined: Wed Sep 23, 2009 12:54 pm

Re: Re:

Post by karog »

nickk wrote: You can specify the tuner rather than using auto:
http://<ip addr>:5004/tuner0/v2

On our todo list is to add resource lock support to MythTV so auto-tuner operations do not interfere with MythTV.

Nick
Excellent. Thanks nick. I had not seen this url documented other than this thread and it did not include the tuner part before.

SoNic67
Posts: 188
Joined: Sat Dec 22, 2012 8:15 pm

Re: Re:

Post by SoNic67 »

nickk wrote: On our todo list is to add resource lock support to MythTV so auto-tuner operations do not interfere with MythTV.
Nick
I hope that won't interfere with the way WMC selects the tuners.

karog
Posts: 529
Joined: Wed Sep 23, 2009 12:54 pm

Re: Re:

Post by karog »

SoNic67 wrote:
nickk wrote: On our todo list is to add resource lock support to MythTV so auto-tuner operations do not interfere with MythTV.
Nick
I hope that won't interfere with the way WMC selects the tuners.
No reason to think it would. WMC uses the existing lock mechanism. MythTV does not. This change would involve changing MythTV to start using that lock mechanism.

Currently MythTV allocates all of the tuners which it has been told about at scheduling time with the assumption that nothing else is using them. MythTV would be changed to allocate tuners on demand respecting the device locking mechanism.

There is both plus and minus to using the lock mechanism. The plus is clear. The minus is that only at record time does one find that a conflict exists and a recording fails. I prefer the way MythTV does it now so I know in advance and can adjust. I prefer to have more control over scheduling. The automatic methods just cannot know my desires well enough.

Post Reply