#4846 closed defect (fixed)
New ffmpeg build lose full cookies support (HLS,APPLEHTTP)
Reported by: | Dany Côté | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | git-master | Keywords: | hls regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
Since kodi 15.0+ my addon can't play HTTPS HLS stream when server use cookies to authenticate client. It's look like Cookie Jar (session) is not kept, I reproduced the problem with MPV for windows (I use Windows 10) (http://mpv.srsfckn.biz/) version 2015-09-03, but it's work perfectly with Kodi 14 and MPV 2015-06-10...
With Kodi, ive tried to determine the source of my bug. I used fiddler to analyse HTTP trafic.
My results :
With kodi 14:
Call 1:
GET master.m3u8?hdnea=st=1442110578~exp=1442110643~acl=/i/012/mp4/i/2015-09-10_19_29_30_infoman_0406_*~hmac=e65e5c1f99490dc7eb6f4735e71f64620b90fa7aa5a2d25d889d2a85e1454867 HTTP/1.1
Return :
Response sent 210 bytes of Cookie data:
Set-Cookie: hdntl=exp=1442197043~acl=%2fi%2f012%2fmp4%2fi%2f2015-09-10_19_29_30_infoman_0406_*~data=hdntl~hmac=38c574b93b9b455c9301b734a34eeeb87ef5fd290bd308a92ecf0c7ec277f467; path=/; domain=toutvuniver1-vh.akamaihd.net;
Response sent 156 bytes of Cookie data:
Set-Cookie: _alid_=YsRWYon6GP4YDxu2iRsAmA==; path=/i/012/mp4/i/2015-09-10_19_29_30_infoman_0406_,500,800,1200,2000,3000,.mp4.csmil/; domain=toutvuniver1-vh.akamaihd.net
ffmpeg correctly send back these cookies during call 2 and 3 :
Call 2 :
GET index_0_av.m3u8
(Cookie: hdntl=exp=1442196982~acl=%2fi%2f012%2fmp4%2fi%2f2015-09-10_19_29_30_infoman_0406_*~data=hdntl~hmac=3eb50bfcada9e8a2c7f67bb9dd5cfd6519690b3360da52631667539abe70f7f1; _alid_=dLmmkHrWidM4JpXfr/wOwQ==; hdntl=exp=1442197043~acl=%2fi%2f012%2fmp4%2fi%2f2015-09-10_19_29_30_infoman_0406_*~data=hdntl~hmac=38c574b93b9b455c9301b734a34eeeb87ef5fd290bd308a92ecf0c7ec277f467; _alid_=YsRWYon6GP4YDxu2iRsAmA==)
Call 3:
GET crypt.key?null=&id=AgDA3ocUzF6bt7Pc9FVCEtLRCQK5cl1HWgwsv0NW8kav4ATDiVGkvfVQlERx6+dVH5BMgsFvpk644Q%3d%3d HTTP/1.1
(Cookie: hdntl=exp=1442196982~acl=%2fi%2f012%2fmp4%2fi%2f2015-09-10_19_29_30_infoman_0406_*~data=hdntl~hmac=3eb50bfcada9e8a2c7f67bb9dd5cfd6519690b3360da52631667539abe70f7f1; _alid_=dLmmkHrWidM4JpXfr/wOwQ==; hdntl=exp=1442197043~acl=%2fi%2f012%2fmp4%2fi%2f2015-09-10_19_29_30_infoman_0406_*~data=hdntl~hmac=38c574b93b9b455c9301b734a34eeeb87ef5fd290bd308a92ecf0c7ec277f467; _alid_=YsRWYon6GP4YDxu2iRsAmA==)
Crypt key value : z��.��O"$Hb�
But since kodi 15 (i tried 15.0, 15.1, 15.2 and 16 RC1)
Call 1 is identical :
GET master.m3u8?hdnea=st=1442110872~exp=1442110937~acl=/i/012/mp4/i/2015-09-10_19_29_30_infoman_0406_*~hmac=3f7f04a637bf5178a8d3649b3b4d02ace5108c53b9baa1771938137d3cc6df3a HTTP/1.1
Return (it's barely identical):
Response sent 210 bytes of Cookie data:
Set-Cookie: hdntl=exp=1442197276~acl=%2fi%2f012%2fmp4%2fi%2f2015-09-10_19_29_30_infoman_0406_*~data=hdntl~hmac=b4a4b8cc0f8bce3fdc07cb96dc11bbbd976057e1e1ef717b0198656580a0aacc; path=/; domain=toutvuniver1-vh.akamaihd.net;
Response sent 156 bytes of Cookie data:
Set-Cookie: _alid_=s4xlmE7ZjxkyCWG0q4svqw==; path=/i/012/mp4/i/2015-09-10_19_29_30_infoman_0406_,500,800,1200,2000,3000,.mp4.csmil/; domain=toutvuniver1-vh.akamaihd.net
Call 2 :
Now ffmpeg select index 4 by itself (based on client bandwidth), it's ok.
GET index_4_av.m3u8?null=&id=AgDA3ocUzF6bvpzd9FXbqEsGltYruWZsB1+VoSG%2f6EY0o5fzdEb4zcAO26Diyi6KS6PnxY0IhWhX7Q%3d%3d HTTP/1.1
(Cookie: hdntl=exp=1442197276~acl=%2fi%2f012%2fmp4%2fi%2f2015-09-10_19_29_30_infoman_0406_*~data=hdntl~hmac=b4a4b8cc0f8bce3fdc07cb96dc11bbbd976057e1e1ef717b0198656580a0aacc; _alid_=s4xlmE7ZjxkyCWG0q4svqw==)
Call 3 :
GET crypt.key?null=&id=AgDA3ocUzF6bvpzd9FXbqEsGltYruWZsB1+VoSG%2f6EY0o5fzdEb4zcAO26Diyi6KS6PnxY0IhWhX7Q%3d%3d HTTP/1.1
(Cookie: _alid_=s4xlmE7ZjxkyCWG0q4svqw==) <<<<< Very tiny !!
this time the server response is:
403 Forbidden
<HTML><HEAD> <TITLE>Access Denied</TITLE> </HEAD><BODY> <H1>Access Denied</H1> You don't have permission to access "crypt.key?" on this server.<P> Reference #18.be9b5ecc.1442110876.126fa </BODY> </HTML>
I think the new version of ffmpeg is broken... but I really need that feature for playing akamaihd content...
Here, copy of MPV output log :
Playing: https://toutvuniver1-vh.akamaihd.net/i/012/mp4/c/2015-09-11_19_00_00_cheforeille_0001_,500,800,1200,2000,3000,.mp4.csmil/master.m3u8?hdnea=st=1442150589~exp=1444742589~acl=/i/012/mp4/c/2015-09-11_19_00_00_cheforeille_0001_*~hmac=84d9371012603adc84fc95b49714153067267921e1fd1657aa4dbde37a135c90
[ytdl_hook] youtube-dl not found, not executable, or broken.
[ffmpeg] https: No trailing CRLF found in HTTP header.
[ffmpeg] http: HTTP error 403 Forbidden
[ffmpeg] crypto: Unable to open resource: http://toutvuniver1-vh.akamaihd.net/i/012/mp4/c/2015-09-11_19_00_00_cheforeille_0001_,500,800,1200,2000,3000,.mp4.csmil/segment1_0_av.ts?null=&id=AgDA3ocUuFTzZP6D9VV5ld2XSNbwaxOqUHkw%2feJpYrOKgj8wqLoFRAOsOOERNS3DwNm8gM5Ya1xYug%3d%3d
[ffmpeg/demuxer] hls,applehttp: Failed to open segment of playlist 0
[ffmpeg] http: HTTP error 403 Forbidden
[ffmpeg] crypto: Unable to open resource: http://toutvuniver1-vh.akamaihd.net/i/012/mp4/c/2015-09-11_19_00_00_cheforeille_0001_,500,800,1200,2000,3000,.mp4.csmil/segment2_0_av.ts?null=&id=AgDA3ocUuFTzZP6D9VV5ld2XSNbwaxOqUHkw%2feJpYrOKgj8wqLoFRAOsOOERNS3DwNm8gM5Ya1xYug%3d%3d
How to reproduce:
Call this page, with your browser :
http://infologique.net/api/ici/
and start playing the generated url (may possibly work only in canada... I don't know)
Change History (9)
follow-up: 2 comment:1 by , 9 years ago
Keywords: | hls regression added; HLS AppleHTTP cookies removed |
---|
comment:2 by , 9 years ago
Replying to cehoyos:
Please verify if this is a regression since da7759b3579de3e98deb1ac58e642b861280ba54 / a duplicate of ticket #4797.
Currently, this has no similarities with a valid ticket;-(
Not really similar to ticket #4797, but the most similar ticket seems to be the #4808. You think my ticket is not valid? I'm only a ffmpeg user, and a simple C# coder... you can't reproduce ?
comment:3 by , 9 years ago
You think my ticket is not valid?
Ignore this. I can confirm this bug. I'll try to fix it as soon as I have time, if nobody else does.
comment:4 by , 9 years ago
Component: | undetermined → avformat |
---|---|
Reproduced by developer: | set |
Resolution: | → duplicate |
Status: | new → closed |
Version: | unspecified → git-master |
Indeed a duplicate of ticket #4797.
comment:6 by , 9 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Originally broken in da7759b3579de3e98deb1ac58e642b861280ba54 and fixed since 2d0117f816b92510546caf26414961ee6088f961 - now broken since ba12ba859aabfa7153ba397d869db13acdaba340
comment:7 by , 9 years ago
Fixed via 26eb2940079d0ec433cf9b2deae24560707cbcf8. (At least this specific case.)
comment:8 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:9 by , 9 years ago
It will be merged into 2.8-branch ? Otherwise in which release commit 26eb2940079d0ec433cf9b2deae24560707cbcf8 will be available? Thanks!
Please verify if this is a regression since da7759b3579de3e98deb1ac58e642b861280ba54 / a duplicate of ticket #4797.
Currently, this has no similarities with a valid ticket;-(