xbmc.Player().play any alternative? - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: xbmc.Player().play any alternative? (/showthread.php?tid=19816)
Pages: 1 2
- Geremia - 2006-05-05 23:29
i'm not good in scripting, i just want to tweak dreambox.tv script to be more faster, but as far as i can understand, xbmc.player().play(url) it's too slow to process in case of http streams, because i see in logs that xbmc consider the url a playlist and not simply a file to open:
0:50:26 m: 27844608 info: loading web playlist http://root:firstname.lastname@example.org:31339/200,28a
00:50:26 m: 27844608 info: get header url: http://root:email@example.com:31339/200,28a
00:50:29 m: 27807744 error: invalid reply from server
00:50:29 m: 27865088 notice: url http://root:firstname.lastname@example.org:31339/200,28a not found
i don't know how to skip this, because xbmc.player have not so many possibilities
00:50:29 m: 27844608 debug: cplayercorefactor::getplayers(http://root:email@example.com:31339/200,28a)
this i already skipped forcing the use of mplayer with xbmc.player(xbmc.player_core_mplayer).
my question: is there a way in python script to start directly mplayer?
i mean, i just want this to happen directly:
00:50:33 m: 26714112 info: mplayer play:http://root:firstname.lastname@example.org:31339/200,28a cachesize:2048
thanks for any advice, and excuse my poor techical language.
- thor918 - 2006-05-06 12:54
try to make a temp playlist file using python
with your url as a playlist item, and then execute that playlist.
- Geremia - 2006-05-06 13:59
i already quickly tried but nothing happens, maybe i miss something.
should this be correct?
- thor918 - 2006-05-06 15:25
i was thinking on doing it a little more simple
using xbmcbuiltin to execute the playlist.
and make the playlist, just adding url as text to a textfile using python. save the file as a playlist file-extencion
- Geremia - 2006-05-06 20:33
thanks, this is interesting, i'll try to execute the builtin xbmc.playmedia(media).
btw, i tried a xbmc.player().play('mylist.pls') but nothing happens in log, don't know if i'm too poor in coding or if python 2.4 problem.
- thor918 - 2006-05-06 22:36
you didn't spesify where playlistfile where located.
i guess if it's not spesified, it will look in the root of xbmc folder for it.
are you sure it is there?
- Geremia - 2006-05-06 23:07
stream = 'f:\apps\xbmc\sega.strm'
tried f:\apps\xbmc\sega.strm or f:\\apps\\xbmc\\sega.strm or q:\\stream.strm but nothing happens. if i start sega.strm manually in xbmc it plays.
tried also xbmc.player(xbmc.player_core_mplayer).play(str(stream))
where am i wrong?!?!?!
tried the executebuiltin and it works
sega1 = 'xbmc.playmedia('
sega2 = ')'
..anyway this way i can't select directly the mplayer core, so a waste of time for xbmc to determine what player to use
how can i manage the xbmc.playlist correctly? have you some real example? i haven't understand it very well.
- thor918 - 2006-05-06 23:25
have you checked python error output?
you can get it by pushing the white controller button when you are in scripts at xbmc.
- Geremia - 2006-05-07 00:21
the log is the same i get with xbmc loglevel 0, nothing more.
i think i'll try with xbmc.playlist but i don't have any example to look at.
- frooby - 2006-05-07 23:58
Quote:the log is the same i get with xbmc loglevel 0, nothing more.if you are using a release after 02/05 don't forget you need to move most of you settings (like loglevel) from xboxmediacenter.xml to userdata/advancedsettings.xml else yes it won't log anything. there's an entry in the wiki about advancedsettings.xml and all the options. log levels have changed so i think you want to just use level 1. i am sure someone will correct me if i'm wrong.