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.

Recording using HTTP download - HDHomeRun Prime

Postby nickk » Sat Oct 20, 2012 9:21 am

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

Postby IanSav » Sat Oct 20, 2012 4:23 pm

Hi Nick,

Will this be coming to the other HDHomeRun models?

Regards,
Ian.
IanSav
 
Posts: 50
Joined: Thu Jun 10, 2010 7:42 am

Postby nfs924 » Wed Oct 24, 2012 10:42 am

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
nfs924
 
Posts: 34
Joined: Fri Dec 02, 2011 2:21 pm

Postby scarhill » Thu Oct 25, 2012 12:01 pm

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.
scarhill
 
Posts: 9
Joined: Thu Oct 25, 2012 11:51 am

Postby jasonl » Thu Oct 25, 2012 2:19 pm

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.
jasonl
Silicondust
 
Posts: 9825
Joined: Sun Oct 28, 2007 9:23 pm

Postby IanSav » Thu Oct 25, 2012 4:04 pm

Hi Jason,

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

Regards,
Ian.
IanSav
 
Posts: 50
Joined: Thu Jun 10, 2010 7:42 am

Postby zaren678 » Thu Oct 25, 2012 5:04 pm

what does it do if the tuner is locked?
zaren678
 
Posts: 30
Joined: Wed Jan 24, 2007 11:24 am

Postby nickk » Thu Oct 25, 2012 5:16 pm

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: 11996
Joined: Tue Jan 13, 2004 9:39 am

Postby nickk » Thu Oct 25, 2012 5:18 pm

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: 11996
Joined: Tue Jan 13, 2004 9:39 am

Postby nickk » Thu Oct 25, 2012 5:27 pm

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

Postby TeddyR » Thu Oct 25, 2012 6:25 pm

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.
TeddyR
 
Posts: 563
Joined: Fri Jul 08, 2011 4:53 am

Postby jasonl » Fri Oct 26, 2012 10:29 am

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.
jasonl
Silicondust
 
Posts: 9825
Joined: Sun Oct 28, 2007 9:23 pm

Re: Recording using HTTP download - HDHomeRun Prime

Postby erratta@comcast.net » Mon Nov 05, 2012 8:47 pm

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
erratta@comcast.net
 
Posts: 9
Joined: Fri Nov 02, 2012 12:39 pm

Postby jasonl » Tue Nov 06, 2012 9:46 am

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.
jasonl
Silicondust
 
Posts: 9825
Joined: Sun Oct 28, 2007 9:23 pm

Postby erratta@comcast.net » Tue Nov 06, 2012 2:31 pm

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
erratta@comcast.net
 
Posts: 9
Joined: Fri Nov 02, 2012 12:39 pm

Next

Return to Development Support

Who is online

Users browsing this forum: No registered users and 1 guest