Kaltura Thumbnail API Guide

Overview

The Thumbnail API (http://cdn.kaltura.com/p/{partner_id}/thumbnail/entry_id/{entry_id}) provides an easy interface to dynamically manipulate images or video snapshots to be used as thumbnails.

The result of the thumbnail API is:

  • A re-sized / cropped version of the original thumbnail image.
  • A specific frame from a video clip.
  • An older version of the entry thumbnail.
  • A various compression quality of the thumbnail image.

Using the thumbnail API

The parameters are passed in the following form
http://my.kalturaserver.com/p/{partner_id}/thumbnail/entry_id/{entry_id}/param1_name/param1_value/param2_name/param2_value...

  • Replace {partner_id} with your partner id.
  • Replace {entry_id} with if of desired entry thumbnail.

API Parameters

Parameter name Type Mandatory Description
entry_id String Yes The entry ID
widget_id String No The widget ID
version integer No The thumbnail version
width integer No Requested width in pixels
height integer No Requested height in pixels
type integer No Type of crop to be used – see remarks below
bgcolor string No 6 hex digits web colorcode
crop_provider string No Internal
quality string No Jpeg quality for output (0-100). The default is 75
src_x integer No 1st part of a rectangle to take from original picture
src_y integer No 2nd part of a rectangleto take from original picture
src_w integer No 3rd part of a rectangleto take from original picture
src_h integer No 4th part of a rectangleto take from original picture
vid_sec integer No second to snap from video
vid_slice integer No Number of slice out of number of slices
vid_slices integer No Number of slices

Parameters usage

  • If both width and height were given a zero value the original image will be returned.
  • If neither width nor height were specified, the resulting size will be 120x90 (default thumbnail size).
  • If only width or height were specified, the given dimension combined with the type parameter will control the resulting size of the image.
  • If vid_slices is provided without vid_slice the result will be a horizontal strip with the different slices.
  • The 'type' parameter controls the resize/cropping options:
    1. resize according to the given dimensions while maintaining the original aspect ratio.
    2. place the image within the given dimensions and fill the remaining spaces using the given background color.
    3. crop according to the given dimensions while maintaining the original aspect ratio. The resulting image may be cover only part of the original image.
    4. crops the image so that only the upper part of the image remains.

Examples

To see a more advanced usage of the thumbnail API see - Kaltura ThumbRotator Guide

0