Passing HTTP Headers to FFmpeg

  • HTTP/1.1

    User-Agent: Lavf/58.20.100

    Accept: */*

    Range: bytes=0-

    Connection: close

    Host: xxxxxx.xxx

    Icy-MetaData: 1

    X-API-KEY: MyApiKey

    X-API-SECRET:asfd


    [http @ 0x1ff5db0] header='HTTP/1.0 403 Forbidden'

    [http @ 0x1ff5db0] http_code=403

    [http @ 0x1ff5db0] HTTP error 403 Forbidden

    :( Something like this.

  • ffmpeg -headers $'x:Mozilla/4.0 (Linux; Android 6.1.2; Test) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.76 Mobile Safari/537.36\r\ny:2\r\n' -i 'xxxxxx.xxx' -y -v debug

    :) Successfully