Configure the size of the screen shots that get generated from frames?
We are heavily using pandastream to allow user upload of videos and are currently grabbing the first screenshot frame to use as our thumbnail. Is there a way to set the dimensions of the screenshots that get generated? I would like to avoid post processing the the screenshots in order to get the correct size of the screenshot/thumbnail to fit our design (our design calls for a 'square').
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Vivien Schilis on 27 Jan, 2012 06:08 PM
Hi,
We have a new api for screenshots to do that, it's a JPEG profile.
Panda::Profile.create :preset_name => 'jpeg', :width => .. , :height => ..., frame_count => 7 )
It performs frame captures on the original video.
You can set the sizes, aspect, frame_count (number evenly spaced) or frame_interval
(ex: '2s' or '600f') or frame_offsets(ex: '2s, 10s, 250f, 400f') You can also set a custom path (path_format => 'test/:video_id/captures/:id') and other encoding options you can find in other encoding profiles
encodings returns an array of files matching the extname of your profile.
=> [12345_1.jpg, 12345_2.jpg, ...]
set the frame_count to 0 to other profiles to not perform any screenshots
Best,
Vivien
Vivien Schilis closed this discussion on 09 Feb, 2012 05:00 PM.