LVS's Thumbnail Generation API endpoints enable you to generate still images from discovered assets with MP4 representations. Your options for generating these image include:
- The specific playable resources to use (Assets, Playlists, or Playlist Elements).
- The location within the playable resource to extract the image (e.g. a specific timecode or keyframe)
- The dimensions of the asset (height and width)
Please note: Thumbnail generation is currently only available for assets containing an MP4 representation. Even if your LVS-enabled application is delivering HLS media to end users, you can still attach MP4 resources to those asset records for the purposes of generating thumbnails.
Get a Thumbnail for a playable resource
GET /v3/thumbnail/{playableId}.jpg - Generates images with .jpg file extension - Click here for this endpoint's full API specs and testing tool (LVS login required).
OR
GET /v3/thumbnail/{playableId} - Generates images without file extension - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose:
Use this endpoint to generate a still image from any playable resource (discovered Asset, Playlist, or Playlist Element). Image is taken from a random keyframe within the playable resource. You have the option to generate the image at a specific height and width. This endpoint is a good choice for cases where you need a simple representative image for your video (e.g. thumbnails displayed in a gallery view of your video archive).
Generate Thumbnail for an Asset keyframe
GET /v3/thumbnail/{assetId}/{keyframe}.jpg - Generates images with .jpg file extension - Click here for this endpoint's full API specs and testing tool (LVS login required)
OR
GET /v3/thumbnail/{assetId}/{keyframe} - Generates images without file extension - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose:
Use this endpoint to generate a still image from a specific keyframe within an Asset. This endpoint is a good choice for situations where it is important to capture a precise moment within a video (e.g. a thumbnail within an editing tool timeline). Using this endpoint generally requires that you first use the "GET /v3/asset/{assetId}/keyframes" endpoint to identify the asset's keyframes.
Generate Thumbnail for an asset at a specific timecode
GET /v3/thumbnail/timecode/{assetId} - Click here for this endpoint's full API specs and testing tool (LVS login required).
Purpose:
Use this endpoint to request a still image from a discovered asset by specifying a timecode (milliseconds). You have the option to extract the image from nearest keyframe before or after the specified timecode. This endpoint is a good choice when you want to represent a particular moment in a video (e.g. a video search result, a clip within a playlist) without the need to look up keyframes.
Comments
0 comments
Article is closed for comments.