0

I want to transcode video in 360p, 480p, 720p and then upload to amazon s3.

Currently we are using php library FFMPEG

I have successfully transcode video on my server. But I did not get that how to achieve same on amazon s3.

Do I need to first upload original video on s3 and then get that video and transcode in different format and send to amazon s3? is it possible?

Or if any other way than please suggest me.

Cœur
  • 37,241
  • 25
  • 195
  • 267
dev
  • 67
  • 7

1 Answers1

0

S3 is not a block file system, it is an object file system. The difference here is that, normally, you cant mount a S3 bucket like a standard unix FS and work on file with fopen(), fwrite() ect... Some trick exists to work on S3 like any other FS but I would suggest an other option :

You have to transcode the video on a localy mounted FS (like an AWS EFS, or a local file system), then "push" (or upload) the whole transcoded video onto the S3 bucket. Of course, you can improve this process in may ways (remove temp file, do parallel works, use Lambda service, or task in containers...). You should avoid to do many upload/download from or to S3 (because it is time and cost consuming). Use a local storage as much as possible, then push the resulting data when they are ready on S3.

Also AWS have a service to do video transcodification : https://aws.amazon.com/en/elastictranscoder/

JayMore
  • 642
  • 6
  • 20
  • Thanks for the answer. I have read about Elastic Transcode but its costly, thats why i want an open source transcode like FFMPEG and upload multiple video formate on s3. – dev May 22 '18 at 08:58
  • elastic transcoder uses ffmpeg. You are paying for the server time not the software. "open source" will not save any money in the case, because you will need to pay for the server and electricity to run ffmpeg. – szatmary May 22 '18 at 15:26
  • @szatmary so any other way that i can transcode video when upload and send to s3 directly without using elastic transcoder ?? – dev May 24 '18 at 09:31