PDA

View Full Version : Python and MythTV (a MythTV Front-End)


Pages : [1] 2 3

madtw
2004-03-23, 22:10
i recently setup mythtv and am waiting for my pvr-250 tv tuner card to arrive. while i wait, i have setup the xbox version of mythtv that runs linux but was a bit disappointed. it takes a long time to boot up and a lot of the features are already handled by xbmc (e.g. weather, games, music, videos, dvd). the only additional feature that i currently want to use is the ability to view recorded tv shows, program recordings, delete recordings, look at tv schedule. as a result, i started playing with the python interpreter in xbmc.

after writing some scripts, i have a few questions. i'm new to python (just learned it on the weekend) so if the language supports something natively, i might not have discovered this yet so go easy on me.

1. does the xbmc version of python provide hooks to access smb shares natively? i found a pure python implementation of the smb client side protocol and have been able to get that working nicely but i was just wondering if there already exists a way to do this? i know that xbmc.player() can access files over smb shares if the "url" is constructed properly but i haven't found a way to do this using, for example, nt.listdir(dir).

2. xbmc obviously parses xml. is this exposed anywhere in the python interpreter? in order to bootstrap to the mysql database, i need a place to store the hostname, database name, user, and password. i was thinking of adding this to my xboxmediacenter.xml file. if there was a way for python scripts to get access to the parsed config file or to call the xml parser on a file, that would be handy.

3. does anyone know of a pure python mysql client interface module? in order to learn python, i wrote a python module that supports connecting and authenticating to mysql over a socket, select, insert, update, and deleting of rows in the database, creating and dropping databases. it does what i need it to do and i'm willing to contribute this to the project... but i'd like to add some more documentation to it and use it in a useful script so that i can make sure i'm happy with the api. if there already exists such a beast, then there's no point in me working any further on it.

4. i ran into a weird problem with the following code:


import xbmc

filename = "smb://banshee/videos/foobar.avi"
xbmc.player().play(filename)


the avi starts to play as expected but when i hit stop on the xbox remote, the screen goes black and the xbmc interface never comes back. i haven't waited to see what happens when the entire avi finishes. i am using the march 9, 2004 build... is this a known problem? if you replace the avi file with a mp3 file, it seems to work fine. any ideas?

5. someone mentioned in the forum about having buttons bound to python scripts... it would be fantastic if a user could add a button to the main xbmc menu (e.g. mythtv) that launches a python script. at the moment, the only way i could launch my scripts is to go into the settings ->scripts screen and pick the name of my script. i tried creating a shortcut to the python script so that i could pick the shortcut under programs but this did not work. i tried placing my python script in an apps folder but it didn't work either. is there any other way to launch a python script other than through the settings screen?

keep up the great work on the python interface! the possibilities are endless...

darkie
2004-03-23, 23:54
1. does the xbmc version of python provide hooks to access smb shares natively? *i found a pure python implementation of the smb client side protocol and have been able to get that working nicely but i was just wondering if there already exists a way to do this? *i know that xbmc.player() can access files over smb shares if the "url" is constructed properly but i haven't found a way to do this using, for example, nt.listdir(dir).
no, this is not possible.
2. xbmc obviously parses xml. *is this exposed anywhere in the python interpreter? *in order to bootstrap to the mysql database, i need a place to store the hostname, database name, user, and password. *i was thinking of adding this to my xboxmediacenter.xml file. *if there was a way for python scripts to get access to the parsed config file or to call the xml parser on a file, that would be handy.
python has some xml parser modules in it's library but i haven't add those yet to python for xbmc (just forgot to add it, but will do it soon).
if you read some documentation on www.python.org you will see that there is support for xml files.
3. does anyone know of a pure python mysql client interface module? *in order to learn python, i wrote a python module that supports connecting and authenticating to mysql over a socket, select, insert, update, and deleting of rows in the database, creating and dropping databases. *it does what i need it to do and i'm willing to contribute this to the project... but i'd like to add some more documentation to it and use it in a useful script so that i can make sure i'm happy with the api. *if there already exists such a beast, then there's no point in me working any further on it.
there is a pure mysql python client but it is only available as a python dll module. and if there is only one big problem left for python it is loading dll modules and especially if they are not compiled for the xbox. so currently not possible.
and if you want to share what you already have, please. i think a lot of other user find this usefull.
the avi starts to play as expected but when i hit stop on the xbox remote, the screen goes black and the xbmc interface never comes back. *i haven't waited to see what happens when the entire avi finishes. *i am using the march 9, 2004 build... is this a known problem? *if you replace the avi file with a mp3 file, it seems to work fine. *any ideas? fixed in current cvs
5. someone mentioned in the forum about having buttons bound to python scripts... it would be fantastic if a user could add a button to the main xbmc menu (e.g. mythtv) that launches a python script. *at the moment, the only way i could launch my scripts is to go into the settings ->scripts screen and pick the name of my script. *i tried creating a shortcut to the python script so that i could pick the shortcut under programs but this did not work. *i tried placing my python script in an apps folder but it didn't work either. *is there any other way to launch a python script other than through the settings screen?
binding scripts to buttons is possible. have a look at cvs/skinning.txt. somewhere at the end of the document there is this
button control:

*<control>
...
...
<script>q:\scripts\update_tvguide.py</script>
*</control>

stickman
2004-03-24, 02:50
i've been thinking about this for some time. recently i suggested adding mythtv frontend support as a feature, but maybe it will be possible to implement at least the main features through python.

i assume you already might know this, or maybe there's even better documentation, but i'll link (http://winmyth.sourceforge.net/mythprotocol.html) it anyway.

as soon as you have some working code i'll beta test it for you and i'll try to help to improve it :)

madtw
2004-03-24, 11:16
thanks darkie for the quick reply and the info.

stickman thanks for the info. at the moment, i'm focusing on getting access to the mythtv information in the database without using the mythtv protocol. the main driver for this is so that i can watch recorded shows without firing up the full blown linux mythtv frontend on the xbox. also, i'd like to be able to view tv listings on the xbox and since mythtv has it all in the database already, i might as well grab it from there instead of hitting zap2it again.

eventually, i'd like to get scheduling, etc. working... so at some point i'll have to delve into the protocol.

anyway, for those interested, here (http://changeling.ixionstudios.com/xbmc/xbmc_mythtv-0.1.tar.gz) is a tar file containing the mysql python module that i wrote... it also includes the pysmb modules for accessing smb/cifs remote file systems.

alx5962
2004-03-24, 14:01
as i said in another topic, i managed to read the listing.xml created by xmltv but there's a bug in thecurrent version of¨xbox python that prevents it to work. but darkie said he will fixes this soon.

Hullebulle
2004-03-27, 00:54
as i said in another topic, i managed to read the listing.xml created by xmltv but there's a bug in thecurrent version of¨xbox python that prevents it to work. but darkie said he will fixes this soon.
i think it is ficxed already.

cvs-note:
24-03-04 added: pyexpat module to python, should fix all those (pyhon) xml problems

jswu
2004-03-29, 07:24
i think this is great idea. thank you for doing this.

i can help test the scripts for you but i only have the xbmc build from 3/9/2004.

madtw
2004-03-29, 08:19
i can help test the scripts for you but i only have the xbmc build from 3/9/2004.

i wasn't sure by your comment if you meant the xml stuff or if you meant the mythtv stuff. if you want to test the mythtv stuff, i started on the 3/9/2004 build and i think it is fine or at least as good as the 3/16/2004 build. i switched to the unofficial 3/16/2004 build hoping that it would include the stuff that darkie added but it didn't.

oh well... patience. :)

jswu
2004-03-29, 08:37
i wasn't sure by your comment if you meant the xml stuff or if you meant the mythtv stuff. *if you want to test the mythtv stuff, i started on the 3/9/2004 build
i meant the mythtv stuff. i downloaded the 0.2 xbmc-mythtv files from your site, and was able to get everything running. i needed to install the python.rar files. i also needed to include the username/password for the tv recording folder on my mythtv box in the mytv.xml smb setting.

excellent work! it was able to query the mysql db and get a list of recorded tv programs and access the tv program share when i selected a program. but a couple issues:
1. when you select a program, it starts playing (you can hear the audio) but it does not display the video. you have to press x or display to see the video playing.
2. when i press stop or reach the end of the video, the whole thing freezes and the screen goes black. i can't get back to xbmc or play the tv program anymore.

madtw
2004-03-29, 18:01
1. when you select a program, it starts playing (you can hear the audio) but it does not display the video. you have to press x or display to see the video playing.

yeah, i've noticed that too... there isn't much that i can do about it in the script as far as i can tell (maybe someone can correct me if i'm wrong). i think it is an xbmc issue in that it sets focus to the python script window instead of the player screen even though the python window was closed in the code. it might also be related to the window close issue i posted about earlier... where the window seems to get events even after a close. darkie any ideas on what i can do in the python code to fix this?

2. when i press stop or reach the end of the video, the whole thing freezes and the screen goes black. i can't get back to xbmc or play the tv program anymore.

this is a known issue with python. darkie said that it has been fixed in cvs but we need to get a new build of the python library to fix the problem. hopefully someone will do that soon...

BHeremans
2004-03-31, 22:06
take a look at the python script at this page : http://www.visi.com/~erl/

madtw
2004-04-01, 05:48
1. when you select a program, it starts playing (you can hear the audio) but it does not display the video. you have to press x or display to see the video playing.

2. when i press stop or reach the end of the video, the whole thing freezes and the screen goes black. i can't get back to xbmc or play the tv program anymore.

looks like the latest build resolved these problems! thanks darkie and whoever else fixed those issues. i haven't had a chance to try the virtual keyboard yet... but i'll get back to it this weekend.

i haven't made much progress over the last couple of days because i was busy getting the tuner card working in linux 2.6.4. everything is working great now so i'll get back to python scripting.

bheremans: thanks for the link... that comes in handy for learning the mythtv protocol.

madtw
2004-04-05, 10:28
fyi... here (http://changeling.ixionstudios.com/xbmc) is a new pre-release version of the mythtv frontend for xbmc. this version includes a gui settings screen as well as mythtv recorded show playback. any issues/comments are welcome.

jswu
2004-04-06, 02:08
just gave it a try. everything is working and looking great! good job!

i have been using xbmc-mythtv to view my mythtv recordings and then using the mythtv web interface to schedule and delete my recordings. thanks!

madtw
2004-04-07, 04:55
jswu: cool... i think i'll add the ability to delete recordings soon as well. i've been finding myself using the web interface to delete stuff but it would be handy to be able to do it from the xbmc after watching the show. :)

rothbart
2004-04-07, 11:29
so i must be missing something. *i've got a mythtv backend running, i've got xbmc running. *i've got access to the setup menu options and can even pull in listings of my recorded shows. *when i click on an episode to play it, i get an error that says "'(cannot connect tree, errclass:1 and errcode:5)',1,5"

should the samba share point to my /myth directory or to the /myth/tv directory or some other directory? *i've curious to compare the output quality with the xbox myth setups i've tried. *any help would be appreciated.

btw, i've been able to access the samba share from my windows machine and can read the files just fine.

jswu
2004-04-08, 00:18
should the samba share point to my /myth directory or to the /myth/tv directory or some other directory? *i've curious to compare the output quality with the xbox myth setups i've tried. *any help would be appreciated.

point it to the folder where the tv recordings are, so /myth/tv. if you need a username/password to access your samba share, you will also need to include that in the path (smb://user:password@ip/share/)

jswu
2004-04-08, 00:23
i think i'll add the ability to delete recordings soon as well.
deleting a recording would be really useful. are you going to have a yes/no dialog box pop-up at the end of a recording?

another thing i have been experimenting with is using the xbox web browser, linksboks, and pointing to the mythtv web server. this way everything can be done thru the xbox.

madtw
2004-04-08, 04:49
are you going to have a yes/no dialog box pop-up at the end of a recording?

instead of playing a show when you select a show from the recorded show window, i was thinking of having a popup window that gives you the option to "play recorded show", "delete recorded show", or "cancel".

at the moment, there is no way for a python script to know when the player finishes. darkie mentioned that he was trying to think of a way for this to be possible but i haven't heard anything since.

i didn't even think to try linksboks... :d

rothbart
2004-04-08, 10:06
so finally figured out that maybe it has to do with the format of my files. *i changed to 640x480 from the default 480x480. *other than that, i think my settings are pretty much default. *are there any things about the format of the recording that could keep xbmc from being able to play the shows?

i sorta got further trying to record a really old show that i still had on hand. it would play "something" but audio-only. it certainly wasn't the audio track to the recording... it was as if random binary data was trying to be played as audio... not quite static, but definitely not intentional audio.

--rothbart

jswu
2004-04-08, 17:56
i was having a problem with the buttons along the top (power off, home, reboot, credits) - it seemed the button images were mis-matched to the commands. anyway, it problem was in the home.xml in the mediacenter skin that came with one of the xbmc-mythtv archives. i cleaned it up to fix the problem. madtw, if it is not already fixed, i can email you the xml file if you want it.

madtw
2004-04-09, 03:30
sure, send me the home.xml file that you modified and also the build version of xbmc that you are using. the home.xml that i included in the latest release of xbmc mythtv was from the 2004-03-28 build. if you used an older or newer version then that might explain why things didn't work as expected. i'm not sure how to release my skin changes on an ongoing basis...

dooze
2004-04-11, 12:11
i'm running a mythtv backend with a dvb-t receiver, and i've been using xbmc to play the .nuv files back manually - i just found this project, you can imagine my delight. :)

however, whilst the "mytvsettings.py" script executes fine (i've set up all the appropriate options), the "mytv.py" script always terminates with a "typeerror: unsupported operand type(s) for +: 'int' and 'tuple' ". i'm running a cvs build from 9/4/04, i've also tried a cvs build from 1/4/04 with the same problem.

looking at the debug log, the problem looks to be in the mysql.py library. i get some debug just prior to the error, specifically:

file "q:\python\lib\mysql.py", line 655, in __getstringandseekpos
*tmpstring = self.msg[self.position:self.position + length]

i'm a coder by day, i've had a go at tracking it down but haven't had much luck, i'm not familiar with pyton and there doesn't seem to be any elegant way of debugging it in xbmc. any ideas you guys have would be appreciated!

meanwhile i think i'll start to study up on python, if i can get this thing going i can see myself wasting hours helping to extend it. :) the default mythtv front-end isn't exactly fault-tolerant, it's a pain to boot via linux, and i've found xbmc's playback to be far better anyway.

madtw
2004-04-13, 03:13
i had a quick look at the code that causes the typeerror exception to be raised. struct.unpack() returns a list instead of a scalar value. if you add [0] after each call to struct.unpack(), hopefully it will work.

i was fairly new to python when i ported the code in mysql.py from a perl module and didn't really test all scenarios as thoroughly as i would've liked. my main goal was to get database access working for what i needed.

given that all the struct.unpack calls were incorrect in that function, i wouldn't be surprised if you hit some other problems in the untested code. you can enable debug in the mysql module by adding "debug=1" to the parameter list when the mysql.connection() object is constructed in mytv.py.

let me know if you run into any other problems so i can fix the module...

dooze
2004-04-13, 13:56
that worked a treat! thanks very much. i was also getting a problem in mytv.py at the start of "displayshow" where "channel" is set, i don't have "callsign"s set up for the channels and i was getting a string concatenation error. i've patched my local copy to ignore callsigns for now. thanks again! :d

dooze
2004-04-13, 14:11
here's a simple little patch for gui.py so it stretches the background to the right size on pal systems:

def ( self, title, width=-1, height=-1 ):
if width == -1:
width = self.getwidth()

if height == -1:
height = self.getheight()

self.width = width
self.height = height

this way it uses the default size of the screen rather than hard-coded values.

madtw
2004-04-14, 06:03
thanks for the feedback... i made the changes you mentioned. at the moment there is a lot of hard coding for ntsc. if you have any other pal friendly changes, pass them on and i'll try to include them.

i just installed the 2004-04-13 build of xbmc. you can grab the latest changes from here (http://changeling.ixionstudios.com/xbmc/).

this version is much smaller because the xbmc release i got had a bunch of the .png files extracted in the skin directory. that means i can probably remove the explicit pathing to the files from my scripts in the long term if the files get included in textures.xpr but for now i just removed the files from my release.

once the functionality is rich, i'll try to figure out how to make the script more skin friendly.

mcfennek
2004-04-17, 11:11
hi madtw,

i'm trying to get your myth-support to work, but i'm having a lot of trouble. the 0.2pre4 version won't even start - getting the exception:

system error: null result without error in pyobject_call
in file ..., line 1 "import gui"

the 0.2pre3 version starts up fine, but when i try to play a recorded show, xbmc either dies or just plays wired sounds. no exception in the python output. i think my settings (including smb are ok).

i'm working on a new version of xmbc (compiled yesterday) and i tried all kinds of tv formats (including 480x480). i'm working on pal.

would be happy for any help!!!!

thanks,

michael

mcfennek
2004-04-17, 20:49
ok - i played around with the .nuv files. even as a plain smb share, i cannot play those files. i get the same syntoms as with the mythtv support - i either just hear some scratching noises, or xbnc hangs. can anybody which format to use?

i tried pal 384x288, 384x576, 480x480. i also tried rtjpeg and mpeg4 codec. i didn't play around with the audio codec yet....

also i still get the same null error when i try to use the 0.2pre4 version of mytv.

please help,

michael

mcfennek
2004-04-19, 18:15
when i do not use the libraies (gui, nmb, smb...), but copy all in one file eg mytv.py it works fine. no idea why i cannot access the libraries.....

michael

madtw
2004-04-21, 04:25
i just saw your message today... haven't read the board for a few days.

which version of xbmc are you using? i have no idea why you have to copy everything into the same file to get it all to work... if you are using the same version as i am, then it doesn't really make sense why it isn't working.

did you ftp the files into the correct location? gui.py, smb.py, nmb.py, mysql.py, simplexml.py, mytvcfg.py should be in <xbmc_home>/python/lib but mytv.py and mytvsettings.py should be in the <xbmc_home>/scripts dir.

if you can't play the .nuv files over a smb share then obviously mytv.py won't work either. did you try playing a ringbuf.nuv file or an actual recorded program (e.g. 1014_20040414213000_20040414220000.nuv file)?

which tuner card do you have? i am using a hauppauge ntsc pvr250 and i record in mpeg2 format at 480x480. 720x480 also worked for me. i haven't tried rtjpeg or mpeg4 because i don't want to use extra cpu cycles transcoding.

which version of mythtv are you using? i am running version 0.14 compiled from a tar ball with no problems...

mcfennek
2004-04-21, 17:40
i'm using more or less the current version of xbmc (tried a few versions...)

about the .nuv files - i just got a wintv pvr 250 and it works. seems that xbmc is only supporting mpeg2 .nuv files.

about the library problem - i tried almost everything. i have no idea what's going wrong. i can load libraries from xbmc, but i have no access to your stuff. at one point i had the 0.2pre3 version working with library support - then i just copied the 0.2pre4 version over it and since then nothing is working again.

i want to play around with your python files (i'm pretty new to phyton). so if i will code something, i will just go with the big file solution..... will be on vacation next week anyways, so it might take some time - maybe till then i found out how to use libraries.....

have you started something with livetv yet?

Workshed
2004-04-21, 22:14
is this still in the works coz the links are dead (or i'm trying to download from the wrong place :( )
i was thinking of setting up a mythtv box and if development of this addon is still goin well i probably will *:d

jswu
2004-04-22, 04:14
is this still in the works coz the links are dead (or i'm trying to download from the wrong place :( )
i was thinking of setting up a mythtv box and if development of this addon is still goin well i probably will *:d
still works for me. are you downloading from http://changeling.ixionstudios.com/xbmc/?

madtw
2004-04-22, 06:51
is this still in the works coz the links are dead (or i'm trying to download from the wrong place :( )
i was thinking of setting up a mythtv box and if development of this addon is still goin well i probably will :d
the link jswu posted is still valid and will probably be valid for a while.

development was just recently started on this and i intend to continue working on it over time.

madtw
2004-04-22, 17:26
have you started something with livetv yet?
i have been able to watch live tv through xbmc. the way i did this was to create a symbolic link to /dev/video0 in the myth recorded show directory (the dir that is shared over samba to xbmc). then i launched the xbmc player on that link. the drawbacks with this are:

- the player steals all input events while it is active
- as a result channel switching had to be done through a pc
- no on screen display to show channel number, show info, etc. like the myth front end

if someone added a python callback to the xbmc player, it might be possible to build channel switching into live tv. i was thinking of a calback where a return value of 0 indicates that the event was consumed by the python script and a value of 1 indicates that the player should process the event as normal. this would allow the python script to trap certain input events and pass other events on to the player. (comments darkie?)

in order to do custom osd, maybe an api to the player's subtitles capabilities could be used. i don't know enough of the internals of the player to know if this would work or not...

streamed playback would be the best approach for doing this so that the myth protocol could be used but is a magnitude more difficult to implement (if i was guessing). not to mention it would be very specific to myth so i don't think it would be something that would be high on the xbmc developers' list.

Workshed
2004-04-22, 21:38
for some reason i cannot access the link! i get the standard "the page cannot be displayed" error.

madtw
2004-05-07, 10:00
i just put together a new cut of xbmc mythtv from the cvs repository. you can grab it from the usual link http://changeling.ixionstudios.com/xbmc/.

smokeman
2004-05-10, 21:50
are you able to use this to schedule recordings at this point, and not just play back?

this is an awesome project,
i hope it can become a full blown mythtv client, integrated into xbmc,
so i can access my games, dvd's, pics, music,
all from one backend, via xbox client for any tv,
or any mythtv client...
truly amazing. i have my nexus-s card on order, and am downloading knoppixmyttv (http://www.mysettopbox.tv/knoppmyth.html)as i type. for those that don't know, nexus-s gets you any of the free to air, or dvb-s channels that are broadcast without having to subscribe to diretv, or dish, see listing here (http://www.lyngsat.com/freetv/united-states.html)

madtw
2004-05-11, 07:28
recorded show viewing/managing, tv guide, and status are implemented. scheduling is being worked on as we speak... it won't be long now. :)

tharvey
2004-05-11, 07:52
i'm having trouble with the 5/3 cvs build of xbmc using the 0.6 version of the mythtv scripts. i can run the settings script fine but when i access 'my tv' xbmp just hangs.

any suggestions?

is there any logging that can/is done anywhere? i didn't see anything in the xbmc standard log.

looking forward to seeing this work!

tim

madtw
2004-05-12, 04:10
i had problems as well when i tried the 5/3 build. even this script caused xbmc to hang:


import traceback, xbmcgui

dlg = xbmcgui.dialog()
dlg.ok( "info", "hello world" )
del dlg


so i reverted back to the 4/27 build and everything seemed to work fine after i deleted the tdata directory for xbmc. i didn't try deleting the dir when i tried the 5/3 build so maybe that's why it was hanging. i've been meaning to try a newer build but haven't gotten around to it...

darkie
2004-05-12, 15:02
from bugs.txt
- 07-05-2004 fixed: creating dialogs with python crashes xbmc

and that is exactly the problem you're seeing :) .

tbdombrosky
2004-05-12, 21:33
don't know what's wrong with my setup. i deleted the tdata directory. i tried 5/08 and 5/09 cvs builds but when i click on the setup script, it says running and then it goes away and nothing happens. i don't have the my tv icon either. i had an old february cvs version on it before that i deleted. any ideas? thanks.

tom

edit: found i have to install python.

jswu
2004-05-14, 03:26
hey! great job. i just tried xbmc_mythtv 0.7 on a 2004-05-09 build of xbmc.

i have tried viewing the recorded shows, playing shows, saving and deleting shows. all works great!

i did find a possible bug. if i select a show from my remote control and select it again before the show details screen comes up, i get an "invalid literal for init(): ok" error. after that happens, i get errors for anything that i select.

tharvey
2004-05-14, 06:21
i'm still not able to run the mytv.py script... it just hangs xbmc. however i still 'can' run mytvsettings.py just fine. i've upgraded to xbmc cvs 5/9, and am still using v0.6 of the scripts.

any idea what could be wrong?

what is this 'tdata' directory thing? i've never heard of that... where is it?

thanks,

tim

mean
2004-05-14, 13:31
howdy
0.7 works really nice for me except a little thing.
it seems it badly displays non ascii strings
like éàè that are translated to 2 symbols (bad utf8 handling ?)

madtw
2004-05-15, 03:53
i did find a possible bug. if i select a show from my remote control and select it again before the show details screen comes up, i get an "invalid literal for init(): ok" error. after that happens, i get errors for anything that i select.
yep, i have fixed it in cvs but haven't made a new release yet. the problem stems from the fact that onaction() and oncontrol() callbacks are threaded and if you store anything on the stack, it can become outdated very quickly. i'll try to put together a new release shortly...
what is this 'tdata' directory thing? i've never heard of that... where is it?
the e:\tdata\0face008 directory stores xbmc settings. sometimes if you don't delete this directory when upgrading, it causes xbmc to hang or behave erratically. the last known build to work with the xbmc mythtv scripts is 4/27. i haven't had time to test a newer upgrade so if someone else has, please post about it.
it seems it badly displays non ascii strings
like éàè that are translated to 2 symbols (bad utf8 handling ?)
hmmm... as far as i can tell, the font displays those characters as a big square. even '*' doesn't render nicely. i think all that is needed is a replacement font... but i could be mistaken. darkie, is there something i can do in the script to fix this?

madtw
2004-05-15, 09:45
fyi... i have just put up xbmc_mythtv-0.8.tar.bz2 (http://changeling.ixionstudios.com/xbmc/xbmc_mythtv-0.8.tar.bz2).

darkie
2004-05-15, 19:23
hmmm... as far as i can tell, the font displays those characters as a big square. even '*' doesn't render nicely. i think all that is needed is a replacement font... but i could be mistaken. darkie, is there something i can do in the script to fix this?
all xbmc labels (buttons / lists/ etc) in python support both normal strings and unicode strings. so the best way is to convert from utf-8 to unicode and use that unicode string

madtw
2004-05-16, 01:11
alright.. easier said than done. :)

i looked into it a bit but haven't had much luck yet. the mythtv database is supposedly using the latin1 character set. when i select values in the database using the mysql client, i see values like:

tã©lã©journal

from that value, the mythweb module gets the following:

téléjournal

so apparently mysql is storing the value correctly... when i retrieve the value in python and print it out, i get the first value - not the second. how do i convert it so that python will output it correctly? i tried using the unicode() function to convert the string but kept getting exceptions that the ordinal is not in range... anyone else figured this out?

edit: it appears that mysql prefixes "special characters" with \xc3 when sending them over the network. i put in a hack for now to strip the character and convert the character after it appropriately and it seems to work for the data i have in my myth database. i'm thinking the proper solution is to change the database to store everything in unicode so that when it is retrieved over the network, everything is sent in unicode. i'm not sure the supporting tools to fill the myth database work with unicode even... so for now this'll have to do until i can confirm the correct way to fix this.

mean
2004-05-17, 00:36
thanks, will give it a spin tomorrow :)

madtw
2004-05-17, 06:40
fyi... those of you wanting to try out the xbmc mythtv python scripts with the latest cvs build, i just installed the 2004-05-15 cvs build and everything seems to be working fine.

mean
2004-05-17, 10:11
just tried it
display is fine
thanks a bunch :)

dop
2004-05-17, 13:55
i see values like:

tã©lã©journal

from that value, the mythweb module gets the following:

téléjournal

how do i convert it so that python will output it correctly? i tried using the unicode() function to convert the string but kept getting exceptions that the ordinal is not in range... anyone else figured this out?
madtw, mysql stores 'special chars' afaik in utf-8 format. to get the correct string in python you should use

unicode (thestring, 'utf-8')

jswu
2004-05-17, 20:48
i just tried xbox-myth 0.9 with the 2004-05-15 build of xbmc. when i access the recorded shows everything freezes. here is what i see in the xmbc log:

17-05-2004 10:43:19 q:\scripts\mytv.py:1: deprecationwarning: non-ascii character '\xa1' in file q:\python\lib\gui.py on line 456, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
*import gui, nmb
17-05-2004 10:43:20 q:\python\lib\smb.py:94: futurewarning: hex/oct constants > sys.maxint will return positive values in python 2.4 and up
*sv_type_domain_enum * * = 0x80000000
17-05-2004 10:43:20 q:\python\lib\smb.py:315: futurewarning: hex/oct constants > sys.maxint will return positive values in python 2.4 and up
*cap_extended_security = 0x80000000
17-05-2004 10:43:20 q:\python\lib\smb.py:621: futurewarning: hex/oct constants > sys.maxint will return positive values in python 2.4 and up
*if server_flags & 0x80000000:

madtw
2004-05-18, 02:03
madtw, mysql stores 'special chars' afaik in utf-8 format. to get the correct string in python you should use

unicode (thestring, 'utf-8')


i already tried this before posting about it above. apparently it is not utf-8 because exceptions are raised by python. the 'ã' character causes an exception to be raised.

anyway, the solution i have in place seems to be working... thanks for the suggestion though.

i just tried xbox-myth 0.9 with the 2004-05-15 build of xbmc. when i access the recorded shows everything freezes.

apparently, you are not running xbmc_mythtv-0.9 because the deprecation warning was fixed in that version by adding the following comment at the top of the gui.py source file:

# -*- coding: iso-8859-1 -*-

the warning is about some characters that are in comments. you can delete the offending lines or add the comment above to silence python. since you are still getting that warning, i don't think you installed everything correctly or you installed an old version or you didn't reboot xbmc after installing the latest version.

i get the future warnings as well... i did not write smb.py and i'm not sure what the correct fix is until python 2.4 comes along so that is why they are still in the source. to be honest, i haven't spent any time looking at it because the module works despite the future warning in that module... in fact, i'm not convinced that those warnings will cause problems even in python 2.4 since the functions that use those constants aren't used for playback or for copying a smb file.

a friend was having similar problems as you and i am still trying to figure out how to fix his install. my install of build 2004-05-15 by untermensch works fine. you might want to look into why you are getting warnings when you shouldn't... and verify that you are using the same build or maybe newer.

jswu
2004-05-18, 10:22
a friend was having similar problems as you and i am still trying to figure out how to fix his install. *my install of build 2004-05-15 by untermensch works fine. *you might want to look into why you are getting warnings when you shouldn't... and verify that you are using the same build or maybe newer.
sorry, i had tried versions 0.7 thru 0.9 with the 2004-05-15 build i had. the log was probably from a pre-0.9 version. none of the versions worked with the 2004-05-15 build i had, so i think the xbmc build was probably bad.

anyway, i just tried 0.9 with the 2004-05-18 build and everything is working fine now. great job.

tbdombrosky
2004-05-19, 06:56
here's the error i get now. it says (running) for a second next to the script. i unrared python.rar into my xbmc/python directory. xbmc is my main frontend so it's on my c:\. any ideas?

18-05-2004 23:52:48 traceback (most recent call last):
18-05-2004 23:52:48 file "q:\scripts\mytvsettings.py", line 1, in ?
18-05-2004 23:52:48
18-05-2004 23:52:48 import gui
18-05-2004 23:52:48 systemerror
18-05-2004 23:52:48 :
18-05-2004 23:52:48 null result without error in pyobject_call
18-05-2004 23:52:48

tharvey
2004-05-19, 07:16
i'm still having troubles getting these scripts to run with any of the xbmc versions i have. i can get the settings script to run without a problem, but all other scripts terminate immediately except for the mytv.py script which simply hangs xbmc.

i have a feeling this is because the builds i'm getting don't have the python directory and i'm using an older version of the files in the python directory (from a 4/23 build). do i need to somehow find a xbmc build that distributes the python stuff as well? if anyone could pm me where to find such a thing i would be very greatful. this is driving me nuts.

tim

tbdombrosky
2004-05-19, 21:28
http://winmyth.sourceforge.net/mythprotocol.html

there's information about the protocol they use there. hopefully that will help you out.

tom

madtw
2004-05-20, 08:05
here's the error i get now. it says (running) for a second next to the script. i unrared python.rar into my xbmc/python directory. xbmc is my main frontend so it's on my c:\. any ideas?

18-05-2004 23:52:48 traceback (most recent call last):
18-05-2004 23:52:48 file "q:\scripts\mytvsettings.py", line 1, in ?
18-05-2004 23:52:48
18-05-2004 23:52:48 import gui
18-05-2004 23:52:48 systemerror
18-05-2004 23:52:48 :
18-05-2004 23:52:48 null result without error in pyobject_call
18-05-2004 23:52:48
have you ftp'd all the python files in python/lib that were included in the xbmc_mythtv-0.9 package? if not, then that explains why the import is failing.

can you run other python scripts successfully? if not, then it sounds like you either have a bad build or the python support files weren't installed correctly.

other than that, i don't know what else to suggest except try a different build... the builds that i have been using are about 23.8mb compressed in size and python has already been setup correctly. i have noticed some builds coming out at 16mb or so... these usually don't have python included.

once you get python working properly, you'll need to run the mytvsettings.py once to supply info specific to your config. after that is done, you should run mytv.py. the other .py files in the scripts directory won't do anything... they will eventually be moved to the python/lib dir or included in one of the files in that directory. it is just easier to debug them as separate scripts at the moment...

tbdombrosky
2004-05-20, 16:23
ok, i got it working. i had to use the python.rar from 2/12/2004. the one in cvs does not work apparently. now i'm having another problem though. only some of my recordings show up (the newest ones). the older ones aren't there. not a big deal, just giving you a heads up.

tom

madtw
2004-05-21, 02:46
ok, i got it working. i had to use the python.rar from 2/12/2004. the one in cvs does not work apparently. now i'm having another problem though. only some of my recordings show up (the newest ones). the older ones aren't there. not a big deal, just giving you a heads up.

tom
i haven't noticed that issue with any of my recordings. the recorded show screen does a join on the channel and the recorded tables using the chanid. my guess is that join is broken because of bad data. can you run the query that mytvrecorded.py runs using a mysql client? compare the count of the rows returned by the query to the count of the rows in the recorded show table. if the count is different, then some shows will be dropped because the join is broken because of bad data. if it is the same, then compare against the number of .nuv files on the filesystem. if the counts are different, then you're database is missing some entries. if everything looks good with the counts in the database and filesystem, then it could be a problem with the script...

also, the scripts have been run using mythtv 0.14 and a fairly recent cvs build (myth protocol version 4 - latest is version 5+). if you are using a different version, then you're on new ground.

tharvey
2004-05-27, 05:11
ok, i got it working. *i had to use the python.rar from 2/12/2004. *the one in cvs does not work apparently. *now i'm having another problem though. *only some of my recordings show up (the newest ones). *the older ones aren't there. *not a big deal, just giving you a heads up.

tom
still having trouble with this. *i'm now using xbmc 4/23 with the python.rar from 2/12. *the mytv.py script hangs xbmc and the mythsettings.py script works fine. *a simple test script with a dialog also hangs xbmc so i'm thinking perhaps i'm getting an error which is displayed via a dialog which hangs xbmc.

i've seen posts refering to a debug log which shows info about python scripts running. *where is this log and how do i enable it? *i see no references to python scripts in the standard 'xbmc.log' in xbmc's homedir.

i'm not at all familiar with python, but am about to take the plunge. *what is a really simple way to open/create a logfile and print info to it so that i can put some debugging in the script to see whats going on?

thanks,

tim

tharvey
2004-05-27, 08:53
i figured out my problem... basically i'm an idiot. *i wasn't updating xbmc properly as my bios requires me to rename the xbe from default.xbe to evoxdash.xbe and i was forgetting to do that.

once i pulled my head out, and properly updated xbmc (running 5/26 cvs now, with python.rar v1.3 and xbmc-mythtv 0.9) everything seems to be working as it should, including popup dialogs from scripts! my original problem was that i had not allowed access to the mythconverg database from any machine and the error dialog was crashing xbmc as i had an old cvs version.

tim

sigtom
2004-05-30, 09:27
30-05-2004 02:20:53 file "q:\scripts\mytv.py", line 84, in ?
30-05-2004 02:20:53 mythtv.conn = mythtv.connection(
30-05-2004 02:20:53 file "q:\python\lib\mythtv.py", line 52, in
30-05-2004 02:20:53 raise serverexception, reply
30-05-2004 02:20:53 serverexception: ['reject', '8']


thats the error im getting. i had been having the dumb cant access errors, finally got them worked out. i just started using my mythtv box so im sure im missing something. any ideas about this? im using a cvs build from 5/24/04 python 1.3, and ill be testing it with a build from 5/30/04 here in a bit. ill see if that helps any at all. tia.

sigtom

jswu
2004-05-30, 11:15
hey madtw,

i have been running the latest version of xbmc-mythtv, and everything is great! love the delete feature. my mythtv box is now running purely as a backend.

is anyone running xbmc-mythtv with version 0.15 of mythtv? i am thinking about upgrading, and was wondering if there would be any problems with xbmc-mythtv.

many thanks!

tharvey
2004-05-30, 20:00
30-05-2004 02:20:53 * file "q:\scripts\mytv.py", line 84, in ?
30-05-2004 02:20:53 * * mythtv.conn = mythtv.connection(
30-05-2004 02:20:53 * file "q:\python\lib\mythtv.py", line 52, in
30-05-2004 02:20:53 * * raise serverexception, reply
30-05-2004 02:20:53 serverexception: ['reject', '8']


thats the error im getting. *i had been having the dumb cant access errors, finally got them worked out. *i just started using my mythtv box so im sure im missing something. *any ideas about this? *im using a cvs build from 5/24/04 python 1.3, and ill be testing it with a build from 5/30/04 here in a bit. *ill see if that helps any at all. *tia.

sigtom
i believe this is refering to the myth protocol version being out of sync. you are probably using a recent mythtv cvs version or have just installed the new 0.15 release, which the myth.py script can't handle yet.

sigtom
2004-05-30, 20:52
i believe this is refering to the myth protocol version being out of sync. you are probably using a recent mythtv cvs version or have just installed the new 0.15 release, which the myth.py script can't handle yet.
tharvey:

yeah im running 0.15, forgot to include that in my post. ill wait to see if/when 0.15 is working with xbmc, and fire it up then. thanks for letting me know.

mapryan
2004-06-02, 12:11
hi

i've done the localisation for pal in 0.9 - is there somewhere i can put them to get them included in the release?

i'm using python.rar v1.3, xbmc-mythtv 0.9, and xbmc (built in the middle of may - sorry, i'm not in front of the system at the moment) and mythtv 0.15 and have the same error as mentioned previously (serverexception: ['reject', '8'] ).

anything i can do to help? i'm not much of a programmer but can do stuff like shell-scripting. also, is there any additional localisation i can do for the uk/pal?

cheers

mike

madtw
2004-06-06, 22:31
ok, i got it working. i had to use the python.rar from 2/12/2004. the one in cvs does not work apparently. now i'm having another problem though. only some of my recordings show up (the newest ones). the older ones aren't there. not a big deal, just giving you a heads up.
i modified the query that selects recorded shows slightly because i was able to reproduce your problem where some recordings would show up and others wouldn't. the query now does an outer join on the channel and program tables - that way if recorded rows exist but the join is broken, you'll still be able to see the recorded shows.

the fix has been checked into cvs but i haven't made a new release of it yet... i'd like to wait for dooze to get mythtv 0.15 working with the scripts first.

madtw
2004-06-06, 22:40
hi

i've done the localisation for pal in 0.9 - is there somewhere i can put them to get them included in the release?

i'm using python.rar v1.3, xbmc-mythtv 0.9, and xbmc (built in the middle of may - sorry, i'm not in front of the system at the moment) and mythtv 0.15 and have the same error as mentioned previously (serverexception: ['reject', '8'] ).

anything i can do to help? i'm not much of a programmer but can do stuff like shell-scripting. also, is there any additional localisation i can do for the uk/pal?

cheers

mike
yep, send any localisation files you have modified to the email address included in the readme file in the xbmc-mythtv package. i'll take a look at the changes and include them in the next release.

dooze is in the process of installing mythtv 0.15 and will make any necessary protocol changes to the scripts - expect a new release fairly soon once he has it working smoothly again. it may be a matter of just sending the correct protocol version request... at least that's mainly what was needed when working with the latest mythtv cvs builds.

mean
2004-06-11, 21:56
count me in in the interested people :)
xboxmediacenter + mythtv is a killer duo

madtw
2004-06-12, 07:58
count me in in the interested people :)
xboxmediacenter + mythtv is a killer duo
alright... i have updated the scripts for mythtv 0.15.1. you can't schedule shows yet through the tv listings screen but that will be the next area of focus unless problems are found with the other screens. you can grab the latest version from here (http://changeling.ixionstudios.com/xbmc).

mean
2004-06-12, 17:51
works fine, including non ascii chars
thanks a bunch, and i mean it :)

jswu
2004-06-13, 22:57
i just upgraded my mythtv box to .15.1 and my xbmc-mythtv files to .10. so far most everything is working (view recordings and play recordings). one strange thing is happening in the recorded show listings. the list of series to the left is repeating. so i am getting:

all programs
family guy
simpsons
all programs
family guy
simpsons
all programs
family guy
simpsons
etc...


is this a bug? maybe this is noticable since i currently only have 2 shows recorded. normally there would be shows from 10+ series.

thanks for all the hard work!

madtw
2004-06-15, 01:49
i just upgraded my mythtv box to .15.1 and my xbmc-mythtv files to .10. so far most everything is working (view recordings and play recordings). one strange thing is happening in the recorded show listings. the list of series to the left is repeating. so i am getting:

all programs
family guy
simpsons
all programs
family guy
simpsons
all programs
family guy
simpsons
etc...


is this a bug? maybe this is noticable since i currently only have 2 shows recorded. normally there would be shows from 10+ series.

thanks for all the hard work!
yeah, that is probably a bug. i don't think i ever tested with that few recordings. the bug shouldn't affect the functionality of the screen. i'll fix it in the next release.

grassmunk
2004-08-10, 16:07
whats the status of this? i'm interested in setting this up and im just wondering if this project is dead or if theres still development being done.

owentl
2004-08-15, 18:35
i have tried to get this running but i keep getting the below error. anyone have any ideas or thoughts on what i can do to fix this.

traceback:
file "q:\scripts\mytvsettings.py", line 1, in ?
import gui
file "q:\python\lib\gui.py", line 410, in ?
class dialog( xbmcgui.dialog ):
attributeerror: 'module' object has no attrivute 'dialog'


the python file that i am running is python23.zlib and xbmc is from 8-7-04

darkie
2004-08-15, 19:43
update to a later xbmc build, the build you have is missing some things in python

davidred
2004-08-31, 12:30
after a crash course in xbmc skin design i've just added support for mytv to show up in the project mayhem skin with support for resolutions upto 720p 16:9.

can i get the contact details of the owner of the project so i can email the updates?

cheers

inwoo
2004-09-05, 05:33
davidred: could you do an 1080i version as well?
i am using the project mayhem skin as well

madtw
2004-09-07, 05:47
after a crash course in xbmc skin design i've just added support for mytv to show up in the project mayhem skin with support for resolutions upto 720p 16:9.

can i get the contact details of the owner of the project so i can email the updates?

cheers
great... send me the updates and i can include them in the release. the email address is in the readme file.

i just installed the september 5, 2004 build of xbmc and updated the release for the project mayhem skin. you can grab the latest release from here (http://changeling.ixionstudios.com/xbmc). instead of modifying the main screen, i just added a new entry into the submenu off the main screen. this is much easier to maintain going forward... but if you have something fancier, i have no problem including it. :)

inwoo
2004-09-07, 18:36
great release madtw :)
if you need any help... i'll gladly give up some time in the coding effort to bring this to mythtv frontend like standards

efurban
2004-09-15, 10:06
hi, i am trying to get this thing to work but i always get the "socket is not connected" error. i do have smb working fine. ( am watching movies from smb server)

xbmc_mythtv: xbmc_mythtv-0.12
mythtv ver: 0.16 (protocol: 13)
xbmc ver: 1.0.0 09-10-04

the error message i got when press "tv guide" and "recorded shows" --> 10057, socket is not connected.

"status" button works fine tho.


my xbmc_mythtv configuration:
protocol: 13
path prefix: smb://urban:password@192.168.2.35/mythtv


any help will be much appreciated.

travis

madtw
2004-09-16, 07:21
i haven't had a chance to upgrade to mythtv 0.16 yet so it is possible that it won't work if something has changed since 0.15. the status information is pulled from the myth status port which is totally different from all other screens so it appears that nothing has changed with status but something is different on the main backend port.

the scripts have been tested with mythtv 0.15.1 (protocol 8).

if you have logging enabled in xbmc, then it might be useful to have a look at the xbmc.log file to see what the call stack was when it got the exception. you could also enable debug in the scripts if you're familiar with python code.

otherwise, you'll have to wait until i can upgrade and test the scripts using mythtv 0.16 - unless someone else has figured things out already and can post the fixes.

efurban
2004-09-17, 01:19
ok, thank you. i'll look into the log file later tonight.

madtw
2004-09-17, 08:25
i upgraded to mythtv 0.16 this evening and have uploaded a new version of the scripts. i haven't done a whole lot of testing but it appears to be working. you can grab it from the usual (http://changeling.ixionstudios.com/xbmc/) place. oddly enough, this release is version 0.13 that coincides with myth protocol version 13 that is supported by the latest mythtv. ;)

mapryan
2004-09-19, 19:08
hi,

i just re-installed using the latest myth (0.16) and everything works great. thanks for all the hard work, and if there's anything i can do from the pal side (or even anything else?) then just let me know

cheers

mike

LarryLeffa
2004-09-26, 16:05
i upgraded to mythtv 0.16 this evening and have uploaded a new version of the scripts. i haven't done a whole lot of testing but it appears to be working. you can grab it from the usual (http://changeling.ixionstudios.com/xbmc/) place. oddly enough, this release is version 0.13 that coincides with myth protocol version 13 that is supported by the latest mythtv. ;)
@madtv:
damn good job! this is exactly what i'm looking for! :bowdown:
using mythtv 0.16 as standalone-server, xbmc cvs and your xmbc_mythtv-0.13 here...working great!

what about translations? i'm working now on german translation for your xbmc_mythtv. any plans to integrate language specific subdirs for the next version?

will post when done translating... think, i'm done this afternoon (gmt+1)...

-
larry

LarryLeffa
2004-09-26, 21:23
just to let you know that translation to german language is finished (so far). had to include some very small changes to design.

grab it here:
xbmc_mythtv-0.13.01.tar.bz2 (http://www.com-in.de/larry/xbmc_mythtv-0.13.01.tar.bz2)

-
larry

madtw
2004-09-29, 03:37
just to let you know that translation to german language is finished (so far). had to include some very small changes to design.
thanks. i grabbed the file. i need to go through the code and change all hard coded text to do language lookups using xbmc.getlocalizedstring(). that's the proper way to do translations so that the code doesn't need to be modified. your translations will be useful for creating a german language file.

madtw
2004-09-30, 04:18
fyi... made a small bug fix. if you have problems quitting out of some screens (i.e. it doesn't let you go to the previous screen by hitting back), grab the latest version from the usual (http://changeling.ixionstudios.com/xbmc/) place.

ArtVandelay3
2004-10-02, 04:00
what is the secret to getting a host value to 'stick' in settings? i can change/modify all the other values, but no matter what i put in host, it's always blank when i open settings back up. also tried putting it in the mytvsettings.py file, but it's still blank when i run the script and go to settings.

i completely wiped out xbmc, and reinstalled it from the version avalaunch installs for you (1.0 (05.09)), so i'm assuming this is the september 5th release? running mythtv version 16 (so protocol 13, right?)

i've installed xebian and mythtv frontend on my xbox already (so i know the connectivity to my backend works), but if i can avoid that one minute bootup and just use xbmc that would be great. well, i can watch them now using xbmc, but it's hard figuring out the show you want to watch with file names like 1047_20040930223000_20040930230000.nuv!

thanks for any help on this...

madtw
2004-10-02, 08:45
that's odd... no one else has reported this problem. when you hit the back button on the controller or menu button on the controller, the settings screen writes out the settings to a file called mytv.xml in the xbmc application directory. if that isn't working then you can create the config file yourself and ftp it into the directory. here is a sample to help you get started:

<mytv>
<host>yourhost</host>
<database>mythconverg</database>
<port>3306</port>
<user>mythtv</user>
<password>mythtv</password>
<mythtvport>6543</mythtvport>
<mythtvstatusport>6544</mythtvstatusport>
<mythtvprotocol>13</mythtvprotocol>
<pathprefix>smb://%h/mythtv</pathprefix>
<localcopypath>e:\videos\</localcopypath>
</mytv>

yes, mythtv 0.16 uses protocol 13, 0.15 uses protocol 8.

[edit] if you are running mythtv_xbmc-0.13, there was a close screen bug that might have caused an exception to be thrown so that the config file couldn't be saved. if you're using 0.14, then this sounds like a new problem.

s_jo03
2004-10-02, 10:26
i have been using happily version 12 with mythtv 0.15 for some time now. however since the last three days, selecting 'recorded shows' or 'tv guide' returns an error popup 'time data did not match format: data=2400- '. selecting status works ok.

mythfrontend on linux works correctly.

thinking about a corrupted database, i have manually cleaned the database of any guide and shows data and ran mythfilldatabase again. still same error.

i'm fine to upgrade to 0.16 and the latest xbmc_mythtv version, but does anybody think it will fix this ?

pointers or suggestions to debug would be appreciated!

madtw
2004-10-02, 17:29
i think if you upgrade that you won't have those problems anymore. after upgrading to myth tv 0.16, i had date format errors as well so i ended up making some changes to the scripts. however, those changes only take effect if the protocol version is >= 13 because myth tv 0.15 seemed to be working fine.

ArtVandelay3
2004-10-02, 18:51
ahh...i didn't know about the mytv.xml file! *mine looked like this:

<mytv>
<host />
<database>mythconverg</database>
...snip...


so i guess the host line got messed up somehow. *i know i didn't manually edit it, but perhaps i screwed it up by going into the other .py files or something. *anyway, i deleted it, went back to settings and fixed everything, and now it works just fine. *thanks for the assistance!

oh, and great work! *this script is very cool. *now i can save the 2.5gb or so of hd space that my xebian/mythtv frontend setup takes up on my xboxes. *this will be especially handy on the one with the stock hard drive (for xbox live access).

LarryLeffa
2004-10-03, 13:06
thanks. i grabbed the file. i need to go through the code and change all hard coded text to do language lookups using xbmc.getlocalizedstring(). that's the proper way to do translations so that the code doesn't need to be modified. your translations will be useful for creating a german language file.
well, if you need any further assistence/help for translating to german language (ie rewriting, completing, ...) just drop me a mail. will begin work quickly then.

we're using your "plugin" day-by-day now. it's so easy and clearly now using xbmc to view/manage the mythtv-recordings; specially for my girlfriend.

again, thanks for your work!

xerxes3rd
2004-10-12, 19:34
madtw: great job! i've been hoping for some mythtv support from xbmc for a while now.

i've been thinking more about the possibility of watching live tv from xbmc. i too have an ivtv-supported card, and could also symlink /dev/video, but as you mentioned earlier, there are some serious drawbacks to doing so. i started looking at how mythfrontend does it, and i believe they use a ring buffer to play the video from. this can be observed by watching for a .nuv file to be created when you start watching live tv from mythfronted.

i then started looking for ring buffer support in mplayer, and came across this page (http://projects.sault.org/mebox/livetv.php). it describes ring buffers, and provides patches for mplayer which enable such support.

the only thing i'm unsure about is which part of myth creates the ring buffer- the front end or the back end. if the back end creates the ring buffer, it'd be simple to implement a live tv function. if the front end handles the creation of the ring buffer, then i think we'll have to wait for some more features from xbmc.

lastly, i was stepping though some of the xbmc souce, and looking for ways to add python hooks for the osd, so channel numbers could be displayed (this looks promising). as far as changing channels goes, however, i'm unsure about one thing: if a video is playing, and the user presses a key on the remote, does the script's button callback method get called? if not, then channel changing would be a little more difficult.

commio
2004-10-13, 18:47
could someone please explain to me what exactly mythtv is? yes im a bit of a n00bie but it sounds like im missing out on such an exciting script.. which i dont even know what it does!

sigtom
2004-10-18, 10:37
google mythtv, theres your answer.

KaZeR
2004-10-21, 00:05
hi there.

first of all, thanks ohhhh thanks for this script. mythtv is awesome, but booting xebian just for watching recorded shows is really annoying... now there's a solution :)

anyhow, i still have a little problem using it (but it doesn't seems to be xbmc myth related).

if i try to watch a recorded show, at best i have some weird sounds that is video sound with some extra noise. at worst, it doesn't do anything.

i got this if i try to launch a show from xbmc myth, but it does the same if i launch directly the file from the smb share from the video selection... i double checked, nuv files are associated with video (i run xbmc 1.1.0, latest available from avalaunch, mplayer 1.0pre5-3.3.3 of 2004/10/17)

any clue?

thanks in advance, and thanks one more time for this wonderfull feature.

choid99
2004-10-21, 00:39
hi,

i had this problem a while back. i narrowed it down to the fact that mplayer doesn't support the current .nuv files that are generated by the latest version of mythtv. i did spot a supposed patch for mplayer to fix this but i could not get it to work.

how did i get around this? what i did was spend my money on a hauppage pvr 350 tv card. with this card mythtv records .nuv files that are viewable in mplayer. how come? well, because the pvr 350 actually creates an mpeg file and mythtv just renames it as a .nuv. mplayer is clever enough to work out that the file is really a plain mpeg file and plays it.

hope this helps, took me ages to work all this out !!

choid99
2004-10-21, 00:48
wondering if anyone can help me?

i have installed the latest cvs version of mythtv and mythweb to overcome a problem where mythweb was causing mythbackend to hang. however, now i've done so the wonderful xbmc_mythtv is out of sync in terms of protocol version. i was wondering what i need to do to update mythtv.py in order to get things working again. i added:

* * * elif mythprotocolversion == "14": * # 0.16
* * * * * *recordsize = 38

in getrecordings but now i get the error:

"unable to find selected show" in mytvshow.py

when trying to view a show i've recorded. how do i calculate the recordsize? i just left it the same as version 13 but this could well be my problem

help much appreciated !!

???

KaZeR
2004-10-21, 09:51
hi,

i had this problem a while back. i narrowed it down to the fact that mplayer doesn't support the current .nuv files that are generated by the latest version of mythtv. i did spot a supposed patch for mplayer to fix this but i could not get it to work.

how did i get around this? what i did was spend my money on a hauppage pvr 350 tv card. with this card mythtv records .nuv files that are viewable in mplayer. how come? well, because the pvr 350 actually creates an mpeg file and mythtv just renames it as a .nuv. mplayer is clever enough to work out that the file is really a plain mpeg file and plays it.

hope this helps, took me ages to work all this out !!
how did i get around this? what i did was spend my money on a hauppage pvr 350 tv card.

thanks for your answer. some days ago i tough about buying a pvr250, mainly because my 5 years old bttv card has a bad shield and some channels looked snowy. but a friend of mine brought his bttv, and now quality is really good.. so i tought it wasn't worth anymore buying a pvr. i was quite happy with that :)

does that mean that you guys are all using a pvr-x50 card?

have you some more info about the patch?

thanks for your reply :)

rpao
2004-11-05, 12:42
when i select a pre-recorded tv show, i get an empty dialog box titled
"error" with an ok button which dismisses the dialog.

i can watch the nuv file through xmbc's my video directly.

[the solution to my problem is at the bottom of this message.]

mythtv backend:
knoppmyth r4v5 (mythtv 0.16 + pvr-350) configured per the note section in
http://www.mysettopbox.tv/doc.html#frontend

mythtv frontend:
xmbc-1.1
mythtv@xbmc v0.14 is a python module for xbmc.
http://changeling.ixionstudios.com/xbmc/xbmc_mythtv-0.14.tar.bz2

mytv.xml contents:
<mytv>
<host>ca810e</host>
<database>mythconverg</database>
<port>3306</port>
<user>mythtv</user>
<password>mythtv</password>
<mythtvport>6543</mythtvport>
<mythtvstatusport>6544</mythtvstatusport>
<mythtvprotocol>13</mythtvprotocol>
<pathprefix>smb://mythtv:mythtv@%h/myth/tv</pathprefix>
<localcopypath>f:\videos\</localcopypath>
</mytv>

enable debug logging in xbmc:
<loglevel>0</loglevel>

xmbc.log contents:
05-11-2004 09:59:29 info -->python initialized<--
05-11-2004 09:59:29 info
05-11-2004 09:59:29 info creating recorded show listing
05-11-2004 09:59:29 info traceback (most recent call last):
05-11-2004 09:59:29 info file "q:\scripts\mytvshow.py", line 463, in ?
05-11-2004 09:59:29 info parentwin = gui.basewindow( 'parent' )
05-11-2004 09:59:29 info typeerror: an integer is required
05-11-2004 09:59:31 info creating recorded show listing
05-11-2004 09:59:33 info > loadrecordedshows
05-11-2004 09:59:33 info < loadrecordedshows
05-11-2004 09:59:33 info > setupshownavcontrols
05-11-2004 09:59:33 info < setupshownavcontrols
05-11-2004 09:59:37 info chanid=[1002] starttime=[2004-11-03t22:00:00] endtime=[2004-11-03t23:00:00]
05-11-2004 09:59:37 info chanid=[1002] starttime=[2004-11-04t21:00:00] endtime=[2004-11-04t22:00:00]
05-11-2004 09:59:37 info showpath=[smb://mythtv:mythtv@ca810e.paonet.org/myth/tv/1002_20041104210000_20041104220000.nuv]
05-11-2004 09:59:41 info traceback (most recent call last):
05-11-2004 09:59:41 info file "q:\scripts\mytvrecorded.py", line 260, in oncontrol
05-11-2004 09:59:41 info showdetails.init( self, self.rowinfo[rowindex] )
05-11-2004 09:59:41 info file "q:\scripts\mytvshow.py", line 149, in init
05-11-2004 09:59:41 info self.showpathinfo = getfileinfo( self.showpath )
05-11-2004 09:59:41 info file "q:\scripts\mytvshow.py", line 76, in getfileinfo
05-11-2004 09:59:41 info addrs = nmb.netbios().gethostbyname( host )
05-11-2004 09:59:41 info file "q:\python\lib\nmb.py", line 190, in gethostbyname
05-11-2004 09:59:41 info return self.nameserver, type, scope, timeout)
05-11-2004 09:59:41 info file "q:\python\lib\nmb.py", line 230, in __queryname
05-11-2004 09:59:41 info raise netbiostimeout
05-11-2004 09:59:41 info netbiostimeout
05-11-2004 09:59:47 info cleaning up
05-11-2004 09:59:51 notice stop all

solution: replace %h in mytv.xml <pathprefix> with the value set for <host>,
"ca810e" in my case.
i have an internal dns server and a wins samba server for my lan.
%h expanded to ca810e.paonet.org from dns while the netbios name is just ca810e.

snotty6969
2004-11-13, 21:21
.......
anyhow, i still have a little problem using it (but it doesn't seems to be xbmc myth related).

if i try to watch a recorded show, at best i have some weird sounds that is video sound with some extra noise. at worst, it doesn't do anything.

i got this if i try to launch a show from xbmc myth, but it does the same if i launch directly the file from the smb share from the video selection... i double checked, nuv files are associated with video (i run xbmc 1.1.0, latest available from avalaunch, mplayer 1.0pre5-3.3.3 of 2004/10/17)

any clue?

thanks in advance, and thanks one more time for this wonderfull feature.

hi all,
first of all thanks for the wonderfull work!
i'm wondering how i can solve the above mentioned trouble i'm also experiencing?
i'm having mythtv 0.16 (debian-unstable sources), xbmc 1.1.0. and xbmc-myth 0.14. i thought it were my capture cards. but i installed a mythtv-frontend on a seperate computer and the sound works fine.

does anybody have any idea on how to solve this? because i'm not going to purchase a pvr-x50-card ???

thanks a lot & have fun.
p.s. i'm not sure what mpllayer has to do with it or how i can solve this using/patching mplayer? i know xbmc is using/helped by mplayer related stuff/code. to what extend i don't know.

sigtom
2004-11-14, 19:54
if you arent going to add a card that does hardware mpeg-2 encoding, then you cant use this script in xbmc, as xbmc cant play the software encoded mpeg-4 or rtjpeg wrapped in the .nuv extension files, it can only play the .nuv files that are actually mpeg-2, which is what you get with a pvr-x50 card.

snotty6969
2004-11-14, 20:26
thank you very much for this information.

/me thought mpeg4 encoding would solve this like mpeg2 with pvr-x50...


i guess i'll have to wait untill the "make mplayer myth-file compatible" patch gets into xbmc?
to bad for me. love the script though.

thanks all!!

sigtom
2004-11-15, 05:09
the mpeg 4 encoded .nuv files that myth makes isnt a regular mpeg-4 stream, its been modified by myth, so i dont ever see there being a patch for something like that, so your best bet is to install linux and then myth on the xbox, search mythtv.org for the xbox mythtv distro.

elminster
2004-11-15, 15:49
to follow on from choids post has anyone found a fix to the python scripts when protocol 14 is being used?

xerxes3rd
2004-11-15, 18:54
the mpeg 4 encoded .nuv files that myth makes isnt a regular mpeg-4 stream, its been modified by myth, so i dont ever see there being a patch for something like that, so your best bet is to install linux and then myth on the xbox, search mythtv.org for the xbox mythtv distro.
while that is true, mythfrontend uses mplayer to play back the recorded streams, so it must be supported somehow in mplayer.

ilovetechno
2004-11-15, 22:28
can anyone post some screenshots of the mythtv frontend for the xbox please?

i am thinking of installing mythtv for recording options in xmbc.

Livin
2004-11-30, 06:10
is there a feature list with some screen shots for this script? i'm currently looking at finding a pvr solution to integrate.

thanks!

tbdombrosky
2004-12-01, 21:30
it can't do live tv at the moment so you might want to consider that in your decision.

windisch
2004-12-05, 06:13
i am having trouble watching a show with the script and accessing a show in the tv schedule. it says error, but no error message. i have everything configured. i'm just not sure where the path prefix smb share needs to point to. the readme file doesn't explain it, and i see no website for help. is there a website for this script? does the mythtv smb share need to point to the recordings folder? also the gui skin does not show the mytv button on xbmc. any help would be appreciated.

thanks

nummer55
2004-12-08, 00:59
will this work with for example the msi vox (usb2.0) tv tuner (philips chipset)? i only got a laptop and would love to be able to record shows via my laptop on my xbox. anyone knows?

windisch
2004-12-16, 16:31
i am having trouble watching a show with the script and accessing a show in the tv schedule. it says error, but no error message. i have everything configured. i'm just not sure where the path prefix smb share needs to point to. the readme file doesn't explain it, and i see no website for help. is there a website for this script? does the mythtv smb share need to point to the recordings folder? also the gui skin does not show the mytv button on xbmc. any help would be appreciated.

thanks
noone has any idea? or knows where else i can look for help on this?

tbdombrosky
2004-12-16, 21:17
will this work with for example the msi vox (usb2.0) tv tuner (philips chipset)? i only got a laptop and would love to be able to record shows via my laptop on my xbox. anyone knows?
you will not be able to use an external tv tuner unless someone writes drivers for it. i doubt that will ever happen, so i'd look elsewhere.

mirth
2004-12-18, 01:09
hi, i am trying to get this thing to work but i always get the "socket is not connected" error. i do have smb working fine. ( am watching movies from smb server)

xbmc_mythtv: xbmc_mythtv-0.12
mythtv ver: 0.16 (protocol: 13)
xbmc ver: 1.0.0 09-10-04

the error message i got when press "tv guide" and "recorded shows" --> 10057, socket is not connected.

"status" button works fine tho.


my xbmc_mythtv configuration:
protocol: 13
path prefix: smb://urban:password@192.168.2.35/mythtv


any help will be much appreciated.

travis
hello all,

i am having the same problem as efurban was having in the post that i am quoting. wonder if anyone knows what is happening? i checked my xbmc log file and here is the relevant error:


17-12-2004 17:20:10 info traceback (most recent call last):
17-12-2004 17:20:10 info file "q:\scripts\mytv.py", line 34, in oncontrol
17-12-2004 17:20:10 info win = mytvrecorded.recordedwin()
17-12-2004 17:20:10 info file "q:\scripts\mytvrecorded.py", line 32, in
17-12-2004 17:20:10 info self.loadrecordedshows()
17-12-2004 17:20:10 info file "q:\scripts\mytvrecorded.py", line 111, in loadrecordedshows
17-12-2004 17:20:10 info self.connecttomythtv()
17-12-2004 17:20:10 info file "q:\python\lib\gui.py", line 229, in connecttomythtv
17-12-2004 17:20:10 info user=self.cfg.getuser(), password=self.cfg.getpassword() )
17-12-2004 17:20:10 info file "q:\python\lib\mysql.py", line 344, in
17-12-2004 17:20:10 info self.getserverinfo
17-12-2004 17:20:10 info msg = self.socket.recv( connection.buffer_length )
17-12-2004 17:20:10 info error: (10057, 'socket is not connected')


i can connect to the samba share directly through xbmc and watch the *.nuv mpegs.

can anyone point me in the right direction here?

mirth
2004-12-18, 01:56
problem solved:

i feel like an idiot. mysql isn't automatically configured listen for network connections. i had to edit /etc/mysql/my.cnf and edit out the skip-networking line. hopefully this can help others..

cyberplague
2004-12-29, 19:44
any luck yet watching live tv with this?

cp

EuphoricaL
2004-12-30, 02:41
i had a play for a couple of hours to try and get livetv working...(almost)

1. i added setup and config for a livetv samba folder to point to the myth livetv buffer folder
2. added a extra menu item
3. i figured out the commands to start a live recording..steps are:
"get_next_free_recorder"
"query_recorder 1[]:[]setup_ring_buffer"
"query_recorder 1[]:[]spawn_livetv"
4. display the stream:
file = 'smb://10.0.0.120/livetv/ringbuf1.nuv'
xbmc.player().play(file)
which works fine...very smooth etc

the myth protocol is pretty simple to understand, just a case of tracing the c source.
so, bascially i've got stuck at xbmc stuff...how would you capture a button press to display a osd with guide data and then allow the changing of the channel...

if anyone wants to see my random hacks, i've uploaded them to:
http://www.comp.lancs.ac.uk/computi....tch.zip (http://www.comp.lancs.ac.uk/computing/users/leek/xbmc_mythtv-0.14-livepatch.zip)
but its just proof-of-concept, not even close to a proper livetv option...

stickman
2005-01-02, 03:14
at least, it would be great being able to zap between channels, it would make the script almost a full frontend.

first thing to know, i guess is if from playback you can call a python function when a button is pressed.

can anyone throw some light on this?

also, it's been a long time since we last heard from madtw... man, are you still there?

bluezx9r
2005-01-03, 00:08
hi guys

i'm trying to get the script to work by following the instructions in the archive but i can seem to get it to work.
(i'm running xbmc 1.1 (a december build) in 720p ntsc.)

the myth tv link is there but does nothing and i can't see the link my tv in the setting page to get it configure.

any ideas?

thanks

:help:

juski
2005-01-03, 12:03
i am having trouble watching a show with the script and accessing a show in the tv schedule. it says error, but no error message. i have everything configured. i'm just not sure where the path prefix smb share needs to point to. the readme file doesn't explain it, and i see no website for help. is there a website for this script? does the mythtv smb share need to point to the recordings folder? also the gui skin does not show the mytv button on xbmc. any help would be appreciated.

thanks
noone has any idea? or knows where else i can look for help on this?
mythtv puts all its recordings in a folder called /videorec by default.

set up a samba share of that folder, or wherever your video recordings are stored.

the gui skin can easily be edited to show an extra button for mythtv... i've done it... (see below). i added the following to my home.xml file in the skin folder

<control>
<description>myth tv button</description>
<visible>yes</visible>
<type>button</type>
<execute>q:\scripts\mytv.py</execute>
<id>1116</id>
<label>myth tv</label>
<posx>270</posx>
<posy>153</posy>
<width>180</width>
<height>35</height>
<font>font14</font>
<onleft>10</onleft>
<onright>100</onright>
<onup>9</onup>
<ondown>2</ondown>
<align>center</align>
<textoffsetx>13</textoffsetx>
</control>

this is what mytv.xml looks like for me too:

<mytv>
<host>192.168.1.10</host>
<database>mythconverg</database>
<port>3306</port>
<user>mythtv</user>
<password>mythtv</password>
<mythtvport>6543</mythtvport>
<mythtvstatusport>6544</mythtvstatusport>
<mythtvprotocol>13</mythtvprotocol>
<pathprefix>smb://%h/video/videorec</pathprefix>
<localcopypath>e:\videos\</localcopypath>
</mytv>

juski
2005-01-03, 13:57
will this work with for example the msi vox (usb2.0) tv tuner (philips chipset)? i only got a laptop and would love to be able to record shows via my laptop on my xbox. anyone knows?
your xbox will not (i repeat will not) be able to record shows, even with a usb video device attached. i think there's a remote chance it might be possible with an xbox running linux, though the xbox usb is only 1.1 so it's probably not fast enough to bother.

however, you could record shows on your laptop with your usb video gadget & share them to the xbox and play them back with xbox media center.

my setup at home is:

xbox with xbmc installled, in my livingroom.

athlon 800 mhz fitted with 256mb ram, two dvb-t tuner cards. this runs mythtv under gentoo linux 24/7. this machine is upstairs out of the way.

a regular windows xp machine.

everything is networked & i can watch recorded shows anywhere, any time :d

i can set up recordings from anywhere that has internet access - even from a wap phone (in theory) :d

windisch
2005-01-03, 14:24
mythtv puts all its recordings in a folder called /videorec by default.

set up a samba share of that folder, or wherever your video recordings are stored.

the gui skin can easily be edited to show an extra button for mythtv... i've done it... (see below). i added the following to my home.xml file in the skin folder

<control>
<description>myth tv button</description>
<visible>yes</visible>
<type>button</type>
<execute>q:\scripts\mytv.py</execute>
<id>1116</id>
<label>myth tv</label>
<posx>270</posx>
<posy>153</posy>
<width>180</width>
<height>35</height>
<font>font14</font>
<onleft>10</onleft>
<onright>100</onright>
<onup>9</onup>
<ondown>2</ondown>
<align>center</align>
<textoffsetx>13</textoffsetx>
</control>
thanks for the reply. i had just got the samba share entered into xbmc correctly this weekend. funny how a typo can screw up the connection...... ;)

thanks for the info on the skin change. i was confused at first because there was no home.xml in the ntsc folder, so i edited the one in the pal folder. i'll copy it over when i get home. thanks again for your help!

juski
2005-01-03, 15:59
thanks for the reply. i had just got the samba share entered into xbmc correctly this weekend. funny how a typo can screw up the connection...... ;)

thanks for the info on the skin change. i was confused at first because there was no home.xml in the ntsc folder, so i edited the one in the pal folder. i'll copy it over when i get home. thanks again for your help!
lol.

you'd think, having linux experience you'd know all about typos by now :d

i knew very little about linux when i set out with my mythtv box, but it's quite easy once you grasp the basic concepts imho.

my next step will be to try to get the scheduling bit to work - last time i tried it, it would just hang - and i think it hung the backend too. i've been tempted to try a knoppmyth install on the xbox but i know how long it (linux) takes to boot up. i sometimes still play games on the xbox so i could do without having to wait for it to boot.

from what i know of mythtv & xbmc it shouldn't be too hard to extend xbmc into a full blown mythfrontend. 'all' the linux frontend does is give instructions to the backend over the network, and live tv is just mplayer pointing to mythtv's ringbuffer. maybe i'll turn it into a little pet project and learn some programming while i'm at it ;)

it's gonna be that or i'll build a 'proper' htpc.

windisch
2005-01-03, 16:51
lol.

you'd think, having linux experience you'd know all about typos by now :d
acutally, i've only been using linux for 6 months now, still have a lot to learn.

i know even less about coding, but if you would like some help with modifying the code to make it a "true" frontend, i'd be willing. i don't want this project to die. ;)

EuphoricaL
2005-01-03, 17:51
it would be nice to know if anyones still developing this??? madtw?
otherwise someone should take ownership so some progress is made rather than lots of little private hacks...

windisch
2005-01-03, 18:06
i agree, i have no idea whats going on with this project.

juski
2005-01-03, 18:07
lol.

you'd think, having linux experience you'd know all about typos by now :d
acutally, i've only been using linux for 6 months now, still have a lot to learn.

i know even less about coding, but if you would like some help with modifying the code to make it a "true" frontend, i'd be willing. i don't want this project to die. ;)
i've already started looking at the python code and some stuff about the mythtv protocol. it all looks fairly straightforward at first glance, but then i don't know much about coding, so what do i know?

edit: i've just re-read this thread. seems as though someone has already started the ball rolling on the livetv aspect :d

nice work by the look of your code, euphorical

i've currently not got my xbox close enough to easily try out changes to the code - and it would disrupt my wife's soaps :lol: so i'll have a mess about with it once i get it out from under the tv ;)

i'm really looking forward to having a play. in the 80s i learnt a lot about programming by taking other people's code apart - the same could be true for python.

let's not let this issue lie people!

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
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?
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
i had a play for a couple of hours to try and get livetv working...(almost)

1. i added setup and config for a livetv samba folder to point to the myth livetv buffer folder
2. added a extra menu item
3. i figured out the commands to start a live recording..steps are:
"get_next_free_recorder"
"query_recorder 1[]:[]setup_ring_buffer"
"query_recorder 1[]:[]spawn_livetv"
4. display the stream:
file = 'smb://10.0.0.120/livetv/ringbuf1.nuv'
xbmc.player().play(file)
which works fine...very smooth etc

the myth protocol is pretty simple to understand, just a case of tracing the c source.
so, bascially i've got stuck at xbmc stuff...how would you capture a button press to display a osd with guide data and then allow the changing of the channel...

if anyone wants to see my random hacks, i've uploaded them to:
http://www.comp.lancs.ac.uk/computi....tch.zip (http://www.comp.lancs.ac.uk/computing/users/leek/xbmc_mythtv-0.14-livepatch.zip)
but its just proof-of-concept, not even close to a proper livetv option...
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...

cp

iawia
2005-01-04, 20:34
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...

cp
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:
www.comp.lancs.ac.uk/computing/users/leek/xbmc_mythtv-0.15.zip
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:
scheduling working...
delete doesn't work anymore
parsing channel data from database and use this as basis for livetv selection.
osd???
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 :sniffle:

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.

(drivel undeleted) ;)

>>> 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:
xbmc.player().play(file)
anyone any idea?

edit:
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
i second the confusion...i'd like to know where the api for the xbmc python scripts are.
i.e. things like:
xbmc.player().play(file)
anyone any idea?

edit:
i found the apis at /docs/python folder of the 1.1.0 xbmc
they are a bit thin :-(
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
nuts.

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 (http://www.xboxmediaplayer.de/cgi-bin/forums/ikonboard.pl?act=st;f=21;t=5505;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
good plan.

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?

edit:

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.

juski
2005-01-05, 11:20
the samba share is already working because i can watch recorded shows. i can play the ringbuffer with mplayer in windows, so maybe something's going wrong somewhere else.

i can still use the 'recorded shows' feature & it all works as it did before.

i'm going to have to bring the xbox into the same room as my main pc so i can play with it for now i think.

fyi i've now set the livetv folder to /video/videorec - which is the same as the recorded programs folder. /video is shared & i can see every last file on my windows box.

xbmc can see everything too.

btw my live tv is a ts stream (dvb-t) - would this present a problem? i don't think it will but i'd like that verified.

rubenonrye
2005-01-06, 01:43
hi everybody,

i've fixed xbmc_mythtv-0.14 to work with protocol version 14 in mythtv. it seems the mythtv people started using a time_t for the starttime and endtime fields instead of the 'mythtime' format that xbmc_mythtv was expecting. i also applied this to the .15 version so that delete, thumbnails, and program information now work again. the code in .15 was just taking the last show for the constructor showdetailwin class.

if anyone wants these, there are patches or pre-patched tarballs here (http://chrislehmann.net/files/xbmc_mythtv).

EuphoricaL
2005-01-07, 00:40
hi guys,
great cvs patch cheers rubenonrye, works great.
i've applied it and included it with my livetv changes in version 0.15.1
to ease installation i've dumped all the files in the same folder, just copy this to xbmc/scripts and correct your interface pointer to point to the correct place. no need to have some files in library and some in scripts etc.

0.15.1 release:
http://www.comp.lancs.ac.uk/computi....5.1.zip (http://www.comp.lancs.ac.uk/computing/users/leek/xbmc_mythtv-0.15.1.zip)

new stuff:
livetv: grabs channel list from myth
livetv: selection of channel by name
livetv: chooses free tuner, so works alongside other frontends and multi-cards
livetv: starts on entry to interface, stops on exit from interface
recordings: mythtv cvs (protocol 14) support

i think i've finally perfected the protocol for using livetv, buffers, changing channel etc.
still slightly buggy due to the way the ringbuffer on myth works
so its just interface stuff to make it look pretty now.

admin:
if people want to post patches against the current release, i'll (or anyone can) apply the patches and post a new version on the forum when necessary, we might get some more progress then.

todo:
schedule recordings
osd
improve livetv interface

rubenonrye
2005-01-07, 15:57
thanks for all of your work btw, i've been wanting to take a stab at this for a while now but haven't had the time...

live tv is working great for me now, i had to change some numbers in the latest version to make it display correctly on my tiny tv though.

as for a better user interface/osd, couldn't we just subclass from the tvguidewin and add an overloaded onaction that starts the player and changes channels if you click a certian button? kind of like the way the mythfrontend epg works by pressing 'm' to switch to the current channel.

seems like the code for figuring out the shows/channels and what not has already been written, there's no need to rewrite it...

i might take a look at it this weekend unless you've already got something else started.

EuphoricaL
2005-01-07, 17:10
glad to know livetv is working for you. still a few minor timing bugs i need to iron out. i was pleased i managed to get it to choose a free tuner.

subclassing tvguidewin is definitely the way to go. however i only see it necessary to display now-next for each channel, also it would be nice to fit more channels on the screen. anything would be better than my dodgy gui (still learning python, am a networking programmer).

is it possible to capture a button while mplayer has started? even if you can, i'm not sure it would be very useable, because of the lack of a osd. up and down would make sense and 1-9, but it would be difficult to use above 9 as no osd to display the channel. this is why i basically treated each channel as a seperate identity which you can choose...like a recording

i'll leave the livetv interface alone for a while so it would be great if you could improve the interface :-) you should prob start the mythlivetv from scratch, as i only wrote it to test the new commands in mythtv.py

i'm going to get a few more of the mythtv features working...

dooze
2005-01-10, 01:34
great work on the new features guys!

just one small fix to keep things working with the old protocol version 13, lines 378 and 383 of mythtv.py both need to change from:

if mythprotocolversion < 14:
to
if int(mythprotocolversion) < 14:

thanks again!
dooze

michael_j_w
2005-01-12, 10:11
first of all thank you to everyone who has helped develop this script! i purchased my xbox with the intent of running it as a linux/mythtv node but in the process i discovered xbmc, it rocks. so i was a quite disapointed when no matter how hard i searched i could not find a mythtv client for the xbox other than those based on *nix. but after days of searching i found your project and i lived happily ever after--well not quite yet. there is the thing, i keep getting two errors, "invalid literal for float(): [file name]" and "oncontrol".

i have a 1.6 xbox with a xecuter3 chip (legal), avalaunch dash, xbmc (last entry in change log 30-11-2004), xbmc-mythtv script 0.15. this is conected via lan to fc3 runing mysql 3.3, kde, mythtv 0.16 (both front and backends).

i get the first error when trying to watch recorded shows and the secound when i select an item in the tv listings. i am able to check the status from xbmc, browse recording, and tv listings w/out error. from what i can find on the web these are python errors so i thought i would give a heads up to the programers. and if any body should discove a fix i would appriciate a heads up.

xerxes3rd
2005-01-12, 17:10
i am getting the same errors as michael_j_w, and in exactly the same places. when it displays "invalid literal for float(): [file name]," the "file name" portion is usually a date string. i'm using the latest cvs build of xbmc, and i've also tried it (and received the same errors) on xbmc's official 1.1 release.

EuphoricaL
2005-01-12, 19:09
hi,
can you try:
http://www.comp.lancs.ac.uk/~leek/xbmcmythtv.tar
this is the latest code, with lots of fixes etc, try livetv by pressing back (red) on the epg channel.

we (me and rubenonrye) are working on a livetv interface now and other stuff...

to keep everyone updated with the progress, i've registered a sourceforge project and we are using this for updates/fixes. the url is:
http://sourceforge.net/projects/xbmcmythtv/ and the module is xbmcmythtv. instructions for downloading current cvs are on cvs page of the project.

if anyone wants to contribute, you can post diffs against the cvs, and i'll give you devel access after a few patches.
we'll do another (more) stable release in a week or 2.

cheers

MHo
2005-01-12, 22:55
hi,

i found this thread today and xbmcmythtv looks really nice!
i've installed the latest version from the post above, and
still have some problems though....

when trying to view a recorded program i get the following
error: "connection instance has ho attribute 'getsingleprogram'"
any clues??

i also have a question. where is the file mytv.xml stored on the
xbox, i can't find it anywhere!

regards, mho

EuphoricaL
2005-01-12, 23:11
mytv.xml will be in the xbmc folder.
check your samba and mythtv settings, this is probably being caused by the frontend not being able to connect to mythtv.

MHo
2005-01-13, 00:00
mytv.xml will be in the xbmc folder.
check your samba and mythtv settings, this is probably being caused by the frontend not being able to connect to mythtv.
ok, i'll have a look again.. i did'nt find it earlier...

i can connect to the mythtv-share on the server from my notebook (using the same username and password). is there a way to verify that this really is the problem?

/mho

beowulfe
2005-01-13, 20:03
i've been (slowly) working on getting livetv to work with xbmc for a while now, but your efforts have far surpassed mine! thanks for all your hard work!

i've seen a few posts from people trying to get xbmc to play the mpeg-4 .nuv files. there's an old patch for mplayer that allowed these files to be played. it's available at:
http://dijkstra.csh.rit.edu/~mdz/mythtv/

this patch can be applied to the mplayer sources in the xbmc cvs with a little bit of tweaking. i have the updated mplayer.dll binary i made for my own use, which i'd be happy to distribute if someone wants to donate the server space :) that way, you could just drop the new mplayer.dll over the old one on your xbox. the binary is not compiled against any ms sdk's, and is all open source, so legal concerns shouldn't be an issue.

madtw
2005-01-14, 08:17
guess i should've checked this thread earlier. it looks like the xbmc mythtv scripts i started writing a while back have taken on a life of their own. good to see that others have picked up when i was too busy to work on them further.

fyi, i had no intention of not continuing with the scripts. in fact, i started poking at my version of the code over the last few days to fix a few high definition gui layout issues and to rethink the interface a little. then i remembered this thread that was started a while back and decided to see if people had any other questions since the last time i checked. to my surprise euphorical and rubenonrye have continued working on it and a sourceforge page has been setup.

anyway, i thought i'd drop a note in the forum to say that i am still around and will be working on the code some more. here are a few things i'm looking into:

1. better 720p/1080i layout for most of the screens. possibly using some sort of skinning to reduce hard coded screen positioning.
2. i'd like to change the layout to be more like the music or videos view in xbmc (i.e. buttons on left with icons/text labels in list on right). i was hoping to get darkie to look into exposing the icon/big icon/detail list control in python. imagine picking your show from a thumbnail view... ok, sometimes the thumbnails are during commercials but if they weren't, it'd look pretty slick.
3. get rid of hard coded text strings to better support localization.
4. look into fully qualified domain name lookups. someone reported an issue on this a while back after they found a work around... but i figured it might as well be fixed.

at the moment, i'm using my 0.14 code base. i briefly tried running the scripts in the latest tar in the thread but only the settings and status screens worked. any other screen caused xbmc to stop responding. i'm not sure if it is a script issue or a xbmc build issue.

someone asked a question about being able to capture input while mplayer is running. when dooze and i were working on the scripts, we looked into this a little. at that time, there was no way to capture remote/control pad events in python while mplayer is running. this means that real time channel switching isn't really possible without modifying the xbmc sources to add mythtv support. a nice way to do this might be to add support for a myth:// url prefix to xbmc so that all playback (including live tv) can be done using the myth streaming protocol but browsing recorded shows, tv guide, schedule programming is still done in python.

anyway, keep up the good work...

dooze
2005-01-14, 11:53
hi guys,

so you you all know, the code change i posted on jan. 10 2005 (scroll up on this page) fixes the "invalid literal for float(): [file name]" problem, anyone running the official 0.16 release of the backend (ie. using the version 13 protocol).

here it is again:

just one small fix to keep things working with the old protocol version 13, lines 378 and 383 of mythtv.py both need to change from:

if mythprotocolversion < 14:
to
if int(mythprotocolversion) < 14:

thanks again everyone for picking up this project, i haven't had the time or focus to finish the parts i started (specifically the scheduling of recordings from the tv schedule), it's great to see this project is alive and well!

dooze

lintweaker
2005-01-14, 21:55
hi guys,

this is wonderful stuff :bowdown:

i have installed the latest version from cvs and i am able to see
the program guide, recorded shows and status :thumbsup:

but when i select a recording to watch i only get an empty error dialogbox with an ok button. what can this be? when i browse to the mythbackend server and select a nuv file manually it works like a charm.

keep up the good work!

EuphoricaL
2005-01-14, 22:37
check your settings for the mythtv backend.
your mysql works/samba works so its probably the mythtv backend. check its not on 127.0.0.1, a lot of people have had this problem.

tharvey
2005-01-15, 03:56
glad to see there is some more development going on with this script!

is anyone looking at adding support for the following?:
- scheduling recordings
- commercial skipping using the flagged commercials in the mythconverg database

thanks,

tim

lintweaker
2005-01-15, 11:19
check your settings for the mythtv backend.
your mysql works/samba works so its probably the mythtv backend. check its not on 127.0.0.1, a lot of people have had this problem.
i checked that but it is ok. it seems that there is a mismatch between the recording highlighted on the screen and the one which is actually selected for playing :shocked:

i started the backend with verbose output which shows:

2005-01-15 10:14:22 mainserver::handleannounce playback
2005-01-15 10:14:22 adding: xbox as a client (events: 0)
2005-01-15 10:14:22 2 ok
2005-01-15 10:14:36 13 accept[]:[]13
2005-01-15 10:14:36 mainserver::handleannounce playback
2005-01-15 10:14:36 adding: xbox as a client (events: 0)
2005-01-15 10:14:36 2 ok
2005-01-15 10:14:45 13 accept[]:[]13
2005-01-15 10:14:45 mainserver::handleannounce playback
2005-01-15 10:14:45 adding: xbox as a client (events: 0)
2005-01-15 10:14:45 2 ok
2005-01-15 10:14:45 17871 38[]:[]globe trekker: norway and lapland[]:[] [...
2005-01-15 10:15:00 13 accept[]:[]13
2005-01-15 10:15:00 mainserver::handleannounce playback
2005-01-15 10:15:00 adding: xbox as a client (events: 0)
2005-01-15 10:15:00 2 ok
2005-01-15 10:15:00 17871 38[]:[]globe trekker: norway and lapland[]:[] [...

i it shows that i selected "globe trekker" to be played while i actually selected a episode of the simpons. something is off here...

rubenonrye
2005-01-16, 01:48
i started the backend with verbose output which shows:

...

i it shows that i selected "globe trekker" to be played while i actually selected a episode of the simpons. something is off here...

hmm i'm not really sure what's going , on, i'm not seeing this problem.

for what it's worth, we've been developing the stuff in cvs against protocol version 14 and you seem to be using version 13. i don't think anything should have broken but you never know.

any chance you could look in the mythtvgui.py and change the line that says:

debugenabled = 0
to
debugenabled = 1

run the script, then post the log?

it should tell you better what's going on.

you might try the latest in cvs too (checked in this evening), it's got a bunch of changes that might have inadvertantly fixed your problem.


also make sure that you (or anyone else having problems) don't have a mythtv.py in your libs folder.

madtw
2005-01-16, 02:07
when trying to view a recorded program i get the following
error: "connection instance has no attribute 'getsingleprogram'"
any clues??
fyi, if you are getting this error, make sure that you remove any old remnants of xbmc_mythtv-0.14. this is out of my control but when the project was moved to sourceforge, the installation instructions were changed, some modules were renamed, and additional changes were made. the mythtv.py module was not renamed but it has been modified. in my version, it would have been installed in <xbmc_dir>/python/lib but in the sourceforge version, it just goes in <xbmc_dir>/scripts (or perhaps a subdir under that). if you have both, it may pick up the older version that does not have a method called getsingleprogram() since this is a new method that has been added.

also, after upgrading to the january 14, 2005 cvs build of xbmc, i was able to get into the program schedule and recorded shows screens. after i selected a recorded show, i was getting the quoted exception... but that is because i still had my version installed. i've got to run for a bit but i figured this might help some people who are having problems with the latest tarball from sourceforge.

[edit] before you try running the sourceforge version (not just if you get the above error), make sure you remove any remnants of xbmc_mythtv-0.14 or older... especially make sure you remove any xbmc_mythtv files that were installed in <xbmc_dir>/python/lib. otherwise, you will be running a mix of old code and new code and the results are undefined. at the moment, your existing config file does not need to be removed.

lintweaker
2005-01-16, 12:07
i started the backend with verbose output which shows:

...

i it shows that i selected "globe trekker" to be played while i actually selected a episode of the simpons. something is off here...

hmm i'm not really sure what's going , on, i'm not seeing this problem.

for what it's worth, we've been developing the stuff in cvs against protocol version 14 and you seem to be using version 13. i don't think anything should have broken but you never know.

any chance you could look in the mythtvgui.py and change the line that says:

debugenabled = 0
to
debugenabled = 1

run the script, then post the log?

it should tell you better what's going on.

you might try the latest in cvs too (checked in this evening), it's got a bunch of changes that might have inadvertantly fixed your problem.


also make sure that you (or anyone else having problems) don't have a mythtv.py in your libs folder.
i am currently running the latest version from cvs. enabling debugging doesn't reveal very much. i am not seeing any mythtv specific items
in the xmbc.log file.

more options?

rubenonrye
2005-01-16, 20:50
i started the backend with verbose output which shows:

...

i it shows that i selected "globe trekker" to be played while i actually selected a episode of the simpons. something is off here...

hmm i'm not really sure what's going , on, i'm not seeing this problem.

for what it's worth, we've been developing the stuff in cvs against protocol version 14 and you seem to be using version 13. *i don't think anything should have broken but you never know.

any chance you could look in the mythtvgui.py and change the line that says:

debugenabled = 0
to
debugenabled = 1

run the script, then post the log?

it should tell you better what's going on.

you might try the latest in cvs too (checked in this evening), it's got a bunch of changes that might have inadvertantly fixed your problem.


also make sure that you (or anyone else having problems) don't have a mythtv.py in your libs folder.
i am currently running the latest version from cvs. enabling debugging doesn't reveal very much. i am not seeing any mythtv specific items
in the xmbc.log file.

more options?

more options?


check your pm, i just messaged you

elminster
2005-01-16, 21:31
heya all,

i have nearly the exactly same problem as linkwert.

i can see the status/ recorded progs and tv schedule. but if i click on a program i get oncontrol or another error about assigned lists.

while in recorded shows their is an error box but no text just an okay.

europhical i saw your post about ip in myth and mine was indeed localhost so i changed it to my outward ip. then copied over the latest scripts. (i'm also running proto 14 with latest myth cvs, today in fact.)

briefly i got a little further into the next screen from scheduled programs, with record, always record etc.... but still no feed.

haven't been able to get that to happen again since, including copying over all the scripts again... really weird i repeated all my actions but anyway, herring perhaps.

i tried similar actions to linkduder and here are my logs not much of use im afraid:

mythbackend -v:

[root@trantor adapter0]# mythbackend -v
starting up as the master server.
2005-01-16 19:18:35.649 dvb#0 using dvb card 0, with frontend lsi l64781 dvb-t.
2005-01-16 19:18:35.660 dvb#0 warning - status: no lock!
2005-01-16 19:18:35.932 dvb#0 successfully tuned to channel 34.
2005-01-16 19:18:35.971 mythbackend version: 0.16.20041224-1 www.mythtv.org
2005-01-16 19:18:35.976 enabled verbose msgs : important general
2005-01-16 19:18:37.971 found changes in the todo list.
2005-01-16 19:18:37.987 scheduled 0 items in 0.0 seconds.
2005-01-16 19:18:37.997 seem to be woken up by user
2005-01-16 19:19:06.474 mainserver::handleannounce playback
2005-01-16 19:19:06.480 adding: xbox as a client (events: 0)
2005-01-16 19:19:10.029 mainserver::handleannounce playback
2005-01-16 19:19:10.034 adding: xbox as a client (events: 0)

xbmc.log:

16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png

any ideas?

EuphoricaL
2005-01-16, 21:51
your problems sound exactly like the problems i get if i don't delete the old scripts properly...
xbmc compiles the .py files to .pyo when it first runs the scripts and won't do this again till the .pyo is deleted. so you have to get rid of .py and .pyo files and also reboot xbmc.

this is why i changed the scripts structure to a single folder. i just have the scripts in xbmc/scripts/xbmcmythtv and delete the whole folder each time i try any script changes. mytv.xml is in xbmc/ so theres no problem loosing any settings.

update: rubenonrye has done some crackin updates to the scripts, including a lot of major speed improvements and a nice livetv interface.
this is in cvs, and although its not been tested much yet, it works nicely on my setup. livetv is actually very useable and the recording screen is much quicker. cheers rubenonrye :-)

dooze
2005-01-16, 22:56
i've been playing with the new live tv interface, which is pretty darn cool, but i've noticed a few problems with it.

firstly, i'm running a backend recording dvb-t streams, and xbmc doesn't like streaming from a nuv with one of these mpeg-2 streams unless there's about 5 seconds of data available already. i've hacked in a dialog between the request to the backend and the call to play in the scripts so i can wait a few seconds before proceeding, but it's not really ideal. if i get in too quickly the resulting stream often crashes xbmc. i've reduced the smb cache sizes right down which helps a little, but it doesn't fix the problem.

the other catch is that the scripts assume the stream is coming from tuner 1, my backend is set up to use "tuner 13", hence the scripts can't find the right .nuv ringbuffer. maybe the tuner number comes back in the response from the server or something, i dunno, but it might be worth looking into for completeness (i haven't had a chance to look myself yet).

dooze

rubenonrye
2005-01-16, 23:42
i've been playing with the new live tv interface, which is pretty darn cool, but i've noticed a few problems with it.



the other catch is that the scripts assume the stream is coming from tuner 1, my backend is set up to use "tuner 13", hence the scripts can't find the right .nuv ringbuffer. maybe the tuner number comes back in the response from the server or something, i dunno, but it might be worth looking into for completeness (i haven't had a chance to look myself yet).

dooze

firstly, i'm running a backend recording dvb-t streams, and xbmc doesn't like streaming from a nuv with one of these mpeg-2 streams unless there's about 5 seconds of data available already. i've hacked in a dialog between the request to the backend and the call to play in the scripts so i can wait a few seconds before proceeding, but it's not really ideal. if i get in too quickly the resulting stream often crashes xbmc. i've reduced the smb cache sizes right down which helps a little, but it doesn't fix the problem.

yeah this is a problem for me too. there's a varible at the top of the mythtv.py file min_ringbuffer_size you can set to help remedy this. it defaults to 512 * 1024, but try and make it larger. the connection.liverequest() function will block until this amount of data has been written on the backend(or the change_channel_timeout has been reached). i guess this should be a setting in the user interface. i still have a bit of corruption (pvr250, mpeg2) at the beginning of the stream when i change channels, but it dosent seem to affect xbmc.


the other catch is that the scripts assume the stream is coming from tuner 1, my backend is set up to use "tuner 13", hence the scripts can't find the right .nuv ringbuffer. maybe the tuner number comes back in the response from the server or something, i dunno, but it might be worth looking into for completeness (i haven't had a chance to look myself yet).


this is a known issue that's really easy to fix. the connection.liverequest() returns the mythtv://host/path/to/ringbufferxx.nuv as a return value. all we have to do is slice off the "ringbufferxx.nuv" part and use that as the filename (this still ony assumes you have one host).

i just haven't done it because i only have one card =]. ill look at it soon though(or feel free to fix it yourself if i'm too slow)

frooby
2005-01-17, 00:05
first off, great script. have had the same problems with the wrong ring buffer, not waiting long enough for stream etc and have a couple of easy fixed. first off after the call to liverequest just return 'ringbuf' + ourrecorder + '.nuv' or what ever the variable was for the recorder you get back from the call. the ringbuf file uses the same number. in my view this is easier than stripping test from the string!

as for the wait. i just added a progress dialog to the waitforchannelchange function (can't remember the exact function name). the dialog just displays the number of bytes currently written (i like to see things happening!). also found the changing the actual network cache in xbmc to 2048, and making the top variable 2048 * 1024 gives a great result, and the wait is acceptable!

rubenonrye
2005-01-17, 00:10
elminster:

look in your xboxmediacenter.xml file and make sure you have
<loglevel>1</loglevel>
then in mythtvgui.py change enabledebug = 0 to enabledebug = 1
you should get quite a bit more usefull information in your xbmc.log file.

16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
16-01-2005 19:19:22 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png

hmm it looks like these files are missing from cvs. you can download one of the 0.14 tarballs and copy the skin folder into your root directory.

we need to fix this in cvs, maybe a skin and a scripts folder?

EuphoricaL
2005-01-17, 00:25
its only those two files, we could just put them inside the xbmcmythtv module and keep it simple.
unless we are planning to start adding nice skins to the interface ;-)

madtw
2005-01-17, 04:38
yeah, i was going to mention that you are missing some skin image files. they should be added to cvs.

actually, we should come up with a better directory structure to store skin files, language translations, some test modules that i use for checking the syntax of the python code before uploading to the xbox, etc..

i also have a python script that i use to update the xbmc skins to add in a myth tv shortcut to the dialogsubmenu.xml skin files when i upgrade xbmc... i've been thinking it might be worth while turning it into an install script that can check for remnants of the old script files, give the user the option of modifying xbmc skin files or check the xboxmediacenter.xml for a shortcut for myth tv, request initial setup info, etc..

elminster
2005-01-17, 18:53
hiya

thanks for the feedback. i deleted the dir which i hold my scripts;
e:\apps\scripts\mythtv
then shutdown the xbox and restarted, copied the files over but alas the same problem.
still the only thing im getting in my xbmc.log is:
17-01-2005 16:44:51 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_25.png
17-01-2005 16:44:51 error texture manager unable to load file: q:\skin\project mayhem ii\media\color_green.png
17-01-2005 16:44:51 error texture manager unable to load file: q:\skin\project mayhem ii\media\color_green.png
17-01-2005 16:44:51 error texture manager unable to load file: q:\skin\project mayhem ii\media\color_green.png
17-01-2005 16:44:51 error texture manager unable to load file: q:\skin\project mayhem ii\media\color_green.png
17-01-2005 16:44:51 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png
17-01-2005 16:44:59 error texture manager unable to load file: q:\skin\project mayhem ii\media\shade_50.png

gonna try getting a new version of xbmc see if it has more media stuff and ill come back with the results. my log level in my xbmc.xml is 2.

point of note i didn't delete my mytv.xml didn't think i needed too. is their any info wrote to the python dir?

elminster
2005-01-18, 00:07
alas no joy. new cvs of both mythtv and xbmcmythtv.

i'll crank up the log levels when i get more time and try deleting the scripts again.

setup:
nova-t receiving dvb-t data using fc3 kernel 2.6.9

got general settings on the right interface in myth too.

don't understand why i managed to get further once, nothing has changed?

must be on the mythtv side if everyone else is okay....

could it be the skins that are missing can any try removing the images and fireing it up?

madtw
2005-01-18, 02:39
no, missing image files don't cause problems. i have been able to switch to the project mayhem ii skin without any additional problems even though the shade*.png files only exist in the project mayhem skin directory.

madtw
2005-01-18, 05:31
fyi for anyone running the latest xbmc builds from cvs... python seems to be a bit unstable at higher resolutions. i traced down where xbmc was hanging for me and it turns out it was hanging in mythtvgui.disconnectfrommythtv. after commenting out all the code in the method, i was able to get to the point where i could watch a recorded show. however, after getting into the show details screen, i was unable to back out to the previous screen. the same thing happened when i went into the program guide screen.

when i changed xbmc to run in ntsc 4:3 instead my default of 720p 16:9, i had no problem going back and forth between the various screens. i've had some visualization lockups in 720p mode (more frequent lockups in 1080i) mode so i'm guessing xbmc is running into memory issues which is trashing python.

hpx
2005-01-18, 06:05
two quick questions,

i don't use smb on my backend, but rather xns. is it possible to use xns rather than smb. i'm also getting prompted for the live prefix, however i haven't been able to find out what that means. what is it?

any help is appreciated.

madtw
2005-01-18, 07:09
1. no, you won't be able to use xns because the code currently builds a smb path, connects to the smb server, and does directory listings and transfers files (tv show still shots) using the smb protocol. all this logic would have to be rewritten to support xns. i may have to start thinking about using a filesystem plugin to encapsulate all filesystem specific operations so that it would be easier to implement something other than smb.

2. the live prefix is the path prefix to your live tv ring buffer file(s). i haven't tested out the live tv stuff yet and didn't implement any of it so that's about all i can tell you right now... rubenonrye may have more info.

lintweaker
2005-01-18, 21:35
ok after sorting out the smb problems i've got the script running properly now! i also managed to add an extra entry to the xmbc main main but i can not use it. i am not really at home configuring xmbc. what did i miss?

the new "myth tv" entry is displayed on the screen but i cannot select it. do i need some extra .xml file?

elminster
2005-01-18, 23:58
well bravo chaps!

you have brought it to the masses. i managed to get live tv going today which must surely mean that your on the way to most being able to do it.

i updated to the latest cvs, the cvs with the "live tv" button but i was getting some access denied stuff but that was just my settings. word of note for others i had to change my livetv prefix too:
smb://foundation;username:passwd@ip/path/to/livetv/
from:
smb://path/to/livetv/
perhaps obvious to most but i assumed that the hostname would be entered into the path.

the recording dumps out after a few seconds of playback but sometimes it maintains its connection. was very excited at this point but girlfriend just looked at me like i had lost my mind :nuts: think i read something abut changing cache size ill have a look

some other issues with recorded progs still getting a blank error box. and did i read that someone had coded recording into the program guide? couldn't see any options

if theres any help i can offer any of you logs etc, more testing let me know.

so pleased to even get this far

nianhbg
2005-01-19, 18:48
this is looking very intresting. i think i will try to install it to night :)

rubenonrye
2005-01-19, 21:00
elminster:

could you set loglevel=1 in your xboxmediacenter.xml file and sen me what's in your xbmc.log file? i might be better able to tell you what's going on.

i'll make a scripts and a skins folder in cvs tonight if no one objects (like it was before, minus the lib folder). that should fix the missing textures.

the recordings interface is currently broken in cvs, i'm planning on fixing it tonight.

smurf2
2005-01-20, 00:28
hello

thanx for continuing the script development

i finally worked out where i was going wrong (many thanx andrew) .i have 2 dvb cards so is there a way of mod'ing the script to figure out which ringbuffer to play as livetv

but angain thanx for everythign so far

latz mary

rubenonrye
2005-01-20, 01:46
i have 2 dvb cards so is there a way of mod'ing the script to figure out which ringbuffer to play as livetv
this is fixed in the most recent cvs, you can either grab that or wait until stuff is stable enough for a release

EuphoricaL
2005-01-21, 15:54
hi guys,
i've just commited to cvs a new option in the main menu called "upcoming shows". this allows you to record upcoming shows in various catagories. this is useful for viewing upcoming movies etc.

the first page allows you to choose a category. if you select one you are then presented with another page with a list of programs in that category. scroll to one you want then select it, you'll then get the option to record or not.

i've been testing it for a day and it hasn't missed any of my recordings so far.

have a look and see if you like it, have any suggestions, bugs etc...

i'm aware of the issue of mythtv not noticing the recordings straight away, this is because the backend only looks at the database every few minutes...will fix when i have time.

boota
2005-01-22, 04:40
sorry to pile on this thread, but i am having problems getting this to work. i am using a very recent version of the xbmcmythtv scripts (maybe a week old?) from cvs. my backend is mythcvs from around the same time.

a few issues (might be all related):
1- i can see my previously recorded shows, including the png's, sizes..etc, but when i select "play", i get some crazy techno sounding stuff from the speakers, and no video (doesnt change screens...just stays on the same screen)

2- when i use the program guilde, i can see the program listings but i can't do anything past that (clicking does nothing).

3- when i try livetv i get an sql error (logs below)
i am using a wintv-go card (read: software) and have tried various transcoding settings after recording (as well as no transcodings).

anyone have similar things going on? i have looked

thanks

19-01-2005 14:09:52 debug loadlibrarya('zlib.pyd')
19-01-2005 14:09:52 debug initializing fs_seg..
19-01-2005 14:09:52 debug fs segment @ 0x80cf00
19-01-2005 14:09:52 debug executing entrypoint at: 0x9184ff - dll: zlib.pyd
19-01-2005 14:09:52 debug loadlibrary('zlib.pyd') returning: 0x80f6b0
19-01-2005 14:09:52 debug kernel32!getprocaddress(0x80f6b0, 'initzlib') => 0x912210
19-01-2005 14:09:53 info -->python initialized<--
19-01-2005 14:09:53 info
19-01-2005 14:09:53 debug loadlibrarya('_sre.pyd')
19-01-2005 14:09:53 debug executing entrypoint at: 0xb2a3cb - dll: _sre.pyd
19-01-2005 14:09:53 debug loadlibrary('_sre.pyd') returning: 0x89e830
19-01-2005 14:09:53 debug kernel32!getprocaddress(0x89e830, 'init_sre') => 0xb2a120
19-01-2005 14:09:53 debug loadlibrarya('_ssl.pyd')
19-01-2005 14:09:53 debug executing entrypoint at: 0xb7e951 - dll: _ssl.pyd
19-01-2005 14:09:53 debug loadlibrary('_ssl.pyd') returning: 0x9c0490
19-01-2005 14:09:53 debug kernel32!getprocaddress(0x9c0490, 'init_ssl') => 0xb31aa0
19-01-2005 14:09:55 info traceback (most recent call last):
19-01-2005 14:09:55 info file "e:\apps\xbmc-1-17-05\scripts\xbmcmythtv\mytv.py", line 33, in oncontrol
19-01-2005 14:09:55 info win = mythtvlivetv.livetvwin()
19-01-2005 14:09:55 info file "e:\apps\xbmc-1-17-05\scripts\xbmcmythtv\mythtvlivetv.py", line 51, in
19-01-2005 14:09:55 info self.loadprogramschedules()
19-01-2005 14:09:55 info file "e:\apps\xbmc-1-17-05\scripts\xbmcmythtv\mythtvlivetv.py", line 89, in loadprogramschedules
19-01-2005 14:09:55 info self.schedules[channel["chanid"]]=self.mythdatabase.getscheduledprograms( self.schedulestarttime, self.scheduleendtime, channel["chanid"] )
19-01-2005 14:09:55 info file "e:\apps\xbmc-1-17-05\scripts\xbmcmythtv\mythtv.py", line 676, in getscheduledprograms
19-01-2005 14:09:55 info raise serverexception, \
19-01-2005 14:09:55 info serverexception: error retrieving recording schedule: you have an error in your sql syntax. check the manual that corresponds to your mysql server version for the right syntax to use near '
programrating.system as system,
19-01-2005 14:09:59 error texture manager unable to load file: q:\skin\project mayhem\media\panel-settings.png
19-01-2005 14:09:59 error texture manager unable to load file: q:\skin\project mayhem\media\shade_25.png
19-01-2005 14:10:00 error texture manager unable to load file: q:\skin\project mayhem\media\panel-settings.png
19-01-2005 14:10:00 error texture manager unable to load file: q:\skin\project mayhem\media\shade_25.png
19-01-2005 14:10:20 info traceback (most recent call last):
19-01-2005 14:10:20 info file "e:\apps\xbmc-1-17-05\scripts\xbmcmythtv\mytv.py", line 33, in oncontrol
19-01-2005 14:10:20 info win = mythtvlivetv.livetvwin()
19-01-2005 14:10:20 info file "e:\apps\xbmc-1-17-05\scripts\xbmcmythtv\mythtvlivetv.py", line 51, in
19-01-2005 14:10:20 info self.loadprogramschedules()
19-01-2005 14:10:20 info file "e:\apps\xbmc-1-17-05\scripts\xbmcmythtv\mythtvlivetv.py", line 89, in loadprogramschedules
19-01-2005 14:10:20 info self.schedules[channel["chanid"]]=self.mythdatabase.getscheduledprograms( self.schedulestarttime, self.scheduleendtime, channel["chanid"] )
19-01-2005 14:10:20 info file "e:\apps\xbmc-1-17-05\scripts\xbmcmythtv\mythtv.py", line 676, in getscheduledprograms
19-01-2005 14:10:20 info raise serverexception, \
19-01-2005 14:10:20 info serverexception: error retrieving recording schedule: you have an error in your sql syntax. check the manual that corresponds to your mysql server version for the right syntax to use near '
programrating.system as system,

rubenonrye
2005-01-22, 05:57
1- i can see my previously recorded shows, including the png's, sizes..etc, but when i select "play", i get some crazy techno sounding stuff from the speakers, and no video (doesnt change screens...just stays on the same screen)

you need a card that can record mpeg2 video(a dvb or ivtv-driver based card) for these scripts to work.


2- when i use the program guide, i can see the program listings but i can't do anything past that (clicking does nothing).

i'm not sure what version you have from cvs, but in the most current version(at least as of tues or so), pushing the red button should start live tv on that channel and pushing the select button shold bring up the 'schedule recording' dialog for that program. try updating and see if it works.

3- when i try livetv i get an sql error (logs below)
i am using a wintv-go card (read: software) and have tried various transcoding settings after recording (as well as no transcodings).

do you per chance not have any recordings scheduled in mythtv? this looks like a bug in the sql statment that appears if there are no recordings. try adding a recording and let me know if it works after that. (i'll put the fix in cvs shortly)

you're not going to ba able to play any video from xbmc if you use the nupplevideo encoding stuff in mythtv though, you need a card that can record mpeg2 (unless you want to patch the xbmc mplayer to support it)

boota
2005-01-22, 16:13
rubenonrye,

thanks for the quick reply. to newegg i go! ;-)

this look very promissing. i appreciate the hard work you guys have put in!

thanks

smurf2
2005-01-23, 03:12
hello

maybe some ppl missed beowulfs comments towards the bottom of page 11 but ... there's a patch availble for mplayer to play the mpeg nuv files this link is from, beowulfs post

http://dijkstra.csh.rit.edu/~mdz/mythtv/

beowulf also offered the patched mplayer dll's so all you would need to do to play and mythtv files is to copy the mplayer dll over the top of the current one in xbmc and it will work

beowulf wanted someone to host the files i am willing to host them but he hasn't replied to me yet

if someone has the sources and knows how to patch or if beowulf raises his head maybe we can get more functionality happening apart from the funky pop music that currently happens

latz mary

iawia
2005-01-23, 10:36
hello

if someone has the sources and knows how to patch or if beowulf raises his head maybe we can get more functionality happening apart from the funky pop music that currently happens
i did this last week, to a then-current cvs checkout of xbmc/mplayer. it seems to work, but i haven't tested very extensively. there were definitively problems with ff/fw, though.

if anyone wants to try, download from *http://www.lagerweij.com/xbmc/mplayerdll.zip
as long as there's not too many people downloading it (it's only my home adsl line) i'll keep it there.

wouter

scottymac
2005-01-23, 22:13
i have installed the latest cvs builds of xbmcmyth but i'm now getting the following error when selecting recorded shows :

23-01-2005 19:41:58 info traceback (most recent call last):
23-01-2005 19:41:58 info file "q:\scripts\mytv.py", line 39, in oncontrol
23-01-2005 19:41:58 info win = mythtvrecorded.recordedwin()
23-01-2005 19:41:58 info file "q:\scripts\mythtvrecorded.py", line 32, in
23-01-2005 19:41:58 info self.loadrecordedshows()
23-01-2005 19:41:58 info file "q:\scripts\mythtvrecorded.py", line 115, in loadrecordedshows
23-01-2005 19:41:58 info self.indexrows()
23-01-2005 19:41:58 info file "q:\scripts\mythtvrecorded.py", line 135, in indexrows
23-01-2005 19:41:58 info if recording.starttime() > self.recordings[show].starttime():
23-01-2005 19:41:58 info file "q:\scripts\mythtvprogram.py", line 135, in starttime
23-01-2005 19:41:58 info return sre.sub( "[:|\\-| ]", self.__data[11])
23-01-2005 19:41:58 info typeerror: sub() takes at least 3 arguments (2 given)


any ideas ?

smurf2
2005-01-24, 10:18
thanx iawia for that dll it's not perfect but it's pritty close and it's better than the buzz and pops

i must admit i am having some real issues with playing live tv
a few days ago it would play a few seconds of live tv then drop back to the guide screen .i am running myth backend .16 and xbmc from the beginning of the month .what are the developers working on backend wise and xbmc wise i am just curious :)

latz mary

EuphoricaL
2005-01-24, 11:13
i'm running mythtv cvs as of about a month ago.
xbmc 1.1.0 release. anything later than this seems to be really unstable for me...

a few issues can make livetv crappy, but tha main solution for me is just to turn all your xbmc caches off. i run my xboxes/backend off a 802.11g bridged wifi and livetv is fine.

the reason livetv drops back to the guide is because xbmc has a cache of the livetv buffer that is old, then it starts reading the new buffer from the location at the end of the cache which doesn't exist, so it crashes. we ae working on a few ways to sort this, but the easiest way for me is just to kill the caches...

frooby
2005-01-24, 22:36
the default network video cache size in xbmc is 8m, and the default for this livetv is nowhere close (about 500kb from what i can tell), so drop your xbmc cache to something lower, and up the livetv value to something higher than your xbmc cache and should be fine (edit the top of mythtv.py file). have been using it without any major problems fora while now.

livetv will wait till it enough of the ring buffer has been read to fill the cache, so the lower the values the quicker it will start playing live tv.

hope this helps, as when it's working it's excellent (quicker than waiting for xebian to boot!)

dooze
2005-01-25, 13:21
i grabbed the latest snapshot from cvs and i've gotta say i'm impressed. the live tv stuff is working almost flawlessly now that i've tweaked the buffer size, but i have found that xbmc stops playing the stream when it hits the end of the ringbuffer, at which point the backend will have looped back to the start of the file again - it'd obviously be nice if xbmc did the same thing - does anyone know if this is possible?

nice work cleaning up the tv schedule, it was a bit of a slap-together whilst learning python to get something on-screen, and the threading issues were pretty bad.

just a few things though - i originally had the tv schedule rendering every alternate cell in the schedule grid in alternating degrees of shading, which makes it a bit easier to see what times the shows start and end at. also, any scheduled recordings where flagged with a green border (i hadn't gotten to the point of handling recording priorities when there were clashes), i'm guessing these little features were casualties of the overall cleanup, but it'd be nice to see them or something better back at some point.

i've got the day off tomorrow so i might have a tinker again, i'll post a patch if i get carried away. :)

rubenonrye
2005-01-27, 16:44
i originally had the tv schedule rendering every alternate cell in the schedule grid in alternating degrees of shading, which makes it a bit easier to see what times the shows start and end at.

i changed everything so that the cells got resized and moved rather than destroy and re-create each one, making it much less'choppy' when you scrolled. it was much faster to keep everything one color rather than redrawing everything in different colors.

that being said, it should be pretty easy to put back in.

also, any scheduled recordings where flagged with a green border (i hadn't gotten to the point of handling recording priorities when there were clashes)


sorry, i refactored the code that checked for all of this and moved it into a non-gui object. the changes just never made it back into the ui. this should be easy to fix though.

if you don't get to it i'll try fix it up this weekend.

madtw
2005-02-01, 09:32
i have installed the latest cvs builds of xbmcmyth but i'm now getting the following error when selecting recorded shows :

23-01-2005 19:41:58 info file "q:\scripts\mythtvprogram.py", line 135, in starttime
23-01-2005 19:41:58 info return sre.sub( "[:|\\-| ]", self.__data[11])
23-01-2005 19:41:58 info typeerror: sub() takes at least 3 arguments (2 given)

any ideas ?
yeah, sub was being called with too few parameters. it was missing the parameter that specifies what to replace the matched characters with. i have fixed this in cvs. you may want to just do an update on that one file though because i have started merging in skinned screens and obsoleting files that are no longer needed so the old screens may be broken. bear with us...

scottymac
2005-02-01, 21:11
thanks for the fix which manages to bypass the previously reported error but unfortunately i'm still using mythtv 0.16 which uses protocol 13 and doesn't work at the moment. i guess it's all about being patient and waiting until more of the bugs are eradicated. i would imagine though that the majority of mythtv users are running 0.16 as it's the latest released stable version.

is there anyone out there who has managed to get the current scripts working with mythtv 0.16 ?? i read about a temporary fix in a previous post in this thread but things have moved on since then.

my current problem with the protocol is :-
01-02-2005 18:45:22 info file "q:\scripts\mythtvprogram.py", line 208, in programflags
01-02-2005 18:45:22 info raise mythtv.protocolversionexception, "unsupported call for protocol version"
01-02-2005 18:45:22 info protocolversionexception: unsupported call for protocol version

smurf2
2005-02-02, 01:13
hello
i am using 0.16 and have issues with playing live tv and scheduling recordings .i hope this will be fixed with imminant release of .17 sometime this week / weekend

i guess my question is a little off topic.it is the xebian install with the mythfrontend .how have you guys got the xebian install to work with the cvs / .17 with the new protocol .i would ask at the xbox mythtv frontend bbs but it was hacked and hasn't come back up yet

any help or pointers would be apreciated

latz mary

madtw
2005-02-02, 08:48
thanks for the fix which manages to bypass the previously reported error but unfortunately i'm still using mythtv 0.16 which uses protocol 13 and doesn't work at the moment. i guess it's all about being patient and waiting until more of the bugs are eradicated. i would imagine though that the majority of mythtv users are running 0.16 as it's the latest released stable version.

is there anyone out there who has managed to get the current scripts working with mythtv 0.16 ?? i read about a temporary fix in a previous post in this thread but things have moved on since then.

my current problem with the protocol is :-
01-02-2005 18:45:22 info file "q:\scripts\mythtvprogram.py", line 208, in programflags
01-02-2005 18:45:22 info raise mythtv.protocolversionexception, "unsupported call for protocol version"
01-02-2005 18:45:22 info protocolversionexception: unsupported call for protocol version
fyi, i am running and testing using the latest stable release (mythtv 0.16). the live tv stuff is being tested against the latest cvs build of mythtv. i have not got that stuff working on my build yet.

also, i have just been working on skinning the interfaces and adding in multilingual support. the latest cvs snapshot has skinned settings and recorded show listing/playback working. the scheduling and live tv screens are broken until they can be rewritten to use skins. this will happen over the next few days.

i ran into the problem you quoted earlier this evening. i have fixed the problem in mythtvprogram.py and checked it into cvs but once again be careful about checking out the latest stuff if you plan on trying out the live tv stuff. if you just want to see something run (without live tv, program guide, scheduling), then grab the latest and greatest cvs code.

madtw
2005-02-02, 08:55
hello
i am using 0.16 and have issues with playing live tv and scheduling recordings .i hope this will be fixed with imminant release of .17 sometime this week / weekend

i guess my question is a little off topic.it is the xebian install with the mythfrontend .how have you guys got the xebian install to work with the cvs / .17 with the new protocol .i would ask at the xbox mythtv frontend bbs but it was hacked and hasn't come back up yet

any help or pointers would be apreciated

latz mary
errr, we're not running xebian... this is an alternative to the xebian myth frontend. it is written entirely in python so it can run within xbmc thereby avoiding xebian bootup times. you'll see talk about the latest protocol because we have to become intimately familiar with the latest protocol in order to implement it in python. of course, we don't know everything about the protocol, just the little bits to get the functionality we're currently working on...

smurf2
2005-02-04, 07:47
lol i know that this is all running under xbmc a native app for xboxen

my question was ... has anyone gotten the xebian myth install working with the current cvs.if so how

as i want a fall back if the myth script isn't working

sgtstadanko
2005-02-05, 05:11
hey i haven't run this in a long time and am having trouble getting the cvs xmbcmyth to work with the latest cvs of xbmc. i am using the .16 backend and when i run mythtv.py from script folder it never loads. here is the error in my xbmc.log file:

04-02-2005 20:49:03 info file "q:\scripts\xbmcmythtv\mythtv.py", line 1167, in ?
04-02-2005 20:49:03 info
04-02-2005 20:49:03 info unittest.main()
04-02-2005 20:49:03 info file "q:\python\python23.zlib\unittest.py", line 714, in
04-02-2005 20:49:03 info attributeerror
04-02-2005 20:49:03 info :
04-02-2005 20:49:03 info 'module' object has no attribute 'argv'
04-02-2005 20:49:03 info
04-02-2005 20:55:04 info debug level set to 31


i have also tried loading mythtvmain.py but i just get the interface and the buttons all generate error messages. it looks like i am missing something simple. any help would be greatly appreciated.

cheers,
william

madtw
2005-02-05, 19:46
hey i haven't run this in a long time and am having trouble getting the cvs xmbcmyth to work with the latest cvs of xbmc. i am using the .16 backend and when i run mythtv.py from script folder it never loads. here is the error in my xbmc.log file:

04-02-2005 20:49:03 info file "q:\scripts\xbmcmythtv\mythtv.py", line 1167, in ?
04-02-2005 20:49:03 info
04-02-2005 20:49:03 info unittest.main()
04-02-2005 20:49:03 info file "q:\python\python23.zlib\unittest.py", line 714, in
04-02-2005 20:49:03 info attributeerror
04-02-2005 20:49:03 info :
04-02-2005 20:49:03 info 'module' object has no attribute 'argv'
04-02-2005 20:49:03 info
04-02-2005 20:55:04 info debug level set to 31


i have also tried loading mythtvmain.py but i just get the interface and the buttons all generate error messages. it looks like i am missing something simple. any help would be greatly appreciated.

cheers,
william
the mythtv.py script is a module containing myth tv protocol logic. it is not meant to be run standalone... if you get errors in there, then hopefully it is just with the unit test stuff as opposed to the objects being tested in the unit test.

the main starting point for the myth tv scripts in the latest cvs is mythtvmain.py. at the moment, only the "recorded shows", "status", and "settings" buttons work. the rest will just popup a dialog with a message. the reason for this is that these screens were recently rewritten to support skinning and language translations. the remaining screens have not been updated to use the new framework. they will be looked at over the next little while...

madtw
2005-02-06, 00:32
two quick questions,

i don't use smb on my backend, but rather xns. is it possible to use xns rather than smb. i'm also getting prompted for the live prefix, however i haven't been able to find out what that means. what is it?

any help is appreciated.
i just removed the explicit dependencies on smb in the scripts in the latest cvs code. this means that if you specify a xns path prefix in the settings, you should also be able to playback shows. if anyone has xns or xbms setup and can verify it, let us know...

note: you still need some other protocol besides the myth protocol to playback shows (i.e. smb, xns, or xbms)

sgtstadanko
2005-02-06, 01:47
ok.. ran the right one and got this error:

5-02-2005 17:24:24 info attributeerror: 'status' object has no attribute 'dom'
05-02-2005 17:24:32 info traceback (most recent call last):
05-02-2005 17:24:32 info file "q:\scripts\xbmcmythtv\mythtvmain.py", line 52, in oncontrol
05-02-2005 17:24:32 info mythtvrecordedshows.showwindow()
05-02-2005 17:24:32 info file "q:\scripts\xbmcmythtv\mythtvrecordedshows.py", line 54, in showwindow
05-02-2005 17:24:32 info win.loadshowlist()
05-02-2005 17:24:32 info file "q:\scripts\xbmcmythtv\mythtvrecordedshows.py", line 138, in loadshowlist
05-02-2005 17:24:32 info self.controls['free_space'].control.setlabel( \
05-02-2005 17:24:32 info file "q:\scripts\xbmcmythtv\mythtv.py", line 970, in diskspacefree
05-02-2005 17:24:32 info return self.diskstatus()['space free']
05-02-2005 17:24:32 info file "q:\scripts\xbmcmythtv\mythtv.py", line 955, in diskstatus
05-02-2005 17:24:32 info divnodes = self._machineinfodivelements()
05-02-2005 17:24:32 info file "q:\scripts\xbmcmythtv\mythtv.py", line 1060, in _machineinfodivelements
05-02-2005 17:24:32 info node = self._getdivelementbyh2value( "machine information" )
05-02-2005 17:24:32 info file "q:\scripts\xbmcmythtv\mythtv.py", line 991, in _getdivelementbyh2value
05-02-2005 17:24:32 info tmpnodes = self.dom.getelementsbytagname( "div" )
05-02-2005 17:24:32 info attributeerror: 'status' object has no attribute 'dom'


any ideas

madtw
2005-02-06, 04:00
ok, it looks like there is something wrong with obtaining status from your myth backend. i added a try/except in the recorded shows screen so that if it fails getting the free disk space status, it will continue creating the window. also, i added code to initialize the "dom" member in the status class - i'm not sure why i never got this error on my version of xbmc. which version are you running? i'm running a 2005-01-15 build still because the newer ones seemed a bit unstable.

does the status screen fail for you entirely? i would expect it to if it failed to display the free disk space on the recorded shows screen...

sgtstadanko
2005-02-06, 04:36
i rolled back my xbmc version to 1.1.0 . i grabbed the new code from cvs ...status screen fails completely with this error now:
expaterror: not well-formed (invalid token): line 17, column 51
05-02-2005 20:20:38 info traceback (most recent call last):
05-02-2005 20:20:38 info file "q:\scripts\xbmcmythtv\mythtvmain.py", line 52, in oncontrol
05-02-2005 20:20:38 info mythtvrecordedshows.showwindow()
05-02-2005 20:20:38 info file "q:\scripts\xbmcmythtv\mythtvrecordedshows.py", line 54, in showwindow
05-02-2005 20:20:38 info win.loadshowlist()
05-02-2005 20:20:38 info file "q:\scripts\xbmcmythtv\mythtvrecordedshows.py", line 138, in loadshowlist
05-02-2005 20:20:38 info self.controls['free_space'].control.setlabel( \
05-02-2005 20:20:38 info file "q:\scripts\xbmcmythtv\mythtv.py", line 1023, in diskspacefree
05-02-2005 20:20:38 info return self.diskstatus()['space free']
05-02-2005 20:20:38 info file "q:\scripts\xbmcmythtv\mythtv.py", line 1008, in diskstatus
05-02-2005 20:20:38 info divnodes = self._machineinfodivelements()
05-02-2005 20:20:38 info file "q:\scripts\xbmcmythtv\mythtv.py", line 1113, in _machineinfodivelements
05-02-2005 20:20:38 info node = self._getdivelementbyh2value( "machine information" )
05-02-2005 20:20:38 info file "q:\scripts\xbmcmythtv\mythtv.py", line 1044, in _getdivelementbyh2value
05-02-2005 20:20:38 info tmpnodes = self.dom.getelementsbytagname( "div" )
05-02-2005 20:20:38 info attributeerror: 'status' object has no attribute 'dom'

madtw
2005-02-06, 06:42
ok, can you connect to the status port on your mythbackend using a browser, save the generated html to a file and send it to me? i'm guessing the html that is being generated is missing some end tags that the xml parser is expecting to find... hence the expaterror error being reported.

sgtstadanko
2005-02-06, 17:25
thanks,i pm'ed it to you

Levia
2005-02-08, 00:36
are there any website for this? i tried to install it on my xbox (from cvs) but had no luck. could not find out what script to actually start.

if no website, can someone give me the 101 to start experimenting with this?

christian...

madtw
2005-02-08, 02:29
are there any website for this? i tried to install it on my xbox (from cvs) but had no luck. could not find out what script to actually start.

if no website, can someone give me the 101 to start experimenting with this?

christian...
the installation instructions are a little out of date in cvs. here are some quick installation instructions:

1. upload the entire contents of the xbmcmythtv directory to your xbmc/scripts directory on your xbox.
2. run the mythtvmain.py script and go into the settings screen to specify your connection details and paths.
3. on the settings screen, make sure that the connections test successfully then save your settings.
4. you should now be able to use the rest of the buttons on the main menu displayed by mythtvmain.py.

optional installation includes adding a shortcut to the main xbmc menu:

1. add a new button entry into your xboxmediacenter.xml file that executes q:\scripts\xbmcmythtv\mythtvmain.py
2. update the xbmc/skin/project mayhem/pal/home.xml (or equivalent for your skin) to increase numbuttons by 1.
3. reboot xbox to show the skin change.

Levia
2005-02-08, 02:49
ok. got it working. the "recorded shows" part that is.

the other just does not do anything.

christian...

sgtstadanko
2005-02-08, 03:08
recorded shows, status and settings are all that is working now (i think)...

EuphoricaL
2005-02-08, 11:32
hi,
i'm not going to get the chance to update the upcoming shows interface for the new skinned layout. so if anyone wants to do it, go for it, it will require a complete rewrite of the whole interface from scratch. i'm not sure if rubenonrye will get round to doing a complete rewrite of the livetv interface.
so if anyone wants these features then checkout a old version from the cvs.

cheers

madtw
2005-02-09, 02:43
hi,
i'm not going to get the chance to update the upcoming shows interface for the new skinned layout. so if anyone wants to do it, go for it, it will require a complete rewrite of the whole interface from scratch. i'm not sure if rubenonrye will get round to doing a complete rewrite of the livetv interface.
so if anyone wants these features then checkout a old version from the cvs.

cheers
rubenonrye has already rewritten the live tv interface. i have been able to test it on my setup whereas the old scripts caused my box to lock up.

if no one else picks up the upcoming shows screens, i may take a look at it in a few days.

imthemp3king
2005-02-09, 07:28
the installation instructions are a little out of date in cvs. *here are some quick installation instructions:

1. upload the entire contents of the xbmcmythtv directory to your xbmc/scripts directory on your xbox.
2. run the mythtvmain.py script and go into the settings screen to specify your connection details and paths.
3. on the settings screen, make sure that the connections test successfully then save your settings.
4. you should now be able to use the rest of the buttons on the main menu displayed by mythtvmain.py.

optional installation includes adding a shortcut to the main xbmc menu:

1. add a new button entry into your xboxmediacenter.xml file that executes q:\scripts\xbmcmythtv\mythtvmain.py
2. update the xbmc/skin/project mayhem/pal/home.xml (or equivalent for your skin) to increase numbuttons by 1.
3. reboot xbox to show the skin change.
i hate to sound like a dummy, but when you say the "entire contents" of the xbmcmyth directory, do you mean the language, skin, and test folders as well or do i still drop those contents into the corresponding folders in the xbmc folder on the xbox? *i did both and both times, when i tried to run mythtvmain.py, it said it was running and then it does nothing. *i replaced version 0.15_fixed with the cvs and now nothing works (which isn't saying much yet as i have still to be able to watch anything, but i was at least able to get into the gui) *i also just copied the xbmcmyth folder the the xbmc\scripts folder on the xbox and that didn't work either. *i am using a build of xbmc from the 4th of february and the latest cvs of xbmcmyth. *my backend is mythtv 0.16. *one other question about the settings. *what exactly is the prefix path setting? *is that the share on the backend where the recordings reside?

thanks

madtw
2005-02-10, 02:38
ok, i guess i could have been clearer in my instructions. for step 1, i meant upload the xbmcmythtv directory and all sub directories to the xbmc/scripts. so the filesystem should look like:


xbmc/
scripts/
xbmcmythtv/
language/
skin/


within the scripts directory, you should have a subdirectory called xbmcmythtv and within that you would have the *.py files. under the xbmcmythtv directory, you would have a language directory and a skin directory.

note: you should *never* have to overwrite xbmc files with this installation method. if you find yourself overwriting files that came with xbmc, then you are doing something wrong and you will most likely mess up your xbmc install.

the old way of installing stuff into the xbmc directories made it more difficult to uninstall everything if you don't want to use the scripts.

technically speaking, you do not need to upload the contents of the "test" directory. the files in the directory are only used for emulation testing outside of xbmc. however, it won't hurt if you upload the test directory with everything else.

my current setup that works fine is a feb 3, 2005 build of xbmc, myth tv 0.16, and the latest cvs of xbmcmythtv.

the path prefix should be a string that can be prepended in front of the myth generated recording filenames (e.g. 1014_20040713103000_20040713110000.nuv) to access the files remotely for playback. the live prefix should be the prefix needed to access the dir where myth will generate the ringbuffer files. with my setup, these two directories happen to be the same. if you happen to share the directory using smb, then it should be a smb share path prefix.

if you use the special value '%h' somewhere in the path prefix, then the scripts will replace the '%h' with the hostname stored in the mythdatabase. this is in case you have multiple backends that record shows. this assumes the remote share name is the same on all hosts. if you only have one backend, you don't need to use the '%h' value - you can put in the hostname explicitly. (if your myth database has fully qualified domain names in the recorded.hostname column, then the scripts will strip the domain from the hostname before replacing %h. this was a bug/feature request from someone that had fqdn hostnames in myth but was sharing using netbios/smb and the fqdn was not the same as the netbios hostname.)

i should note that the prefix can begin with "smb://", "xns://", "xbms://" or anything else supported by xbmc. i have only tested with "smb://" but the others should work as well...

Loto_Bak
2005-02-12, 00:30
nice work madtw and dev crew
im excited to see the guide skinned up so i can test out live tv!

looks like mythtv 0.17 was released today. hopefully there arnt many protocol changes ;)

imthemp3king
2005-02-12, 19:03
i put an old version of xbmc on one of my xbox's and the 0.15_fixed xbmcmythtv in all the right locations. *it loads up ok, and i go to the recorded shows menu and press the green button to select the show i want to view, i hear some activity on the hard drive and then nothing. *i see no activity on the tv. *it freezes up on the selection i chose and i have to power off the xbox and then power it back on. *here is a snippet of the xbmc log file:
12-02-2005 11:03:19 info fillindefaulticon(aqtbrowser.py)
12-02-2005 11:03:19 info fillindefaulticon(eurotv.py)
12-02-2005 11:03:19 info fillindefaulticon(gamesaves.py)
12-02-2005 11:03:19 info fillindefaulticon(gametrailers.py)
12-02-2005 11:03:19 info fillindefaulticon(ifilmbrowser.py)
12-02-2005 11:03:19 info fillindefaulticon(xbmcmail.py)
12-02-2005 11:03:19 info fillindefaulticon(xsp 26 11 04 beta 1.py)
12-02-2005 11:03:19 info fillindefaulticon(data)
12-02-2005 11:03:19 info fillindefaulticon(eurotv)
12-02-2005 11:03:19 info fillindefaulticon(gamesaves)
12-02-2005 11:03:19 info fillindefaulticon(gametrailers)
12-02-2005 11:03:19 info fillindefaulticon(ifilmbrowser)
12-02-2005 11:03:19 info fillindefaulticon(images)
12-02-2005 11:03:19 info fillindefaulticon(launchbrowser)
12-02-2005 11:03:19 info fillindefaulticon(xbmcmythtv)
12-02-2005 11:03:19 info fillindefaulticon(mytv.py)
12-02-2005 11:03:19 info fillindefaulticon(mytvlivetv.py)
12-02-2005 11:03:19 info fillindefaulticon(mytvrecorded.py)
12-02-2005 11:03:19 info fillindefaulticon(mytvschedule.py)
12-02-2005 11:03:19 info fillindefaulticon(mytvscheduleshow.py)
12-02-2005 11:03:19 info fillindefaulticon(mytvsettings.py)
12-02-2005 11:03:19 info fillindefaulticon(mytvshow.py)
12-02-2005 11:03:19 info fillindefaulticon(mytvstatus.py)
12-02-2005 11:03:22 debug loadlibrarya('zlib.pyd')
12-02-2005 11:03:22 debug executing entrypoint at: 0xc484ff - dll: zlib.pyd
12-02-2005 11:03:22 debug loadlibrary('zlib.pyd') returning: 0x927540
12-02-2005 11:03:22 debug kernel32!getprocaddress(0x927540, 'initzlib') => 0xc42210
12-02-2005 11:03:23 info -->python initialized<--
12-02-2005 11:03:23 info
12-02-2005 11:03:23 info fillindefaulticon(aqtbrowser.py)
12-02-2005 11:03:23 info fillindefaulticon(eurotv.py)
12-02-2005 11:03:23 info fillindefaulticon(gamesaves.py)
12-02-2005 11:03:23 info fillindefaulticon(gametrailers.py)
12-02-2005 11:03:23 info fillindefaulticon(ifilmbrowser.py)
12-02-2005 11:03:23 info fillindefaulticon(xbmcmail.py)
12-02-2005 11:03:23 info fillindefaulticon(xsp 26 11 04 beta 1.py)
12-02-2005 11:03:23 debug loadlibrarya('_sre.pyd')
12-02-2005 11:03:23 info fillindefaulticon(data)
12-02-2005 11:03:23 info fillindefaulticon(eurotv)
12-02-2005 11:03:23 info fillindefaulticon(gamesaves)
12-02-2005 11:03:23 info fillindefaulticon(gametrailers)
12-02-2005 11:03:23 info fillindefaulticon(ifilmbrowser)
12-02-2005 11:03:23 info fillindefaulticon(images)
12-02-2005 11:03:23 info fillindefaulticon(launchbrowser)
12-02-2005 11:03:23 info fillindefaulticon(xbmcmythtv)
12-02-2005 11:03:23 debug executing entrypoint at: 0xc5a3cb - dll: _sre.pyd
12-02-2005 11:03:23 info fillindefaulticon(mytv.py)
12-02-2005 11:03:23 debug loadlibrary('_sre.pyd') returning: 0x9a7090
12-02-2005 11:03:23 info fillindefaulticon(mytvlivetv.py)
12-02-2005 11:03:23 debug kernel32!getprocaddress(0x9a7090, 'init_sre') => 0xc5a120
12-02-2005 11:03:23 info fillindefaulticon(mytvrecorded.py)
12-02-2005 11:03:23 info fillindefaulticon(mytvschedule.py)
12-02-2005 11:03:23 info fillindefaulticon(mytvscheduleshow.py)
12-02-2005 11:03:23 info fillindefaulticon(mytvsettings.py)
12-02-2005 11:03:23 info fillindefaulticon(mytvshow.py)
12-02-2005 11:03:23 info fillindefaulticon(mytvstatus.py)
12-02-2005 11:03:23 debug loadlibrarya('_ssl.pyd')
12-02-2005 11:03:23 debug executing entrypoint at: 0xcae951 - dll: _ssl.pyd
12-02-2005 11:03:23 debug loadlibrary('_ssl.pyd') returning: 0x96eb90
12-02-2005 11:03:23 debug kernel32!getprocaddress(0x96eb90, 'init_ssl') => 0xc61aa0
12-02-2005 11:03:26 error texture manager unable to load file: q:\skin\project mayhem\media\panel-settings.png
12-02-2005 11:03:26 error texture manager unable to load file: q:\skin\project mayhem\media\panel-settings.png
12-02-2005 11:04:07 info traceback (most recent call last):
12-02-2005 11:04:07 info * file "q:\scripts\mytvrecorded.py", line 260, in oncontrol
12-02-2005 11:04:07 info * * showdetails.init( self, self.rowinfo[rowindex] )
12-02-2005 11:04:07 info * file "q:\scripts\mytvshow.py", line 135, in init
12-02-2005 11:04:07 info * * gui.debug( \
12-02-2005 11:04:07 info * file "q:\python\lib\mythtv.py", line 398, in starttime
12-02-2005 11:04:07 info * * return ctime2mythtime(self.__data[11])
12-02-2005 11:04:07 info * file "q:\python\lib\mythtv.py", line 18, in ctime2mythtime

and here are the settins i have in xbmcmythtv
<mytv>
<host>10.0.0.10</host>
<database>mythconverg</database>
<port>3306</port>
<user>mythtv</user>
<password>mythtv</password>
<mythtvport>6543</mythtvport>
<mythtvstatusport>6544</mythtvstatusport>
<mythtvprotocol>13</mythtvprotocol>
<pathprefix>smb://10.0.0.10/recordings</pathprefix>
<livetvprefix>smb://10.0.0.10/buffer</livetvprefix>
<localcopypath>f:\videos\</localcopypath>
</mytv>

i have lowered the cache size on the xbox as well to 512k so it shouldn't take very long to begin playing video. *
thanks for all your help

madtw
2005-02-13, 08:54
i'm guessing it is a date formatting issue or perhaps a protocol issue in that the incorrect number of fields are being returned compared to what the code is expecting. i also had a number of lockups with 0.15_fixed, mythtv 0.16, and older versions of xbmc. i would recommend using the latest cvs... but you can always have a go at fixing the code in the older versions if you prefer to use that.

adjusting the video cache for the recorded shows is not as critical as it is for the live tv. the issue you are having is because of bugs in the code... not with your cache settings.

sgtstadanko
2005-02-13, 15:20
jhey guys. just upgraded from .16 tio ,17 on the myth side. went in changed the protocol to 14 in settings.xml, fired her up and she works great still. whats the status on "live tv" working?

thanks,
bill

walterb1
2005-02-13, 18:02
sorry to repeat this question but ..

i get an error:

error
(10057, socket is not connected)

i use mythtv 0.16
xbmc 2/3/05 build

mythtv is functional on my gentoo linux box 2.6.9-r1
all shares are available on the xbox.
any help is appreciated.
i am so close!!
thanks

sgtstadanko
2005-02-13, 19:44
jhey guys. just upgraded from .16 tio ,17 on the myth side. went in changed the protocol to 14 in settings.xml, fired her up and she works great still. whats the status on "live tv" working?

thanks,
bill
ok..with live tv i am digging around in the logs and have found a couple of problems. one, the settings.xml file, you have to put a trailing "/" after the livetv path to the backend. otherwise it doesn't parse the path to the ringbuffer file on the myth backend. no problem there just added one. however, xbmcmythtv is looking for the wrong ringbuffer name. in my case it is looking for "ringbuf3.nuv" when on the myth backend the file is named "ringbuf1.nuv" . i couldnt find where to edit this in the scripts to fix and i don't know if this is by design to use multiple backend tuners? also, in the xbmc.log i can see the following:
13-02-2005 11:17:08 info mplayer play:smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv cachesize:8192
13-02-2005 11:17:09 info flipping bi-directional subtitles disabled
13-02-2005 11:17:09 info stating file smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv.conf
13-02-2005 11:17:09 info stating file q:\mplayer\ringbuf3.nuv.conf
13-02-2005 11:17:09 error cmplayer::openfile() smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv failed
13-02-2005 11:17:15 debug freeing fs segment @ 0x8b1fc0
13-02-2005 11:17:15 info mplayer play:smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv cachesize:8192
13-02-2005 11:17:15 debug initializing fs_seg..
13-02-2005 11:17:15 debug fs segment @ 0xe30010
13-02-2005 11:17:15 info flipping bi-directional subtitles disabled
13-02-2005 11:17:15 info stating file smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv.conf
13-02-2005 11:17:15 info stating file q:\mplayer\ringbuf3.nuv.conf
13-02-2005 11:17:15 error cmplayer::openfile() smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv failed
13-02-2005 11:20:42 debug freeing fs segment @ 0xe30010
13-02-2005 11:20:42 info mplayer play:smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv cachesize:8192
13-02-2005 11:20:43 debug initializing fs_seg..
13-02-2005 11:20:43 debug fs segment @ 0xe30010
13-02-2005 11:20:43 info flipping bi-directional subtitles disabled
13-02-2005 11:20:43 info stating file smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv.conf
13-02-2005 11:20:43 info stating file q:\mplayer\ringbuf3.nuv.conf
13-02-2005 11:20:43 error cmplayer::openfile() smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv failed
13-02-2005 11:21:14 debug freeing fs segment @ 0xe30010
13-02-2005 11:21:14 info mplayer play:smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv cachesize:8192
13-02-2005 11:21:14 debug initializing fs_seg..
13-02-2005 11:21:14 debug fs segment @ 0xe30010
13-02-2005 11:21:14 info flipping bi-directional subtitles disabled
13-02-2005 11:21:14 info stating file smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv.conf
13-02-2005 11:21:14 info stating file q:\mplayer\ringbuf3.nuv.conf
13-02-2005 11:21:14 error cmplayer::openfile() smb://mythtv:xxxx@192.168.1.114/mythtv/tv/ringbuf3.nuv failed


no idea what this *.conf file is either. almost there so any help would be great...
bill

madtw
2005-02-14, 07:15
update to the latest cvs... i made some fixes this weekend (e.g. trailling slash, hostname expansion, etc). i also added in a new setting so that you can specify the mininum ring buffer size before the xbmc video player is launched. that way you can play around with the xbmc cache settings and the ring buffer minimum size until you reach a happy medium with caching of video versus time it takes to start playing live tv.

as for the wrong ring buffer filename problem you mentioned, i haven't had the problem with my setup. the script gets the name of the ringbuffer file from the myth backend so i'm a bit surprised that it gets this wrong. on my setup, the ring buffer filename is ringbuf7.nuv so we haven't hard coded the name of the ring buffer in the scripts. i'm not saying that the logic is correct in the script... but it isn't as simple as fixing a hard coded value. if you launch the mythtvlivetv.py script manually (i.e. not from mythtvmain.py). it will slow it down a lot but the screen will log all the myth protocol stuff to help in debugging.

the .conf stuff is xbmc behavior... i'm guessing you can specify configuration options for each video file if you like. so xbmc checks to see if such a file exists whenever it launches any video file.

madtw
2005-02-14, 07:24
i get an error:

error
(10057, socket is not connected)
ok, this problem means that the xbox was unable to connect to either the mythbackend or mysql server. there are many reasons why this might be the case but here are some suggestions:

1. make sure you entered a fully qualified domain name for your backend server or the correct ip address. a name like 'banshee' will not work because the dns lookup on the xbox requires a fqdn to work. instead you will have to specify something like "banshee.house.net" or "10.1.2.3".
2. make sure all the server port numbers are correct.
3. make sure the mythbackend is running and the mysql database is up.
4. this might be obvious but make sure your xbox is connected to the network and is getting an ip address on your lan. (this should be the case since you said your shares were working.)

mirth
2005-02-14, 23:58
<snip>
error
(10057, socket is not connected)
</snip>
i had this problem before. i provided a post a while back in the thread, but here is my solution:

mysql isn't automatically configured listen for network connections. i had to edit /etc/mysql/my.cnf and edit out the skip-networking line and then restart mysqld.

beef
2005-02-15, 00:44
this clearly rocks and since you all know what you are talking about im gonna ask my question right here, hope thats ok.

i have an 2000 server as fileserver atm and was thinking of making it my new stream-comp/digitalvcr. (was hoping to keep running 2k server if possible)
all i want to know is what analog tv-turnercard you all recommend. ive seen so many different and id like to make the right choice right away so it will save me time later.

ex. a analog tv-turnercard that is compatible with the program needed to control the whole thing from my xboxes.

id appreciate all response to my reply, and o man i cant wait til i get it up and running so i can contribute to this thread for real.

cheers guys and keep up the grand work.

/beef

ps. what's the correct name of the program and the plugin that i need on the serverside?

sgtstadanko
2005-02-15, 03:45
update to the latest cvs... i made some fixes this weekend (e.g. trailling slash, hostname expansion, etc). i also added in a new setting so that you can specify the mininum ring buffer size before the xbmc video player is launched. that way you can play around with the xbmc cache settings and the ring buffer minimum size until you reach a happy medium with caching of video versus time it takes to start playing live tv.

as for the wrong ring buffer filename problem you mentioned, i haven't had the problem with my setup. the script gets the name of the ringbuffer file from the myth backend so i'm a bit surprised that it gets this wrong. on my setup, the ring buffer filename is ringbuf7.nuv so we haven't hard coded the name of the ring buffer in the scripts. i'm not saying that the logic is correct in the script... but it isn't as simple as fixing a hard coded value. if you launch the mythtvlivetv.py script manually (i.e. not from mythtvmain.py). it will slow it down a lot but the screen will log all the myth protocol stuff to help in debugging.

the .conf stuff is xbmc behavior... i'm guessing you can specify configuration options for each video file if you like. so xbmc checks to see if such a file exists whenever it launches any video file.

ok..loaded up the latest cvs and ran live tv. it still plays for like maybe 2 seconds before dropping back to the tv listings. here is what i am getting in my backend log during the event:
2005-02-14 19:39:51.788 adding: xbox as a client (events: 0)
2005-02-14 19:40:37.440 changing from none to watchinglivetv
waited too long for recorder to pause
changing to 7
[1] 24580
2005-02-14 19:40:39.571 ret_pid(24579) child(24579) status(0x0)
2005-02-14 19:40:39.573 external tuning program exited with no error
2005-02-14 19:40:45.537 changing from watchinglivetv to none
2005-02-14 19:40:46.180 unknown socket
2005-02-14 19:40:48.755 mainserver::handleannounce playback
2005-02-14 19:40:48.756 adding: xbox as a client (events: 0)
2005-02-14 19:40:48.780 changing from none to watchinglivetv
waited too long for recorder to pause
changing to 7
[1] 24590
2005-02-14 19:40:50.919 ret_pid(24589) child(24589) status(0x0)
2005-02-14 19:40:50.920 external tuning program exited with no error
2005-02-14 19:40:55.669 changing from watchinglivetv to none
2005-02-14 19:40:56.530 mainserver::handleannounce playback
2005-02-14 19:40:56.531 adding: xbox as a client (events: 0)
2005-02-14 19:40:56.553 changing from none to watchinglivetv
waited too long for recorder to pause


when i run mythtvlivetv.py from the scripts folder, it crashes xbmc with:

14-02-2005 19:41:09 warning emergency recovery console starting...
14-02-2005 19:41:09 fatal xbmc fatal error:
14-02-2005 19:41:09 fatal exception_access_violation (0xc0000005)
14-02-2005 19:41:09 fatal at 0x002125b7

yikes....

h

any ideas on how to keep it from dropping out?

madtw
2005-02-15, 07:27
i had some dropout problems initially. i ended up setting up the minimum ring buffer size to 750000 bytes. also, i went into the xbmc cache settings (under system) and adjusted the following:

video cache - dvd rom 8192kb
- local 1024kb
- internet 1024kb
unknown type cache - internet 1024kb

i didn't try playing around to figure out which one was used for myth... but i'm guessing it is just the local one. (note: i didn't actually change the dvd rom setting - this was the default that came with xbmc.)

if you still get drop outs, try increasing the min ring buffer size past 1024kb (e.g. 2097152). that way the scripts will wait until the ring buffer is 2mb in size before xbmc tries to cache 1mb from the beginning.

sgtstadanko
2005-02-15, 13:53
woohoo...that did it. thanks madtw :kickass:

madtw
2005-02-15, 17:33
this clearly rocks and since you all know what you are talking about im gonna ask my question right here, hope thats ok.

i have an 2000 server as fileserver atm and was thinking of making it my new stream-comp/digitalvcr. (was hoping to keep running 2k server if possible)
all i want to know is what analog tv-turnercard you all recommend. ive seen so many different and id like to make the right choice right away so it will save me time later.

ex. a analog tv-turnercard that is compatible with the program needed to control the whole thing from my xboxes.

id appreciate all response to my reply, and o man i cant wait til i get it up and running so i can contribute to this thread for real.

cheers guys and keep up the grand work.

/beef

ps. what's the correct name of the program and the plugin that i need on the serverside?
the program we're using is myth tv (http://www.mythtv.org). as far as i know, it does not run on windows 2000 yet although there may be an effort to port it. you don't need any additional plugins to use the xbmcmythtv python scripts for xbmc with a myth tv backend.

as for cards, i can't really tell you what is the best... but i can tell you that i have a hauppauge pvr 250 that works really well for me because it encodes directly to mpeg-2 in hardware. other people that have bought cards that require software encoding have had problems playing back the files without first transcoding them to some other format. also, a hardware encoding card reduces the cpu load on the server.

if you want to stick with windows 2000, then there are other solutions that might be supported by xbmc. i don't know a whole lot about them but you can look into realtv, snapstream (there may be others as well).

sgtstadanko
2005-02-15, 23:51
you should give media portal http://mediaportal.sourceforge.net a try. i have used it on windoze and it works pretty good. has a mceish interface. i use it on my notebook which has an avermedia 2 usb tv card. i agree with madtw though on the card. for my money the pvr250 by hauppage has rocked. it does all the encoding on the card and only uses like 2-5% cpu. it a little on the pricey side, but worth it.

also, check here http://www.xpmce.com for windows media/tv stuff. lots o hardware and setup discussion.

you should give mythtv a try though. setup is pretty easy if you use the knoppix disto. all comes on the cd, just boot and answer questions...(more or less)

smurf2
2005-02-16, 05:02
could some one put up the a link to the current cvs

bubbajoebob
2005-02-16, 05:36
cvs information --> http://sourceforge.net/cvs/?group_id=128346

ego093
2005-02-16, 06:08
first off y'all - wow. i'm really impressed that you all pulled this off, and as quickly as you did. i bought an xbox to do just this sort of thing, and you've made my week.

now... i'm one of the unlucky souls who purchased a wintv card (which works great in myth) who is stuck with software encoding. while the patched mplayer.dll sort of works (ya - ffw and rw are weird!), it obviously isn't perfect and often times drops playback altogether.

so, i'm thinking that i would like to go the transcode route, but haven't been able to figure out how that works in myth and what tools to use. my question is: for those folks who have found a work-around, what have you done and how do you get it going?

again - great work, all.

madtw
2005-02-17, 03:01
so, i'm thinking that i would like to go the transcode route, but haven't been able to figure out how that works in myth and what tools to use. my question is: for those folks who have found a work-around, what have you done and how do you get it going?
a friend that has a card that requires software encoding uses nuvexport... at the moment, this is a manual process but there must be a way to automate it. that's about all i know about this though...

bone450
2005-02-18, 22:37
recently finished getting mythtv working on my linux box and have been trying to get a frontend working on my xbox. i am glad i came across this page, because running linux on my xbox wasn't going as well as i planned. when this becomes fully functional, xbmc will become the ultimate home theater center piece. i allready think it is, but now with ability to record and watch live tv from xbmc, it is getting even better. can't wait to play with these scripts when i get home.

smurf2
2005-02-19, 04:08
cvs information --> http://sourceforge.net/cvs/?group_id=128346

i can't seem to get to this page been trying for a few days now :-\

is there any where else i can get a newer script than 15.1

i just upgraded to mythtv 0.17 so all i can do on my xboxen's is watch recorded shows :-\

ArtVandelay3
2005-02-19, 04:23
how in the world do you install this script from "cvs"? i've been using it for months (thanks madtw!) but i'd like to try a newer version. i installed tortoisecvs, but have no idea how to download anything. it kept asking for a password. can anyone point me in the right direction?

smurf2
2005-02-19, 06:04
duh i am really blonde
sorry i got to the cvs site .it would seem that protowall was blocking the sourceforge domain for soem reason

i have installed it am looking at how to get it running

thanx :)