All Products
Search
Document Center

Intelligent Media Management:TargetImage

Last Updated:Oct 28, 2026

Parameter

Type

Description

Example

object

The target image information for snapshots, sprites, or animated images.

Sprites

array

The sprite processing list.

object

The detailed information about sprite processing.

URI

string

The OSS URL where the sprite is saved.

The URL format is oss://bucket/object, where bucket is the name of the OSS bucket that resides in the same region as the current project, and object is the full path of the file including the file name extension.

oss://test-bucket/sprites

Format

string

The format of the sprite. Valid values:

  • jpg

  • png

jpg

StartTime

number

The start time for extracting video snapshots, in seconds. Default value: 0, which indicates that the extraction starts from the beginning of the video.

0

Interval

number

The time interval for extracting video snapshots, in seconds.

1

Number

integer

The number of sub-images. Default value: 0, which indicates that snapshots are extracted until the end of the video.

0

ScaleWidth

number

The width of a single image. Default value: 1. The meaning varies based on whether the value is an integer or a decimal:

  • Integer: the pixel value, in pixels (px). Valid values: (1,4096).

  • Decimal: the ratio relative to the width of the output video resolution. Valid values: (0,1].

1280

ScaleHeight

number

The height of a single image. Default value: 1. The meaning varies based on whether the value is an integer or a decimal:

  • Integer: the pixel value, in pixels (px). Valid values: (1,4096).

  • Decimal: the ratio relative to the height of the output video resolution. Valid values: (0,1].

960

TileWidth

integer

The number of images contained in each row. Default value: 6.

6

TileHeight

integer

The number of images contained in each column. Default value: 6.

6

Pad

integer

The spacing between sub-images. Default value: 2.

2

Margin

integer

The margin between the sub-images and the edge of the sprite. Default value: 2.

2

ScaleType

string

The scaling mode. Valid values:

  • stretch (default): stretches the image to fill the area.

  • crop: scales and crops the image.

  • fill: scales the image and retains black borders.

  • fit: scales the image without retaining black borders.

crop

Mode

string

The snapshot extraction mode for sprite sub-images. Valid values:

  • interval (default): the fixed time interval mode. The snapshot interval is determined by the Interval parameter.

  • keyframe: the keyframe mode. Only IDR frames in the source video are extracted. In this mode, the Interval parameter is invalid.

  • average: the average mode. Snapshots are extracted at uniform time intervals based on the Number parameter. In this mode, the Interval parameter is invalid.

  • dhash: the dhash mode. Based on the Number parameter, this mode extracts the top N frames whose content changes exceed the Threshold parameter on the basis of fixed time interval snapshot extraction.
    Note

    If the Number parameter is set to 0, all frames whose content changes exceed the Threshold parameter are extracted.

interval

Threshold

integer

The snapshot extraction threshold. A larger value results in fewer extracted snapshots. Valid values: 0 to 100. Default value: 0.

Note
  • This parameter is valid only when the dhash snapshot extraction mode is used.

  • The dhash mode is sensitive to the threshold. Set this parameter to 25 or less and adjust it based on the specific scenario.

0

Snapshots

array

The list of snapshot processing configurations.

object

The detailed information about snapshot processing.

URI

string

The OSS URL where the snapshots are saved.

The URL format is oss://bucket/object, where bucket is the name of the OSS bucket that resides in the same region as the current project, and object is the full path of the file including the file name extension.

oss://test-bucket/snapshots

Format

string

The format of the snapshots. Valid values:

  • jpg

  • png

jpg

StartTime

number

The start time for extracting video snapshots, in seconds. Default value: 0, which indicates that the extraction starts from the beginning of the video.

0

Interval

number

The time interval for extracting video snapshots, in seconds.

0.5

Number

integer

The number of snapshots to extract. Default value: 0, which indicates that snapshots are extracted until the end of the video.

10

Width

number

The width of the image. By default, the width of the source video is retained. The meaning varies based on whether the value is an integer or a decimal:

  • Integer: the pixel value, in pixels (px). Valid values: [1,4096].

  • Decimal: the ratio relative to the width of the output image resolution. Valid values: (0,1).

1280

Height

number

The height of the image. By default, the height of the source video is retained. The meaning varies based on whether the value is an integer or a decimal:

  • Integer: the pixel value, in pixels (px). Valid values: [1,4096].

  • Decimal: the ratio relative to the height of the output image resolution. Valid values: (0,1).

960

ScaleType

string

The scaling mode. Valid values:

  • stretch (default): stretches the image to fill the area.

  • crop: scales and crops the image.

  • fill: scales the image and retains black borders.

  • fit: scales the image without retaining black borders.

crop

Mode

string

The snapshot extraction mode for sprite sub-images. Valid values:

  • interval (default): the fixed time interval mode. The snapshot interval is determined by the Interval parameter.

  • keyframe: the keyframe mode. Only IDR frames in the source video are extracted. In this mode, the Interval parameter is invalid.

  • average: the average mode. Snapshots are extracted at uniform time intervals based on the Number parameter. In this mode, the Interval parameter is invalid.

  • dhash: the dhash mode. Based on the Number parameter, this mode extracts the top N frames whose content changes exceed the Threshold parameter on the basis of fixed time interval snapshot extraction.
    Note

    If the Number parameter is set to 0, all frames whose content changes exceed the Threshold parameter are extracted.

interval

Threshold

integer

The snapshot extraction threshold. A larger value results in fewer extracted snapshots. Valid values: 0 to 100. Default value: 0.

Note
  • This parameter is valid only when the dhash snapshot extraction mode is used.

  • The dhash mode is sensitive to the threshold. Set this parameter to 25 or less and adjust it based on the specific scenario.

0

Animations

array

The list of animated image processing configurations.

object

The detailed information about animated image processing.

URI

string

The OSS URL where the animated image is saved.

The URL format is oss://bucket/object, where bucket is the name of the OSS bucket that resides in the same region as the current project, and object is the full path of the file including the file name extension.

oss://test-bucket/animations

Format

string

The format of the output animated image. Valid values:

  • gif

  • webp

gif

FrameRate

number

The frame rate of the animated image. You can use this parameter together with the Interval parameter to speed up or slow down the animated image.

25

StartTime

number

The start time for extracting frames for the animated image, in seconds. Default value: 0.

0

Interval

number

The frame extraction interval, in seconds.

0.5

Number

integer

The number of frames to extract. A value of 0 indicates that frames are extracted until the end of the video. Default value: 0.

100

Width

number

The width of the animated image. By default, the original width is retained. The meaning varies based on whether the value is an integer or a decimal:

  • Integer: the pixel value, in pixels (px). Valid values: [1,4096].

  • Decimal: the ratio relative to the width of the output image resolution. Valid values: (0,1).

1280

Height

number

The height of the animated image. By default, the original height is retained. The meaning varies based on whether the value is an integer or a decimal:

  • Integer: the pixel value, in pixels (px). Valid values: [1,4096].

  • Decimal: the ratio relative to the height of the output image resolution. Valid values: (0,1).

960

ScaleType

string

The scaling mode. Valid values:

  • stretch (default): stretches the image to fill the area.

  • crop: scales and crops the image.

  • fill: scales the image and retains black borders.

  • fit: scales the image without retaining black borders.

crop