Python and MythTV (a MythTV Front-End) - Printable Version
+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: Python and MythTV (a MythTV Front-End) (/showthread.php?tid=2349)
- elminster - 2005-01-04 12:36
am i correct in saying that the latest cvs of mythtv is using protocol 14?
because the above python scripts are built for protocol 13 right?
any one able to shed some light on this?
- iawia - 2005-01-04 15:34
(elminster @ jan. 04 2005,10:36 Wrote:am i correct in saying that the latest cvs of mythtv is using protocol 14?yes, the scripts work only up to protocol version 13, from what i've seen.
i installed a new xbmc (1.1 release) and the 0.9 mythtv scripts yesterday.
the scripts do work partly (if you use the settings to set the protocol version to 14), allowing you to browse the tv guide (with some weird overlapping text effects, though), and to take a look at the recorded programs.
it wasn't possible to play any recordings, though, giving me a 'not allowed for this protocol version' error. not that it would've worked, since i still record with a simple bttv card, and have either mpeg1 or mpeg2 streams in my .nuvs.
i would be intereseted in getting the mplayer patch for myth .nuvs working, which means i'll probably will have to install windows somewhere to compile it.
does anyone know if it's possible to load libraries/call external programs from within a xbmc python script?
i'll start reading docs...
- cyberplague - 2005-01-04 18:45
(euphorical @ dec. 30 2004,00:41 Wrote:i had a play for a couple of hours to try and get livetv working...(almost)great work figuring atleast that much out. but if i remember correctly the issue was that once you started playing the live buffer there was no way for python to capture the input and/or display some kind of osd...
please someone correct me if i am wrong...
- iawia - 2005-01-04 20:34
(cyberplague @ jan. 04 2005,16:45 Wrote:great work figuring atleast that much out. but if i remember correctly the issue was that once you started playing the live buffer there was no way for python to capture the input and/or display some kind of osd...i haven't tried the script, but from the post it looks like the script just tells myth to start 'live tv' mode for a certain channel, and then points xbmc to the (smb mounted) file containing the ringbuffer. that way, python doesn't have to play anything!
- EuphoricaL - 2005-01-04 21:04
hi guys, i've packaged some of my changes at:
to try it out just overwrite the python and scripts folders as usual.
live tv now bascially works, with a simple interface allowing changing channel up and down and some channel numbers.
to get live tv working, export your mythtv livetv folder in samba the same as recordings. use the settings panel to set the correct share. you can now go to the livetv option and switch livetv on and off, change channel up and down, channel numbers and start viewing the stream. because of the lack of any osd, you have to press stop or display to access the interface to change channel etc...
i've also added support for myth protocol 14, which is current mythtv cvs.
if anyone wants to have a go at other bits, these are the things that need to be done:
delete doesn't work anymore
parsing channel data from database and use this as basis for livetv selection.
improve livetv stuff so it uses getnextfreerecorder, for people who have more than one card and also recordinginprogress
i honestly don't think it would be a huge amount of work to get these scripts pretty much finished (bar osd), i'll carry on hacking, but i don't have a huge amount of time.
- juski - 2005-01-04 21:07
deleted my drivel
- EuphoricaL - 2005-01-04 21:40
i noticed the stream corruption when changing channel in the version i just posted...
i've been getting round this by just pressing stop when i want to change a channel, this could be automatic in a osd. mythfrontend does stop the playback whilst changing channel. if mythfrontend can do it, we can in xbmc...
it would be nice as a start to press the select button during playback and get a small window over the video the same as the livetv panel i've done for changing channel.
- juski - 2005-01-04 21:54
i don't know what exactly goes on in xbmc when a file is playing, but i suspect that it'd be possible to trap remote keypresses & overlay something on top of the video.
i don't think mplayer (which xbmc uses to play files) monitors for key presses - all it probably does is do what xbmc tells it to do - so as far as i know, xbmc traps & interprets the keypresses itself, then relays commands to the player.
one thing which could possibly upset all of this is the stream corruption when you change channels. i've tried playing the ringbuffer in mplayer on my windows pc while the mythfrontend runs on my linux box - changing channels broke the stream so much that mplayer had to be restarted. maybe you'd have to stop playing the ringbuffer before issuing the command to change channels, then wait for a while before restarting playback of the live stream. i suspect that's what the mythfrontend does. i've not looked at the source for the frontend yet, but it looks like that's what happens.
>>> dives into the xbmc code for a while....
- juski - 2005-01-04 22:18
silly question time. is xbmc based almost entirely on python? apart from the obvious things like mplayer i mean.
i've been trawling though the install folders & i can't find anything which actually does anything. i'm assuming that all the core stuff is in the archive in the main python folder, yes?
i couldn't find a util to let me take the archive apart so now i'm downloading the xbmc source. i feel very naughty now!!
- EuphoricaL - 2005-01-04 22:38
i second the confusion...i'd like to know where the api for the xbmc python scripts are.
i.e. things like:
anyone any idea?
i found the apis at /docs/python folder of the 1.1.0 xbmc
they are a bit thin :-(
- juski - 2005-01-04 23:08
(euphorical @ jan. 04 2005,20:38 Wrote:i second the confusion...i'd like to know where the api for the xbmc python scripts are.i've got the sourcecode now & i'm going through the whole lot searching for xbmc.player to find out where it's mentioned.
from what i've seen of the code so far there's not much in the way of comments :-(
- juski - 2005-01-04 23:40
i've looked through the source quite a bit, and although i can't find any mention of xbmc.player i've noticed that all the player actions are in the main sourcecode - that is to say i've not found a single instance where a python script controls the player.
but i found an itunes.py for xbmc and gleaned something useful... have you tried xbmc.player().stop() for stopping the playback between channel changes?
and i don't know if you've seen this yet... http://www.xboxmediaplayer.de/cgi-bin....;st=150
- EuphoricaL - 2005-01-05 00:03
using xbmc.player().stop() will stop the buffer problem :-)
dreambox looks to be a similar style thing to ours...
from the screenshots, looks if they just minimise the video to use the control, i suppose this isn't a bad solution. my pioneer stb does this for the full epg.
so its just a case of parsing available channels and cleaning up the interface a bit...
i was debating combining the schedule with the livetv panel, so you could go to the guide then use the listing to select a channel or create a recordind.
- juski - 2005-01-05 00:23
i've been thinking though that it must be possible to have a window where there's a small video portal and an epg. after all if we play a video from my videos etc then hit menu you can see a small video window and the onscreen menu... tantalising isn't it?
i've not yet had a chance to try out your latest script - do you draw the dialogs on top of the video window while it's playing?
just had a try of the new scripts - live tv doesn't work. the backend starts the ringbuffer etc but when i press the button on xbmc to watch livetv nothing happens.
- EuphoricaL - 2005-01-05 09:28
if the backend starts the ringbuffer and starts livetv, check your getting data in the livetv file (ringbuf1.nuv). if you are then the problem is with the setup of the livetv samba share. check your settings for the livetv folder on the server and xbmc settings.