[FFmpeg-user] Uploading output of ffmpeg to AWS S3

Moritz Barsnick barsnick at gmx.net
Thu Jun 7 16:27:41 EEST 2018

On Thu, Jun 07, 2018 at 17:39:06 +0530, tarun singhal wrote:
> But this command is not working.

So what is it doing? Are there any error messages?

Without knowing aws, let me guess:
> ffmpeg -i <M3u8 Stream> -an -r 2 -t 60 -f image2 -vcodec mjpeg
> pipe:a_%0d.jpg | aws s3 cp - s3://ffmpegbucket-1/

The documentation for the "cp" command says: "Copies a local file or S3
object to another location locally or in S3." From those words, I would
guess it cannot handle stdin ("-"). And even if it did, you didn't name
a target file.

You do realize that your ffmpeg command outputs a stream of JPEG
images, and not a set of files? "pipe:a_%0d.jpg" most likely will not
nearly do what you expect it to.

> The objective is read a live stream keep generating frames and as soon I
> get 1st frame transfer it to AWS S3 bucket. So this will be continous
> upload process

You can probably do this from outside the ffmpeg command, by letting
ffmpeg create files, and checking the directory for the resulting files
before copying.


More information about the ffmpeg-user mailing list