HLS m3u8 streams plays on Safari but not in Chrome or PMP

I have a plugin that retrieves m3u8 files from a server. I then play the complete m3u8 master file using:

        return IndirectResponse( VideoClipObject, key = HTTPLiveStreamURL( url = playlist_url ), http_cookies = http_cookies )

It works perfectly with Safari and iOS (with old player).
With Chrome, PMP (macos), PMP (RPi) or iOS (with new player) I get a 403 HTTP error (see below).

I can copy the m3u8 URL to Quicktime Player or VLC and it plays without problems so there shouldn’t be any missing cookies or similar.

Does anyone have any hints to help me find the root cause?

019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: request: GET /i/globalexclusives/gbl-abscbn/tvpatrolge/20190227/20190227-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=xxxxxxxxxxx~st=1551638680~exp=1551638980~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190227/20190227-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=237527~hmac=b2f50486b34b88a33d0fb8d3abf7dc60fba59835fc226de0fc6d0285e15328c9&__b__=5000 HTTP/1.1
 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: User-Agent: mpv 53a7eec
 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Accept: */*
 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Range: bytes=0-
 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Connection: close
 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Host: o2-i.akamaihd.net
 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Icy-MetaData: 1
 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: 
 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg:  
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: header='HTTP/1.1 403 Forbidden' 
2019-03-03 19:44:56 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: http_code=403 
2019-03-03 19:44:56 [ WARN  ] PlayerComponent.cpp @ 597 - ffmpeg: https: HTTP error 403 Forbidden 
2019-03-03 19:44:56 [ ERROR ] PlayerComponent.cpp @ 599 - stream: Failed to open https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190227/20190227-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=xxxxxxxxxxx~st=1551638680~exp=1551638980~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190227/20190227-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=237527~hmac=b2f50486b34b88a33d0fb8d3abf7dc60fba59835fc226de0fc6d0285e15328c9&__b__=5000. ```

I think http_cookies is very old and doesn’t do anything anymore. If you get the stream working in VLC without any cookies, you can just delete that part.

Issues I can think of in this case are:

  • They maybe check for certain allowed User Agents.
  • The m3u8 URL is created inside the plugin code and the hases inside the URL are partially based on the User Agent and/or other things. Trying to use the URL in a different player/browser location fails because the hashes don’t match.
  • The stream is encrypted and the player can’t handle encrypted HTTP Live Streams (although you wouldn’t get a 403 error in this case afaik).

Thanks for the input!

  1. Yes, http_cookies can be removed (they fill no purpose any longer)
  2. I did set the user agent both in the plugin and in mvp.conf to “Mozilla/5.0” but unfortunately no luck.
2019-03-06 18:17:48 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: User-Agent: Mozilla/5.0
2019-03-06 18:17:48 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Accept: */*
2019-03-06 18:17:48 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Range: bytes=0-
2019-03-06 18:17:48 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Connection: close
2019-03-06 18:17:48 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Host: o2-i.akamaihd.net
2019-03-06 18:17:48 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Icy-MetaData: 1
2019-03-06 18:17:48 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: 
2019-03-06 18:17:48 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg:  
2019-03-06 18:17:49 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: header='HTTP/1.1 403 Forbidden' 
  1. Well, the URL I get from the website is what I print in my log and what I use in Quicktime Player where it works. I just tried with some URLs in VLC but currentlt VLC is crashing…

  2. Is there a way to check if the stream is encrypted? In that case, is that a player capability or something I need to change in my setup?

It seems to be 403ing which means it can’t get the M3U8. There definately could be encryption on the other end. I’d try with something like webhook.site to ensure a valid user-agent is being sent. I’ve had the issue with FFMpeg before. Also you may want to use a full user agent.

Correct about 403.

Access Denied

You don't have permission to access "http://o2-i.akamaihd.net/i/halik/20190301/20190301-halik-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?" on this server.
Reference #18.24cdef50.1551894877.58dc42f

I have tested both “Mozilla 5.0” and Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15 which is my Safari user agent. I have used these both in all requests in Plex and also in mpv.conf.

I have also sent the user agent as part of a custom header in my IndirectResponse(… call and can see that it is propagated properly to mpv.

2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15 
2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Accept: */* 
2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Range: bytes=0- 
2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Connection: close 
2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Host: o2-i.akamaihd.net 
2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Icy-MetaData: 1 
2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: 
2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg:  
2019-03-06 19:05:37 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: header='HTTP/1.1 403 Forbidden' 

I can also set a dummy user agent like “my user agent” in Safari and I can play the m3u8 list.
I can download the m3u8 master file with Chrome.

Using cURL I can even get the master m3u8 file, and then the segments and then the segment data.
Note! No user agen specified and no cookies used!

MagBook:~ magnus$ curl --verbose --url "https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=81.228.62.213~st=1551896095~exp=1551896395~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=238369~hmac=9e8e188b19ffa6dadf4a4d61d34e3a23e5fd488883a06c1581c9c7352f056cf6&__b__=5000"
*   Trying 80.239.205.40...
* TCP_NODELAY set
* Connected to o2-i.akamaihd.net (80.239.205.40) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=Massachusetts; L=Cambridge; O=Akamai Technologies, Inc.; CN=a248.e.akamai.net
*  start date: Oct 18 00:00:00 2018 GMT
*  expire date: Oct 18 12:00:00 2019 GMT
*  subjectAltName: host "o2-i.akamaihd.net" matched cert's "*.akamaihd.net"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert ECC Secure Server CA
*  SSL certificate verify ok.
> GET /i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=81.228.62.213~st=1551896095~exp=1551896395~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=238369~hmac=9e8e188b19ffa6dadf4a4d61d34e3a23e5fd488883a06c1581c9c7352f056cf6&__b__=5000 HTTP/1.1
> Host: o2-i.akamaihd.net
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: AkamaiGHost
< Mime-Version: 1.0
< Content-Type: application/vnd.apple.mpegurl
< Content-Length: 5236
< Pragma: no-cache
< Cache-Control: no-store
< Expires: Wed, 06 Mar 2019 18:15:28 GMT
< Date: Wed, 06 Mar 2019 18:15:28 GMT
< Connection: keep-alive
< Set-Cookie: hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95; path=/; domain=o2-i.akamaihd.net; 
< Access-Control-Allow-Headers: *
< Access-Control-Expose-Headers: *
< Access-Control-Allow-Methods: GET, HEAD, OPTIONS
< Access-Control-Allow-Origin: *
< Set-Cookie: _alid_=zNZ4NfHo8/DZBlg8dG8lqQ==; path=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/; domain=o2-i.akamaihd.net
< 
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1261000,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_6_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=178000,RESOLUTION=320x180,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_0_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=333000,RESOLUTION=320x180,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_1_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=487000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_2_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=739000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_3_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=861000,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_4_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1099000,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_5_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=40000,CODECS="mp4a.40.2",CLOSED-CAPTIONS=NONE
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_0_a.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
* Connection #0 to host o2-i.akamaihd.net left intact

then get the segments

MagBook:~ magnus$ curl -v --url "https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_0_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95"
*   Trying 80.239.254.202...
* TCP_NODELAY set
* Connected to o2-i.akamaihd.net (80.239.254.202) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=Massachusetts; L=Cambridge; O=Akamai Technologies, Inc.; CN=a248.e.akamai.net
*  start date: Oct 18 00:00:00 2018 GMT
*  expire date: Oct 18 12:00:00 2019 GMT
*  subjectAltName: host "o2-i.akamaihd.net" matched cert's "*.akamaihd.net"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert ECC Secure Server CA
*  SSL certificate verify ok.
> GET /i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_0_av.m3u8?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=%2fi%2fglobalexclusives%2fgbl-abscbn%2ftvpatrolge%2f20190305%2f20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95 HTTP/1.1
> Host: o2-i.akamaihd.net
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: AkamaiGHost
< Mime-Version: 1.0
< Content-Type: application/vnd.apple.mpegurl
< Content-Length: 314938
< Pragma: no-cache
< Cache-Control: no-store
< Expires: Wed, 06 Mar 2019 18:15:52 GMT
< Date: Wed, 06 Mar 2019 18:15:52 GMT
< Connection: keep-alive
< Access-Control-Allow-Headers: *
< Access-Control-Expose-Headers: *
< Access-Control-Allow-Methods: GET, HEAD, OPTIONS
< Access-Control-Allow-Origin: *
< Set-Cookie: _alid_=p4jYelKd9NOK2yxwF/rFlA==; path=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/; domain=o2-i.akamaihd.net
< 
#EXTM3U
#EXT-X-TARGETDURATION:6
#EXT-X-ALLOW-CACHE:YES
#EXT-X-KEY:METHOD=AES-128,URI="https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/crypt.key?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95"
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:6.000,
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/segment1_0_av.ts?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXTINF:6.000,
https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/segment2_0_av.ts?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95
#EXTINF:6.000,

and even get the segment data:

MagBook:~ magnus$ curl -v --url "https://o2-i.akamaihd.net/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/segment2_0_av.ts?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95"
*   Trying 80.239.205.40...
* TCP_NODELAY set
* Connected to o2-i.akamaihd.net (80.239.205.40) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=Massachusetts; L=Cambridge; O=Akamai Technologies, Inc.; CN=a248.e.akamai.net
*  start date: Oct 18 00:00:00 2018 GMT
*  expire date: Oct 18 12:00:00 2019 GMT
*  subjectAltName: host "o2-i.akamaihd.net" matched cert's "*.akamaihd.net"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert ECC Secure Server CA
*  SSL certificate verify ok.
> GET /i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/segment2_0_av.ts?null=0&id=AgBR5D7VUO%2fNJEAOgFwlXYvPj50KbTZFWdkLWQbdHDHPnxDpdoCkJj+xvFJu4ojuoYkmW2u6PJOGLQ%3d%3d&hdntl=exp=1551982528~acl=/i/globalexclusives/gbl-abscbn/tvpatrolge/20190305/20190305-tvpatrol-ge-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~data=hdntl~hmac=e12d2cefe0d918c5c82ee9dab7e08bc71672dc678d5c2ea17a225a2e1694ca95 HTTP/1.1
> Host: o2-i.akamaihd.net
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: AkamaiGHost
< Mime-Version: 1.0
< Content-Type: video/MP2T
< Content-Length: 142704
< Pragma: no-cache
< Cache-Control: no-store
< Expires: Wed, 06 Mar 2019 18:17:51 GMT
< Date: Wed, 06 Mar 2019 18:17:51 GMT
?Wlj-?lm?N?}???e??*?͉a4P1*?\:⒞?l????C(n?Eܳ??i????Y??r?zG7?n?????ּ??=??.?`rR???
???zЌ3e??C????^4??`\??ٵf^?A*??p??i+?o?)?jg??'?3??=?^???6?X?4:w???w-V*??
                                                                       E???
                                                                           ??h?>p ???]=?)?#???L~?GֈU??B?/?'I
                                                                                                            ???U=,?;??<[??K??!F??l?Břp??t??5?,??T??,J)?@???_N????????"f?ޑ?`A?">?n???lae?'t???V#?)??Z?b"~?b????*hŰj?g1?7?_????#MC??

isn’t needed by Plex Web Player in Safari either…

It looks like it’s cutting off the authentication portion of the URL?

@NGTmeaty:

Good idea! Unfortunately that isn’t the case (see below).

The post you quoted was me showing what a browser will print out for an unauthorized URL as a comparison for the error seen with ffmpeg. I probably should have explained that in the post…

2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: request: GET /i/globalexclusives/gbl-anc/gametime/20190307/20190307-gametime-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=1.2.3.4~st=1552079405~exp=1552079705~acl=/i/globalexclusives/gbl-anc/gametime/20190307/20190307-gametime-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=238580~hmac=db4eccd360da480fcfa40584e0380ec02a3bf55617942cf1af566f8cc4fec4fc&amp;__b__=5000 HTTP/1.1
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Accept: */*
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Range: bytes=0-
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Connection: close
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Host: [o2-i.akamaihd.net](http://o2-i.akamaihd.net/)
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Icy-MetaData: 1 
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: 
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg:  
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: header='HTTP/1.1 403 Forbidden' 
2019-03-08 22:10:23 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: http_code=403 
2019-03-08 22:10:23 [ WARN  ] PlayerComponent.cpp @ 597 - ffmpeg: https: HTTP error 403 Forbidden 
2019-03-08 22:10:23 [ ERROR ] PlayerComponent.cpp @ 599 - stream: Failed to open https://o2-i.akamaihd.net/i/globalexclusives/gbl-anc/gametime/20190307/20190307-gametime-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=1.2.3.4~st=1552079405~exp=1552079705~acl=/i/globalexclusives/gbl-anc/gametime/20190307/20190307-gametime-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=238580~hmac=db4eccd360da480fcfa40584e0380ec02a3bf55617942cf1af566f8cc4fec4fc&amp;__b__=5000. 

BTW, once again the Plex forum serves me all white, blank pages! It happens quite often and is extremely annoying.

I have never understood how I manage to get out of it. I clear caches, cookies, reload, use different browsers, laptop and phone, .nothing works … and then suddenly it does without me doing anything.

What is going on? How can I make it stop?

@NGTmeaty:

You got me studying the URL a bit more, and look! The last ‘&’ has been url encoded to ‘&amp;’ which I am sure it shouldn’t be.

That stems from me changing the bandwidth limitation to get higher quality in some players.
playlist_url = playlist_url + '&__b__=5000'

I will investigate this further! Thanks for leading me there!

Noop! Wasn’t the added part of the url…

2019-03-09 07:39:59 [ WARN  ] PlayerComponent.cpp @ 597 - ffmpeg: https: HTTP error 403 Forbidden 
2019-03-09 07:39:59 [ ERROR ] PlayerComponent.cpp @ 599 - stream: Failed to open https://o2-i.akamaihd.net/i/bandila/20190306/20190306-bandila-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=1.2.3.4~st=1552113581~exp=1552113881~acl=/i/bandila/20190306/20190306-bandila-hd-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=238559~hmac=3d76a71db97f66d41f31c1602fda19211f2244b51d44c3af05fad317639157b4

Hmmm, something with user agents!

curl -A "plex" gives 403, curl -A "pleks" works
curl -A "mpv" gives 403, curl -A "mpw" works

So I need to do some deeper digging from the server to see what user agent that is actually used.

This seems to be a problem with the two ffmpeg headers:

Range: bytes=0-
Icy-MetaData: 1

The can be removed from ffmpeg with -seekable 0 and -icy 0 and I can open the master m3u8 file as here:

ffmpeg -user_agent "pleks" -loglevel debug -seekable 0 -icy 0 -i "https://o2-i.akamaihd.net/i/fksm/ep29/fksm-episode29-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=81.228.62.213~st=1552222371~exp=1552222671~acl=/i/fksm/ep29/fksm-episode29-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=55999~hmac=3e2913520b53e112d1c751d76471370c2722a523a5a7151c19b8514a45e36c02"

For some unknown and annoying reason ffmpeg puts back the Icy-MetaData: 1 header on all subsequent calls and fails with HTTP error 403.

Calling the index files and segment files manually with the command above I can get all data.

Therefor I have two major problems:

  1. How to pass -seekable 0 and -icy 0 through Plex and mpv to ffmpeg
  2. How to get ffmpeg to drop Icy-MetaData: 1 on subsequent calls

From mpv I can pass options to ffmpeg with this:
mpv --stream-lavf-o=seekable=0,icy=0,user_agent="pleks" "https://xxxxxxx"

I can now get the contents of the master.m3u8 file with mpv but it fails on getting the index files in the same manner as before. Making a new call with mpv for the index I get a problem with “crypt.key” files. With altered headers these can be read with cURL so it may be related to ffmpeg doing something it shouldn’t again…

The following line in mpv.conf solves the part of passing the parameters into ffmpeg from Plex:

stream-lavf-o=seekable=0,icy=0,user_agent="no-pleks"

For debugging I also added:

msg-level=all=trace

Extract from the log shows what happens.

  1. First call is good:
2019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: request: GET /i/kulilits/eps7/eps7-kulilits-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=1.2.3.4~st=1552226385~exp=1552226685~acl=/i/kulilits/eps7/eps7-kulilits-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=28535 hmac=898875971fad47a58f467ea45456dad9f8bb79d2d398e95fde3016ef12d86a69 HTTP/1.1
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: User-Agent: no-pleks
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Accept: */*
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Connection: close
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Host: o2-i.akamaihd.net
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: 
2019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg:  
2019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: header='HTTP/1.1 200 OK' 

skip…,

  1. Second call, Still good:
2019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: request: GET /i/kulilits/eps7/eps7-kulilits-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/master.m3u8?hdnea=ip=1.2.3.4~st=1552226385~exp=1552226685~acl=/i/kulilits/eps7/eps7-kulilits-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/*~id=c5c8a385-d366-45b6-914a-5a5cc875298b~data=28535 hmac=898875971fad47a58f467ea45456dad9f8bb79d2d398e95fde3016ef12d86a69 HTTP/1.1
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: User-Agent: no-pleks
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Accept: */*
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Connection: close
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Host: o2-i.akamaihd.net
 019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: 
2019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg:  
2019-03-10 15:00:06 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: header='HTTP/1.1 200 OK' 

skip…

  1. Now ffmpeg starts to read the index files and since the icy-metadata header is back, the call fails:
2019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: request: GET /i/kulilits/eps7/eps7-kulilits-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.csmil/index_0_av.m3u8?null=0&id=AgBR5D7VaFZvj2YYhVxrbmN99zD7Nh7frSQLGYAyVgsz0B%2fgmDD6zyM3yguBkBq%2fFkM5R625vNBg5A%3d%3d&hdntl=exp=1552312806~acl=%2fi%2fkulilits%2feps7%2feps7-kulilits-,150000,300000,500000,800000,1000000 1300000,1500000,.mp4.csmil%2f*~data=hdntl~hmac=62db3dc1df4ac1fb99117124b5a04975c671e4c9e1063412c5d6bbc876734beb HTTP/1.1
 019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: User-Agent: no-pleks
 019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Accept: */*
 019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Connection: close
 019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Host: o2-i.akamaihd.net
2019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Cookie: hdntl=exp=1552312806~acl=%2fi%2fkulilits%2feps7%2feps7-kulilits-,150000,300000,500000,800000,1000000,1300000,1500000,.mp4.cs il%2f*~data=hdntl~hmac=62db3dc1df4ac1fb99117124b5a04975c671e4c9e1063412c5d6bbc876734beb; _alid_=q1sp4kbhooNSk1P5cslDZA==
 019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: Icy-MetaData: 1
 019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: 
2019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg:  
2019-03-10 15:00:07 [ DEBUG ] PlayerComponent.cpp @ 593 - ffmpeg: https: header='HTTP/1.1 403 Forbidden' 

PMP log (macos):

log.txt.zip (2.0 KB)

The Icy-MetaData header may be a bug in ffmpeg: https://trac.ffmpeg.org/ticket/5578, unless there is some other option to pass to ffmpeg.

I think that the ffmpeg bug 5578 needs to be fixed in order for this to work.
The step to build ffmpeg myself just to verify is a little bit too much for me right now and
after going through the ffmpeg source code I’m haven’t really got any wiser.

I think the main problem is that the “-icy 0” parameter is not propagated to the calls made
by ffmpeg itself when it starts to fetch the index files and the segments.

Unfortunately the default value for “-icy” is 1 so when a new request is initiated it sets “-icy 1”.

The last poster in 5578 removed the complete “Icy-MetaData” part from the source code which would work for an individual but to propose a push request to ffmpeg a real solution must be
found.

I know that @Pip.Longrun worked around similar issues by pulling in the playlist and segments in the Python code, instead of handing over the playlist to the Plex player. That way you have more control over what headers you send out to the server, e.g. a required Referer header for arconaitv.bundle

  1. Rebuild the playlist: rewrite all URLs to represent a specific route in the plugin (/video/arconaitv/segment/{url}.ts in this case).

  2. Download each requested segment and output it.

@sander1: Excellent advice!

This will most likely work in my case as well.

I tried to accomplish the rewriting with a proxy server but have so far failed. Your suggestion is a much better approach since the plugin will work without any external fixes. Probably I don’t even need the settings in mpv.conf.

A bit silly that I should have to make these tricks in the plugin to work around what seems to be a one line bug fix in ffmpeg, but if it hasn’t been fixed in 3 years I guess we are to few having that problem.

Thanks to the tip from @sander1 I managed to overcome the bug in ffmpeg!
Unfortunately, things got a bit messier than expected since I had to retrieve the master.m3u8 file in the URL Service and send the URL back to __init__.py to process it…

Anyway, thank you everyone for your help!