Create thumbnails from your videos

There are two main ways to create thumbnails from your videos:

  • Individual thumbnails Thumbnails created at a specific points in the video

  • Interval-based thumbnails: Thumbnails created by intervals defined in seconds

Individual and Interval-based Thumbnails

This approach allows you to select specific parts of the video for images to be created. Individual thumbnails are created using the following parameters.

Time - The frame of the video to be used for the thumbnail, based on percentage total video length. Any value between and including 0 and 100.

Example: time = 0 (beginning of the video, at 0% of duration) time = 50 (middle of the video, at 50% of duration) time = 100 (end of the video, at 100% of duration)

Size - The resolution of the image to be created. You can set multiple image sizes and an image will be created for each time and size combination.

Format - The format of the image file created. (Options: JPEG or PNG).

Interval-based Thumbnails

This approach allows you to create images at many points of the video based on an interval of time that you define.

Interval - The number of seconds in the video between each image to be created.

Example: interval = 20 (an image will be created every 20 seconds)

Size - The resolution (width x height) of the image to be created. You can set multiple image sizes and an image will be created for each interval and size combination.

When creating thumbnails there are two different approaches to set images based on whether you want a single tumbnail to be created at a specific point of the video (Individual Thumbnails) or thumbnails created at an interval of seconds (Interval-based Thumbnails).

Individual Thumbnails

To create individual thumbnails, create a format and set the output attribute to “thumbnail”. Enter the time, width, height, destination and user tag. Make sure to specify the full url in the destination.url field (ie: s3://s3.nyc3.qencode.com/bucket/thumb/50_320x240.png)

Example of Individual Thumbnail

{
 "output": "thumbnail",
 "time": "0.50",
 "width": "320",
 "height": "240",
 "destination": {
   "url":"s3://s3.nyc3.qencode.com/bucket/thumb/50_320x240.png",
   "key":"your_access_key",
   "secret":"your_secret_key",
   "permissions": "public-read"
 },
 "user_tag": "50_320x240"
}

Interval-based Thumbnails

To create individual thumbnails, create a format and set the output attribute to “thumbnails”. Enter the destination, time, width, and height. Make sure to specify the full path to where you want the images and .vtt file to be saved in the destination.url field (ie: s3://s3.nyc.qencode.com/bucket/thumb/)

Example of Interval-based Thumbnail

{
  "output" : "thumbnails",
  "destination": {
    "url":"s3://s3.nyc.qencode.com/bucket/thumb/",
    "key":"your_access_key",
    "secret":"your_secret_key",
    "permissions": "public-read"
  },
  "interval": 30,
  "width" : 320,
  "height" : 240
}