Player.play(url) problem
#1
Hi everybody, I have first time in there. I am started to develop my addon in python language, and I have one trouble on play method maybe anyone can help?

I use this like of method:

....
....
Code:
xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, listitem)

for starting play video from url. it works fine but when I have the spaces in world param it cannot play the video, I tried to use urllib.quote, tried to replace spaces with %20 but it doesn't help to play video.

Please if you have any practice help me?[/php]
Reply
#2
urlencode the url?
Reply
#3
yes I tried urlencode also. but without result . . .
Reply
#4
then check the log. You didn't provide enough details for us to help you further
Reply
#5
and this is the check log of on click play button: look at it maybe you can HELPHuh

16:34:45 T:140701401978816 NOTICE: DVDPlayer: Opening: http://site_url/mp4/Sherlock/Season3/Sherlock. S03E03 (2013, HDTVRip).mp4
16:34:45 T:140701401978816 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
16:34:45 T:140701401978816 DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
16:34:45 T:140701401978816 DEBUG: LinuxRendererGL: Cleaning up GL resources
16:34:45 T:140701401978816 DEBUG: CLinuxRendererGL:TonguereInit - precision of luminance 16 is 16
16:34:45 T:140700975597312 NOTICE: Thread DVDPlayer start, auto delete: false
16:34:45 T:140700975597312 NOTICE: Creating InputStream
16:34:45 T:140700975597312 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://site_url/mp4/Sherlock/Season3/Sherlock. S03E03 (2013, HDTVRip).mp4
16:34:45 T:140700975597312 DEBUG: CCurlFile::GetMimeType - http://site_url/mp4/Sherlock/Season3/Sherlock. S03E03 (2013, HDTVRip).mp4 -> failed
16:34:45 T:140700975597312 DEBUG: CFileCache::Open - opening <mp4/Sherlock/Season3/Sherlock. S03E03 (2013, HDTVRip).mp4> using cache
16:34:45 T:140700975597312 DEBUG: CurlFile::Open(0x7ff74c0ec8b0) http://site_url/mp4/Sherlock/Season3/Sherlock. S03E03 (2013, HDTVRip).mp4
16:34:45 T:140701401978816 DEBUG: ------ Window Init (DialogBusy.xml) ------
16:34:46 T:140700975597312 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 400
16:34:46 T:140700975597312 NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
16:34:46 T:140700975597312 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 400
16:34:46 T:140700975597312 ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
16:34:46 T:140700975597312 ERROR: Open - failed to open source <http://site_url/mp4/Sherlock/Season3/Sherlock. S03E03 (2013, HDTVRip).mp4>
16:34:46 T:140700975597312 ERROR: CDVDPlayer::OpenInputStream - error opening [http://site_url/mp4/Sherlock/Season3/Sherlock. S03E03 (2013, HDTVRip).mp4]
16:34:46 T:140700975597312 NOTICE: CDVDPlayer::OnExit()
16:34:46 T:140700975597312 DEBUG: OnPlayBackStopped: play state was 1, starting 1
16:34:46 T:140700975597312 DEBUG: Thread DVDPlayer 140700975597312 terminating
16:34:46 T:140701401978816 DEBUG: OnPlayBackStopped: play state was 3, starting 0
16:34:46 T:140701401978816 DEBUG: CAnnouncementManager - Announcement: OnStop from xbmc
16:34:46 T:140701401978816 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnStop
16:34:46 T:140701401978816 NOTICE: CDVDPlayer::CloseFile()
16:34:46 T:140701401978816 NOTICE: DVDPlayer: waiting for threads to exit
16:34:46 T:140701401978816 NOTICE: DVDPlayer: finished waiting
16:34:46 T:140701401978816 DEBUG: LinuxRendererGL: Cleaning up GL resources
16:34:46 T:140701401978816 NOTICE: CDVDPlayer::CloseFile()
16:34:46 T:140701401978816 NOTICE: DVDPlayer: waiting for threads to exit
16:34:46 T:140701401978816 NOTICE: DVDPlayer: finished waiting
16:34:46 T:140701401978816 DEBUG: LinuxRendererGL: Cleaning up GL resources
16:34:46 T:140701401978816 DEBUG: ------ Window Deinit (DialogBusy.xml) ------
16:34:46 T:140700352071424 DEBUG: DoWork - Saving file state for video item http://site_url/mp4/Sherlock/Season3/Sherlock. S03E03 (2013, HDTVRip).mp4
16:35:07 T:140701401978816 INFO: CheckIdle - Closing session to http://site_url (easy=0x7ff74c136ca0, multi=0x7ff74c0510f0)
16:35:09 T:140701401978816 DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-x86_64-linux.so)
16:35:09 T:140701401978816 DEBUG: Unloading: /ImageLib-x86_64-linux.so
16:35:16 T:140701401978816 INFO: CheckIdle - Closing session to http://site_url (easy=0x48347b0, multi=0x7ff74009e630)
16:35:16 T:140700593223424 DEBUG: Thread JobWorker 140700593223424 terminating (autodelete)
16:35:16 T:140700352071424 DEBUG: Thread JobWorker 140700352071424 terminating (autodelete)
Reply
#6
Code:
url = url.replace(' ' , '%20')
Reply
#7
no replace spaces with %20 doesn't help, look:

10:29:05 T:140201440020416 DEBUG: Keyboard: scancode: 0x40, sym: 0x0134, unicode: 0x0000, modifier: 0x100
10:29:05 T:140201440020416 DEBUG: OnKey: alt-leftalt (0x4f0d4) pressed, action is
10:29:09 T:140199723521792 DEBUG: Thread JobWorker 140199723521792 terminating (autodelete)
10:29:09 T:140201440020416 DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-x86_64-linux.so)
10:29:09 T:140201440020416 DEBUG: Unloading: /ImageLib-x86_64-linux.so
10:29:17 T:140201013638912 ERROR: ffmpeg[7F83179D7700]: [mov,mp4,m4a,3gp,3g2,mj2] error reading header
10:29:17 T:140201013638912 ERROR: Open - Error, could not open file http://site_url/mp4/Sherlock/Season3/She...TVRip).mp4
10:29:17 T:140201013638912 ERROR: OpenDemuxStream - Error creating demuxer
10:29:17 T:140201013638912 NOTICE: CDVDPlayer::OnExit()
Reply
#8
Are you sure the link points to an actual video stream? Have you tried with another player, e.g. VLC or mplayer?
Reply
#9
Yes in VLC player it playes normal.
Reply
#10
Maybe it is the ',' try
Code:
url = url.replace(',' , '%2C')
too...
Reply

Logout Mark Read Team Forum Stats Members Help
Player.play(url) problem0