xbmc.Player().play any alternative?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Geremia Offline
Junior Member
Posts: 7
Joined: May 2004
Reputation: 0
Post: #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:dreambox@192.168.2.97:31339/200,28a
00:50:26 m: 27844608    info: get header url: http://root:dreambox@192.168.2.97:31339/200,28a
00:50:29 m: 27807744   error: invalid reply from server
00:50:29 m: 27865088  notice: url http://root:dreambox@192.168.2.97: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:dreambox@192.168.2.97: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:dreambox@192.168.2.97:31339/200,28a cachesize:2048

thanks for any advice, and excuse my poor techical language.
find quote
thor918 Offline
Fan
Posts: 363
Joined: Jun 2004
Reputation: 0
Location: Norway
Post: #2
try to make a temp playlist file using python
with your url as a playlist item, and then execute that playlist.
find quote
Geremia Offline
Junior Member
Posts: 7
Joined: May 2004
Reputation: 0
Post: #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()
find quote
thor918 Offline
Fan
Posts: 363
Joined: Jun 2004
Reputation: 0
Location: Norway
Post: #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
find quote
Geremia Offline
Junior Member
Posts: 7
Joined: May 2004
Reputation: 0
Post: #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.
find quote
thor918 Offline
Fan
Posts: 363
Joined: Jun 2004
Reputation: 0
Location: Norway
Post: #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?
find quote
Geremia Offline
Junior Member
Posts: 7
Joined: May 2004
Reputation: 0
Post: #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
find quote
thor918 Offline
Fan
Posts: 363
Joined: Jun 2004
Reputation: 0
Location: Norway
Post: #8
have you checked python error output?
you can get it by pushing the white controller button when you are in scripts at xbmc.
find quote
Geremia Offline
Junior Member
Posts: 7
Joined: May 2004
Reputation: 0
Post: #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.
find quote
frooby Offline
Junior Member
Posts: 16
Joined: Jan 2005
Reputation: 0
Post: #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
find quote
Post Reply