#8913 closed defect (invalid)

Ffmpeg Restream a Hls that served by cloudflare

Reported by: Mike Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: hls
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

The page is : https://imajbet80.tv
I test different ffmpeg version, latest & git-2019-11-15-bfa8272

The restream code is 
ffmpeg  -headers "scheme: https" -headers "accept-encoding: gzip, deflate, br" -referer "https://imajbet80.tv" -headers "origin: https://imajbet80.tv" -headers "referer: https://imajbet80.tv" -headers "pragma: no-cache" -headers "cache-control:no-cache" -headers "sec-fetch-site: cross-site" -headers "sec-fetch-mode: cors" -headers "sec-fetch-dest: empty" -headers ":authority:d1.supercdn.cc" -headers ":method: GET"  -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36" -i "https://fast.supercdn.cc/o/1/bein-sports-1/supercdn.cc/1" -loglevel debug -f mp4 test.mp4

The Stream not encrypted, only the ts file extension changed to thge images, when you right click over browser the jpeg ( actually ts ) is downloading and when you change the extension you can watch it . The playlist.m3u8 file can be get by ffmpeg
however the jpeg file gives http 444 error , it seems ffmepg handshake bug but I cant be sure ?
it can get m3u8 without any issue
it tries to get the jpeg , got 444 ?

here is the verbose mode output


Splitting the commandline.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'scheme: https'.
Reading option '-headers' ... matched as AVOption 'headers' with argument .
Reading option '-headers' ... matched as AVOption 'headers' with argument 'accept-encoding: gzip, deflate, br'.
Reading option '-referer' ... matched as AVOption 'referer' with argument 'https://imajbet80.tv'.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'origin: https://imajbet80.tv'.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'referer: https://imajbet80.tv'.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'pragma: no-cache'.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'cache-control:no-cache'.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'sec-fetch-site: cross-site'.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'sec-fetch-mode: cors'.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'sec-fetch-dest: empty'.
Reading option '-headers' ... matched as AVOption 'headers' with argument ':authority:d1.supercdn.cc'.
Reading option '-headers' ... matched as AVOption 'headers' with argument ':method: GET'.
Reading option '-user_agent' ... matched as AVOption 'user_agent' with argument 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36'.
Reading option '-i' ... matched as input url with argument 'https://fast.supercdn.cc/o/1/bein-sports-1/supercdn.cc/1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'.
Reading option 'test.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url https://fast.supercdn.cc/o/1/bein-sports-1/supercdn.cc/1.
Successfully parsed a group of options.
Opening an input file: https://fast.supercdn.cc/o/1/bein-sports-1/supercdn.cc/1.
[NULL @ 000001b5f2a4b280] Opening 'https://fast.supercdn.cc/o/1/bein-sports-1/supercdn.cc/1' for reading
[https @ 000001b5f2a4c380] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[https @ 000001b5f2a4c380] No trailing CRLF found in HTTP header. Adding it.
[tcp @ 000001b5f2a4f380] Original list of addresses:
[tcp @ 000001b5f2a4f380] Address 104.26.3.147 port 443
[tcp @ 000001b5f2a4f380] Address 172.67.70.129 port 443
[tcp @ 000001b5f2a4f380] Address 104.26.2.147 port 443
[tcp @ 000001b5f2a4f380] Interleaved list of addresses:
[tcp @ 000001b5f2a4f380] Address 104.26.3.147 port 443
[tcp @ 000001b5f2a4f380] Address 172.67.70.129 port 443
[tcp @ 000001b5f2a4f380] Address 104.26.2.147 port 443
[tcp @ 000001b5f2a4f380] Starting connection attempt to 104.26.3.147 port 443
[tcp @ 000001b5f2a4f380] Successfully connected to 104.26.3.147 port 443
[https @ 000001b5f2a4c380] request: GET /o/1/bein-sports-1/supercdn.cc/1 HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
Referer: https://imajbet80.tv
Accept: */*
Range: bytes=0-
Connection: close
Host: fast.supercdn.cc
Icy-MetaData: 1
:method: GET

[https @ 000001b5f2a4c380] Last chunk received, closing conn
[hls @ 000001b5f2a4b280] Format hls probed with size=2048 and score=100
[hls @ 000001b5f2a4b280] Skip ('#EXT-X-VERSION:3')
[hls @ 000001b5f2a4b280] HLS request for url 'https://d1.supercdn.cc/i/bein-sports-1-1601418444.jpeg', offset 0, playlist 0
[hls @ 000001b5f2a4b280] Opening 'https://d1.supercdn.cc/i/bein-sports-1-1601418444.jpeg' for reading
[tcp @ 000001b5f2b13440] Original list of addresses:
[tcp @ 000001b5f2b13440] Address 104.26.2.147 port 443
[tcp @ 000001b5f2b13440] Address 104.26.3.147 port 443
[tcp @ 000001b5f2b13440] Address 172.67.70.129 port 443
[tcp @ 000001b5f2b13440] Interleaved list of addresses:
[tcp @ 000001b5f2b13440] Address 104.26.2.147 port 443
[tcp @ 000001b5f2b13440] Address 104.26.3.147 port 443
[tcp @ 000001b5f2b13440] Address 172.67.70.129 port 443
[tcp @ 000001b5f2b13440] Starting connection attempt to 104.26.2.147 port 443
[tcp @ 000001b5f2b13440] Successfully connected to 104.26.2.147 port 443
[https @ 000001b5f2b13200] request: GET /i/bein-sports-1-1601418444.jpeg HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
Referer: https://imajbet80.tv
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: d1.supercdn.cc
Cookie: cfduid=de801933f540c57f5f468fd1bdb563cd41601418460
Icy-MetaData: 1
:method: GET

[https @ 000001b5f2b13200] HTTP error 444 unknown
[hls @ 000001b5f2a4b280] Failed to open segment 399 of playlist 0
[hls @ 000001b5f2a4b280] HLS request for url 'https://d1.supercdn.cc/i/bein-sports-1-1601418449.jpeg', offset 0, playlist 0
[hls @ 000001b5f2a4b280] Opening 'https://d1.supercdn.cc/i/bein-sports-1-1601418449.jpeg' for reading
[tcp @ 000001b5f2af1d40] Original list of addresses:
[tcp @ 000001b5f2af1d40] Address 104.26.2.147 port 443
[tcp @ 000001b5f2af1d40] Address 104.26.3.147 port 443
[tcp @ 000001b5f2af1d40] Address 172.67.70.129 port 443
[tcp @ 000001b5f2af1d40] Interleaved list of addresses:
[tcp @ 000001b5f2af1d40] Address 104.26.2.147 port 443
[tcp @ 000001b5f2af1d40] Address 104.26.3.147 port 443
[tcp @ 000001b5f2af1d40] Address 172.67.70.129 port 443
[tcp @ 000001b5f2af1d40] Starting connection attempt to 104.26.2.147 port 443
[tcp @ 000001b5f2af1d40] Successfully connected to 104.26.2.147 port 443
[https @ 000001b5f2b13200] request: GET /i/bein-sports-1-1601418449.jpeg HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
Referer: https://imajbet80.tv
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: d1.supercdn.cc
Cookie: cfduid=de801933f540c57f5f468fd1bdb563cd41601418460
Icy-MetaData: 1
:method: GET

[https @ 000001b5f2b13200] HTTP error 444 unknown
[hls @ 000001b5f2a4b280] Failed to open segment 400 of playlist 0
[hls @ 000001b5f2a4b280] HLS request for url 'https://d1.supercdn.cc/i/bein-sports-1-1601418453.jpeg', offset 0, playlist 0
[hls @ 000001b5f2a4b280] Opening 'https://d1.supercdn.cc/i/bein-sports-1-1601418453.jpeg' for reading
[tcp @ 000001b5f2b12a80] Original list of addresses:
[tcp @ 000001b5f2b12a80] Address 104.26.2.147 port 443
[tcp @ 000001b5f2b12a80] Address 104.26.3.147 port 443
[tcp @ 000001b5f2b12a80] Address 172.67.70.129 port 443
[tcp @ 000001b5f2b12a80] Interleaved list of addresses:
[tcp @ 000001b5f2b12a80] Address 104.26.2.147 port 443
[tcp @ 000001b5f2b12a80] Address 104.26.3.147 port 443
[tcp @ 000001b5f2b12a80] Address 172.67.70.129 port 443
[tcp @ 000001b5f2b12a80] Starting connection attempt to 104.26.2.147 port 443
[tcp @ 000001b5f2b12a80] Successfully connected to 104.26.2.147 port 443
[https @ 000001b5f2af1b80] request: GET /i/bein-sports-1-1601418453.jpeg HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
Referer: https://imajbet80.tv
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: d1.supercdn.cc
Cookie: cfduid=de801933f540c57f5f468fd1bdb563cd41601418460
Icy-MetaData: 1
:method: GET

Change History (3)

comment:1 by Carl Eugen Hoyos, 13 months ago

Keywords: ffmpeg restream removed
Priority: criticalnormal

comment:2 by Mike, 13 months ago

Hi, the website updated,
imajbet81.tv
any news ?
What you think about the hls error ?

comment:3 by Chris Miceli, 13 months ago

Resolution: invalid
Status: newclosed

This is not a bug with ffmpeg, this is something to do with your webserver setup. The URLs are also a little bit suspicious and cannot be reproduced.

Note: See TracTickets for help on using tickets.