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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With