xbmc.Player().play any alternative?
#1
hi all,

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:[email protected]:31339/200,28a
00:50:26 m: 27844608    info: get header url: http://root:[email protected]:31339/200,28a
00:50:29 m: 27807744   error: invalid reply from server
00:50:29 m: 27865088  notice: url http://root:[email protected]:31339/200,28a not found

i don't know how to skip this, because xbmc.player have not so many possibilities

after that:

00:50:29 m: 27844608   debug: cplayercorefactor::getplayers(http://root:[email protected]: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:[email protected]:31339/200,28a cachesize:2048

thanks for any advice, and excuse my poor techical language.



Reply
#2
try to make a temp playlist file using python
with your url as a playlist item, and then execute that playlist.
Reply
#3
i already quickly tried but nothing happens, maybe i miss something.
should this be correct?

xbmc.playlist(xbmc.playlist_video).clear()
xbmc.playlist(xbmc.playlist_video).add(url)
xbmc.player(xbmc.player_core_mplayer).play()



Reply
#4
i was thinking on doing it a little more simple
using xbmcbuiltin to execute the playlist.
http://manual.xboxmediacenter.de/wakka.p....s&v=98v

and make the playlist, just adding url as text to a textfile using python. save the file as a playlist file-extencion



Reply
#5
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.
Reply
#6
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?
Reply
#7
stream = 'f:\apps\xbmc\sega.strm'

xbmc.player(xbmc.player_core_mplayer).play(stream)

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 = ')'

xbmc.executebuiltin(str(sega1+myurl+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.

thanks again
Reply
#8
have you checked python error output?
you can get it by pushing the white controller button when you are in scripts at xbmc.
Reply
#9
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.
Reply
#10
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. Smile
Reply
#11
np with newer xbmc, i added   <loglevel>0</loglevel>  in main config file as before, but same situation:

if i xbmc.player().play(url) the log starts with:

00:50:26 m: 27844608    info: loading web playlist http://root:[email protected]:31339/200,28a

if i insert the url into a textfile renamed something.m3u or .pls or .strm and i do
stream = 'f:\\sega.strm'
xbmc.player().play(str(stream)) i dont see anything in log (level 0) and nothing happens.
to be sure, if i set
stream = 'f:\\something.avi'
it plays the video, so i don't know what's wrong with my sega.strm, if i play in xbmc it plays

may i add something in python to log something more?



Reply

Logout Mark Read Team Forum Stats Members Help
xbmc.Player().play any alternative?0