adaptivedemux: Need configuration for user-agent used for downloading fragments/manifests
Hi, custom user-agent is not always sent as i expect it to, which causes Forbidden (403)
error.
Full command :
gst-launch-1.0 souphttpsrc user-agent="mpv 0.29.1" location='http://93.87.85.10/PLTV/88888888/224/3221226575/index.m3u8?accountinfo=vl%2B3Xq3qLstxwB%2FFDSS4Sma3SEm0jTynU03wrqt2VrHb4SZOjx%2FOedJ28OyycsbNbkkv%2BqCH1xvhl2s4C5WUA1gfY6LC3makiUZQ9TZ1ayPMZA2cJK72fajyUvEXE%2BWTj5qzCwXBzJWxuappVP5N2dycE3QM6COEN9pTB3VsSgM%3D%3A20180309191625%3AUT%2CEND&GuardEncType=2' ! hlsdemux ! decodebin ! videoconvert ! videoscale ! autovideosink
I used tcpdump
to see html headers, and here is what the output looks like :
...
Host: 93.87.85.10
User-Agent: mpv 0.29.1
...
Host: 93.87.85.149
User-Agent: mpv 0.29.1
...
Host: 93.87.85.149
User-Agent: GStreamer souphttpsrc 1.14.4 libsoup/2.56.0
...
(i get 403 error)
User-Agent appears to be reset to original after second redirect.
I think 403 is definetly caused by wrong user-agent, because i tried with ffmpeg, which works, so long i set the user-agent :
ffplay -user-agent "mpv 0.29.1" -i 'http://93.87.85.10/PLTV/88888888/224/3221226575/index.m3u8?accountinfo=vl%2B3Xq3qLstxwB%2FFDSS4Sma3SEm0jTynU03wrqt2VrHb4SZOjx%2FOedJ28OyycsbNbkkv%2BqCH1xvhl2s4C5WUA1gfY6LC3makiUZQ9TZ1ayPMZA2cJK72fajyUvEXE%2BWTj5qzCwXBzJWxuappVP5N2dycE3QM6COEN9pTB3VsSgM%3D%3A20180309191625%3AUT%2CEND&GuardEncType=2'
However, if i omit the -user-agent option in ffmpeg, i also get the same 403 problem.
Is there a way i can use extra-headers option to set user agent ? I can not figure out how to set it from the command line, as it is a structure, not a simple string or int. I tried extra-headers='User-Agent:mpv0.29.1'
, but it did not change headers.
Thanks in advance !