I am trying to download a blob video that is playing in my browser:
ffmpeg -i 'https://example.com/playlist.m3u8?cred=abcd' -bsf:a aac_adtstoasc \
-vcodec copy -c copy -crf 50 file.mp4
I get the error
https @ 0x11fe2ade0] HTTP error 403 Forbidden [hls @ 0x11fe05610] Failed to open an initialization section in playlist 0 Error when loading first segment 'https://example.com/s2q1.m4s'
Indeed, when I open https://example.com/s2q1.m4s
I get 403 forbidden in browser. However, if I add https://example.com/s2q1.m4s?cred=abcd
, I get no error.
I get the same behaviour with youtube-dl
So how to make ffmpeg
or youtube-dl
append whatever query parameter in the input url in all subsequent requests ?