2014-07-09, 23:37
Hi,
I'm working on a plugin that is scraping a page for video links to live video. I've got the scraping working, and the links are functional if I try to play them as a network stream in VLC. When I try to play them through XBMC however, I get errors and they fail to play. The relevant part of the log is here:
Specifically the error seems to stem from curl and its requirement for being able to request byte ranges. I imagine this is an issue for live video, since typically you're downloading chunks as they're available. Is there some way to get XBMC to do live video playback or does the plugin itself need to manage downloading chunks and feeding them into the XBMC player? If so, could anyone point me to some resources on how that could be accomplished?
I'm working on a plugin that is scraping a page for video links to live video. I've got the scraping working, and the links are functional if I try to play them as a network stream in VLC. When I try to play them through XBMC however, I get errors and they fail to play. The relevant part of the log is here:
Code:
12:32:40 T:4579958784 NOTICE: Thread DVDPlayer start, auto delete: false
12:32:40 T:4579958784 NOTICE: Creating InputStream
12:32:40 T:4579958784 DEBUG: CFileCache::Open - opening <vinnyboughtbotcolony_1_700@46333> using cache
12:32:40 T:4579958784 DEBUG: CurlFile::Open(0x11309a480) http://gamespothdflash-f.akamaihd.net/vinnyboughtbotcolony_1_700@46333
12:32:40 T:4579958784 DEBUG: Curl::Debug - TEXT: About to connect() to gamespothdflash-f.akamaihd.net port 80 (#0)
12:32:40 T:4579958784 DEBUG: Curl::Debug - TEXT: Trying 67.69.196.160...
12:32:40 T:4579958784 DEBUG: Curl::Debug - TEXT: Connected to gamespothdflash-f.akamaihd.net (67.69.196.160) port 80 (#0)
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_OUT: GET /vinnyboughtbotcolony_1_700@46333 HTTP/1.1
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_OUT: Range: bytes=0-
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_OUT: User-Agent: XBMC/13.1 Git:20140604-84725b0 (Mac OS X; 12.5.0 x86_64, Version 10.8.5 (Build 12F45); http://xbmc.org)
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_OUT: Host: gamespothdflash-f.akamaihd.net
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_OUT: Accept: */*
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_OUT: Accept-Charset: UTF-8,*;q=0.8
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: HTTP/1.1 200 OK
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Server: AkamaiGHost
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Mime-Version: 1.0
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Content-Type: video/x-flv
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Content-Length: 2147483647
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Expires: Wed, 09 Jul 2014 16:32:40 GMT
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Cache-Control: max-age=0, no-cache
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Pragma: no-cache
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Date: Wed, 09 Jul 2014 16:32:40 GMT
12:32:40 T:4579958784 DEBUG: Curl::Debug - HEADER_IN: Connection: keep-alive
12:32:40 T:4579958784 NOTICE: Creating Demuxer
12:32:40 T:4594339840 NOTICE: Thread FileCache start, auto delete: false
12:32:40 T:4579958784 DEBUG: ffmpeg[10FCA000]: Format flv probed with size=2048 and score=100
12:32:40 T:4579958784 DEBUG: Open - probing detected format [flv]
12:32:40 T:4579958784 DEBUG: Open - avformat_find_stream_info starting
12:32:40 T:4579958784 DEBUG: ffmpeg[10FCA000]: [flv] File position before avformat_find_stream_info() is 13
12:32:40 T:4594339840 INFO: easy_aquire - Created session to http://gamespothdflash-f.akamaihd.net
12:32:40 T:4594339840 DEBUG: CurlFile::CReadState::Connect - Resume from position 2147418111
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: About to connect() to gamespothdflash-f.akamaihd.net port 80 (#0)
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: Trying 67.69.196.160...
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: Connected to gamespothdflash-f.akamaihd.net (67.69.196.160) port 80 (#0)
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: GET /vinnyboughtbotcolony_1_700@46333 HTTP/1.1
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: Range: bytes=2147418111-
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: User-Agent: XBMC/13.1 Git:20140604-84725b0 (Mac OS X; 12.5.0 x86_64, Version 10.8.5 (Build 12F45); http://xbmc.org)
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: Host: gamespothdflash-f.akamaihd.net
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: Accept: */*
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: Accept-Charset: UTF-8,*;q=0.8
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: HTTP/1.1 200 OK
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Server: AkamaiGHost
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Mime-Version: 1.0
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Content-Type: video/x-flv
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Content-Length: 2147483647
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Expires: Wed, 09 Jul 2014 16:32:40 GMT
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Cache-Control: max-age=0, no-cache
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Pragma: no-cache
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Date: Wed, 09 Jul 2014 16:32:40 GMT
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Connection: keep-alive
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: HTTP server doesn't seem to support byte ranges. Cannot resume.
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: Closing connection #0
12:32:40 T:4594339840 ERROR: CCurlFile::FillBuffer - Failed: Requested range was not delivered by the server(33)
12:32:40 T:4594339840 ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: Closing connection #0
12:32:40 T:4594339840 DEBUG: CurlFile::CReadState::Connect - Resume from position 2147418111
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: About to connect() to gamespothdflash-f.akamaihd.net port 80 (#0)
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: Trying 67.69.196.160...
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: Connected to gamespothdflash-f.akamaihd.net (67.69.196.160) port 80 (#0)
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: GET /vinnyboughtbotcolony_1_700@46333 HTTP/1.1
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: Range: bytes=2147418111-
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: User-Agent: XBMC/13.1 Git:20140604-84725b0 (Mac OS X; 12.5.0 x86_64, Version 10.8.5 (Build 12F45); http://xbmc.org)
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: Host: gamespothdflash-f.akamaihd.net
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: Accept: */*
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_OUT: Accept-Charset: UTF-8,*;q=0.8
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: HTTP/1.1 200 OK
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Server: AkamaiGHost
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Mime-Version: 1.0
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Content-Type: video/x-flv
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Content-Length: 2147483647
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Expires: Wed, 09 Jul 2014 16:32:40 GMT
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Cache-Control: max-age=0, no-cache
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Pragma: no-cache
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Date: Wed, 09 Jul 2014 16:32:40 GMT
12:32:40 T:4594339840 DEBUG: Curl::Debug - HEADER_IN: Connection: keep-alive
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: HTTP server doesn't seem to support byte ranges. Cannot resume.
12:32:40 T:4594339840 DEBUG: Curl::Debug - TEXT: Closing connection #0
12:32:40 T:4594339840 ERROR: CCurlFile::FillBuffer - Failed: Requested range was not delivered by the server(33)
12:32:40 T:4594339840 ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
12:32:40 T:4594339840 ERROR: CFileCache::Process - Error 36 seeking. Seek returned -1
12:32:40 T:4594339840 INFO: CFileCache::Process - Hit eof.
12:32:40 T:4579958784 DEBUG: Seek - waiting for position 2147483643.
12:32:40 T:4579958784 WARNING: Seek - failed to get remaining data
12:32:40 T:4579958784 ERROR: ffmpeg[10FCA000]: [h264] AVC: nal size 171238
12:32:40 T:4579958784 ERROR: ffmpeg[10FCA000]: [h264] no frame!
12:32:40 T:4579958784 INFO: ffmpeg[10FCA000]: [flv] decoding for stream 0 failed
12:32:40 T:4579958784 DEBUG: ffmpeg[10FCA000]: [flv] Could not find codec parameters for stream 0 (Video: h264, 2500 kb/s): unspecified size
12:32:40 T:4579958784 DEBUG: ffmpeg[10FCA000]: [flv] Consider increasing the value for the 'analyzeduration' and 'probesize' options
12:32:40 T:4579958784 DEBUG: ffmpeg[10FCA000]: [flv] Could not find codec parameters for stream 1 (Audio: aac, 44100 Hz, stereo, 128 kb/s): unspecified sample format
12:32:40 T:4579958784 DEBUG: ffmpeg[10FCA000]: [flv] Consider increasing the value for the 'analyzeduration' and 'probesize' options
12:32:40 T:4579958784 DEBUG: ffmpeg[10FCA000]: [flv] Estimating duration from bitrate, this may be inaccurate
12:32:40 T:4579958784 DEBUG: ffmpeg[10FCA000]: [flv] File position after avformat_find_stream_info() is 17915
12:32:40 T:4579958784 WARNING: could not find codec parameters for http://gamespothdflash-f.akamaihd.net/vinnyboughtbotcolony_1_700@46333
12:32:40 T:4579958784 ERROR: OpenDemuxStream - Error creating demuxer
12:32:40 T:4579958784 NOTICE: CDVDPlayer::OnExit()
12:32:40 T:4579958784 NOTICE: CDVDPlayer::OnExit() deleting input stream
12:32:40 T:4594339840 DEBUG: Thread FileCache 4594339840 terminating
12:32:40 T:4579958784 DEBUG: OnPlayBackStopped : play state was 1, starting 1
12:32:40 T:4579958784 DEBUG: Thread DVDPlayer 4579958784 terminating
12:32:40 T:140735217652096 DEBUG: OnPlayBackStopped : play state was 3, starting 0
12:32:40 T:140735217652096 DEBUG: CAnnouncementManager - Announcement: OnStop from xbmc
12:32:40 T:140735217652096 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnStop
12:32:40 T:140735217652096 ERROR: Playlist Player: skipping unplayable item: 0, path [http://gamespothdflash-f.akamaihd.net/vinnyboughtbotcolony_1_700@46333]
12:32:40 T:140735217652096 DEBUG: Playlist Player: no more playable items... aborting playback
12:32:40 T:4579958784 NOTICE: Thread BackgroundLoader start, auto delete: false
12:32:40 T:140735217652096 NOTICE: CDVDPlayer::CloseFile()
12:32:40 T:140735217652096 NOTICE: DVDPlayer: waiting for threads to exit
12:32:40 T:140735217652096 NOTICE: DVDPlayer: finished waiting
12:32:40 T:140735217652096 DEBUG: LinuxRendererGL: Cleaning up GL resources
12:32:40 T:4579958784 DEBUG: Thread BackgroundLoader 4579958784 terminating
12:32:40 T:140735217652096 NOTICE: CDVDPlayer::CloseFile()
12:32:40 T:140735217652096 NOTICE: DVDPlayer: waiting for threads to exit
12:32:40 T:140735217652096 NOTICE: DVDPlayer: finished waiting
Specifically the error seems to stem from curl and its requirement for being able to request byte ranges. I imagine this is an issue for live video, since typically you're downloading chunks as they're available. Is there some way to get XBMC to do live video playback or does the plugin itself need to manage downloading chunks and feeding them into the XBMC player? If so, could anyone point me to some resources on how that could be accomplished?