AWS Elastic Transcoder从视频中提取帧? [英] AWS Elastic Transcoder to extract frames from videos?

查看:116
本文介绍了AWS Elastic Transcoder从视频中提取帧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上一个问题所述,我正在寻找是使用AWS从视频中提取帧的最佳方法.

我遇到了AWS Elastic Transcoder,试图弄清楚是否可以使用它.唯一有趣的选择是缩略图的生成,但是它被限制为每秒1张,并且我需要视频的所有帧.

您认为使用Elastic Transcoder可以完成我需要做的事情吗?

谢谢

解决方案

我不认为Elastic Transcoder可以完成您想要的事情.视频处理本身的最佳解决方案是编写可在Elsatic Benadtalk或普通EC2上运行的python脚本或类似脚本(使用docker可能是个不错的主意,以用所需的所有工具获得正确的图像)./p>

以下是我用于转码的解决方案,这是一个类似的问题:

  • 网页允许用户将视频直接上传到S3(请参见fineuploader)
  • s3触发SQS消息
  • 弹性beantalk工作者层服务器运行python脚本,该脚本检查SQS队列并处理作业.
  • 对于任何作业,请使用ffmpeg生成框架(将Google ffmpeg视频转换为框架).
  • 如果要保留大图片,请将其上传回S3或先处理图像(调整大小),然后再上传
  • (可选)如果将大图片上传到s3,则可以将lambda函数仅用于图像调整大小.

我希望我可以向您展示不同部分的代码,但是我的解决方案更加详细,并且可以做其他事情,因此提取和修改以显示所需的内容并不容易,但是希望您能从中得到启发.

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

解决方案

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.

这篇关于AWS Elastic Transcoder从视频中提取帧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆