Skip to main content

Image Extraction & Thumbnails

This article discusses the image extraction and thumbnails generation, which are a part of encoding. You can find an overview of the entire encoding process in the Job Processing article.

Interactions between the Encoding Service and the other systems during the Image Extraction Phase

Image Extraction

Encoding Service can extract frames from the video stream at specified time indexes and store them as JPEG images in a specified location. External systems (like Content Management) can use the generated images.

The section ImageExtraction of the job description is used to provide the necessary settings.

{
"ImageExtraction": {
"Quality": 85,
"Intervals": [15, 25, 82],
"Pattern": "preview_%.jpg",
"Location": {
...
}
}
}

The example above signalizes to take 3 snapshots from the video, at the time indexes of 15, 25, and 82 percentages of the video length. The snapshots are stored as JPEG files with a quality of 85 as files named preview_1.jpg, preview_2.jpg and preview_3.jpg, respectively, in the specified Location. The format for Location is the same as for input/output storage.

Thumbnails

Encoding Service can generate thumbnails (used as preview images) at regular intervals and include them as a part of the DASH representation in accordance with the DASH IF IOP 4.3, section 6.2.6 "Tiles of thumbnail images". Any player supporting this DASH standard can display the thumbnails for any time index.

Example of a Thumbnail Image on YouTube

ThumbnailImages

The section Thumbnails of the job description is used to provide the necessary settings.

{
"Thumbnails": {
"Generate": true,
"Width": 64,
"Height": 64,
"DurationInSeconds": 5,
"BandwidthInKbps": 128
}
}

The example above signalizes to capture thumbnails with the size 64x64 every 5 seconds starting at position 0.

The features Thumbnails and Image Extraction are very similar (both extract images from a video), but do have the following differences:

  • Image Extraction uses a specified location to store the images. A custom implementation is required to use the extracted images. The thumbnails are published according to the DASH IF IOP 4.3 standard, so any compatible player can use the images.
  • For Image Extraction, the specific time indexes are specified (usually, just a few). For Thumbnails - an interval in seconds (usually every couple of seconds).
  • Thumbnails can (and should) be very small, like 64x64 in the example above, due to their high number.
warning

As the thumbnails follow DASH IF IOP standard, this feature can only be used if DASH is the target output format (or one of them, e.g. DASH and HLS).