View Full Version : [RELEASE] Myth2XBMC Script for Xbox (Stream Live TV from MythTV to XBMC for Xbox)
Myth2XBMC is heavily based on the original xbmc-mythtv script. I started modifying it quite awhile back and have been using it at home on 3 Xboxes. I decided to update and release it since MythBox doesn't work on the XBOX.
This is for XBOX only since I haven't had time to look at any other platforms... and since MythBox is available for them. Let me know if you have any problems.
http://code.google.com/p/myth2xbmc/downloads/list
Requires a recent build of XBMC. I have it working with the latest T3CH build. The script uses the new special:// directory changes to get the XBMC cache size to use for LiveTV. Otherwise you would need to set your XBMC Video Lan cache to 1024K or less (because I default to 1024K if have trouble getting the XBMC value). Not doing this results in Live TV not starting or stopping quickly because the player trys to read enough for the cache and if the live tv file isn't that big yet the player reaches the end of the file.
Known Problems:
I haven't been able to get Commercial skipping working right for my SD digital mpeg recordings. Seems like a bug with MPlayer that seekTime doesn't seek correctly for the SD digital recordings, but analog recordings seem to seek correctly.
**** This uses the player you have set in default for XBMC, I prefer MPlayer since DVDPlayer skips are so slow ****
NOTE: I do not have a ton of time to work on this so don't expect me to check back here more than once a day (usually in the evenings).
iRoNBiLL
2009-03-10, 22:00
This script is compatible only for Xbox I'm assuming since it didn't work on Windows. Just looking to confirm this, thanks.
iRoNBiLL
THIS IS PRIMARILY FOR XBOX! However, I have made some fixes to the original code and I noticed it loads under windows now, however it doesn't play the files with settings path set to smb://....
You can however change the settings path to something like myth://192.168.11.2/recordings and it will play as long as the native XBMC myth:// protocol works on your system. Change the 192.168.11.2 to your myth server. you have to have shared the recordings on the server.
Not sure what the deal is with smb:// on windows.
You can also use myth:// on xbox but I have found smb:// to be more responsive to skip forward/back, etc.
This is great, thank you for this.
Working perfectly with my mythbuntu 8.10 back end with two nova-t 500
I have also uploaded the changes I made to Project Mayhem III skin that includes a TV button that starts myth2xbmc. When you unzip ProjectMayhemIII_chg1.zip it would go under the XBMC directory and replaces a few files under XBMC/skin/Project Mayhem III: home.xml under Pal and Pal16x9 for the TV button, and font.xml under NTSC makes the fonts bigger for standard TVs like my 27" TV. You can find it at: http://code.google.com/p/myth2xbmc/downloads/list
sounds like great work:-)
seems i need to sort out my mythubunto install problems, and soon.
Dam0
Getting this to work for XBMC windows with Aeon Auriga would rock my world... :)
analogue
2009-04-25, 19:37
Getting this to work for XBMC windows with Aeon Auriga would rock my world... :)
check my sig for windows compatible fork
Found a strange bug
On my Mythbuntu 9.04 machine, when i do a scan on Freeview (UK DVB) some of my channels get strange high numbers which I have to manually reset to the correct numbers.
If I do this, the guide on a mythfrontend shows the correct content but the guide on this XBMC script shows no guide data available.
Any ideas?
Is it just the Guide that has a problem? (ie does LiveTV show the correct channels and/or programs?)
first of all nice work,
I'm getting troubles with the script and my mysql database on a xbox, it says something like database connection failed unable to continue, but I check the same configuration information and it works from mythbox script on a windows box, where i can check logs?
Change the logLevel in default.py. Probably want to set
logLevel = mythutil.LOG_MYTH | mythutil.LOG_GUI
Then look in myth2xbmc.log in the myth2xbmc directory.
I think the mysql client version is the problem, the log says:
DEBUG:root:[30] 2008-02-03 01:53:58.722000 myth.Database.initialize() ERROR: Client does not support authentication protocol requested by server; consider upgrading MySQL client
DEBUG:root:[29] 2008-02-03 01:53:58.728000 < myth.Database.initialize()
DEBUG:root:[29] 2008-02-03 01:54:00.718000 MythMain.refresh ERROR: conn
I'm using mysql 5.0.51a-3ubuntu5.1 as database, do you know if there is an updated py client?
After some googling i've find that is a password version problem, to resolve the issue i've modified user password with the following mysql command:
SET PASSWORD FOR '<xbmc_user>'@'%' = OLD_PASSWORD('<xbmc_password>');
And it start working :)
Upss another problem, Live Tv seems not working properly, and tv guide also, i get this on myth2xbmc log:
DEBUG:root:[29] 2009-06-12 11:44:21.293000 < MythMain.loadPage(2)
DEBUG:root:[29] 2009-06-12 11:44:21.295000 < MythMain.loadAction(main_recorded_shows) returning 1
DEBUG:root:[29] 2009-06-12 11:44:21.296000 < MythMain.onControlHook(<xbmcgui.ControlButton object at 0x013B3800>)
DEBUG:root:[29] 2009-06-12 11:44:36.814000 > MythMain.onControlHook(<xbmcgui.ControlButton object at 0x013B3720>)
DEBUG:root:[29] 2009-06-12 11:44:36.815000 > MythMain.loadAction(main_live_tv)
DEBUG:root:[29] 2009-06-12 11:44:36.816000 > MythMain.loadPage(1)
DEBUG:root:[29] 2009-06-12 11:44:37.113000 > mythlivetv.showWindow()
DEBUG:root:[29] 2009-06-12 11:44:37.131000 > mythlivetv.__init__
DEBUG:root:[29] 2009-06-12 11:44:37.133000 < mythlivetv.__init__
DEBUG:root:[28] 2009-06-12 11:44:39.092000 > mythlivetv.loadPrograms()
DEBUG:root:[28] 2009-06-12 11:44:39.094000 < mythlivetv.checkConnections()
DEBUG:root:[28] 2009-06-12 11:44:39.096000 > myth.getChannelList
DEBUG:root:[28] 2009-06-12 11:44:39.133000 < myth.getChannelList
DEBUG:root:[28] 2009-06-12 11:44:39.135000 > mythlivetv.fixChannelList()
DEBUG:root:[28] 2009-06-12 11:44:39.137000 < mythlivetv.fixChannelList()
DEBUG:root:[28] 2009-06-12 11:44:39.138000 > myth.getProgramListings
DEBUG:root:[28] 2009-06-12 11:44:39.258000 < myth.getProgramListings
DEBUG:root:[28] 2009-06-12 11:44:39.260000 > mythlivetv.fixProgramList()
DEBUG:root:[28] 2009-06-12 11:44:39.274000 < mythlivetv.fixProgramList()
DEBUG:root:[28] 2009-06-12 11:44:39.611000 loadPrograms() exception: list index out of range
DEBUG:root:[28] 2009-06-12 11:44:39.614000 MythMain.loadPage(1) ERROR: list index out of range
DEBUG:root:[28] 2009-06-12 11:44:39.631000 < MythMain.loadAction(main_live_tv) returning 1
DEBUG:root:[28] 2009-06-12 11:44:39.634000 < MythMain.onControlHook(<xbmcgui.ControlButton object at 0x013B3720>)
DEBUG:root:[29] 2009-06-12 11:44:44.474000 > MythMain.onControlHook(<xbmcgui.ControlButton object at 0x013B3720>)
DEBUG:root:[29] 2009-06-12 11:44:44.475000 > MythMain.loadAction(main_live_tv)
DEBUG:root:[29] 2009-06-12 11:44:44.476000 > MythMain.loadPage(1)
DEBUG:root:[28] 2009-06-12 11:44:44.771000 > mythlivetv.showWindow()
DEBUG:root:[28] 2009-06-12 11:44:44.791000 > mythlivetv.__init__
DEBUG:root:[28] 2009-06-12 11:44:44.794000 < mythlivetv.__init__
DEBUG:root:[28] 2009-06-12 11:44:46.791000 > mythlivetv.loadPrograms()
DEBUG:root:[28] 2009-06-12 11:44:46.794000 < mythlivetv.checkConnections()
DEBUG:root:[28] 2009-06-12 11:44:46.796000 > myth.getChannelList
DEBUG:root:[28] 2009-06-12 11:44:46.831000 < myth.getChannelList
DEBUG:root:[28] 2009-06-12 11:44:46.834000 > mythlivetv.fixChannelList()
DEBUG:root:[28] 2009-06-12 11:44:46.836000 < mythlivetv.fixChannelList()
DEBUG:root:[28] 2009-06-12 11:44:46.837000 > myth.getProgramListings
DEBUG:root:[28] 2009-06-12 11:44:46.958000 < myth.getProgramListings
DEBUG:root:[28] 2009-06-12 11:44:46.959000 > mythlivetv.fixProgramList()
DEBUG:root:[28] 2009-06-12 11:44:46.972000 < mythlivetv.fixProgramList()
DEBUG:root:[28] 2009-06-12 11:44:47.291000 loadPrograms() exception: list index out of range
DEBUG:root:[28] 2009-06-12 11:44:47.294000 MythMain.loadPage(1) ERROR: list index out of range
DEBUG:root:[28] 2009-06-12 11:44:47.312000 < MythMain.loadAction(main_live_tv) returning 1
DEBUG:root:[28] 2009-06-12 11:44:47.314000 < MythMain.onControlHook(<xbmcgui.ControlButton object at 0x013B3720>)
any idea?
After i manually adjust the numbers, the program details are available in live TV but not in the guide. Strange.
For jurr's problem, I am guessing that no channels were found. The log should show you what the SQL response was for the SQL query:
SELECT
c.chanid as chanid,
c.channum as channum,
c.callsign as callsign,
c.name as name,
c.icon as icon
FROM
channel c
WHERE
c.channum IS NOT NULL
AND c.channum != ""
AND c.visible = 1
ORDER BY
c.chanid
After i manually adjust the numbers, the program details are available in live TV but not in the guide. Strange.
Try turning on logging by editing default.py:
logLevel = mythutil.LOG_MYTH | mythutil.LOG_GUI
and see if there is an error.
hello teresa,
The sql query returns all my channels, but yesterday i change the channel num because i had change them to put in order. I put as channel number the channel id and then i substract 1000. And with this change the guide data works fine :). Also the live tv start working :) but it seems that when i click on the remote controller the stop button the tv turner still recording and i need to restart mythbackend to free the turner, but if i click on the next button it stop fine. Any idea?
One final question, Are you planning to add the record options that mythtv has? i.e. record allways, record one weekly,...
Thanks in advance
The stop button works fine for me for stopping the recording so not sure what is happening with your setup. Check the log for any errors.
There already is functionality for the recording options.... but I don't use it. I use MythWeb on my laptop for scheduling recordings... I find it much easier.
Mighty Duck
2009-09-27, 15:02
Hi Teresa,
I like the changes you made to the original code and would like to use your script. However as stated above, I also have the problem that not all of the program guide information is visible.
Live TV is working fine for all the channels: can start it and watch tv, the channels are sorted and the current info is displayed
Recording channels however has a problem. Not all of the channels are displaying the information (order is correct).
Can you help (I don't see any error reported in the log file).
Are you missing the channel completely in the Program Guide list? Or does it list the channel number but not the guide info for it?
Mighty Duck
2009-09-28, 09:16
Thx for your quick response.
Nope, the channel is in the list, but no data is available. If I use the old script it shows the data (but the channels aren't sorted).
The odd thing is: some channels show the EPG data, most not (which is for the analog cable tuner). All digital sat channels don't show the info (but channels are visible).
If I select the live TV option, all channels are visible and all channels show the current data (so both: cable as well as sat).
??
I have uploaded a new version that I think will fix your issue. It is a quick fix and may cause paging up and down to be a bit slower but I tested on my xbox and doesn't seem much slower. If I have a chance I may go back and try to speed it up... but I don't use the program guide much at all.
Mighty Duck
2009-09-30, 14:09
Hi Teresa,
Sorry for the late response: works perfectly. Thx for the good work.
I know for sure, there are still a lot of xbox fans using the script.
Just tried your script and got suprised to hear my xbox harddrive writing/reading like crazy when navigating up&down the Live TV list (my channels).
For each tic up/down it is an short (but intense) burst read/write from the hard drive.
Funny: try holding in the LT or RT as little as you can, that will give you an pretty slow scroll, but alot of harddrive noise.
So, what's up with that?
Sorry, I haven't noticed any excessive hd noise with my xbox on livetv scrolling.
Sorry, I haven't noticed any excessive hd noise with my xbox on livetv scrolling.
So perhaps you have a silent hdd. Still I wonder why all that info is written/readen when going up&down.
Actually... If you do as I say and use the LT or RT you can fool the script beliving it changed row and making the reading/writing thing.
So how is the navigation built? Caching any info at all? Using index? etc etc
Ignore me if you feel that it's nothing to bother about. I will not try fix any code myself. Just giving some info about my findings
The only thing going on in LiveTV when scrolling or moving the cursor up/down is populating the show details for the currently selected program. I am not sure what you mean by LT and RT but I use a universal remote so may not have all the same buttons.
I am not sure what you mean by LT and RT but I use a universal remote so may not have all the same buttons.
Left Trigger / Right Trigger... on the xbox controller
There is a new version of myth2xbmc that supports mythtv .22 protocol 50. Might have a few bugs yet but initial testing looks ok. It has not been tested with mythtv .21 protocol 40.
http://code.google.com/p/myth2xbmc/downloads/list
I just updated this script to fix an issue with the latest XBMC SVN.
http://code.google.com/p/myth2xbmc/downloads/list