Bug Kodi 17 + m3u8 With Multible Quality Streams (HLS)
#1
To reproduce the error
create an strm file with:
http://qthttp.apple.com.edgesuite.net/10...fg/sl.m3u8

When Playd in Kodi16
THe Best Stream get Loaded and Playd (Depending on the Internet Limit in the Settings)

HEAD http://qthttp.apple.com.edgesuite.net/10...fg/sl.m3u8
← 200 application/x-mpegURL [no content] 33.58kB/s
GET http://qthttp.apple.com.edgesuite.net/10...fg/sl.m3u8
← 200 application/x-mpegURL 940B 83.78kB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1.11MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/33400.ts
← 200 video/MP2T 4.24MB 3.22MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/33401.ts
← 200 video/MP2T 4MB 2.89MB/s



On Kodi17
(Seen with an Url Logger)
All Streams are Getting Loaded and Playd (The Best Fitting for the (Internet Limit in the Settings)
But All files of All Qualitys are getting loaded (Much Mor Traffik, Problems in Playback)
.
GET http://qthttp.apple.com.edgesuite.net/10...0/12401.ts
← 200 video/MP2T 1.53MB 3.12MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/18400.ts
← 200 video/MP2T 2.32MB 3.06MB/s
HEAD http://qthttp.apple.com.edgesuite.net/10...fg/sl.m3u8
← 200 application/x-mpegURL [no content] 22.74kB/s
>> HEAD http://qthttp.apple.com.edgesuite.net/10...fg/sl.m3u8
← 200 application/x-mpegURL [no content] 13.67kB/s
GET http://qthttp.apple.com.edgesuite.net/10...fg/sl.m3u8
← 200 application/x-mpegURL 940B 51.06kB/s
GET http://qthttp.apple.com.edgesuite.net/10...fg/sl.m3u8
← 200 application/x-mpegURL 940B 102.87kB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1.14MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1.2MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1008.34kB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1.17MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1.15MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1.28MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1.41MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0_vod.m3u8
← 200 application/x-mpegURL 15.67kB 1.37MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/06400.ts
← 200 video/MP2T 863.81kB 2.7MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/01500.ts
← 200 video/MP2T 206.91kB 2.2MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/02400.ts
← 200 video/MP2T 324.78kB 2.43MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/04400.ts
← 200 video/MP2T 608.43kB 2.81MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/12400.ts
← 200 video/MP2T 1.61MB 3.08MB/s
GET http://qthttp.apple.com.edgesuite.net/10...0/18400.ts
← 200 video/MP2T 2.32MB 3.18MB/s


Tested with
Tested on Kodi 17 Beta5 (Windows)
und Nightly Windows (KodiSetup-20161110-5957945-fix-skipping.exe)


[UPDATE]
I im No Expert, mayby the error Comes from:
https://github.com/xbmc/xbmc/pull/10766/...02fdc51454

Users from my Plugin said it happend afer:
Build #1025 or Kodi 17 Beta 5
Reply
#2
I don't see a bug here if the desired stream is finally played.
Reply
#3
(2016-11-11, 19:14)FernetMenta Wrote: I don't see a bug here if the desired stream is finally played.

Mayby to make the Problem Clear

http://sample.vodobox.net/skate_phantom_...ex_4k.m3u8

To watch the Video you need in Kodi 16
YOu Would need Minimal
288 Kbit for the Smallest Video

On Kodi17 i loads all streams so you need
288000+582000+1018000+1366000+2742000+5400000+7556000+10768000= 29720000

You Need about a 30 Mbit Internet Connection instead 288 Kbit

So this Video Would Only be playable for Kodi16 user or Kodi17 User if they have an very Fast Connection

I think this is a bug , or am i wrong?

[Update] Ah an Setting the Internet COnenction Limit to 1 Mbit, Kodi 17 still trys Loads all Videos, an try to play the 4k Video instead the best Video for 1 mbit

Setting the Connection to 1 Mbit, Kodi16 Loads only the Best for this Connection.So YOu will get 426x240 Video that would be Playble
Reply
#4
The old method that selected the video from the playlist was buggy and resulted in loss of audio stream for many videos. Now we leave this to ffmpeg. ffmpeg analyses the playlist and presents the results as selectable programs. kodi selects a program with regard on max bandwidth, others are discarded.

But right, there is a c/p error that results in wrong selection of stream. Nevertheless there should only be a single stream that goes over the network.
Reply
#5
Thats the Problem , when you Log the URL that ar called by Fiddler or mitmproxy. It Fetchers all Streams .

Also in The Kodi Log:
21:55:18.248 T:9084 DEBUG: ffmpeg[237C]: [http] request: GET /skate_phantom_flex_4k/medium/skate_phantom_flex_4k_452_240p.m3u8 HTTP/1.1
21:55:18.249 T:9084 DEBUG: ffmpeg[237C]: [http] User-Agent: Kodi/17.0-BETA6 (Windows NT 10.0; WOW64) App_Bitness/32 Version/17.0-BETA6-Git:20161110-5957945
21:55:18.676 T:9084 DEBUG: ffmpeg[237C]: [http] request: GET /skate_phantom_flex_4k/high/skate_phantom_flex_4k_788_360p.m3u8 HTTP/1.1
21:55:18.676 T:9084 DEBUG: ffmpeg[237C]: [http] User-Agent: Kodi/17.0-BETA6 (Windows NT 10.0; WOW64) App_Bitness/32 Version/17.0-BETA6-Git:20161110-5957945
21:55:19.104 T:9084 DEBUG: ffmpeg[237C]: [http] request: GET /skate_phantom_flex_4k/veryhigh/skate_phantom_flex_4k_1056_480p.m3u8 HTTP/1.1
21:55:19.104 T:9084 DEBUG: ffmpeg[237C]: [http] User-Agent: Kodi/17.0-BETA6 (Windows NT 10.0; WOW64) App_Bitness/32 Version/17.0-BETA6-Git:20161110-5957945
....
21:55:20.740 T:9084 DEBUG: ffmpeg[237C]: [hls,applehttp] HLS request for url 'http://sample.vodobox.net/skate_phantom_flex_4k/low/skate_phantom_flex_4k_228_144p1.ts', offset 0, playlist 0
21:55:21.678 T:9084 DEBUG: ffmpeg[237C]: [hls,applehttp] HLS request for url 'http://sample.vodobox.net/skate_phantom_flex_4k/medium/skate_phantom_flex_4k_452_240p1.ts', offset 0, playlist 1
21:55:22.992 T:9084 DEBUG: ffmpeg[237C]: [hls,applehttp] HLS request for url 'http://sample.vodobox.net/skate_phantom_flex_4k/high/skate_phantom_flex_4k_788_360p1.ts', offset 0, playlist 2
....

On the Example File you see he Load All mp3u8 and then also loads all Mpg files
skate_phantom_flex_4k_788_360p1.ts' ) Is 360 Resultion Part1
skate_phantom_flex_4k_452_240p1.ts is 452 Resultion Part1
usw...

Every File Looks in Kodi.log like
21:55:26.667 T:9084 DEBUG: ffmpeg[237C]: [hls,applehttp] HLS request for url 'http://sample.vodobox.net/skate_phantom_flex_4k/hdready/skate_phantom_flex_4k_2112_720p1.ts', offset 0, playlist 4
21:55:26.904 T:9084 DEBUG: ffmpeg[237C]: [http] request: GET /skate_phantom_flex_4k/hdready/skate_phantom_flex_4k_2112_720p1.ts HTTP/1.1
21:55:26.905 T:9084 DEBUG: ffmpeg[237C]: [http] User-Agent: Kodi/17.0-BETA6 (Windows NT 10.0; WOW64) App_Bitness/32 Version/17.0-BETA6-Git:20161110-5957945
21:55:26.905 T:9084 DEBUG: ffmpeg[237C]: [http] Accept: */*
21:55:26.905 T:9084 DEBUG: ffmpeg[237C]: [http] Connection: close
21:55:26.905 T:9084 DEBUG: ffmpeg[237C]: [http] Host: sample.vodobox.net
21:55:26.905 T:9084 DEBUG: ffmpeg[237C]: [http] Icy-MetaData: 1
21:55:26.905 T:9084 DEBUG: ffmpeg[237C]: [http]
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='HTTP/1.1 200 OK'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] http_code=200
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Date: Fri, 11 Nov 2016 20:55:27 GMT'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Server: Apache/2.2'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Last-Modified: Tue, 22 Sep 2015 16:46:21 GMT'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='ETag: "6c20c48-d4b18-52058bcd9bb2a"'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Accept-Ranges: bytes'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Content-Length: 871192'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Access-Control-Allow-Origin: *'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Access-Control-Expose-Headers: Content-Length'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Access-Control-Allow-Headers: Range'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Connection: close'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header='Content-Type: video/MP2T'
21:55:27.062 T:9084 DEBUG: ffmpeg[237C]: [http] header=''
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: Probing mp3 score:1 size:2048
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: Probing mpegts score:50 size:2048
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: Format mpegts probed with size=2048 and score=50
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: score: 44, dvhs_score: -3, fec_score: -1
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] Filter: pid=0x11 type=1
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] Filter: pid=0x0 type=1
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] SDT:
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] tag: 0x48 len=18
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] new_program: id=0x0001
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] PAT:
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] sid=0x1 pid=0x1000
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] new_program: id=0x0001
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] Filter: pid=0x1000 type=1
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] PMT: len 26
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] sid=0x1 sec_num=0/0 version=0 tid=2
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] pcr_pid=0x100
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] Filter: pid=0x100 type=0
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] stream=0 stream_type=1b pid=100 prog_reg_desc=
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] Filter: pid=0x101 type=0
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] stream=1 stream_type=f pid=101 prog_reg_desc=
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] tuning done
21:55:27.294 T:9084 DEBUG: ffmpeg[237C]: [mpegts] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:2
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] Skipping after seek
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] SDT:
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] tag: 0x48 len=18
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] new_program: id=0x0001
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] PAT:
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] sid=0x1 pid=0x1000
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] new_program: id=0x0001
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] PMT: len 26
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] sid=0x1 sec_num=0/0 version=0 tid=2
21:55:27.295 T:9084 DEBUG: ffmpeg[237C]: [mpegts] pcr_pid=0x100
....


So You see it really Calls All Streams.

> Nevertheless there should only be a single stream that goes over the network.
Thats why i Mean its a bug, makes no sense calling all Streams
Reply
#6
Here is a fix: https://github.com/xbmc/xbmc/pull/10913

In addition to discarding all unselected programs now I discard all streams not in the selected program.

Hope this helps.
Reply
#7
Tahnks , i will test .
Hopfully it will get in the Nightly Builds soon so i can test
Reply
#8
could you try this test build?
http://mirrors.kodi.tv/test-builds/win32...hlsfix.exe
Reply
#9
Much Better.

He Still loads all m3u8 Lists ans also from all Playlists the Segment1,
but then it loads only the Segments of The Streams that is with the Right Bitrate (The Other Streams stoped after Segment 1

It that with the Segment1 correct?
Reply
#10
(2016-11-12, 14:03)L0RE Wrote: It that with the Segment1 correct?

That most likely occurs when ffmpeg analyses the streams. In order to do so it decodes a bit of every stream.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 17 + m3u8 With Multible Quality Streams (HLS)0