ffmpeg upload to s3

Viewed 241

I just want to upload a video file to AWS S3 using ffmpeg console. I tried

ffmpeg -re -i 1.mp4 -f hls -method PUT https://[my-public-bucket].s3.us-east-2.amazonaws.com/video/temp.mp4

the commands executes but no file appears in the bucket.

Also I tried

ffmpeg -re -i 1.mp4 -f mp4 -movflags frag_keyframe+empty_moov -method PUT https://[my-public-bucket].s3.us-east-2.amazonaws.com/video/temp.mp4

but got an error:

[tls @ 00000295dffdea80] Error in the push function.
frame=  201 fps= 15 q=-1.0 Lsize=      33kB time=00:00:13.44 bitrate=  20.2kbits/s speed=0.984x
video:27kB audio:212kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[tls @ 00000295dffdea80] The specified session has been invalidated for some reason.
[tls @ 00000295dffdea80] Error in the pull function.
[https @ 00000295dffde980] URL read error: I/O error

My another task is to upload a video to S3 using Presigned Url of my private bycket. I tried:

ffmpeg -re -i 1.mp4 -f mp4 -movflags frag_keyframe+empty_moov -method PUT [my-presigned-url]

and it fails with the same error.

Does anyone know how to upload the video to S3 ?

0 Answers
Related