[FFmpeg-user] ffmpeg hls and 3 cookies

Moritz Barsnick barsnick at gmx.net
Sun Jan 1 18:27:51 EET 2017


On Sun, Jan 01, 2017 at 16:19:14 +0100, Georg Stein SMC wrote:
> Hello,
> 
>   ffmpeg -headers 'Cookie: 
> CloudFront-Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9yZXBsYXkucGVyaXNjb3BlLnR2L3JaXzhYbk5yeVhWVnA3M2JKbG1OVlZ3RldkS0lDbTBNbHdyaGRPelBZMFY4b3lUM2ZfWl9nbkdiRVJ6NGhERDhzT3NsSFE1WEZTaUdySmFla1lXTVpnKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTQ4MzM0NDIzNn19fV19;CloudFront-Key-Pair-Id=APKAIHCXHHQVRTVSFRWQ;CloudFront-Signature=PiLhDHXFD~VbDd3qKKeafwntyvBWITmt3sAmv46z~DmgHl8vRYruodYj3iwh8Sjm2PqD1Dp4TqMCp498fxrpEt~MtI8EbuYQc~w5-iQR3lp8fHGN7aHybJghpCZn2ac-J0ujdOZyz0uQuKmeck8EwvMpJhhfQm3RMsi4Zonu3X0Hl0GYCoqM3AFTlLc8FAkBmqRaw~lRoud6GqepptGPcnMgL~aM5vzXGkbPLmnWmB6UUKFOQFfSo1xHVMz3FbOEsg2GN0CkKKKGKQcj4nf7jYEZpehOPu9SA1H~tVfASQxNiMLGdFgy7W72pMeI2bU2odmOek6eoRjAWauQIffNyg__;'$'\r\n' 
> -i 
> 'https://replay.periscope.tv/rZ_8XnNryXVVp73bJlmNVVwFWdKICm0MlwrhdOzPY0V8oyT3f_Z_gnGbERz4hDD8sOslHQ5XFSiGrJaekYWMZg/playlist_1482892547484600267.m3u8' 
> -c copy test.ts -v debug

(You should be showing us the complete, uncut console output.)

You're saying this works for you, right? And not with "-cookies"? It
that an issue for you?

>From playing around, I can confirm that the implementation of
"-cookies" does seem to have some deficits. You would have seen this,
had you compared the quoted output from "-headers" with that from
"-cookies": As soon as "-cookies" has more than one cookie (separated
by "; ", it one uses the first. If you don't add a cookie "path=/;", it
won't validate the command line and refuse to send any cookie at all
(apparently).

I can't fix this, because I don't understand the intention of the code.
;-) Perhaps someone else will take a look.

I don't need "$'\r\n'" with "-headers" by the way, it works without.

Moritz


More information about the ffmpeg-user mailing list