AWS Elastic Transcoder to extract frames from videos?

丶灬走出姿态 提交于 2021-02-10 12:34:52

问题


As mentionned in a previous question, I'm looking for the best way to extract frames from videos using AWS.

I came accross AWS Elastic Transcoder and tried to figure out if I could use it. The only option that could have been interesting is the thumbnails generation, but it is limited to 1 per second and I need all the frames of the video.

Do you think there is way to do what I need with Elastic Transcoder ?

Thanks


回答1:


I don't believe Elastic Transcoder can do what you want. The best solution for the video processing itself is to write a python script or similar that you can run on Elsatic Benadtalk or a normal EC2 ( using docker may be a good idea to get a proper image with all the tools you will need ).

Here a solution I use for transcoding which is a similar problem:

  • web page allows users to upload video directly to S3 ( see fineuploader )
  • s3 triggers an SQS message
  • an elastic beanstalk worker tier server runs a python script that checks the SQS queue and processes the job.
  • for any job, Use ffmpeg to generate the frames ( Google ffmpeg video to frames ).
  • if you want to keep the large pictures, upload them back to S3 or process the images first (resize) and then upload
  • optionally, if you upload the large pictures to s3, you could use a lambda function just for the image resizing side.

I wish I could show you the code for the different parts but my solution is more elaborated and does other things so it is not easy to extract and modify to show what you need, but I hope you get inspiration to do it yourself.



来源:https://stackoverflow.com/questions/36334108/aws-elastic-transcoder-to-extract-frames-from-videos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!