yixia / VitamioBundle

Vitamio for Android
http://www.vitamio.org/en/
Other
5.27k stars 2.07k forks source link

Http headers with live m3u8 #440

Closed Eltion closed 4 years ago

Eltion commented 7 years ago

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 option

Now 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.

Eltioni commented 7 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.

xavieryao commented 7 years ago

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.