[FFmpeg-user] Output to S3

Moritz Barsnick barsnick at gmx.net
Tue Sep 8 12:10:26 EEST 2020


Hi Bohdan/Bogdan,

On Tue, Sep 08, 2020 at 09:39:26 +0300, Bohdan Fihar wrote:
> How can I output a video file to AWS S3 either public bucket ot Presigned
> url ?
> I tried
> *ffmpeg -i small.mkv -f matroska -movflags frag_keyframe+empty_moov -method
> PUT https://[my-bucket-name].s3.us-east-2.amazonaws.com/video/output.mkv
> <http://s3.us-east-2.amazonaws.com/video/output.mkv>*
>
> bur it won't work, fails with
>
> *av_interleaved_write_frame(): I/O errorError writing trailer of https...*

I have no experience with S3, but this Stackoverflow thread seems to
suggest you need to use the "aws s3 cp" command:

https://stackoverflow.com/questions/54736246/stream-ffmpeg-transcoding-result-to-s3

I *guess* ffmpeg assumes it can seek on HTTP PUT output URLs, which
doesn't work on AWS S3. Instead, when piping with above command, ffmpeg
doesn't use this assumption. But I may be wrong.

Please try this.

Cheers,
Moritz


More information about the ffmpeg-user mailing list