ApsaraVideo VOD allows you to capture snapshots based on a snapshot template. This topic describes how to create and use a snapshot template.

Create a snapshot template

  1. Log on to the ApsaraVideo VOD console.
  2. In the left-side navigation pane, choose Configuration Management > Media Processing > Snapshot Templates.
  3. On the Snapshot Templates page, click Add Template. On the Create Snapshot Template page, create a snapshot template.
    Create a snapshot template

    The supported snapshot types include Normal Snapshot, WebVTT, and Image Sprite. For more information, see Video snapshots.

    The following table describes the parameters that you need to configure to create a snapshot template.
    ParameterSnapshot typeDescription
    Template NameNormal Snapshot, WebVTT, and Image SpriteThe name of the snapshot template.
    Start TimeNormal Snapshot, WebVTT, and Image SpriteThe start time for capturing snapshots. The time is in the HH:MM:SS format.
    Snapshot CountNormal Snapshot, WebVTT, and Image SpriteThe total number of snapshots.
    Snapshot IntervalNormal Snapshot, WebVTT, and Image SpriteThe interval between snapshots when multiple snapshots are captured. If you set this parameter to 0 or leave it empty, snapshots are evenly captured throughout the video duration.
    Size (Width × Height)Normal Snapshot, WebVTT, and Image SpriteThe width and height of the snapshot. Unit: pixels.
    Note
    • If neither Width nor Height is specified, the snapshot width and height are the same as those of the input video.
    • If only Width or Height is specified, the other parameter is automatically set based on the aspect ratio of the input video to ensure that the snapshots are not distorted.
    Frame TypeNormal Snapshot, WebVTT, and Image SpriteValid values: Frame and Keyframe.
    Note If you select Keyframe, only keyframes are captured. If no keyframe is found at the specified time, the keyframe closest to the specified time is captured. Keyframes are captured faster than normal frames when the same snapshot rules are applied.
    Generate Image SpriteWebVTTIf you do not enable this feature, snapshots are separately stored. If you enable this feature, snapshots are put into a single image.
    Arrangement (Rows x Columns)Image SpriteThe width and height of snapshots in the image sprite.
    Note
    • If neither Rows nor Columns is specified, the snapshot width and height are the same as those of the input video.
    • If only Rows or Columns is specified, the other parameter is automatically set based on the aspect ratio of the input video.
    Row SpaceImage SpriteThe space between the rows in the image sprite. Unit: pixels.
    Column SpaceImage SpriteThe space between the columns in the image sprite. Unit: pixels.
    Background ColorImage SpriteThe background color of the image sprite.
    Retain SnapshotsImage SpriteIf you enable this feature, the original snapshots are retained. If you do not enable this feature, the original snapshots are not retained.
  4. Click Save.

Manage snapshot templates

After you create a snapshot template, you can modify or delete the template.

On the Snapshot Templates page, find the template that you want to modify or delete and click Edit or Delete in the Actions column.
Note If you click Edit to modify template configurations, you cannot change the snapshot type.
Modify or delete a snapshot template

Use a snapshot template

To use a snapshot template, you must add the snapshot template to a workflow when you upload or process the media file. For more information about how to use workflows, see Manage workflows.
  • When you upload a media file, you can specify a workflow that contains a snapshot template. After the media file is uploaded, the workflow is automatically triggered and ApsaraVideo VOD automatically processes the media file. For more information, see Upload audio and video files.
  • Alternatively, you can perform the following steps after you upload a media file to ApsaraVideo VOD: Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. Find the media file that you want to manage and click Media Processing in the Actions column. In the dialog box that appears, click Use Workflow. Then, specify a workflow that contains a snapshot template to process the media file.