Consolidate MediaPortal Web Applications (1 Viewer)

DieBagger

Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    39
    Austria
    Home Country
    Austria Austria
    Hi,

    first of all I think cheezey and gemx did a great job in showing us the potential of a MediaPortal web module (Haven't tried the webserver by Big_Kev). I do however think that everyone (users as well as developers) would benefit a lot if there was a common base for the different applications instead of many seperated plugins/applications as we have now.

    The key benefits of this would be
    • Only 1 webserver
    • Less confusion for users
    • Less duplicate code
    • Easier for new developers to jump in
    • and a lot more ;)

    Not sure how everyone else feels about this but I thought I'll bring it up anyways... Maybe we could use this thread to do a little brainstorming on what can be done and how it should be implemented.

    I created a quick drawing of how I imagine such a system, feel free to comment on it or even make better ones ;)

    MPWeb.png

    All function calls/database queries to the tvserver, MediaPortal or other plugins should be encapsulated in what I called the MPWeb code layer. This code layer is then used by different asp .net websites (e.g. desktop/webkit/wap/... version) as well as different webservice apis (soap/rpc/rest/...). These webservices can then be used by applications to offer MediaPortal functionality to the user. Examples would be my MP-TvViewer, clients for other MediaCenters, Unix/Mac clients, an iphone/android/webos/s60 app, or whatever else someone feels like writing.

    Both (webservice and websites) should also have access to a streaming/encoding module (from what I've read adaptive http streaming seems to be an awesome solution for web as well as mobile devices) which offers live conversion and a conversion queue (convert first then stream/download). Imo AirVideo shows how such a service should be done, but then again it's not free and it requires itunes :mad: to work properly).

    Regarding the webserver, from my experience the iPimp solution with an apache webserver with asp_mod seems to be much more mature/stable as other products (cassini web server, aspnetserve,...) so I would use this as a base (also as mentioned in another thread Smooth Streaming - Trac is available for apache) for hosting the websites/webservices. Maybe a small config utility with a systray icon to start/stop webserver and configure other settings.

    Since this is quite a task it will only work if we can find a few people that would be willing to work together on this. I for one would gladly help with coding on the code layer and the webservice part (not so much with webdesign and such stuff ;)).


    Okay, that was everything I can currently think of, what do you guys think???

    :D
     

    nicx

    Portal Pro
    February 1, 2006
    387
    12
    Stuttgart
    Home Country
    Germany Germany
    thumbs up! :)

    this is what i have asked for months ago (maybe years?). in my opinion this is the main missing feature... a maintained web interface for different platforms. i think there is enough knowhow in the community and if gemx, cheezy, big_kev and others would work togehter this goal should not be that far away.

    nicx...
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    But do the web services created by gemx not cover the standard interface? I wanted to create an app to run on my NAS box which is on 24x7 and has a web-server running anyway and did hack some stuff up to use those services.

    AIUI iPimp needs some code on the web-server itself to provide the iPhone style interface so this would need a web server to connect to the web-services web-server?

    All I want (and I think many users would like this too) is to be able to schedule recordings across the net. I use BigKev's webserver which whilst it has may faults) works pretty well to do this. I have hacked up a script to send a WOL request to the HTPC and then redirect all further web-traffic there. All works but not as nice as it could be.

    I think this is too open endeded to have a single solution. For me all I want is access to the guide and to be able to schedule a recording. This is not too difficult and would suit a very lightweight fast web-server. Other users want to stream TV which would require a more powerful web-server which various add-ons. iPimp then wants it's plugins at the web-server end so already you have requirements for three web-servers ??

    I think gemx has provided the based for what you want but other apps will always sit along side this.
     

    Dragy

    Portal Pro
    April 27, 2009
    778
    333
    31
    Home Country
    Netherlands Netherlands
    Big_Kev's web app is the best in my eyes. Only its webserver lacks on stability...

    MPWebServices is nice, but it lacks on recording options.. And I think it's better to have the webserver not integrated into the TVservice, because of instability.

    iPIMP is iPhone only.. I was planning to make a Desktop version of it. But it's harder then I thought, because I'm not a VB programmer or something.. I can't find the source files on the server? :p
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    55
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    Here we are again :)

    I agree the MediaPortal would definately benefit from a single approach and would be happy to work toward that. I have stated that I'd migrate iPiMP to gemx's MPWebServices when it was in a position to fulfil my requirements, which it isn't at the moment, but as a concept it is spot on. I think I have written iPiMP in such a way as it wouldn't be too much work to migrate to a common 'MPWeb' or MPWebServices layer.

    I'd like to make some points in reply to the above posts and some personal thoughts on an implementation:

    • iPiMP is trying to be a smartphone interface - not just for the iPhone anymore.
    • A fully fledged web server is a requirement - that way you get the flexibility, stability, extendability and cool community stuff like the Smooth Streaming extension. This has the potential to make a generic streaming module VERY simple.
    • I am not a web developer (I'm not really any kind of developer - just a hobbyist), all the iPiMP screen layout and AJAX comes for free with the WebApp.Net framework I use.
    • I used VB.Net as I had tinkered in the past with VBScript and IIS hosted Asp.Net sites.
    • iPiMP deploys a MPclient plugin - a single process plugin which is used by the web app to control the MP client and access it's DBs (via MP / plugin functions) - this way you don't need to have a webserver running on every client - which is a good thing!
    • If the MPWeb code layer was implemented as web services and ran on a full web server then all other web interfaces should run on the same web server. My ideal would be to have one web server and be able to access TV server and all MP clients.
    • Dragy - the iPiMP code is compiled into a DLL - the source though is all on Google code ;)

    I only code iPiMP so what dev time I have is dedicated to that, I know gemx has his fingers in many pies so getting his time
    may be a problem, and has Big_Kev rejoined the forums? What we need though is a good web developer (no offence to anyone) - I know the MP team have struggled with this in the past also.

    So - you can count me in from the iPiMP side if you get enough traction to make this fly.
    :D
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    That was exactly what i had in mind when creating MPWebServices.
    The only goal it should reach was to have a simple webservice layer to access the tvserver functions and databases of MP and TvServer.
    The WebApp itself was just meant to be a demo of how the webservices could be used.
    So basically MPWebServices IS the MPWeb-Code layer you mentioned.
    Just throw away the webapp and use IIS or Apache as WebServer and you have the basis :D
    So my proposal would be to do the following:
    1) Throw away MPWebService's web app
    2) Use Apache or IIS to host the webservices
    3) Let iPimp and other WebApps use the WebServices of MPWebServices instead of their own implementations to control TvServer and access the MP and TvServer databases
    4) Host iPimp and other WebApps on the same WebServer

    That's it :)
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    39
    Austria
    Home Country
    Austria Austria
    And I think it's better to have the webserver not integrated into the TVservice, because of instability.
    I think so as well, also there isn't really any advantage of doing so imo.

    I think this is too open endeded to have a single solution. For me all I want is access to the guide and to be able to schedule a recording. This is not too difficult and would suit a very lightweight fast web-server. Other users want to stream TV which would require a more powerful web-server which various add-ons. iPimp then wants it's plugins at the web-server end so already you have requirements for three web-servers ??
    gemx webservice needs the same type of webserver as ipimp (one that can serve asp .net). Also the point of this would be that you only need one webserver (on a singleseat) on which all services are running. Currently you would need 3 webservers if you install the webservices/bigkev's webserver and ipimp.


    If the MPWeb code layer was implemented as web services and ran on a full web server then all other web interfaces should run on the same web server. My ideal would be to have one web server and be able to access TV server and all MP clients.
    This would certainly allow more flexability since you could have the webservice run on a different machine than your websites, also it would be possible to support multi-seat environments. But I think it would be neccessary to have some sort of master/slave setup with webservices because you only want one entry point for the user or programs using the webservice (see drawing 2 ;)):

    Webapp.png

    Also how do you bring the video (not tv since it's streamed in rtsp anyways, offline video files) to the "master" webservice/website and where is the encoding/streaming done?


    That was exactly what i had in mind when creating MPWebServices.
    The only goal it should reach was to have a simple webservice layer to access the tvserver functions and databases of MP and TvServer.
    The WebApp itself was just meant to be a demo of how the webservices could be used.
    So basically MPWebServices IS the MPWeb-Code layer you mentioned.
    Just throw away the webapp and use IIS or Apache as WebServer and you have the basis :D
    So my proposal would be to do the following:
    1) Throw away MPWebService's web app
    2) Use Apache or IIS to host the webservices
    3) Let iPimp and other WebApps use the WebServices of MPWebServices instead of their own implementations to control TvServer and access the MP and TvServer databases
    4) Host iPimp and other WebApps on the same WebServer
    Your webservices are awesome but at the current state they're only for us enthusiasts imo because it's a little tricky to get everything working (specially when you're on MediaPortal RC3) and even if you do the website (as you said lots of times) is more a proof of concept.


    Different WebServices
    Would it be good to have (or at least plan for) different types of webservices then the SOAP that is generated by asp .net (e.g. JSON or REST based)? Afaik on some platforms it is difficult to access soap (e.g. iPhone).

    It should be easy for a regular MP user to install this
    The ideal imo would be one installer where the user can choose to install
    • Only webservices
    • only WebApplication (e.g. ipimp)
    • Singleseat (WebService and WebApp on the same webserver)

    Authentification
    Imo its very important to have authentification also for webservices because I don't want to have a publicly available webservice that anyone can access.

    @cheezey:
    For me one on the most exciting aspects of the whole thing is video/tv streaming (I think I'm not alone with this ;)) so I'd have a few questions about the smoothstreaming framework if I may:
    • What kind of video formats are possible with this? Is it also possible to stream hd (tv/videos)?
    • What's the lag on this/how good is the performance?
    • How much CPU does the transcoding use?

    :D
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    55
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    If the MPWeb code layer was implemented as web services and ran on a full web server then all other web interfaces should run on the same web server. My ideal would be to have one web server and be able to access TV server and all MP clients.
    This would certainly allow more flexability since you could have the webservice run on a different machine than your websites, also it would be possible to support multi-seat environments. But I think it would be neccessary to have some sort of master/slave setup with webservices because you only want one entry point for the user or programs using the webservice (see drawing 2 ;)):

    This diagram reflects a singleseat install (tv server + mp client) and a standalone client, there should also be the facility to run a standalone TV server, which is why I went down the client plugin route, the iPiMP web app interfaces with TV server for tv/radio/recording functions and also interfaces with the client plugin for MP client video/audio/control.


    Also how do you bring the video (not tv since it's streamed in rtsp anyways, offline video files) to the "master" webservice/website and where is the encoding/streaming done?
    You could stream it from the plugin to the server, but the easiest option would be to insist MP clients used UNC shares for video/audio files - I was going to do the latter for iPiMP. You'd have to give clear instructions on why this was required and how exactly to do it, or there's probably some automation that could help. All my sources for My Music, My Videos, Moving Pictures & TV Series are on UNC, it makes a multi seat environment easier to setup & maintain.



    Different WebServices
    Would it be good to have (or at least plan for) different types of webservices then the SOAP that is generated by asp .net (e.g. JSON or REST based)? Afaik on some platforms it is difficult to access soap (e.g. iPhone).
    Absolutely - if it can support common integration formats, or at least be extendible, then it's take-up would be faster.



    It should be easy for a regular MP user to install this
    The ideal imo would be one installer where the user can choose to install
    • Only webservices
    • only WebApplication (e.g. ipimp)
    • Singleseat (WebService and WebApp on the same webserver)
    Absolutely - you have to consider 'normal' users who don't want to wade through a million settings/tweaks. Point & click. The MediaPortal Installer is fantastic in this. iPiMP supports standard & advanced installs and I'm happy to help on the installer side of things.



    Authentification
    Imo its very important to have authentification also for webservices because I don't want to have a publicly available webservice that anyone can access.
    Absolutely - iPiMP uses Asp.Net authentication & authorisation providers so you get it for free!



    @cheezey:
    For me one on the most exciting aspects of the whole thing is video/tv streaming (I think I'm not alone with this ;)) so I'd have a few questions about the smoothstreaming framework if I may:
    • What kind of video formats are possible with this? Is it also possible to stream hd (tv/videos)?
    • What's the lag on this/how good is the performance?
    • How much CPU does the transcoding use?
    • Any format that FFMpeg supports - it uses FFMpeg patched to allow it to output a fragmented MP4 file format (ismv).
    • There is certainly a startup time for the streaming, maybe 15secs. Performance will be dependent on the trancoding parameters you select. I have only tested using iPiMP's standard MP4 parameters. One cool thing you can do with this though is create a single h264 stream containing multiple video streams encoded at different bitrates, this brings the adaptive bitrate into scope where the quality of video adapts to the available bandwidth. I haven't done any testing on this yet.
    • Again, it depends on the transcoding parameters used.

    :D
     

    Users who are viewing this thread

    Top Bottom