2016-06-05, 01:26
Hi guys,
Did something change recently in the logic for playing audio streams or mimetype detection ?
The spotify addon I created uses the libspotify implementation to provide a stream of audio packets to the Kodi player.
URL for the listitems is set as http pointing to the http proxy started by libspotify which streams the spotify music.
Working perfectly fine in Kodi 15, 16 and older builds of Krypton but somehow now it's failing.
Some users are reporting it's working when selecting VideoPlayer as the player.
Even if I set the mimetype to "audio/x-wav" this won't stop Kodi from probing the http address which btw sets the headers correctly.
For now I fixed a small workaround by setting the streaminfo on teh listitems which forces playback with VideoPlayer but it's pretty slow.
The problem is that if you select a track in the addon, Kodi completely freezes for almost a minute and when it responds again there is the "playback failed" message. I've turned on debug logging in the libspotify httpproxy and I can see the request but after that it's timed out.
Small snippet of the log with the errors:
As it looks in the log Kodi is probing the url for the MimeType even if I have that specified in my listitem:
li.setProperty('do_not_analyze', 'true')
li.setMimeType("audio/x-wav")
Besides that, I checked and the headers are correctly set by the libspotify webproxy.
Not sure if this is a bug ?
Did something change recently in the logic for playing audio streams or mimetype detection ?
The spotify addon I created uses the libspotify implementation to provide a stream of audio packets to the Kodi player.
URL for the listitems is set as http pointing to the http proxy started by libspotify which streams the spotify music.
Working perfectly fine in Kodi 15, 16 and older builds of Krypton but somehow now it's failing.
Some users are reporting it's working when selecting VideoPlayer as the player.
Even if I set the mimetype to "audio/x-wav" this won't stop Kodi from probing the http address which btw sets the headers correctly.
For now I fixed a small workaround by setting the streaminfo on teh listitems which forces playback with VideoPlayer but it's pretty slow.
The problem is that if you select a track in the addon, Kodi completely freezes for almost a minute and when it responds again there is the "playback failed" message. I've turned on debug logging in the libspotify httpproxy and I can see the request but after that it's timed out.
Small snippet of the log with the errors:
PHP Code:
01:14:02 T:1828 DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnAdd
01:14:12 T:14300 ERROR: CCurlFile::Stat - Failed: Timeout was reached(28) for http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29
01:14:12 T:14300 DEBUG: CCurlFile::GetMimeType - http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29 -> failed
01:14:12 T:14300 DEBUG: CFileCache::Open - opening <track/386RUes7n1uM1yfzgeUuwp.wav> using cache
01:14:12 T:14300 DEBUG: CurlFile::Open(16BA7F78) http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0
01:14:31 T:12984 DEBUG: Thread JobWorker 12984 terminating (autodelete)
01:14:31 T:6380 DEBUG: Thread JobWorker 6380 terminating (autodelete)
01:14:31 T:7000 DEBUG: Thread JobWorker 7000 terminating (autodelete)
01:14:31 T:12956 DEBUG: Thread JobWorker 12956 terminating (autodelete)
01:14:32 T:14300 ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
01:14:32 T:14300 ERROR: CCurlFile::Open failed with code 0 for http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29
01:14:32 T:14300 ERROR: XFILE::CFileCache::Open - failed to open source <http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29>
01:14:32 T:14300 ERROR: VideoPlayerCodec::Init: Error opening file http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29
01:14:42 T:14300 ERROR: CCurlFile::Stat - Failed: Timeout was reached(28) for http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29
01:14:42 T:14300 DEBUG: CCurlFile::GetMimeType - http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29 -> failed
01:14:42 T:14300 DEBUG: CFileCache::Open - opening <track/386RUes7n1uM1yfzgeUuwp.wav> using cache
01:14:42 T:14300 DEBUG: CurlFile::Open(03CFFF18) http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0
01:15:02 T:14300 ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
01:15:02 T:14300 ERROR: CCurlFile::Open failed with code 0 for http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29
01:15:02 T:14300 ERROR: XFILE::CFileCache::Open - failed to open source <http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29>
01:15:02 T:14300 ERROR: VideoPlayerCodec::Init: Error opening file http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29
01:15:02 T:14300 ERROR: CAudioDecoder: Unable to Init Codec while loading file http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29
01:15:02 T:14300 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder
01:15:02 T:14300 DEBUG: CApplication::OnQueueNextItem: play state was 1, starting 1
01:15:02 T:14300 ERROR: Playlist Player: skipping unplayable item: 0, path [http://127.0.0.1:8090/track/386RUes7n1uM1yfzgeUuwp.wav?idx=0|X-Spotify-Token=b5951c9547f17e6f20e78f424b0c86ace16f0eef&User-Agent=Spotify%2F1.0.17+%28XBMC%2F17.0-ALPHA2+Git%3A20160602-91a1cd5%29]
01:15:02 T:14300 DEBUG: Playlist Player: one or more items failed to play... aborting playback
As it looks in the log Kodi is probing the url for the MimeType even if I have that specified in my listitem:
li.setProperty('do_not_analyze', 'true')
li.setMimeType("audio/x-wav")
Besides that, I checked and the headers are correctly set by the libspotify webproxy.
Not sure if this is a bug ?