Closed Eltion closed 4 years ago
Solved the problem. All I had to do is change the hls.c and hls.h file inside libavformat in FFmpeg-Vitamio and compile.
This is a know bug of ffmpeg (see ticket ffplay do not keep custom http headers across http sessions playing m3u8). It was fixed in https://github.com/FFmpeg/FFmpeg/commit/4684539c9148050ad26a8b840c4b5ee33799865d but the fix was months after Vitamio forked ffmpeg.
I'm setting headers to the http request like this
options.put("headers","User-Agent: something\r\nReferer: something\r\n")
and i also tired using -user-agent optionNow the get request for the first time to the m3u8 file goes well but than the next request goes without Referer header so video stops.