Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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'
      }
    )
share|improve this question
Uhmm... Why is this off-topic in anyway? I'm specifically asking about what are the correct option inputs so that Amazon ET doesn't generate a file, but makes a thumbnail. – ays0110 2 days ago

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer

Amazon Elastic Transcoder does provide functionality for thumbnails. http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/preset-settings.html#preset-settings-thumbnails

It looks like you do indeed have to transcode a video file in order to get thumbnails though.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.