XBMC Python Script (1 Viewer)

elupus

Portal Member
July 14, 2007
17
0
Home Country
Sweden Sweden
Let me know how you get along. I've wanted to add filesystem support for TVServer for a long time, but been deterred by the lack of any usable interface. (.net remoting isn't very usable from the xbox side of things)

Just for reference, dvdplayer can already play the rtsp:// url the tvserver provides data from for livetv. Thus just some interface to tune to a channel, and returning the rtsp url would make it possible to get livetv streaming working.

Regards
elupus
 

Gamester17

Portal Pro
May 12, 2004
98
3
Sweden
Home Country
Sweden Sweden
EvilDude, there is already a python script for XBMC that can control MediaPortal, (as I understand the only thing that script do not yet support is Live-TV streaming), so maybe you like to start by extending that existing script, see: MP & XBMC intergration scripts v0.6d Update 4-MAR-07 - MediaPortal Forum

Also https://forum.team-mediaportal.com/...terface-tvserver-potential-xbmc-client-25538/

The streaming protocol you want to use today is RTSP, ...at least until MediaPortal has a UPnP MediaServer which supports streaming Live-TV over UPnP.

Some related topic-threads in the XBMC forum:
MediaPortal Control Script in the making - XBMC Community Forum
XBMC MediaPortal Control Script - XBMC Community Forum
New Python Script for MediaPortal Client - XBMC Community Forum
 

EvilDude

Portal Member
February 1, 2008
43
3
Home Country
The tvservice has an "heart beat" feature that will disconnect inactive clients automatically.

Hm the problem I have is that the server which is doing the actual talking to TV-Server will constantly be running, and so will remain active. I need some way to tell the server that "for this time shift, when the last client disconnects, stop timeshifting".


Let me know how you get along. I've wanted to add filesystem support for TVServer for a long time, but been deterred by the lack of any usable interface. (.net remoting isn't very usable from the xbox side of things)

Just for reference, dvdplayer can already play the rtsp:// url the tvserver provides data from for livetv. Thus just some interface to tune to a channel, and returning the rtsp url would make it possible to get livetv streaming working.

Regards
elupus

Yeah, I'm considering doing this as a video python plugin, just to get something working. I've gotten all the server commands working : ListGroups, ListChannels, TimeshiftChannel, StopTimeshift. I'm now going to code the python video plugin to use these plugins. All my testing so far as been through telnet.

@EvilDude, there is already a python script for XBMC that can control MediaPortal, (as I understand the only thing that script do not yet support is Live-TV streaming), so maybe you like to start by extending that existing script, see: MP & XBMC intergration scripts v0.6d Update 4-MAR-07 - MediaPortal Forum

I wanted to keep the TVServer stuff separate for now - just because it's easier, but also because I do not want to use MediaPortal on my PC, as I want my PC to be just the server, and XBMC to be my client, and the current plugin uses MediaPortal.
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    The tvservice has an "heart beat" feature that will disconnect inactive clients automatically.

    Hm the problem I have is that the server which is doing the actual talking to TV-Server will constantly be running, and so will remain active. I need some way to tell the server that "for this time shift, when the last client disconnects, stop timeshifting".

    Currently no such thing is possible. So all TVE3 clients need to send the heart beat signal to keep the TVE3 server "alive". As we are currently in feature freeze there won't be any additional support for different kind of communication.

    One possibility is that when developing the xbmc client you will create your own TVE3 brach (local SVN or just local folder on your dev PC) and then add such feature. After the feature freeze is over (no exact date yet) the team could possibly integrate the new feature in main code base.
     

    EvilDude

    Portal Member
    February 1, 2008
    43
    3
    Home Country
    Very early alpha version available!
    https://www.prashantv.com/xbmc/TVServerXBMC.zip


    In the zip file,

    TVServerXBMC => the VS2005 project.
    TVServer Live TV => XBMC python video plugin

    The VS2005 project is just a server (no gui, just a command window which will show what it is doing). I have made it single threaded for now, but it is made so that I can very easily make it multithreaded.

    The "TVServer Live TV" folder is the xbox video plugin. This means that it has to be copied to XBMC\plugins\video. Once you do that, you can add it as a source.

    By default the VS2005 project runs on port 9596, and must be run on the machine that is the tv server. The XBMC script connects to "192.168.1.2", you can configure that by opening the file:
    TVServer Live TV\MpLiveTv\xbmcplugin_list.py

    And at the top modifying SERVER_HOST. Make sure you use an IP and not the dns name.

    I should probably write up some basic documentation, but I'm just happy to have gotten it working. It has some ugly hacks, like "~~Stop Timeshifting" in every menu, because I can't make it do that automatically, but if I view channel 10, and change to ABC, it automatically stops and starts the new one so I'm pretty happy with it.

    Please post any feedback you have.
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    You might be able to get greater control over the TV Server by turning your server program into a TV Server Plugin...

    I'm going away to test what you've done so far now ... I'll report back if I find anything note-worthy ...

    Cheers,
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    Hey, I'm trying to get it going, but I'm not sure where the python files should go...

    I didn't have an XBMC\Plugins folder so I made one, but I don't know if I've done it right.

    Can you explain the process for setting it up a little more?

    Thanks,
     

    EvilDude

    Portal Member
    February 1, 2008
    43
    3
    Home Country
    Hey, I'm trying to get it going, but I'm not sure where the python files should go...

    I didn't have an XBMC\Plugins folder so I made one, but I don't know if I've done it right.

    Can you explain the process for setting it up a little more?

    Thanks,

    Looks like you might have a very old version? This feature was added to SVN semi recently, so I would update to the latest SVN version which would come with the plugins folder.

    You need to put it in
    XBMC\plugins\video

    This is how it should be:

    $ ls
    MpLiveTv/ default.py* default.py~* default.tbn* resources/

    $ pwd
    XBMC/plugins/video/TVServer Live TV

    Hope that helps
     

    Users who are viewing this thread

    Top Bottom