kodi-pvr / pvr.hdhomerun

Kodi's HDHomeRun client addon
GNU General Public License v2.0
20 stars 24 forks source link

[Feature Request] Record TV (DVR feature) save video stream to local disk #7

Closed Hedda closed 7 years ago

Hedda commented 8 years ago

I like to make a feature suggestion, that is to add recording functionality into this PVR client addon.

From a user-experince point of view have the ability to "record to disk" inside this native HDHomeRun PVR client addon. In function for this PVR client addon to be able act a DVR (Digital Video Recorder) on its own when used in Kodi. That is, for the PVR client addon itself to save individual video streams to local disk directory/folder. Preferably for the PVR client addon to even save as video files in MPEG-TS (.TS) format just like real DVRs.

This ability to record can also add more features which have dependency on recording, like the ability to "Pause" and "Rewind" Live TV if could add the possibility to continuously record a video streaming from a networked-attatched HDHomeRun tuner to a series of temporary files in a look, again acting just like a read stand-alone DVR box.

Compating to other PVR client addons for Kodi, all such a function is normally located and dependent in an external PVR backend instead of the PVR client addon itself, but this addon is kind-of special and somewhat unique in that it connects to the (network-attached) TV-tuner directly, streaming directly from, so it does not go through a third-party PVR backend at all which can bring such recording functionality. And in addition it would be very nice to have the ability for the video files to be saved locally directlly on an Android device instead of on the PVR backend.

Hedda commented 8 years ago

Here are a couple of links to forks of the Simple IPTV PVR client with added code (by rkubera, with updates by simphax) which features a simple recording feature which adds timeshifting functionality, perhaps you could have a look at this code for possible integration into this native HDHomeRun PVR client addon?

https://github.com/rkubera/pvr.iptvsimple/

https://github.com/simphax/pvr.iptvsimple

This request have also been mentioned in the forum thread with the comment "Just imagine all Android boxes that will then be able to act as a full featured DVR with Kodi and HDHomeRun without a external backend." And please note that Nate from the Kodi team and president of the XBMC Foundation posted in the native HDHomeRun PVR client addon forum thread not long ago and requested this feature himself:

http://forum.kodi.tv/showthread.php?tid=246658

Point is for this addons to have this capability nativly is just these few unique stand-alone client addons without the need to use a standa-alone PVR backend software application.

Hedda commented 8 years ago

Would it be maybe interested in copying and implementing rkubera's native code for recording into your stand-alone HDHomeRun PVR client addon as a proof-of-concept? See rkubera commits here:

https://github.com/rkubera/pvr.iptvsimple/

@rkubera added stream recording code to Simple IPTV PVR client addon, including multi-recording with ffmpeg binary integration. And @simphax is kept an update dfork of of his recording branch:

https://github.com/simphax/pvr.iptvsimple/commits/recording

Hedda commented 8 years ago

@zcsizmadia What is your opionion on this? Do you think that Team-Kodi developers would reject a pull request for such local record features added to this native HDHomeRun PVR client addon? If so, why?

zcsizmadia commented 8 years ago

It is definitely a plan to add this feature. Unfortunately in short term I do not think I can find the time. I am really open for pull requests if someone takes the initiative to modify the addon.

Hedda commented 8 years ago

@zcsizmadia That is cool. Have you looked at code by rkubera for recording to a PVR client addon?

https://github.com/simphax/pvr.iptvsimple/tree/master/src

Other than adding libexecstream the recording functionality looks to be pretty well contained in code.

Hedda commented 8 years ago

FYI; might be a little off-topic but some competition could maybe give a little insentive to add a record feature to the HDHomeRun PVR native addon for Kodi;

Plex have in partnership with SiliconDust now added native DVR recording support in to Plex Media Server from HDHomeRun network tuners. For more info read:

https://www.plex.tv/blog/air-human-plex-dvr-divine/ https://www.plex.tv/features/dvr/ https://support.plex.tv/hc/en-us/articles/226074728-Setting-Up-Recordings https://support.plex.tv/hc/en-us/articles/225976308-Manage-Your-Recordings https://support.plex.tv/hc/en-us/sections/205778607-DVR

Hedda commented 7 years ago

Was this closed because it is a bad idea or just because no one wants it?

Hedda commented 7 years ago

@zcsizmadia any comments on this?

zcsizmadia commented 7 years ago

I am not planning to add this feature to the addon as of now. I think this should be implemented as part of the PVR engine in Kodi, instead of on the individual add-on level. I suggest to make your request with the Kodi development team.

Hedda commented 6 years ago

@zcsizmadia FYI; I took this to Team Kodi and the feedback I got from the members that replied was that "PVR recoding will never be implemented in Kodi's core" and the reasoning for this is that recording could be abused by IPTV addons to illegally record online streams.

So if this is the opionion of all Kodi team members then I see no other solution than to implement recording in the individual HDHomeRun PVR addon, as it will "never" be implemented into Kodi's core.

fuzzard commented 6 years ago

Theres a PR that implements this in a rough fashion that i made a couple months back. https://github.com/kodi-pvr/pvr.hdhomerun/pull/67 I havent bothered to keep working on it, but it works with my limited testing and builds against current kodi master

MatthewLundberg commented 6 years ago

As I've said before, the recording should be done by a service on Windows or daemon on Linux, and be instructed by Kodi. This increases the complexity, as two cooperating programs are required. And of course, there's another PVR that does exactly this, but unfortunately the DVR portion is not free.