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.
nickk
Silicondust
Posts: 20163
Joined: Tue Jan 13, 2004 9:39 am
x 376

Recording using HTTP download - HDHomeRun Prime

Post by nickk »

New feature in the latest HDHomeRun Prime beta firmware...

A HTTP download of the following URL will make a 1 hour (3600 seconds in 1 hour) recording of virtual channel 2:

Code: Select all

http://<ip addr>:5004/auto/v2?duration=3600
Nick

IanSav
Posts: 52
Joined: Thu Jun 10, 2010 7:42 am

Post by IanSav »

Hi Nick,

Will this be coming to the other HDHomeRun models?

Regards,
Ian.

nfs924
Posts: 34
Joined: Fri Dec 02, 2011 2:21 pm

Post by nfs924 »

Very interesting feature....I'm looking forward to using that.

I just wonder what the security implications of this will be. Doubtful that someone would take advantage of this....but you never know.

I have friends who like to mess with me :P

scarhill
Posts: 10
Joined: Thu Oct 25, 2012 11:51 am

Post by scarhill »

I just wonder what the security implications of this will be.
You should really use POST or PUT. Using GET violates the HTTP spec:
... the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe".
More importantly, clients prefetch and cache GETs, which will break apps in strange and unpredictable ways.

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

Post by jasonl »

All it does is retrieve. Not like you can inadvertently subscribe to a PPV event via a CableCARD, which is the only thing I can think of that would have enough significance to warrant a POST. Besides, doing it as anything other than a GET greatly increases the complexity of accessing those streams via a client that isn't a web browser. Pop that URL minus the ?duration bit into VLC and it will happily play, as will MPC-HC, and probably most anything else that can play an HTTP URL (WMP not recommended, it buffers too much). Toss it in an m3u file with a few hundred of its closest friends, maybe some EXTM3U data, and put that file in %appdata%\XBMC\userdata\playlists\video, and it leads to some intriguing possibilities.

Edit: and those of you who like to put together tools to do things, don't forget about http://<ip addr>/lineup.xml?show=unprotected to get you an XML file with channel numbers and names for all subscribed, non-copy-protected channels. We've got an even better method than playlists in the works, but for those who have to have it now, enjoy.

IanSav
Posts: 52
Joined: Thu Jun 10, 2010 7:42 am

Post by IanSav »

Hi Jason,

Will these sort of features (where applicable) be coming to the other HDHomeRun models?

Regards,
Ian.

zaren678
Posts: 30
Joined: Wed Jan 24, 2007 11:24 am

Post by zaren678 »

what does it do if the tuner is locked?

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

Post by nickk »

zaren678 wrote:what does it do if the tuner is locked?
It automatically allocates and uses an available tuner.

If all tuners are in use (locked) it will return 503 Service Unavailable.

Nick

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

Post by nickk »

scarhill wrote:You should really use POST or PUT. Using GET violates the HTTP spec:
... the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe".
More importantly, clients prefetch and cache GETs, which will break apps in strange and unpredictable ways.
The use of HTTP-GET is required by the DLNA standard.

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

Post by nickk »

IanSav wrote:Will these sort of features (where applicable) be coming to the other HDHomeRun models?
The feature set of the HDHR-US models is not being expanded.

Nick

TeddyR
Posts: 772
Joined: Fri Jul 08, 2011 4:53 am

Post by TeddyR »

jasonl wrote:... and those of you who like to put together tools to do things, don't forget about http://<ip addr>/lineup.xml?show=unprotected to get you an XML file with channel numbers and names for all subscribed, non-copy-protected channels. We've got an even better method than playlists in the works, but for those who have to have it now, enjoy.
Items like this might be nice to have in a FAQ or a sticky thread... :-)

I do not know how to code well, bust someone else might be able to use this to help in generating strm files for the prime? None of the methods I looked at seem to work well at this time.... This seems like it might be very helpful...

edit: looks like someone is already on the right path... http://www.silicondust.com/forum/viewtopic.php?p=78660 using a similar method and powershell to generate strm files using the last scan xml.

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

Post by jasonl »

strm files are not needed, and were always an ugly hack with PRIME. The HTTP links can be added directly to a playlist file and will continue to work even if the provider rearranges channels. Still not an optimal solution, just an interim option for impatient people. Better solution is coming once we get the thumbs up from the appropriate people.

erratta@comcast.net
Posts: 10
Joined: Fri Nov 02, 2012 12:39 pm

Re: Recording using HTTP download - HDHomeRun Prime

Post by erratta@comcast.net »

nickk wrote:New feature in the latest HDHomeRun Prime beta firmware...

A HTTP download of the following URL will make a 1 hour (3600 seconds in 1 hour) recording of virtual channel 2:

Code: Select all

http://<ip addr>:5004/auto/v2?duration=3600
Nick
Any more information about this interface ?
I was wondering how to specify which tuner to record from ?
And the output format is mpeg2 ?

I've just gotten the device and haven't learned all its interfaces yet.

I know this is off topic, but when I run google tv's media player it
does a search for upnp/dlna media servers (it may search for other
protocols) the three tuners are discovered. I was wondering what
discovery protocol might the hd homerun be responding to ?
I didn't think it was upnp/dlna capable.

Thanks

-rick

-rick

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

Post by jasonl »

The tuner is automatically selected from the available tuners.

The output is a standard MPEG TS containing whatever video and audio the cable provider uses, typically MPEG2 video and AC3 audio, though occasionally you'll run across others like H.264 video and MPEG audio.

UPnP isn't a single protocol, but rather a collection of many protocols, most of which are also used by other things. SSDP is used by UPnP/DLNA devices to find each other, and is also used by Windows and WMC to find CableCARD tuners.

erratta@comcast.net
Posts: 10
Joined: Fri Nov 02, 2012 12:39 pm

Post by erratta@comcast.net »

jasonl wrote:The tuner is automatically selected from the available tuners.

The output is a standard MPEG TS containing whatever video and audio the cable provider uses, typically MPEG2 video and AC3 audio, though occasionally you'll run across others like H.264 video and MPEG audio.

UPnP isn't a single protocol, but rather a collection of many protocols, most of which are also used by other things. SSDP is used by UPnP/DLNA devices to find each other, and is also used by Windows and WMC to find CableCARD tuners.
Thanks for the quick response.

Are you saying that the HDHomeRun PRIME broadcasts SSDP Advertisements ?
Or responds to SSDP Discover requests ?

....Nevermind....

It does respond to discover events. It would be great if there was some
more documentation on the services supported by the device.
Didn't detect any advertiesments though.

Thanks

-rick

Post Reply