Open PVR LiveTV Architecture somehow for new features
#1
Hi,

since broadcasting is shifting more and more to IPTV or DVB-S to ethernet streaming (in LAN), I notice that the IPTV provider features are not possible to realize in kodi PVR code.

As far as I understood realizing anything as a Video Addon is easily possible (because python code?) for capable developers without changing anything in KODI code.
But including new features as a PVR-Client is not possible at all, because PVR-Addons apparently need to be a C-Code and they are also absolutely restricted to the LiveTV feature set, which is included in Kodis LiveTV code.

Example 1 - Re-Play:
Here in Europe we have IPTV providers like Zattoo and Teleboy, Magine TV etc. Most or every of those services include a Re-Play feature which offers the entire Television program of the past 7 days. Usually you would simply open your EPG, list some days back and start (e.g.) Big Bang Theory from two days ago, which you missed because of a Birthday Party or so.
Well... In kodis PVR/LiveTV section respectively code, there is no such possibility to realize this feature. It is simply not meant to start shows from past days or times. You would need to patch resp. alter the code of kodi and then Patch your entire kodi with it to get these features working with one particular PVR-Client (some developers do these hacks in german kodinerds forum already). However these additions most probably break compatibility with other PVR-Clients, which are meant to comply with original Kodi code.

Example 2 - Currently playing mosaik preview:
Again zattoo IPTV. Zattoo provides a feature like current playing guide mosaik preview as static thumbnails:Image
It's an overview of every show, which is now playing. Simply navigate to the static thumbnail and tune the channel by clicking on it. The thumbnails are requested from the zattoo server (a feature) when opening this preview view. The screenshot is from a zattoo kodi video add-on, which has this feature realized, as well as the Re-Play feature. Unfortunately it is not possible to include such things as PVR-Client add-on because of mentioned restrictions.

Example 3:
PVR-Clients are not supposed to be working with inputstream add-on. Hence no DASH stream support is present, which is becoming the standard format for streaming content now. Also future DRM stuff won't be possible this way.


Well, one could always use the full-featured Video Add-on or so, but there the Recordings and channels are not connected to kodis LiveTV-Api, so controls, timer overviews and Yatse PVR Integration is not present, because it is simply a video add-on and not a cool pvr-addon.

I know, that this might be hard to achieve, but perhaps there is a way to discuss and think about how to make the Kodi PVR-Integration open for these kinds of features and for new ones which might come up in the future.
Reply
#2
the straming related part will be split off pvr api.

I am not sure if it makes sense to hack a lot of new features into existing pvr api. maybe new types of services need their own type of integration.
Reply
#3
(2017-06-21, 18:06)FernetMenta Wrote: the straming related part will be split off pvr api.

I am not sure if it makes sense to hack a lot of new features into existing pvr api. maybe new types of services need their own type of integration.
Ah interesting/promising. But what does that mean in the long run? Will there be still an IPTV compatible PVR part in kodi, or do you mean that IPTV is kind of prohibited as PVR client? As far as I understand kodi doesn't really know that it is getting streaming related channels tuned in, when using IPTV Simple Client. Or as a better example: TVHeadEnd with IPTV sources through m3u pipe solution are for kodi something like DVB-S sources, at least it handles it as if. So how will this split be then?

The most important part for me is that IPTV PVR clients should still be able to access the PVR api somehow. So that Yatse can show the channels lists, EPG and Recordings etc. in its PVR section. Same for kodi... PVR has its own keymap section, so that Channel-List is accressible as a OSD via "ActivateWindow(pvrosdchannels)" and EPG OSD is accessible through "ActivateWindow(pvrosdguide".

(2017-06-21, 18:06)FernetMenta Wrote: I am not sure if it makes sense to hack a lot of new features into existing pvr api
Well, but an API is there to make things accessible, isn't it? The logical step would be to add some flexibility to the api to be capable of realizing new things (of course only to some extend).
Reply
#4
the pvr api gets reduced to managing channels and epg. from that perspective it is not relevant if that is iptv or whatever as long as there are channels and epg.
if requests are related to this, a change of api might be ok but trying to implement i.e. vod into pvr is a diferent story. we use pvr and live tv as synonyms. making broadcasts in the past available through live tv is more than just hacking some code to make it work somehow

EDIT: oops, I forgot to mention recordings that clearly belong to pvr
Reply
#5
would you consider treating VOD as a special kind of recoding a possible solution?
Reply
#6
(2017-06-21, 19:01)FernetMenta Wrote: the pvr api gets reduced to managing channels and epg. from that perspective it is not relevant if that is iptv or whatever as long as there are channels and epg.
if requests are related to this, a change of api might be ok but trying to implement i.e. vod into pvr is a diferent story. we use pvr and live tv as synonyms. making broadcasts in the past available through live tv is more than just hacking some code to make it work somehow

EDIT: oops, I forgot to mention recordings that clearly belong to pvr
I totally undestand your points. It could get a never ending story and outsourcing features except EPG/Recordings/Channels makes sense, as these are the core features.
My motivation in this thread here is supposed to be more like a proposal to take into account preparations for future features in the API (for the next kodi version Leia or later), so that these new non-core-features will somehow be possible to fit into the same kodi gui section (LiveTV).

I've seen how rbuehlma@kodinerds has had included this VDO-like Replay feature already in his kodi fork.

My naive non-programmer view of it things something like:
PVR-Client with Replay-Feature: clicked EPG in the past? --> PVR Client reported at installation that it has an EPG-Replay-capability --> Kodi reacts on EPG-Past-Click with video-request
PVR-Client without Replay-Feature: clicked EPG in the past? --> PVR Client reported at installation that it hasn't an EPG-Replay-capability --> Kodi reacts on EPG-Past-Click with noop

So perhaps it would be even best to construct the api like a simple information wrapper. If pressed anything (not showing information, but doing an action) it will allow a program interlayer (similar to the function of inputstream, which hacks itself between source and decoder as a blackbox), so that anything could be included here feature-wise like in a video add-on and the return-value would simply be passed back to the PVR-Add-on, which displays simply whatever was returned (video, audio or perhaps even simply a textmessage etc.)
Reply
#7
I also thought about adding vod into the recording section. Thats already part of the api and in the end its exactly that no? (Yeah no nice epg view but recordings can be categorised by date for example)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#8
For me, replays are a special kind of recordings. If one would want to integrate replay into Kodi pvr, recordings pvr api is the way to go.

For Leia, I implemented an "epg smart select" option, which dynamically decides on epg event click behavior according to timeline. For events in the past, a click on the event will play the recording of that event, if available, otherwise information for the clicked event will be displayed. Although not implemented especially with replay in mind, this seems to fit quite nicely.
Reply
#9
There are also replay/catchup systems that do NOT follow an EPG style of presentation. Locally here at least one station - you go to the catchup part of their website, they list the series that can be replayed, clicking on a series name shows the episodes that are available. Some of them go back weeks or months, certainly wouldn't want to scroll back through an EPG to catchup on an episode from 10 weeks ago.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#10
(2017-06-22, 08:17)nickr Wrote: There are also replay/catchup systems that do NOT follow an EPG style of presentation. Locally here at least one station - you go to the catchup part of their website, they list the series that can be replayed, clicking on a series name shows the episodes that are available. Some of them go back weeks or months, certainly wouldn't want to scroll back through an EPG to catchup on an episode from 10 weeks ago.

This listing could be "recordings" in Kodi PVR UI. Should be almost a nobrainer if the addon delivers the replayable shows as recordings. All possible even today, with Krypton, with existing pvr add-on api and Kodi pvr core implementation.

EDIT: the addon even can put the recordings into (virtual) recordings folders, so the replays can be well organized, even if there are many of them (e.g. top-level folders for series names, containing folders with available episodes etc, or whatever structure the addon developer thinks makes sense)
Reply
#11
I too think that it could be very cool to have the option to write a VOD/catchup service for the PVR API and get a nice VOD presentation interface for them on the GUI instead of having to a python plugin/script for them. As a workaround PVR client developer could reuse recordings section to integrate 'replay' options, but perhaps a completly new VOD/catchup window(s) as a seperate section(s) would be preferably?

To have an interface within the PVR section that is optimized for movie and TV-show/episode rentals, purchases, or paid subscriptions on Smart TVs (for non-flat-fee memberships that is, so pay-to-play TV in other words).

Adding such support for 'pay-to-play' VOD/catchup services might however also rquire the additonal of new login-verification and payment features to the PVR API for handling rentals, purchases, or paid subscriptions?

Otherwise, as I understand it, the main benefit of PVR recordings for PVR client addons (not available to python script/plugin based addons) is video library integration, which in turn brings optional organizational features such as additional metadata via scrapers and sorting with Smart Playlists.
Reply
#12
I did something similar in the past. My mockup python add-on could add a context menu item, which will check if the EPG entry is available as VOD. There were some monor issues because of inconsistent EPG data, but otherwise it worked very well. Support via the API would be really nice.

(2017-06-22, 08:21)ksooo Wrote: This listing could be "recordings" in Kodi PVR UI. Should be almost a nobrainer if the addon delivers the replayable shows as recordings. All possible even today, with Krypton, with existing pvr add-on api and Kodi pvr core implementation.

EDIT: the addon even can put the recordings into (virtual) recordings folders, so the replays can be well organized, even if there are many of them (e.g. top-level folders for series names, containing folders with available episodes etc, or whatever structure the addon developer thinks makes sense)

That is a nice idea. Is it possible to link the recording files to the EPG entries?
Reply
#13
(2017-06-22, 11:40)membrane Wrote: I did something similar in the past. My mockup python add-on could add a context menu item, which will check if the EPG entry is available as VOD. There were some monor issues because of inconsistent EPG data, but otherwise it worked very well. Support via the API would be really nice.

(2017-06-22, 08:21)ksooo Wrote: This listing could be "recordings" in Kodi PVR UI. Should be almost a nobrainer if the addon delivers the replayable shows as recordings. All possible even today, with Krypton, with existing pvr add-on api and Kodi pvr core implementation.

EDIT: the addon even can put the recordings into (virtual) recordings folders, so the replays can be well organized, even if there are many of them (e.g. top-level folders for series names, containing folders with available episodes etc, or whatever structure the addon developer thinks makes sense)

That is a nice idea. Is it possible to link the recording files to the EPG entries?

Yes, this is possible, using the uid of an epg event.
Reply
#14
(2017-06-21, 20:57)infinity85 Wrote: So perhaps it would be even best to construct the api like a simple information wrapper. If pressed anything (not showing information, but doing an action) it will allow a program interlayer (similar to the function of inputstream, which hacks itself between source and decoder as a blackbox), so that anything could be included here feature-wise like in a video add-on and the return-value would simply be passed back to the PVR-Add-on, which displays simply whatever was returned (video, audio or perhaps even simply a textmessage etc.)

That would be nice but actually you are requesting a re-write of large portions of pvr (and pvr gui) code. In particur the EGP grid control that displays EPG is a very bad piece of code.
Reply
#15
It seems that you need a PVR add-on to add recordings. Is there a simple way to do that via a python add-on?
Reply

Logout Mark Read Team Forum Stats Members Help
Open PVR LiveTV Architecture somehow for new features0