Intelligent Media Management (IMM) converts video files into animated images in GIF or WebP format through the CreateMediaConvertTask API. Convert a full video or a specific time range, with control over frame rate, resolution, and output format. The resulting animated image is saved to an Object Storage Service (OSS) bucket.

Use cases
Social media clips: Extract short moments from video and share them as animated images on social platforms.
Tutorials and demos: Capture step-by-step software operations as looping animated images that readers can follow without playing a video.
Stickers and reactions: Turn video moments into animated stickers for messaging apps.
Event highlights: Clip key moments from live streams, competitions, or presentations and share them instantly.
Supported input formats
| Category | Formats |
|---|---|
| Video | Mainstream video formats, such as MP4, MPEG-TS, MKV, MOV, AVI, FLV, M3U8, WebM, WMV, RM, and VOB |
| Audio | Mainstream audio formats, such as AAC, MP3, WAV, FLAC, WMA, AC3, and Opus |
Choose an output format
| Aspect | GIF | WebP |
|---|---|---|
| Quality | Lower color depth (256 colors) | Full color support, better visual quality |
| File size | Smaller | Typically larger |
| Browser support | Universal | All modern browsers |
| Best for | Simple animations, maximum compatibility | High-quality previews, rich-color content |
For most use cases, use WebP. It delivers noticeably better image quality. Choose GIF only when broad legacy compatibility is required.
Prerequisites
Before you begin, make sure you have:
An AccessKey pair. For more information, see Create an AccessKey pair
An OSS bucket to store the source video and output animated image. For more information, see Create a bucket
IMM activated. For more information, see Activate IMM
An IMM project in the same region as your OSS bucket. For more information, see Create a project
You can also create a project by calling the CreateProject API, or list existing projects by calling the ListProjects API.
Procedure
Step 1: Upload a video to OSS
Upload your source video file to an OSS bucket in the same region as your IMM project. Use the OSS console or any OSS SDK.

Step 2: Create an animated image conversion task
Call the CreateMediaConvertTask API. Define the source video URI, output format, frame rate, resolution, and output path in the request parameters.
Try the API directly in OpenAPI Explorer with pre-filled parameters and SDK sample code.
For more information about media processing, see Media transcoding.
Usage notes
Do not set the
Target.URIorTarget.Containerparameters for animated image conversion. Define the output path in theImage.Animations[].URIfield instead.Set
FrameRatebetween 10 and 15 for smooth playback without excessive file size. IfFrameRateis not set, the default value is1/Interval.Use fractional
WidthandHeightvalues (e.g.,0.5) to scale relative to the source video, or integer values for absolute pixel dimensions.
Parameter examples
The following examples use an IMM project named test-project and convert oss://test-bucket/video-demo/Winemaking.mov to an animated image.
Convert an entire video
This example converts the full video to a WebP animated image at 15 fps, scaled to half the source resolution.
Configuration summary:
| Parameter | Value |
|---|---|
| Output format | WebP |
| Frame extraction interval | 1 second |
| Frame rate | 15 fps |
| Resolution | 50% of source (Width: 0.5, Height: 0.5) |
| Scale type | fit (no black borders) |
| Output path | oss://test-bucket/video-demo/animation.{autoext} |
| Notification | MNS topic test-mns-topic |
For more information about resize methods, see Resize methods.
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
}
]
}
}
]
}For SDK sample code with pre-filled parameters, visit OpenAPI Explorer. Modify the parameters as needed before debugging.
Convert a specific time range
This example converts seconds 5 through 30 of the video (a 25-second segment) to a WebP animated image with the same output settings.
Configuration summary:
| Parameter | Value |
|---|---|
| Output format | WebP |
| Start time | 5 seconds |
| Duration | 25 seconds |
| Frame extraction interval | 1 second |
| Frame rate | 15 fps |
| Resolution | 50% of source (Width: 0.5, Height: 0.5) |
| Scale type | fit (no black borders) |
| Output path | oss://test-bucket/video-demo/animation.{autoext} |
| Notification | MNS topic test-mns-topic |
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
}
]
}
}
]
}For SDK sample code with pre-filled parameters, visit OpenAPI Explorer. Modify the parameters as needed before debugging.
Billing
Video-to-animated-image conversion incurs charges on both the OSS and IMM sides.
Starting from 11:00 on July 28, 2025 (UTC+8), video-to-animated-image conversion changed from free to paid. For details, see the IMM billing adjustment announcement.
IMM charges
For detailed pricing, see IMM billing items.
| API | Billing item | Description |
|---|---|---|
| CreateMediaConvertTask | MediaAnimation | Billed by the number of frames in the output animated image |
OSS charges
For detailed pricing, see OSS pricing.
| API | Billing item | Description |
|---|---|---|
| GetObject | GET requests | Billed by the number of successful requests |
| GetObject | Infrequent Access data retrieval | Billed by retrieved data volume, if the source object uses Infrequent Access storage |
| GetObject | Real-time access of Archive objects | Billed by retrieved data size, if the bucket has real-time access of Archive objects enabled |
| GetObject | Transfer acceleration | Billed by data size, if transfer acceleration is enabled and an acceleration endpoint is used |
| PutObject | PUT requests | Billed by the number of successful requests |
| PutObject | Storage fees | Billed by storage class, size, and duration of the output object |
| HeadObject | GET requests | Billed by the number of successful requests |