我可以使用亚马逊的弹性横贯codeR只创建缩略图? [英] Can I use Amazon Elastic Transcoder to only create thumbnails?

查看:217
本文介绍了我可以使用亚马逊的弹性横贯codeR只创建缩略图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用回形针上传和亚马逊S3存储录像的Rails应用程序。我不是特别感兴趣转换视频文件转换成另一种格式,或添加水印,没有任何幻想。我只是想创建一个从视频缩略图作为海报图像使用我的视频播放器。

我看到亚马逊弹性横贯codeR允许自由创建缩略图(或者更确切地说,他们没有为创建缩略图收费),并因为我已经使用亚马逊的服务,我想看看我是否可以使用这对我的缩略图。

有谁知道如何设置使得没有文件从缩略图一边产生的输入/输出选项?难道我只是做了以下?

 跨codeR = AWS :: ElasticTrans codeR :: Client.new
跨coder.create_job(
  pipeline_id:APP_CONFIG [Rails.env] [:pipeline_id]
  输入:{
    关键:将videoPath,
    帧频:自动,
    解析:自动,
    aspect_ratio:自动,
    隔行扫描:'汽车',
    集装箱:自动
      },
       输出:{
       关键:,#LEAVE为空白吗?
        preset_id的:,#LEAVE为空白?
        thumbnail_pattern:缩略图,
        转:0
      }
    )
 

解决方案

没有。

有没有函数用于创建仅缩略图。

有也不可能建立一个新的代码转换工作而不实际代码转换任何东西。输入参数要求,在最低限度,输入视频的名称。输出参数要求,在最低限度,输出的文件的名称和一个preset中的ID。启动前的工作参数进行检查,并没有选择这将prevent的作业,同时创造一个缩略图执行。

您可以读到此处所有的可用功能:

http://docs.aws.amazon.com/elastictrans$c$cr/latest/developerguide/api-reference.html

给FFMPEG看看。它可以是一个麻烦,安装了一点点,但是它可以从视频中创建缩略图。

I have a Rails app using Paperclip to upload and store videos on Amazon S3. I'm not particularly interested converting the video files into another format, or adding watermarks, nothing fancy. I just want to create thumbnails from the videos to use as poster images on my video players.

I see that Amazon Elastic Transcoder allows for free thumbnail creation (or rather, they don't charge for thumbnail creation), and since I'm already using Amazon services, I wanted to see if I can use this for my thumbnails.

Does anyone know how to set the input/output options such that no file is generated aside from thumbnails? Could I just do the following?

transcoder = AWS::ElasticTranscoder::Client.new
transcoder.create_job(
  pipeline_id: APP_CONFIG[Rails.env][:pipeline_id],
  input: {
    key: VIDEOPATH,
    frame_rate: 'auto',
    resolution: 'auto',
    aspect_ratio: 'auto',
    interlaced: 'auto',
    container: 'auto'
      },
       output: {
       key: , #LEAVE THIS BLANK TOO?
        preset_id: , #LEAVE THIS BLANK?
        thumbnail_pattern: "thumbnail", 
        rotate: '0'
      }
    )

解决方案

No.

There are no functions for creating only thumbnails.

It also is not possible to create a new transcoding job without actually transcoding anything. The input parameters require, at minimum, the name of an input video. The output parameters require, at minimum, the name of the output file and a preset ID. Parameters are checked prior to starting the job, and there are no options which would prevent the job from executing while creating a thumbnail.

You can read about all of the available functions here:

http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/api-reference.html

Give ffmpeg a look. It can be a little bit of a hassle to install, but it can create thumbnails from videos.

这篇关于我可以使用亚马逊的弹性横贯codeR只创建缩略图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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