Bug #2633
HLS player should check variant availability before switching to it
Status: | Fixed | Start date: | 05/24/2015 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | HLS | |||
Target version: | 4.10 | |||
Found in version: | 4.9.452 | Platform: | Linux |
Description
If I play following hls url via WebUI is ok:
hls:http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil
The log:
navigator [INFO ]: Opening hls:http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil Freetype [DEBUG]: Loaded font family='liberation sans' fullname='liberation sans regular' style='Regular' from .//resources/fonts/liberation/LiberationSans-Regular.ttf domain:0 X11 [DEBUG]: Suspending screensaver vp [DEBUG]: Waiting for event vp [DEBUG]: Playing 'hls:http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil', primary, resume:yes (overridden) media [DEBUG]: Settings initialized for URL hls:http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil in folder: <unset> [<unset>] SVSYNC [DEBUG]: Set to 0s AVSYNC [DEBUG]: Set to 0 ms HTTP [DEBUG]: Connected to lb1.itcons.net.ua:1935 (cid=3) HTTP-3 [DEBUG]: Sending request for http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil (cid=3) HTTP-3 [DEBUG]: > GET /inters/redirect.hls?smil:inter.smil HTTP/1.1 HTTP-3 [DEBUG]: > User-Agent: Movian Linux/x86_64 4.9.452.g2925e HTTP-3 [DEBUG]: > Connection: keep-alive HTTP-3 [DEBUG]: > Accept: */* HTTP-3 [DEBUG]: > Accept-Encoding: gzip HTTP-3 [DEBUG]: > Host: lb1.itcons.net.ua:1935 HTTP-3 [DEBUG]: http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil: Response: HTTP-3 [DEBUG]: < HTTP/1.1 301 Moved Permanently HTTP-3 [DEBUG]: < Location: http://109.68.40.67:1935/castGeo/smil:inter.smil/playlist.m3u8 HTTP-3 [DEBUG]: < Content-Type: text/html HTTP-3 [DEBUG]: < Connection: Keep-Alive HTTP-3 [DEBUG]: < Server: FlashCom/3.5.5 HTTP-3 [DEBUG]: < Cache-Control: no-cache HTTP-3 [DEBUG]: < Content-Length: 0 HTTP-3 [DEBUG]: < HTTP-3 [DEBUG]: http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil: Following redirect to http://109.68.40.67:1935/castGeo/smil:inter.smil/playlist.m3u8, (premanent) HTTP [DEBUG]: Parking connection to lb1.itcons.net.ua:1935 (cid=3) -- Location changed HTTP [DEBUG]: Connected to 109.68.40.67:1935 (cid=4) HTTP-3 [DEBUG]: Sending request for http://109.68.40.67:1935/castGeo/smil:inter.smil/playlist.m3u8 (cid=4) HTTP-3 [DEBUG]: > GET /castGeo/smil:inter.smil/playlist.m3u8 HTTP/1.1 HTTP-3 [DEBUG]: > User-Agent: Movian Linux/x86_64 4.9.452.g2925e HTTP-3 [DEBUG]: > Connection: keep-alive HTTP-3 [DEBUG]: > Accept: */* HTTP-3 [DEBUG]: > Accept-Encoding: gzip HTTP-3 [DEBUG]: > Host: 109.68.40.67:1935 HTTP-3 [DEBUG]: http://109.68.40.67:1935/castGeo/smil:inter.smil/playlist.m3u8: Response: HTTP-3 [DEBUG]: < HTTP/1.1 200 OK HTTP-3 [DEBUG]: < Date: Sun, 24 May 2015 14:19:14 GMT HTTP-3 [DEBUG]: < Content-Type: application/vnd.apple.mpegurl HTTP-3 [DEBUG]: < Accept-Ranges: bytes HTTP-3 [DEBUG]: < Server: WowzaStreamingEngine/4.1.2 HTTP-3 [DEBUG]: < Cache-Control: no-cache HTTP-3 [DEBUG]: < Content-Length: 252 HTTP-3 [DEBUG]: < HTTP-3 [DEBUG]: Reading 252 bytes HTTP [DEBUG]: Parking connection to 109.68.40.67:1935 (cid=4) -- Request destroyed HTTP [DEBUG]: Reusing connection to 109.68.40.67:1935 (cid=4) HTTP-4 [DEBUG]: Sending request for http://109.68.40.67:1935/castGeo/smil:inter.smil/chunklist_w1044045208_b256000_slru.m3u8 (cid=4) HTTP-4 [DEBUG]: > GET /castGeo/smil:inter.smil/chunklist_w1044045208_b256000_slru.m3u8 HTTP/1.1 HTTP-4 [DEBUG]: > User-Agent: Movian Linux/x86_64 4.9.452.g2925e HTTP-4 [DEBUG]: > Connection: keep-alive HTTP-4 [DEBUG]: > Accept: */* HTTP-4 [DEBUG]: > Accept-Encoding: gzip HTTP-4 [DEBUG]: > Host: 109.68.40.67:1935 HTTP-4 [DEBUG]: http://109.68.40.67:1935/castGeo/smil:inter.smil/chunklist_w1044045208_b256000_slru.m3u8: Response: HTTP-4 [DEBUG]: < HTTP/1.1 200 OK HTTP-4 [DEBUG]: < Date: Sun, 24 May 2015 14:19:14 GMT HTTP-4 [DEBUG]: < Content-Type: application/vnd.apple.mpegurl HTTP-4 [DEBUG]: < Accept-Ranges: bytes HTTP-4 [DEBUG]: < Server: WowzaStreamingEngine/4.1.2 HTTP-4 [DEBUG]: < Cache-Control: no-cache HTTP-4 [DEBUG]: < Content-Length: 262 HTTP-4 [DEBUG]: < HTTP-4 [DEBUG]: Reading 262 bytes HTTP [DEBUG]: Parking connection to 109.68.40.67:1935 (cid=4) -- Request destroyed HTTP [DEBUG]: Reusing connection to 109.68.40.67:1935 (cid=4) HTTP-5 [DEBUG]: Sending open request for http://109.68.40.67:1935/castGeo/smil:inter.smil/media_w1044045208_b256000_slru_12618.ts (cid=4) HTTP-5 [DEBUG]: > GET /castGeo/smil:inter.smil/media_w1044045208_b256000_slru_12618.ts HTTP/1.1 HTTP-5 [DEBUG]: > User-Agent: Movian Linux/x86_64 4.9.452.g2925e HTTP-5 [DEBUG]: > Connection: keep-alive HTTP-5 [DEBUG]: > Accept: */* HTTP-5 [DEBUG]: > Accept-Encoding: identity HTTP-5 [DEBUG]: > Host: 109.68.40.67:1935 HTTP-5 [DEBUG]: http://109.68.40.67:1935/castGeo/smil:inter.smil/media_w1044045208_b256000_slru_12618.ts: Response: HTTP-5 [DEBUG]: < HTTP/1.1 200 OK
But if I play it via:
page.type = "video"; page.source = "videoparams:" + showtime.JSONEncode({ title: unescape(title), sources: [{ url: hls:http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil }], no_subtitle_scan: true });
Following happens then:
navigator [INFO ]: Opening tv:divan:/tv/view/inter-light-versija-312:%u0418%u043D%u0442%u0435%u0440%20light%20%u0432%u0435%u0440%u0441%u0438%u044F HTTP [DEBUG]: Disconnected from divan.tv:443 (cid=2) Keep alive expired HTTP [DEBUG]: Reusing connection to divan.tv:80 (cid=3) HTTP-5 [DEBUG]: Sending request for http://divan.tv/tv/view/inter-light-versija-312 (cid=3) HTTP-5 [DEBUG]: > GET /tv/view/inter-light-versija-312 HTTP/1.1 HTTP-5 [DEBUG]: > Cookie: CakeCookie[back_filter][tv]=%7B%22categoryIds%22%3A%5B%5D%2C%22devices%22%3A%22online%22%2C%22access%22%3A%22free%22%2C%22showAll%22%3A0%7D; CAKEPHP=jdebi6h5c4bb9lp2gmodrnckr7 HTTP-5 [DEBUG]: > User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36 HTTP-5 [DEBUG]: > Connection: keep-alive HTTP-5 [DEBUG]: > Accept: */* HTTP-5 [DEBUG]: > Accept-Encoding: identity HTTP-5 [DEBUG]: > Host: divan.tv HTTP-5 [DEBUG]: http://divan.tv/tv/view/inter-light-versija-312: Response: HTTP-5 [DEBUG]: < HTTP/1.1 200 OK HTTP-5 [DEBUG]: < Server: nginx HTTP-5 [DEBUG]: < Date: Sun, 24 May 2015 14:16:18 GMT HTTP-5 [DEBUG]: < Content-Type: text/html; charset=UTF-8 HTTP-5 [DEBUG]: < Content-Length: 56538 HTTP-5 [DEBUG]: < X-Powered-By: PHP/5.3.3 HTTP-5 [DEBUG]: < Access-Control-Allow-Origin: * HTTP-5 [DEBUG]: < HTTP-5 [DEBUG]: Reading 56538 bytes HTTP [DEBUG]: Parking connection to divan.tv:80 (cid=3) -- Request destroyed HTTP [DEBUG]: Connected to lb1.itcons.net.ua:1935 (cid=5) HTTP-6 [DEBUG]: Sending request for http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil (cid=5) HTTP-6 [DEBUG]: > GET /inters/redirect.hls?smil:inter.smil HTTP/1.1 HTTP-6 [DEBUG]: > User-Agent: Movian Linux/x86_64 4.9.452.g2925e HTTP-6 [DEBUG]: > Connection: keep-alive HTTP-6 [DEBUG]: > Accept: */* HTTP-6 [DEBUG]: > Accept-Encoding: identity HTTP-6 [DEBUG]: > Host: lb1.itcons.net.ua:1935 HTTP-6 [DEBUG]: http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil: Response: HTTP-6 [DEBUG]: < HTTP/1.1 301 Moved Permanently HTTP-6 [DEBUG]: < Location: http://109.68.40.68:1935/castGeo/smil:inter.smil/playlist.m3u8 HTTP-6 [DEBUG]: < Content-Type: text/html HTTP-6 [DEBUG]: < Connection: Keep-Alive HTTP-6 [DEBUG]: < Server: FlashCom/3.5.5 HTTP-6 [DEBUG]: < Cache-Control: no-cache HTTP-6 [DEBUG]: < Content-Length: 0 HTTP-6 [DEBUG]: < HTTP-6 [DEBUG]: http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil: Following redirect to http://109.68.40.68:1935/castGeo/smil:inter.smil/playlist.m3u8, (premanent) HTTP [DEBUG]: Parking connection to lb1.itcons.net.ua:1935 (cid=5) -- Location changed HTTP [DEBUG]: Connected to 109.68.40.68:1935 (cid=6) HTTP-6 [DEBUG]: Sending request for http://109.68.40.68:1935/castGeo/smil:inter.smil/playlist.m3u8 (cid=6) HTTP-6 [DEBUG]: > GET /castGeo/smil:inter.smil/playlist.m3u8 HTTP/1.1 HTTP-6 [DEBUG]: > User-Agent: Movian Linux/x86_64 4.9.452.g2925e HTTP-6 [DEBUG]: > Connection: keep-alive HTTP-6 [DEBUG]: > Accept: */* HTTP-6 [DEBUG]: > Accept-Encoding: identity HTTP-6 [DEBUG]: > Host: 109.68.40.68:1935 HTTP-6 [DEBUG]: http://109.68.40.68:1935/castGeo/smil:inter.smil/playlist.m3u8: Response: HTTP-6 [DEBUG]: < HTTP/1.1 200 OK HTTP-6 [DEBUG]: < Date: Sun, 24 May 2015 14:16:34 GMT HTTP-6 [DEBUG]: < Content-Type: application/vnd.apple.mpegurl HTTP-6 [DEBUG]: < Accept-Ranges: bytes HTTP-6 [DEBUG]: < Server: WowzaStreamingEngine/4.1.1 HTTP-6 [DEBUG]: < Cache-Control: no-cache HTTP-6 [DEBUG]: < Content-Length: 237 HTTP-6 [DEBUG]: < HTTP-6 [DEBUG]: Reading 237 bytes HTTP [DEBUG]: Parking connection to 109.68.40.68:1935 (cid=6) -- Request destroyed vp [DEBUG]: Waiting for event Freetype [DEBUG]: Loaded font family='liberation sans' fullname='liberation sans regular' style='Regular' from .//resources/fonts/liberation/LiberationSans-Regular.ttf domain:0 vp [DEBUG]: Playing 'videoparams:{"title":"Интер light версия","canonicalUrl":"tv:divan:/tv/view/inter-light-versija-312:%u0418%u043D%u0442%u0435%u0440%20light%20%u0432%u0435%u0440%u0441%u0438%u044F","sources":[{"url":"hls:http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil"}],"no_subtitle_scan":true}', primary, resume:yes (overridden) Video [DEBUG]: Playing hls:http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil media [DEBUG]: Settings initialized for URL tv:divan:/tv/view/inter-light-versija-312:%u0418%u043D%u0442%u0435%u0440%20light%20%u0432%u0435%u0440%u0441%u0438%u044F in folder: Divan.tv (51) [tv:divanStart] X11 [DEBUG]: Suspending screensaver SVSYNC [DEBUG]: Set to 0s AVSYNC [DEBUG]: Set to 0 ms HTTP [DEBUG]: Reusing connection to 109.68.40.68:1935 (cid=6) HTTP-7 [DEBUG]: Sending request for http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil (cid=6) HTTP-7 [DEBUG]: > GET /castGeo/smil:inter.smil/playlist.m3u8 HTTP/1.1 HTTP-7 [DEBUG]: > User-Agent: Movian Linux/x86_64 4.9.452.g2925e HTTP-7 [DEBUG]: > Connection: keep-alive HTTP-7 [DEBUG]: > Accept: */* HTTP-7 [DEBUG]: > Accept-Encoding: gzip HTTP-7 [DEBUG]: > Host: 109.68.40.68:1935 HTTP-7 [DEBUG]: http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil: Response: HTTP-7 [DEBUG]: < HTTP/1.1 200 OK HTTP-7 [DEBUG]: < Date: Sun, 24 May 2015 14:16:34 GMT HTTP-7 [DEBUG]: < Content-Type: application/vnd.apple.mpegurl HTTP-7 [DEBUG]: < Accept-Ranges: bytes HTTP-7 [DEBUG]: < Server: WowzaStreamingEngine/4.1.1 HTTP-7 [DEBUG]: < Cache-Control: no-cache HTTP-7 [DEBUG]: < Content-Length: 234 HTTP-7 [DEBUG]: < HTTP-7 [DEBUG]: Reading 234 bytes HTTP [DEBUG]: Parking connection to 109.68.40.68:1935 (cid=6) -- Request destroyed HTTP [DEBUG]: Reusing connection to lb1.itcons.net.ua:1935 (cid=5) HTTP-8 [DEBUG]: Sending request for http://lb1.itcons.net.ua:1935/inters/chunklist_w736848556_b600000.m3u8 (cid=5) HTTP-8 [DEBUG]: > GET /inters/chunklist_w736848556_b600000.m3u8 HTTP/1.1 HTTP-8 [DEBUG]: > User-Agent: Movian Linux/x86_64 4.9.452.g2925e HTTP-8 [DEBUG]: > Connection: keep-alive HTTP-8 [DEBUG]: > Accept: */* HTTP-8 [DEBUG]: > Accept-Encoding: gzip HTTP-8 [DEBUG]: > Host: lb1.itcons.net.ua:1935 HTTP-8 [DEBUG]: http://lb1.itcons.net.ua:1935/inters/chunklist_w736848556_b600000.m3u8: Response: HTTP-8 [DEBUG]: < HTTP/1.1 404 Not Found HTTP-8 [DEBUG]: < Server: FlashCom/3.5.5 HTTP-8 [DEBUG]: < Content-Length: 0 HTTP-8 [DEBUG]: < HTTP [DEBUG]: Parking connection to lb1.itcons.net.ua:1935 (cid=5) -- Request destroyed HLS [ERROR]: Unable to open http://lb1.itcons.net.ua:1935/inters/chunklist_w736848556_b600000.m3u8 -- HTTP error: 404
Related issues
Associated revisions
hls: Deal with variant playlist being absent or empty
Fixes #2633
History
#1
Updated by Leonid Protasov about 7 years ago
- Subject changed from Movian uses different procedure of opening HLS links between WebUI and page.source to Movian uses different connection reusing flow when opening HLS between WebUI and page.source
#2
Updated by Leonid Protasov about 7 years ago
- Subject changed from Movian uses different connection reusing flow when opening HLS between WebUI and page.source to HLS player should check variant availability before switching to it
- Priority changed from Normal to High
Ok, I know what's wrong
http://lb1.itcons.net.ua:1935/inters/redirect.hls?smil:inter.smil is a load balancing url. It switches to one of:
http://109.68.40.67:1935/castGeo/smil:inter.smil/playlist.m3u8
http://109.68.40.68:1935/castGeo/smil:inter.smil/playlist.m3u8
And http://109.68.40.67:1935/castGeo/smil:inter.smil/playlist.m3u8 contains:
http://109.68.40.67:1935/castGeo/smil:inter.smil/chunklist_w1722982028_b1024000_slru.m3u8
http://109.68.40.67:1935/castGeo/smil:inter.smil/chunklist_w1722982028_b512000_slru.m3u8
http://109.68.40.67:1935/castGeo/smil:inter.smil/chunklist_w1722982028_b256000_slru.m3u8
And http://109.68.40.68:1935/castGeo/smil:inter.smil/playlist.m3u8 contains:
http://109.68.40.68:1935/castGeo/smil:inter.smil/chunklist_w1543702335_b1600000.m3u8
http://109.68.40.68:1935/castGeo/smil:inter.smil/chunklist_w1543702335_b900000.m3u8
http://109.68.40.68:1935/castGeo/smil:inter.smil/chunklist_w1543702335_b600000.m3u8
When Movian is redirected to http://109.68.40.68:1935/castGeo/smil:inter.smil/playlist.m3u8 all variants are alive and are playable. But when it is redirected to http://109.68.40.67:1935/castGeo/smil:inter.smil/playlist.m3u8 - it plays only two lower links as http://109.68.40.67:1935/castGeo/smil:inter.smil/chunklist_w1722982028_b1024000_slru.m3u8 is 404.
So the bug is - Movian should only jump/switch to higher/lower variant if it is not 404.
#3
Updated by Andreas Smas about 7 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset git|c303c502515048aa2459534fdf20f25e11a1da04.
#4
Updated by Leonid Protasov about 7 years ago
- Related to Bug #2638: HLS player won't skip to next variant if current is 404 added