This topic describes how to use the CreateMediaConvertTask operation of Intelligent Media Management (IMM) to convert videos to animated images.
Feature introduction
Video-to-animated-image conversion transforms video files into animated image formats, such as GIF or WebP, to facilitate convenient sharing and embedding on websites and social media platforms.

Scenarios
Social media sharing: Animated images allow users to conveniently share video clips on social platforms to express emotions, humorous moments, or important information.
Online stickers: Converting videos to animated images can be used to create fun or humorous stickers, enhancing the enjoyment of online communication.
Tutorials and demonstrations: In teaching and demonstrations, animated images can be used to showcase software operations or step-by-step guides to help the audience quickly understand complex concepts and procedures.
Live streaming and event playback: Animated images can be used during competitions, events, or live broadcasts to quickly clip and share highlights, thereby enhancing audience engagement.
Supported audio and video formats
Category | Format |
Audio | Mainstream audio formats, such as AAC, MP3, WAV, FLAC, WMA, AC3, and Opus. |
Video | Mainstream video formats, such as MP4, MPEG-TS, MKV, MOV, AVI, FLV, M3U8, WebM, WMV, RM, and VOB. |
How to use
Prerequisites
An AccessKey pair is created and obtained. For more information, see Create an AccessKey pair.
Object Storage Service (OSS) is activated and a bucket is created. For more information, see Create a bucket.
IMM is activated. For more information, see Activate IMM.
A project is created in the IMM console. For more information, see Create a project.
NoteYou can call the CreateProject operation to create a project. For more information, see CreateProject.
You can call the ListProjects operation to list information of all projects in a region.
Step 1: Upload files
You can use the OSS console to upload media files to a bucket in the same region as your IMM project.

Step 2: Use IMM video-to-animated-image conversion
Call the CreateMediaConvertTask operation to create a video-to-animated-image task.
Billing
During the video-to-animated-image conversion process, the following billing items are generated on both OSS and IMM sides:
OSS side: For detailed pricing, see OSS Pricing.
API
Billing item
Description
GetObject
GET requests
Request fees are calculated based on the number of successful requests.
Infrequent Access data retrieval
If the retrieved data is stored as Infrequent Access, fees for Infrequent Access data retrieval are charged based on the volume of retrieved data.
Real-time access of Archive objects
If you read an archived object and the bucket has real-time access of Archive objects enabled, fees for real-time access of Archive objects are charged based on the size of the retrieved data.
Transfer acceleration
If transfer acceleration is enabled and you access your bucket using an acceleration endpoint, transfer acceleration fees are charged based on the size of the data.
PutObject
PUT requests
Request fees are calculated based on the number of successful requests.
Storage fees
Storage fees are charged based on the storage class, size, and storage duration of the object.
HeadObject
GET requests
Request fees are calculated based on the number of successful requests.
IMM side: For detailed pricing, see IMM billing items.
ImportantStarting from 11:00 on July 28, 2025 (UTC+8), the IMM video-to-animated-image service will be upgraded from a free model to a paid model. For more information, see IMM billing adjustment announcement.
API
Billing item
Description
CreateMediaConvertTask
MediaAnimation
Fees for video-to-animated-image conversion are calculated based on the number of frames in the output animated image.
Parameter examples
The following examples use the IMM project test-project to convert the oss://test-bucket/video-demo/Winemaking.mov video file to an animated image.
For more information about media processing features, see Media transcoding.
You can use the CreateMediaConvertTask operation to process video files in OpenAPI Explorer. For more information, see the SDK sample code.
Do not configure the Target.URI and Target.Container parameters when you use the video-to-animated-image conversion feature.
Animated images in GIF format have lower quality. You can use WebP format to obtain better animated image quality. However, WebP files are typically larger in size than GIF files.
We recommend that you set the FrameRate parameter to 10-15. If you do not configure the FrameRate parameter, the default value 1/Interval is used.
Generate an animated thumbnail for the entire video
Transcoding information
Image format: WebP
Frame extraction interval: 1 second
Frame rate: 15
Resolution: 1/2 of the source video
Resize method: Resize the image and do not keep the black border. For more information about resize methods, see Resize methods.
Path to the output file:
oss://test-bucket/video-demo/animation.webpTranscoding completion notification: Send an MNS message to the MNS topic "test-mns-topic".
For the SDK sample code, visit OpenAPI Explorer. The parameters in the sample code are automatically configured for reference. Modify the parameters as needed before you perform debugging.
Request parameters
{
"ProjectName": "test-project",
"Notification": {
"MNS": {
"TopicName": "test-mns-topic"
}
},
"Sources": [
{
"URI": "oss://test-bucket/video-demo/Winemaking.mov"
}
],
"Targets": [
{
"Image": {
"Animations": [
{
"Format": "webp",
"FrameRate": 15,
"Height": 0.5,
"Interval": 1,
"ScaleType": "fit",
"URI": "oss://test-bucket/video-demo/animation.{autoext}",
"Width": 0.5
}
]
}
}
]
}Generate an animated thumbnail for the 5th to 30th second of the video
Transcoding information
Image format: WebP
Frame extraction start time: 5th second
Frame extraction duration: 25 seconds
Frame extraction interval: 1 second
Frame rate: 15
Resolution: 1/2 of the source video
Resize method: Resize the image and do not keep the black border. For more information about resize methods, see Resize methods.
Path to the output file:
oss://test-bucket/video-demo/animation.webpTranscoding completion notification: Send an MNS message to the MNS topic "test-mns-topic".
For the SDK sample code, visit OpenAPI Explorer. The parameters in the sample code are automatically configured for reference. Modify the parameters as needed before you perform debugging.
Request parameters
{
"ProjectName": "test-project",
"Notification": {
"MNS": {
"TopicName": "test-mns-topic"
}
},
"Sources": [
{
"Duration": 25,
"StartTime": 5,
"URI": "oss://test-bucket/video-demo/Winemaking.mov"
}
],
"Targets": [
{
"Image": {
"Animations": [
{
"Format": "webp",
"FrameRate": 15,
"Height": 0.5,
"Interval": 1,
"ScaleType": "fit",
"URI": "oss://test-bucket/video-demo/animation.{autoext}",
"Width": 0.5
}
]
}
}
]
}