2014-05-11, 20:20
Hello,
I was not sure where to post this, but here it goes. I am having issues with playing redirected .m3u8 streams in XBMC.
It's kinda hard to explain, so I'll try my best. I am not sure if this is a bug or if I do not understand how thing work in XBMC.
I have a local web-server that provides http:// urls to all my XBMC units in the house (internet streams). When the url is called it fetches the channel Id and based on type of channel, generates propper url and redirects to it. So the redirected url can be anything, http, rtmp, rtsp, whatever. Some of the streams need to go via this server, in order to generate tokens and authenticate.
So the "start" url looks like this (local IP). This would commonly be in favourites.xml, a video-addon or in a .m3u file used in a pvr-addon that I use. Most streams work just fine this way:
http://192.168.1.10/RedirectToStream?chNr=374
In this particular case, the url returns\redirects to the external stream url of type .m3u8 (hls), that will look something like this:
http://ip-adress:port/live/TV1.stream/playlist.m3u8?token=4398756384975
This again returns a new .m3u8 file that contains "chunks", that will later on point to media.ts chunks:
Now, the thing is that theese "chunk" parts are not full urls, they are just the filenames, and when XBMC tries to redirect to them, it thinks they are stored localy somewhere and the stream fails.
The url should be, in this case, http://ip-adress:port/live/TV1.stream/chunk_2.m3u8. It should redirect based on the url that originaly retrieved the playlist.m3u8 file.
What bothers me the most, is that this url-redirection works perfectly in VLC. it finds the propper url (the parent url) to redirect to, and it just works. But in XBMC it fails. See a snippet of debug log below.
Most interesting line is ffmpeg[96C]: ... it adds the chunk to 'pvr://channels/tv/All TV channels/'.
There is a similar post to the same issue here: http://forum.xbmc.org/showthread.php?tid...pid1540008
I'am just looking for guidance here. How should I resolve this? Is this a bug or limitation? If I was to compile my own version of xbmc where should I look in the code to modfiy this?
Thanks
I was not sure where to post this, but here it goes. I am having issues with playing redirected .m3u8 streams in XBMC.
It's kinda hard to explain, so I'll try my best. I am not sure if this is a bug or if I do not understand how thing work in XBMC.
I have a local web-server that provides http:// urls to all my XBMC units in the house (internet streams). When the url is called it fetches the channel Id and based on type of channel, generates propper url and redirects to it. So the redirected url can be anything, http, rtmp, rtsp, whatever. Some of the streams need to go via this server, in order to generate tokens and authenticate.
So the "start" url looks like this (local IP). This would commonly be in favourites.xml, a video-addon or in a .m3u file used in a pvr-addon that I use. Most streams work just fine this way:
http://192.168.1.10/RedirectToStream?chNr=374
In this particular case, the url returns\redirects to the external stream url of type .m3u8 (hls), that will look something like this:
http://ip-adress:port/live/TV1.stream/playlist.m3u8?token=4398756384975
This again returns a new .m3u8 file that contains "chunks", that will later on point to media.ts chunks:
Code:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1000476,RESOLUTION=640x360
chunk_2.m3u8
Now, the thing is that theese "chunk" parts are not full urls, they are just the filenames, and when XBMC tries to redirect to them, it thinks they are stored localy somewhere and the stream fails.
The url should be, in this case, http://ip-adress:port/live/TV1.stream/chunk_2.m3u8. It should redirect based on the url that originaly retrieved the playlist.m3u8 file.
What bothers me the most, is that this url-redirection works perfectly in VLC. it finds the propper url (the parent url) to redirect to, and it just works. But in XBMC it fails. See a snippet of debug log below.
Most interesting line is ffmpeg[96C]: ... it adds the chunk to 'pvr://channels/tv/All TV channels/'.
Code:
DEBUG: opening live stream on url 'http://192.168.1.10/RedirectToStream?chNr=374'
DEBUG: PVRFile - XFILE::CPVRFile::Open - playback has started on filename pvr://channels/tv/All TV channels/92.pvr
DEBUG: CFileCache::Open - opening </RedirectToStream> using cache
DEBUG: CurlFile::Open(0E1AA948) http://192.168.1.10/RedirectToStream?chNr=374
DEBUG: ------ Window Init (DialogBusy.xml) ------
DEBUG: CDVDInputStreamPVRManager::Open - stream opened: http://192.168.1.10/RedirectToStream?chNr=374
NOTICE: Creating Demuxer
NOTICE: Thread FileCache start, auto delete: false
INFO: CFileCache::Process - Hit eof.
DEBUG: CDVDDemuxFFmpeg::Open - probing detected format [hls,applehttp]
ERROR: ffmpeg[96C]: [hls,applehttp] Error when loading first segment 'pvr://channels/tv/All TV channels/chunk_2.m3u8?token=4398756384975'
ERROR: CDVDDemuxFFmpeg::Open - Error, could not open file pvr://channels/tv/All TV channels/92.pvr
ERROR: CDVDDemuxFFmpeg::Open - error probing input format, pvr://channels/tv/All TV channels/92.pvr
ERROR: Previous line repeats 8 times.
ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer
NOTICE: CDVDPlayer::OnExit()
NOTICE: CDVDPlayer::OnExit() deleting input stream
There is a similar post to the same issue here: http://forum.xbmc.org/showthread.php?tid...pid1540008
I'am just looking for guidance here. How should I resolve this? Is this a bug or limitation? If I was to compile my own version of xbmc where should I look in the code to modfiy this?
Thanks