ffmpeg - How to pass http headers?

前端 未结 3 1679
别那么骄傲
别那么骄傲 2021-01-30 23:36

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 -          


        
3条回答
  •  青春惊慌失措
    2021-01-31 00:07

    Well, ffmpeg manual says to split multiple http-headers by CRLF. The problem is that you overwrite your first "-header" argument with the second "-header" as there can be only one "-header" argument.

    For your example, you need to join User-Agent and X-Forwarded into one argument by valid CRLF like this:

    -header "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36"$'\r\n'"X-Forwarded-For: 13.14.15.66"$'\r\n'

提交回复
热议问题