All Products
Search
Document Center

ApsaraVideo VOD:Dynamic images from videos

Last Updated:Jan 21, 2026

You can create a dynamic image from a video by capturing a specific video segment and generating a dynamic image file. This feature is often used to create video summaries or thumbnails for scenarios such as social media sharing, news reporting, and marketing promotions. ApsaraVideo VOD supports generating dynamic images in GIF and WebP formats. This topic describes how to create a dynamic image from a video using ApsaraVideo VOD.

Introduction

A dynamic image is a set of static images that are displayed in sequence at a specific frequency to create a motion effect. The most common dynamic image formats on the web are GIF and WebP. Creating a dynamic image from a video involves extracting a specific video segment and converting it into a dynamic image file.

ApsaraVideo VOD supports generating dynamic images in GIF and WebP formats. You can choose the format that best suits your business needs. The features of each format are described in the following table.

Format

Features

GIF

Good compatibility. Often used for website decorations.

WebP

Much smaller file size than GIF. However, some browsers do not support WebP. Incompatible browsers include Internet Explorer, iOS Safari 3.2 to 13.7, and KaiOS Browser.

Scenarios

  • Social media sharing: Create GIFs from exciting video clips for easy sharing. You can also use dynamic images as eye-catching content summaries to entice users to watch the full video.

  • Marketing promotion: Use dynamic images from video highlights in advertisements to attract user interest. This can increase the click-through rate (CTR) and conversion rate. On e-commerce websites, you can use dynamic images to highlight product features or demonstrate functions.

  • News and entertainment: In news reporting, editors can create dynamic images of key moments from news events to concisely present important information. Movie trailers or show highlights can be released as dynamic images for viewers to quickly preview.

  • Educational demos: In online education, teachers can use dynamic images to explain complex concepts or procedural steps. This helps students better understand and retain the information.

Billing

Generating dynamic images is a feature of video transcoding and is billed accordingly. The fees are based on the resolution and duration of the output file. For more information, see Billing for media transcoding.

Notes

  • Dynamic image generation may fail if the source file is audio-only, the source file is damaged, or the source file has abnormal encapsulation information.

  • The process of creating a dynamic image is asynchronous. You can retrieve the status of the dynamic image job from the DynamicImageComplete callback.

  • The time required to create a dynamic image depends on the file size, the video duration, and the duration of the dynamic image.

Prerequisites

  • ApsaraVideo VOD is activated. For more information, see Activate ApsaraVideo VOD.

  • The RAM user or RAM role that you use has corresponding permissions to access ApsaraVideo VOD. We recommend that you use a RAM user or RAM role to perform operations to improve the security of your account and resources. For more information, see Create and grant permissions to a RAM user.

Step 1: Create a dynamic image template

Dynamic image creation involves multiple parameters. To simplify job submission, ApsaraVideo VOD provides dynamic image templates. You can pre-configure these parameters in a template. Then, you only need to specify the template ID when you submit a dynamic image job, instead of passing all the parameters for each job.

Using the console

  1. Log on to the ApsaraVideo VOD console.

  2. In the left-side navigation pane, choose Configuration Management > Media Processing > Frame Animation Templates.

  3. Click Create Frame Animation Template and configure the template on the Add Dynamic Image Template page.

    Parameter

    Description

    Template Name

    The name of the dynamic image template. The name must be 4 to 64 characters in length and can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_).

    Output Format

    The format of the output dynamic image file. Valid values: gif and webp.

    Frame Rate

    The frame rate of the dynamic image. The value must be an integer in the range of (0, 60].

    Size (Width × Height)

    The width and height of the captured dynamic image, in pixels.

    Note
    • If you do not set the width and height, the captured dynamic image has the same width and height as the input video.

    • If you set only the width or the height, the other dimension is scaled based on the aspect ratio of the input video to prevent image distortion.

    Capture Method

    The method to capture video frames within a specified time range to generate a dynamic image. You can capture frames By Duration or Trim from Beginning and End.

    Start Time

    The start time of the video segment for the dynamic image. The value must be in the range of [0.000, 86399.999]. Unit: seconds.

    Duration

    The duration of the video segment from the start time. The value must be in the range of [0.000, 86399.999]. Unit: seconds.

    Note

    This parameter is required when Capture Method is set to By Duration.

    Trim End

    The duration to trim from the end of the video. The value must be in the range of [0.000, 86399.999]. Unit: seconds.

    Note

    This parameter is required when Capture Method is set to Trim from Beginning and End.

    Set as Default Thumbnail

    If you enable this feature, the captured dynamic image is automatically set as the video thumbnail.

  4. Click Save to finish configuring the template.

    After the template is created, you can view it on the Dynamic Image Templates page.动图模板.png

Using the OpenAPI

Call the AddVodTemplate operation. Set the TemplateType parameter to DynamicImage and configure the other parameters to create a dynamic image template.

After the template is created, the template ID is returned in the VodTemplateId field.

Step 2: (Optional) Configure event notifications for dynamic image jobs

Before you submit a dynamic image job, you can configure event notifications for ApsaraVideo VOD. If you configure the DynamicImageComplete event notification, you will receive the job status and the URL of the generated dynamic image after the job is complete.

For more information about how to configure event notifications, see Configure callbacks.

Step 3: Submit a dynamic image job

Using the console

  1. Create a workflow that includes a Frame Animation Template node.

    To submit a dynamic image job in the ApsaraVideo VOD console, you must first create a workflow. In the workflow, add a Frame Animation Template node and set its template to the template that you created in Step 1. For more information about how to create a workflow, see Manage workflows.

  2. You can start a task to capture an animated image.

    • Scenario 1: Create a dynamic image when you upload a video

      1. In the ApsaraVideo VOD console, choose Media Files > Audio/Video in the navigation pane on the left.

      2. Click Upload Media and then click Add Audio/Video.

      3. Set the upload method and storage address, and add the video to upload. Then, select Use Workflow and choose the workflow that you created in the previous step.

      4. Click the Upload button.

    • Scenario 2: Create a dynamic image after you upload a video

      1. In the navigation pane on the left of the ApsaraVideo VOD console, choose Media Files > Audio/Video.

      2. On the Audio/Video page, in the Actions column for the target video, click Processing.

      3. Set Processing Type to Use Workflow. For the Workflow parameter, select the workflow that you created in the previous step.

      4. Click OK.

OpenAPI method

  • Scenario 1: Create a dynamic image when you upload a video

    1. You can create a workflow that contains a Frame Animation Template node.

      Add a Frame Animation Template node to the workflow and set the dynamic image template to the one you created in Step 1. For more information about how to create workflows, see Manage workflows.

    2. Call one of the following media upload operations, set the WorkflowId parameter to the ID of the workflow that you created, and configure the other parameters as required to upload the media asset.

  • Scenario 2: Create a dynamic image after you upload a video

    Call the SubmitDynamicImageJob operation. Set the DynamicImageTemplateId parameter to the ID of the dynamic image template that you created in Step 1. Configure the other parameters as required to submit a dynamic image job for a specific video.

Step 4: Get information about the captured dynamic image

  • If you configured event notifications, you can retrieve information about the dynamic image by receiving the DynamicImageComplete callback message. This method is recommended.

  • After the dynamic image is created, you can call the ListDynamicImage operation to retrieve information about the generated dynamic image.

Note

If you set the dynamic image as the video thumbnail, you can call the GetVideoInfo operation to retrieve the URL of the dynamic image thumbnail.