I need to pass http headers (user agent and ip) to an ffmpeg command.
I use the following command:
ffmpeg -y -timeout 5000000 -map 0:0 -an -sn -f md5 -
For set x:1
and y:2
for header ffmpeg request, use this:
ffmpeg -headers $'x:1\r\ny:2\r\n' -i 'http://sample.com' -y 'sample.mp4' -v debug
Result:
[http @ 0x358be00] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[http @ 0x358be00] request: GET / HTTP/1.1
User-Agent: Lavf/57.76.100
Accept: */*
Range: bytes=0-
Connection: close
Host: example.com
Icy-MetaData: 1
x:1
y:2