/video/thumbs robot
Extracts one or more thumbnails from a video.
Important: Since we extract thumbnails from videos in parallel, the order of them appearing in the results json does not necessarily reflect the order in which these frames appear in the video. Please use the thumb_index meta field from the results json to save them in the correct order. Check out this demo to see this in action.
Optional parameters
| Name | Type | Default | Description |
|---|---|---|---|
| count | integer | 8 |
The amount of thumbnails to extract. There are some videos that lie about their duration, so you may get less thumbnails in some very rare cases. |
| offsets | array | [] |
An array of offsets. These can be absolute values like [2, 45, 120]
representing seconds of the file duration. Offsets can also be percentage values like
['2%', '50%', '75%']. This option overwrites the count parameter, they
cannot be used in combination. Out of bounds offsets are silently ignored.
|
| format | string | "jpeg" |
The format for the extracted thumbnail. Supported are
"jpeg", "png".
|
| width | 1 - 1920 | Width of the video | Size for the thumbnail in px. |
| height | 1 - 1080 | Height of the video | Height for the thumbnail in px. |
| resize_strategy | string | "pad" |
Click here for a list of available resize strategies. |
| rotate | integer | (auto) |
Force the video to be rotated by the given integer of degrees. Currently only multiples of 90 are supported. Note: We automatically correct the orientation for many videos if the camera provides that information. This option is only useful for videos you need to rotate because the camera did not record the rotation. |
Demos
- Extract 8 thumbnails from an encoded video
- Resize the thumbnails to 75x75 pixels after extraction
- Extract a specific amount of thumbnails from an uploaded video
- Apply a watermark to extracted thumbnails
- Extract 10 thumbnails and create different size versions for them