Set stream url resolve timeout from addon
#1
Hi,

I have an addon which based on t0mm0.common.addon lib.

Currently I have my add-on created with the following snippet.

Code:
from t0mm0.common.addon import Addon

addon = Addon('plugin.video.howtovideos', sys.argv)
.
.
.
addon.resolve_url(stream_url)
on my method I am resolving the streaming URL and passing it to addon.resolve_url(stream_url) when I finally resolve the streaming URL. The playback happens fine if the sever is good, if it's slow then it takes more than 30 seconds to start the playback. Due to the 30 seconds timeout the video playback fails.

Is there any way I can set the timeout from my plugin?


Code:
02:50:01 T:5900  NOTICE: DVDPlayer: Opening: http://www.dailymotion.com/cdn/H264-848x480/video/helpto.mp4?auth=14ee5799-2562-y3lahw4z-1b2ef5a2d424a23f966c611c038caab4
02:50:02 T:5900 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
02:50:02 T:13856  NOTICE: Thread DVDPlayer start, auto delete: false
02:50:02 T:13856  NOTICE: Creating InputStream
02:50:02 T:13856 WARNING: XFILE::CSimpleFileCache::Close: failed to delete temporary file ""
02:50:03 T:13856 WARNING: Previous line repeats 1 times.
02:50:04 T:13856  NOTICE: Creating Demuxer
02:50:04 T:15200  NOTICE: Thread FileCache start, auto delete: false
02:50:34 T:13856   ERROR: CDVDDemuxFFmpeg::Open - Error, could not open file http://www.dailymotion.com/cdn/H264-848x480/video/helpto.mp4?auth=14ee5799-2562-y3lahw4z-1b2ef5a2d424a23f966c611c038caab4
02:50:34 T:13856   ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer
02:50:34 T:13856  NOTICE: CDVDPlayer::OnExit()
02:50:34 T:13856 WARNING: XFILE::CSimpleFileCache::Close: failed to delete temporary file ""
02:50:34 T:5900 WARNING: Previous line repeats 1 times.
02:50:34 T:5900   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.howtovideos/?url=http%3A%2F%2Fwww.dailymotion.com%2Fswf%2Fx2h09c6%3Fsyndication%3helpto%26autoplay%3D1&play=True&AddtoHist=True&img=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fen%2Fthumb%2F1%2F15%2Fhelpto.jpg%2F220px-helpto.jpg&title=Helpto+%282013%29+%5BSL]
02:50:34 T:13772  NOTICE: Stream All The Sources: Service: Playback Stopped
02:50:34 T:5900  NOTICE: CDVDPlayer::CloseFile()
02:50:34 T:5900  NOTICE: DVDPlayer: waiting for threads to exit
02:50:34 T:5900  NOTICE: DVDPlayer: finished waiting
02:50:34 T:5900  NOTICE: CDVDPlayer::CloseFile()
02:50:34 T:5900  NOTICE: DVDPlayer: waiting for threads to exit
02:50:34 T:5900  NOTICE: DVDPlayer: finished waiting
Reply
#2
imo, if something is _expected_ to need a timeout > 30 sec, its seriously broken. And no, afaik you cannot set the timeout from an addon.
Reply
#3
currently not possible.

https://github.com/notspiff/kodi-cmake/c...9c643c23af makes it possible to pass as a protocol option, i.e. append |URLENCODE(connection-timeout=<value>) to the http url. feel free to submit to mainline (i won't).
Reply
#4
(2015-03-16, 09:57)wsnipex Wrote: imo, if something is _expected_ to need a timeout > 30 sec, its seriously broken. And no, afaik you cannot set the timeout from an addon.

Well, the server isn't that bad.. I manually calculated the time it takes to play a video on my PC and it takes ~35 seconds which is more than kodi default timeout. The same stream plays like 2/10 times. So, in this scenario it will be a good idea to have a option to set stream timeout with specific to player/plugin/overall system.
Reply
#5
(2015-03-16, 12:02)ironic_monkey Wrote: currently not possible.

https://github.com/notspiff/kodi-cmake/c...9c643c23af makes it possible to pass as a protocol option, i.e. append |URLENCODE(connection-timeout=<value>) to the http url. feel free to submit to mainline (i won't).

Thanks for the pointer. let me see if I can make it.
Reply

Logout Mark Read Team Forum Stats Members Help
Set stream url resolve timeout from addon0