Unified PVR frontend (DVR/HTPC client GUI with EPG) and Addons API for PVR backends? - Printable Version
+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Add-ons (/forumdisplay.php?fid=26)
+---- Forum: PVR (/forumdisplay.php?fid=136)
+---- Thread: Unified PVR frontend (DVR/HTPC client GUI with EPG) and Addons API for PVR backends? (/showthread.php?tid=28918)
Unified PVR frontend (DVR/HTPC client GUI with EPG) and Addons API for PVR backends? - Gamester17 - 2007-10-03 11:43
One common PVR front-end (client-side GUI) and a unified API for addons that control different PVR back-end TV-servers?
Please do not let the length of this post put you off, as this is really a great idea for truly 'taking XBMC to the next level' for sure!
Note that I have already tried to lobby this internally to Team-XBMC for quite a long time but unfortunately none of the developers on the team currently have both personal interest and time required to programming all this by themselves alone, (mostly due to time restraints), so I am now posting this idea as a public request, hoping that some new C/C++ programmer/developer will like this idea and take the initiative to make it happen (and submitting an initial code patch for it to help get us started).
As you may already know, more and more PVR/DVR devices (and also HTPC software applications) are nowdays redesigning/refactoring their applications to be split into a separate back-end and and a front-end, (meaning a separate server-side back-end which runs as a background service and takes care of the recording, storing, and sharing part, and a separate a client-side front-end that acts as the graphical user-interface and media-player viewer).
The basic concept of this design is that the back-end and the front-end have a two-way communication channel between them for sending commands and streaming video, using either their own protocols, (which though often proprietary usually have an openly documented command API), or they use an open internet standard protocol like UPnP, RTSP/RTP, HTTP, XML and/or SOAP. Also, many PVR/DVR devices and HTPC software that are not front-end/back-end based does still have a built-in web-interface (similar to what XBMC has) that can be used to fully remote-control that device/software, plus they often support streaming video via HTTP and RTSP/RTP or they have the option to share their recorded files via standard SMB over the network.
My idea here for is that XBMC could have a generic GUI front-end section in XBMC (which could maybe have the graphical EPG and scheduling stuff based on the XMLTV-GUI TV-Guide standard format for the EPG back-end?). This GUI front-end section should be designed to to able to command and control all types of PVR/DVR devices (and HTPC software) over a network. This GUI front-end should preferably be linked to a generic PVR framework infrastructure with a mapping/translation-layer that would offer a common uniform 'wrapper' API which developers can write separate plugins (eg. DLL libraries) for in order control specific PVR/DVR devices and HTPC software, (like MythTV, MediaPortal, and Dreambox as examples). Maybe even a few common DLL libraries that could be shared between the different plugins if they utilize similar functions/protocols, like UPnP, which could be customized via XML and RegEx or Python to fit different back-ends. All controlled from the same interface in XBMC, with the user all seeing the same generic GUI front-end no matter which back-end is used.
So which new end-user features would this then enable in XBMC?:
- Watch Live TV
- Channel selection during Live TV over full screen window
- Info screen during Live TV with Program Descriptions)
- Record Live TV (on the server-side back-end running on a PC)
- Basic cut and rework recordings (trim the beginning and end)
- Watch that recorded TV
- Electronic Program Guide (EPG) GUI
- View Program Listings (and Program Descriptions on demand)
- Schedule recordings
- Info about what is currently recording or next scheduled recording
- Pause Live TV (time-shift)
- Listen to AM/FM and Satellite Radio
- Teletext (Text TV)
I guess that the requirements for a such API as this will be that it has to be well specified and documented, (or at the very least use doxygen for semi-automatic code documentation?), so that independent plugin developers can jump right in and get started quickly, ei. writing a 'plugin' for the API should not require any knowledge of XBMC GUI internals or the actual workings inside this 'PVR front-end API', right? Maybe start by looking at the existing XBMC's visualization API as a framework reference? As an option we could maybe also add an alternative method for those back-end devices/software that have a web-interface, for those we could possible let the users write 'simple' XML plugins made with RegExp similar to the scrapers and/or Python to enable scraping and web-interface control, or we could even possibly extend XBMC's existing HTTP API to be more flexible in these areas and be accessible from this API as well(?), noted though that those 'simple' plugins could only work if the back-end is capable of streaming using a standard protocol such as UPnP or RTSP/RTP.
Suggested plugins (if a the framework API described in the concept above will ever become available in XBMC):
- MythTV (HTPC software for Linux and Mac OS X) front-end to control MythTV back-end (maybe via MVPMC's libCMyth, or UPnP?).
* XMLTV's .XML download to XBMC's TV-Guide from MythTV EPG and possible schedule control via the TV-Guide too.
- Linux VDR (Video Disk Recorder) front-end to control LinVDR server (maybe via UPnP or existing VDR plugin like streamdev?).
* XMLTV's .XML download to XBMC's XMLTV TV-Guide from VDR EPG and possible sheduele control via the TV-Guide too.
- HTS TVheadend front-end to control HTS's TVheadend as a back-end] (maybe via TVheadend's existing XBMSP-server and Web UI API?).
* XMLTV's .XML download to XBMC's XMLTV TV-Guide and possible schedule control via that TV-Guide too.
- Dreambox/Dbox2 front-end to fully control Dreambox/Dbox2 boxes (maybe via Tuxbox Client for Enigma?).
* XMLTV's .XML download to XBMC's TV-Guide from Dreambox/Dbox2 EPG and possible schedule control via the TV-Guide too.
- HDHomeRun front-end to fully control HDHomeRun boxes.
* XBMC's XMLTV TV-Guide from HDHomeRun EPG and possible sheduele control via the TV-Guide too.
- MediaPortal front-end to control MediaPortal TVserver back-end (maybe via UPnP?, or RTSP?) now they've newly released TvEngine
* XMLTV's .XML download to XBMC's TV-Guide from MediaPortal EPG and possible schedule control via the TV-Guide too.
- MeediOS front-end to control MeediOS back-end (maybe via UPnP?, or RTSP?) they use a derivative of MediaPortal's TV Engine.
* There is also a project on SourceForge called "VistaMCEClient for TVE3 Server" which does the same for Windows Vista MCE.
* XMLTV .XML download to XBMC's TV-Guide from MeediOS EPG and possible schedule control via the TV-Guide too.
- Windows Media Center Extender front-end to control Microsoft Windows MCE as the back-end (maybe via WebGuide for the control?)
* XMLTV's .XML download to XBMC's TV-Guide from Windows MCE EPG and possible schedule control via the TV-Guide too.
- ProgDVB front-end to control ProgDVB as a back-end] (maybe via UPnP or existing ProgDVB plugins API?).
* XMLTV's .XML download to XBMC's XMLTV TV-Guide and possible schedule control via that TV-Guide too.
- v4l and v4l2 (Video4Linux framework) - v4l comes built-into Linux 2.6.x kernel and later, plus a library for v4l2.
What do you all think? Comments, suggestions, ideas?
Any volunteers for the API and/or any or the plugin ideas?
Note! Please understand that since I'm not a programmer myself I probably didn't get all the technical terms correct in this first concept draft.
- t029248 - 2007-10-03 21:56
This would be great, especially with all the plugins to control the different backends there are. I hope people are going to share there backends also trough encrypted P2P. I'm definitely are going to move to XBMC Linux soon and with the option to use powerful backends, the hardware for the front-end can stay moderate.
I also hope the front end stays simple, no XMLTV crap at least simplified like the rest of XBMC, XMLTV is the reason why i stay away from Media Portal, i really dislike, no i hate XMLTV.
In my opinion it would be better to develop a standard package (blackbox) for XMLTV maintained by people who like. This package contains everything, and a user can simpley select, Country, City, Provider to set up the guide. Of course i'm not against a advanced and flexible mode for the power users, but the noobs should be able to get it work within a minute.
- Gamester17 - 2007-11-14 12:30
t029248 Wrote:I also hope the front end stays simple, no XMLTV crap at least simplified like the rest of XBMC, XMLTV is the reason why i stay away from Media Portal, i really dislike, no i hate XMLTV.That is the idea, it should use the XMLTV format in the background (invisible to the end-user) and the XMLTV 'grabbers'/'scrapers' would be written in Python and RegEx to scrape HTTP websites for TV-Guide information, making them easy to share and maintain.
- joolzg - 2007-11-14 15:15
I would like also to find out which is the best way for getting the EPG data into the xbox, as we now have the MM100 moving along I was going to add in a pvr function which can be controlled from the xbox, now we would have to also get an epg on the xbox.
As this box is based on a live source we have a live 7 day epg (UK), dont know about the rest of the worlds DTV service, but whatever you have we can broadcast this live to the xbox and hence have a live epg!!!!
- DrDDT - 2007-11-19 10:18
joolzg Wrote:I would like also to find out which is the best way for getting the EPG data into the xbox, as we now have the MM100 moving along I was going to add in a pvr function which can be controlled from the xbox, now we would have to also get an epg on the xbox.
The MyTV script?
- EvilDude - 2007-12-11 08:02
I really like this idea, although I personally don't even have a controllable TV tuner (yet!)
Has any progress been made on an API etc?
- Gamester17 - 2007-12-11 15:09
EvilDude Wrote:Has any progress been made on an API etc?Unfortunately no developer/programmer has volunteered (yet)
- topfs2 - 2007-12-22 13:57
Oh my god YES! this would be fantastic!! This would really make XBMC on linux usable.
But I'm a bit confused on what you'd like to get done first, make it a server/client based or to write plugin that can communicate with other PVR servers? I'm kind of new to XBMC and just started using it as it made it Linux move and I wonder how it's built up. Is it plugin based with precompiled libs or is the plugin system limited to the python scripts?
Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#.
- EvilDude - 2007-12-23 16:12
I think what is wanted is XBMC as a frontend to other PVR. Initially could just start with myth, and then also become compatible with mediaportal's tv server etc.
Basically, one standard interface in XBMC, to control mutliple backends.
These are just ideas/suggestions from a non-developer... - Gamester17 - 2007-12-28 16:50
Topfs2 Wrote:I'm a bit confused on what you'd like to get done first, make it a server/client based or to write plugin that can communicate with other PVR servers? I'm kind of new to XBMC and just started using it as it made it Linux move and I wonder how it's built up. Is it plugin based with precompiled libs or is the plugin system limited to the python scripts?No work on this has been done at all as of yet, (I'm not a programmer myself and no one who is has volunteered), so you would have to create it all from scratch.
EvilDude is right; the idea is to 'only' add a front-end GUI and client API to XBMC then access third-party back-ends/servers over the network (or if XBMC for Linux is used with the third-party back-ends/servers locally installed as a seperate application on the same computer, like MythTV).
Topfs2 Wrote:Is it plugin based with precompiled libs or is the plugin system limited to the python scripts?Like I said, nothing has been done so whoever volunteers to develop will have decide that themselves, however my idea is that the plugins could be precompiled library DLL files and/or python scripts (or even just regexp XML files), ...that all depends how the developer who volunteers decide to make the client API. My guess is that long as the back-end server has a web-server (or some other HTTP-interface) then simlest would be to make the plugins python based (or again; maybe even just regexp XML based similar to the scraper API in XBMC, which just formats links and text, and grab thumbnails/pictures for channel-icons of the internet or the back-end server web-server if available. I believe that an XMLTV grabber for EPG TV-Guide functions similar to that, like the XBMC scraper).
Could possible grab some ideas and code from these:
- topfs2 - 2008-01-24 11:18
Hi! Sry for the long reply delay but I didn't notice your reply
I've looked through XBMCTv source and well, it's quite dated and needs major fixes to compile but I might use the XMLTV code from though. May be usefull in the future when I get some progress in the rest.
I've downloaded the gmyth sources and will see if I can get some common ground on how a general pluginbase would look for TV.
My Idea is to have All comunication done in this and just send the URL to the DVDPlayer/Mplayer for it to play..
My work will be done on the linux port and therefor I wonder which network protocol's are currently support in the svn? the wiki just state's that it has limited support how limited?
Another source of inspiration... - Gamester17 - 2008-02-12 15:57
Maybe some interface/API ideas can be taken from the source code of the mvpmc (MediaMVP Media Center) project? mvpmc is an open source open source suite of libraries and a media player capable of acting as a front-end for multiple types of backends over the network:
Quote:The MediaMVP Media Center (mvpmc) is a media player written in C. It currently runs on the Hauppauge MediaMVP hardware. It can play video (including live TV), audio (including live radio), show pictures, and retrieve Yahoo! weather. mvpmc can access media from a MythTV, ReplayTV, Hauppauge, VLC, or SqueezeCenter (aka SlimServer) server. It can also access media via UPNP, HTTP, NFS and CIFS. There is a VNC viewer built in. It understands MPEG1 and MPEG2 video, MP3, OGG, WAV, AC3 and FLAC audio and JPG, BMP & PNG images.
Let's make this happen - alcoheca - 2008-02-24 18:51
Would this project be a suitable candidate for inclusion in XBMC's & Google's SoC 2008? Perhaps it's too big a task to qualify?
I'm only asking as I would love to tackle this, however realistically I'd need some guidance to get somewhere. I'm also unsure if any of the main developers are willing to mentor on this, as responses to requests for PVR functionality have always been fairly muted.
On the other hand, I'm of the opinion that this is the last big missing feature of XBMC and one that is sorely missed by many, many people. For example I think this project would be far more valuable to XBMC (cross platform) than this suggestion already on the XBMC SoC wiki entry:
"Native DVB television in XBMC for Linux via v4l/v4l2 library and FFmpeg".
For a start it's hard to know what this means, coding an entirely new PVR application for XBMC? Or could it just be having live TV support from local DVB cards? Even if somebody was going to have PVR recording sever in their XBMC/Linux box, it seems like that could easily be achieved by the idea set out above by Gamester17. (Running VDR/Mythtv/Freevo/whatever in the background instead).
Seperating the GUI from the PVR client part must be the smartest way to go on this, rather than targeting particular applications, that some people may not be able/want to use.
My 2 pence
- Nick8888 - 2008-03-10 14:57
One nice feature which I think would need to be included in this new "[live] TV Section" if it were created would be codes to put in the keymap which are linked to each channel.
I am currently setting up a universal remote and am wanting to add my mythtv channels to it...
something like <one<tv.mythtv.channels.abchd</one>
I would love to hear other peoples thoughts on this as well.
- Gamester17 - 2008-03-10 18:07
alcoheca Wrote:Would this project be a suitable candidate for inclusion in XBMC's & Google's SoC 2008? Perhaps it's too big a task to qualify?Just the front-end GUI (user interface) and maybe the XMLTV TV-Guide as well could be one GSoC project, then each backend could each be a separate project by themselves. I think that the two major goals of a such project would be writing the skinable GUI and coming up with an API so that it could command several backend-client plugins from the same GUI, making it seamless to the end-user (and the GUI skinners) no matter if the backend-server was MythTV, VDR, or MediaPortal.
PS! @alcoheca, checkout our qualification tasks and be sure to apply with Google to GSoC.