[FFmpeg-user] specifying header for http post
Daniel Oberhoff
danieloberhoff at googlemail.com
Wed Mar 31 01:05:46 EEST 2021
> On Mar 31, 2021, at 12:00 AM, Daniel Oberhoff <danieloberhoff at googlemail.com> wrote:
>
>
>
>> On Mar 30, 2021, at 7:46 PM, Gyan Doshi <ffmpeg at gyani.pro <mailto:ffmpeg at gyani.pro>> wrote:
>>
>>
>>
>> On 2021-03-30 20:44, Daniel Oberhoff via ffmpeg-user wrote:
>>> Hello
>>>
>>> I am trying to add an authorization header to a http post output, but somehow cant seem to succeed.
>>>
>>> my request looks like this:
>>>
>>> ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 -vframes 1 -headers "Authorization: foo" -f image2 -chunked_post 0 https://foo <https://foo/> <https://foo/ <https://foo/>>.org/endpoint -loglevel trace
>>>
>>>
>>> but the trace doesnt mention the auth header at all or respect the chunked_post 0. am I missing something?
>>
>> You need to use the image2 option protocol_opts to pass on these options.
>>
>> See the last example at http://www.ffmpeg.org/ffmpeg-formats.html#Options-7 <http://www.ffmpeg.org/ffmpeg-formats.html#Options-7>
>
> Hmm, that doesnt seem to work.
>
> -protocol_opts headers="Authorization: feb6c4ec3562a15e450fe07568e62e2f”
>
> gave me
>
> Error setting option protocol_opts to value headers="Authorization: feb6c4ec3562a15e450fe07568e62e2f".
> Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
> Error initializing output stream 0:0 --
>
>
> :(
ok, figured it out: i need to escape the colon :)
best
daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210331/79efb4d6/attachment.sig>
More information about the ffmpeg-user
mailing list