[FFmpeg-devel] [PATCH] http: make caching of redirect url optional
Eran Kornblau
eran.kornblau at kaltura.com
Tue Nov 2 15:00:10 EET 2021
Hi all,
The attached patch makes the default behavior of caching HTTP redirects optional.
When enabled (default), seek operations use the latest redirect URL, this was the behavior until now.
When disabled, the initial URL passed to http_open will be used after seek, effectively going through all redirections again.
The motivation for this feature is S3 signatures – currently we have a problem where S3 signatures cannot be created
with an expiration of more than 12H. In some cases, a transcoding task may execute for more than that.
If we use a pre-signed S3 URL, and ffmpeg disconnects/seeks after the expiration of the URL, it will fail.
The solution we are planning is to have some local server on the machine running ffmpeg that will generate an S3-signature,
and redirect to the full pre-signed URL. For this to work, I need to disable the caching of redirects, and have ffmpeg always
start from the initial URL.
The nice thing about this solution is that the video data is pulled directly from S3 – in other words, the local server doesn’t
hold any real load, it just builds the signature and returns a redirect.
Thank you,
Eran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-http-make-caching-of-redirect-url-optional.patch
Type: application/octet-stream
Size: 3086 bytes
Desc: 0001-http-make-caching-of-redirect-url-optional.patch
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20211102/dd825129/attachment.obj>
More information about the ffmpeg-devel
mailing list