All Products
Search
Document Center

Intelligent Media Management:TargetVideo

Last Updated:Aug 28, 2026

Parameter

Type

Description

Example

object

The video processing parameter settings.

DisableVideo

boolean

Specifies whether to disable video stream generation. Valid values:

  • true: Disabled. The output file does not contain a video stream.

  • false (default): Not disabled.

false

Stream

array

The list of video stream index numbers to process from the source file. An empty value (default) indicates that the video stream with the smallest index number (the first video stream) is processed. An index number greater than 100 indicates that all video streams are processed.

  • Example: [0,1] processes video streams with index numbers 0 and 1. [1] processes the video stream with index number 1. [101] processes all video streams.

Note

Only video streams with existing index numbers are processed. If a video stream corresponding to an index number does not exist, that index number is ignored.

integer

The video stream index number to process.

0

TranscodeVideo

object

The video transcoding parameters. An empty value indicates that video processing is disabled and the output file does not contain a video stream.

Note

Setting this parameter to an empty value to disable video processing is not recommended.

Codec

string

The video encoding format. Valid values:

  • For the CreateMediaConvert API: copy (default), h264, h265, vp9.
    Warning When this parameter is set to copy, the video streams to be processed are directly copied to the output file, and other parameters under TranscodeVideo do not take effect. copy cannot be used for video concatenation and is typically used for container format conversion scenarios.
  • For the GenerateVideoPlaylist API: h264 (default), h265.

h264

PixelFormat

string

The pixel format. The default value is the same as the source video. Valid values:

  • yuv420p

  • yuv422p

  • yuv444p

  • yuv420p10le

  • yuv422p10le

  • yuv444p10le

  • yuva420p

Note

yuva420p is available only for the CreateMediaConvert API, and the Codec parameter must be set to vp9.

yuv420p

FrameRateOption

string

The frame rate option. Valid values:

  • fixed: Always uses the specified target video frame rate.

  • adaptive: Uses the source video frame rate when it is lower than the specified target video frame rate.

  • fall: Returns a failure when the source video frame rate is lower than the specified target video frame rate.

Default value:

  • For the CreateMediaConvert API, the default value is fixed.

  • For the GenerateVideoPlaylist API, the default value is adaptive.

Note

This parameter must be set together with the FrameRate parameter.

fixed

FrameRate

number

The video frame rate. The default value is the same as the source video.

25

ResolutionOption

string

The resolution option. Valid values:

  • fixed: Always uses the specified target video resolution.

  • adaptive: Uses the source video resolution when the source video resolution area is smaller than the specified target video resolution area.

  • fall: Returns a failure when the source video resolution area is smaller than the specified target video resolution area.

Default value:

  • For the CreateMediaConvert API, the default value is fixed.

  • For the GenerateVideoPlaylist API, the default value is adaptive.

Note

This parameter must be set together with the Resolution parameter.

fixed

Resolution

string

The resolution of the output video in the format of widthxheight. The default value is the same as the playback resolution of the source video. You can specify both width and height, or specify only width or height. You can also use the AdaptiveResolutionDirection parameter to specify both long and short sides, or only the long side or short side. The value range for a single side is (0,4096].

  • Example 1: If AdaptiveResolutionDirection is false, 1280x720 sets the width to 1280 and height to 720. 1280x sets the width to 1280 and keeps the height the same as the source video. x720 sets the height to 720 and keeps the width the same as the source video.

  • Example 2: If AdaptiveResolutionDirection is true, 1280x720 sets the long side to 1280 and short side to 720. 1280x sets the long side to 1280 and keeps the short side the same as the source video. x720 sets the short side to 720 and keeps the long side the same as the source video.

Note

If the source video contains rotation information, the width/height and long/short side determination is based on the post-rotation state, which is the playback resolution.

640x480

AdaptiveResolutionDirection

boolean

Specifies whether to enable adaptive long/short side mode. Valid values:

  • true: Enabled. The format of the Resolution parameter is long side × short side.

  • false (default): Disabled. The format of the Resolution parameter is width × height.

true

ScaleType

string

The scaling mode. Valid values:

  • stretch (default): Fixed width/height or long/short sides. Forces scaling and stretches to fill blank areas.

  • crop: Proportional scaling. Scales to the minimum resolution that extends beyond the specified width/height or long/short side rectangle, then center-crops the excess.

  • fill: Proportional scaling. Scales to the maximum resolution within the specified width/height or long/short side rectangle, then fills blank areas with black using center alignment.

  • fit: Proportional scaling. Scales to the maximum resolution within the specified width/height or long/short side rectangle.

Note

This parameter must be set together with the Resolution parameter.

crop

Rotation

integer

The clockwise rotation degree of the video. Valid values:

  • 0 (default)

  • 90

  • 180

  • 270

90

BitrateOption

string

The video bitrate option. Valid values:

  • fixed: Always uses the specified target video bitrate.

  • adaptive: Uses the source video bitrate when it is lower than the specified target video bitrate.

  • fall: Returns a failure when the source video bitrate is lower than the specified target video bitrate.

Default value:

  • For the CreateMediaConvert API, the default value is fixed.

  • For the GenerateVideoPlaylist API, the default value is adaptive.

Note

This parameter must be set together with the Bitrate parameter.

fixed

Bitrate

integer

The video stream bitrate, in bits per second (bit/s).

Note

This parameter is mutually exclusive with CRF. If both this parameter and CRF are empty, encoding is performed with a CRF value of 23.

128000

GOPSize

integer

The number of frames between keyframes. Default value: 150.

Note

This parameter is not supported for the GenerateVideoPlaylist API.

60

CRF

number

Specifies the constant quality mode. This parameter is mutually exclusive with the Bitrate parameter. The value range is [0,51]. A larger value results in lower video quality. The recommended value range is [18,38].

18

BufferSize

integer

The decoding buffer size for variable bitrate, in bits per second (bps).

Note

This parameter takes effect only when used together with the CRF parameter.

4000000

MaxBitrate

integer

The maximum bitrate limit for variable bitrate. When using this parameter, the BufferSize parameter must be specified.

Note

This parameter takes effect only when used together with the CRF parameter.

128000

BFrames

integer

The number of consecutive B-frames. Default value: 3.

3

Refs

integer

The number of reference frames. Default value: 2.

2

VideoSlim

integer

Enables the lightweight HD mode. Valid values:

0: Default value. Disabled.

1: Uses the lightweight HD mode for transcoding.

Note

For optimal results, use the officially recommended Bitrate or CRF parameters for video transcoding encoding with lightweight HD.

Important Lightweight HD supports only h.264/h.265 formats, only yuv420p, 8-bit depth, and does not support multi-target video transcoding output or video concatenation. For more information, see Lightweight HD product introduction.

0

FilterVideo

object

The video processing parameters. This parameter does not take effect when the TranscodeVideo parameter is empty or when TranscodeVideo.Codec is set to copy.

Note

This parameter is not supported for the GenerateVideoPlaylist API.

Watermarks

array

The list of video watermarks.

object

The video watermark information.

Type

string

The watermark type. Valid values:

  • text (default): text watermark.

  • file: image or animated image watermark.

text

Dx

number

The meanings differ depending on whether the value is an integer or decimal:

  • 0 (default): Both the offset in pixels and the ratio of horizontal offset to output resolution height are 0.

  • Integer: The offset in pixels (px). Value range: [1,4096].

  • Decimal: The ratio of horizontal offset to output resolution height. Value range: (0,1).

0

Dy

number

The meanings differ depending on whether the value is an integer or decimal:

  • 0 (default): Both the offset in pixels and the ratio of vertical offset to output resolution height are 0.

  • Integer: The offset in pixels (px). Value range: [1,4096].

  • Decimal: The ratio of vertical offset to output resolution height. Value range: (0,1).

0

StartTime

number

The start time for adding the watermark, in seconds (s). The default value is the start time of the video.

0

Duration

number

The duration for which the watermark is displayed, in seconds (s). The default value is until the end of the video.

0

ReferPos

string

The reference position for adding the watermark. Valid values:

  • topleft (default): top-left corner

  • topright: top-right corner

  • bottomright: bottom-right corner

  • bottomleft: bottom-left corner

topleft

Content

string

The content of the text watermark. The default value is empty.

Important This parameter takes effect when the Type parameter is set to text.

example

FontName

string

The font name of the text watermark. Valid values:

  • SourceHanSans-Regular (default)

  • SourceHanSans-Bold

  • SourceHanSerif-Regular

  • SourceHanSerif-Bold

Important This parameter takes effect when the Type parameter is set to text.

SourceHanSans-Bold

FontSize

integer

The font size of the text watermark. Default value: 16. The value must be an integer. Value range: (4,120).

Important This parameter takes effect when the Type parameter is set to text.

18

FontColor

string

The font color of the watermark text. The format is #RRGGBB. Default value: #000000. Values such as "red" and "green" are also supported.

Important This parameter takes effect when the Type parameter is set to text.

red

FontApha

number

The font transparency of the text watermark. Value range: (0,1]. Default value: 1, which indicates fully opaque.

Important This parameter takes effect when the Type parameter is set to text.

0.8

BorderWidth

integer

The border width of the text watermark, in pixels (px). The value must be an integer. Value range: [0,4096]. Default value: 0.

Important This parameter takes effect when the Type parameter is set to text.

2

BorderColor

string

The border color of the watermark text. The format is #RRGGBB. Default value: #000000. Values such as "red" and "green" are also supported.

Important This parameter takes effect when the Type parameter is set to text.

red

URI

string

The OSS URI of the watermark file. Supported formats are PNG and MOV.

The OSS URI format is oss://<bucket>/<object>, where <bucket> is the name of an OSS bucket in the same region as the current project, and <object> is the full path of the file including the file name extension.

Important This parameter takes effect when the Type parameter is set to file.

oss://test-bucket/watermark.jpg

Width

number

The width of the watermark image. The default value is the original width of the watermark image. The meanings differ depending on whether the value is an integer or decimal:

  • Integer: The pixel value of the logo removal width, in pixels (px). Value range: [1,4096].

  • Decimal: The ratio relative to the output video resolution width. Value range: (0,1).

80

Height

number

The height of the watermark image. The default value is the original height of the watermark image. The meanings differ depending on whether the value is an integer or decimal:

  • Integer: The pixel value of the logo removal height, in pixels (px). Value range: [1,4096].

  • Decimal: The ratio relative to the output video resolution height. Value range: (0,1).

40

Delogos

array

Blurs a rectangular area of the video to remove logos, station marks, and similar elements.

object

The video blur processing parameters.

StartTime

number

The start time for adding the mosaic, in seconds (s). The default value is the start time of the video.

0

Duration

number

The duration for which the mosaic is applied, in seconds (s). The default value is until the end of the video.

15

Dx

number

The meanings differ depending on whether the value is an integer or decimal:

  • 0 (default): Both the offset in pixels and the ratio of horizontal offset to output resolution height are 0.

  • Integer: The offset in pixels (px). Value range: [1,4096].

  • Decimal: The ratio of horizontal offset to output resolution height. Value range: (0,1).

0

Dy

number

Default value: 0. The meanings differ depending on whether the value is an integer or decimal:

  • 0 (default): Both the offset in pixels and the ratio of vertical offset to output resolution height are 0.

  • Integer: The offset in pixels (px). Value range: [1,4096].

  • Decimal: The ratio of vertical offset to output resolution height. Value range: (0,1).

0

Width

number

The width of the mosaic. The default value is the decimal 1.0, which fills the entire output video width. The meanings differ depending on whether the value is an integer or decimal:

  • Integer: The pixel value, in pixels (px). Value range: [1,4096].

  • Decimal: The ratio relative to the output video resolution width. Value range: (0,1).

100

Height

number

The height of the mosaic. The default value is the decimal 1.0, which fills the entire output video height. The meanings differ depending on whether the value is an integer or decimal:

  • Integer: The pixel value, in pixels (px). Value range: [1,4096].

  • Decimal: The ratio relative to the output video resolution height. Value range: (0,1).

40

ReferPos

string

The reference position for adding the mosaic. Valid values:

  • topleft (default): top-left corner

  • topright: top-right corner

  • bottomright: bottom-right corner

  • bottomleft: bottom-left corner

topleft

Speed

number

The video playback speed setting. Value range: [0.5,1.0]. Default value: 1.0.

Note
  • This is the ratio of the transcoded media file playback speed to the source media file default playback speed, not speed-up transcoding.

Important
  • This parameter is applicable only to the CreateMediaConvertTask API.

1.0

Desensitization

object

The video desensitization configuration.

Important
  • This parameter is applicable only to the CreateMediaConvertTask API.

Face

object

The face desensitization configuration.

Note

This feature is in public preview. If you have any questions, join the DingTalk group for feedback. For the DingTalk group number, see Contact us.

Confidence

number

The face confidence threshold, which sets the lower limit of confidence for face recognition. If the confidence value of a detected face is lower than this threshold, the face is not desensitized.

  • Value range: 0.0 to 1.0.

  • Default value: 0.0 (no confidence filtering is performed).

0.4

MinSize

integer

The minimum face size threshold, which sets the minimum size of faces to be desensitized. If the width or height of a detected face is smaller than this threshold, the face is not desensitized. Unit: pixels. Default value: 0, which indicates no restriction on face size.

0.4

ScaleRatio

number

The detection box scaling ratio. Value range: 0.1 to 5.0. Scales both the width and height of the detection box based on its center. • > 1.0: Enlarges the blur area. • < 1.0: Reduces the blur area. • = 1.0: Uses the original detection box.

1.0

BlurRadius

integer

The blur radius. Value range: 1 to 100. A larger value typically results in a more blurred area.

100

Transparency

number

The transparency and edge feathering intensity of the blur area. Value range: 0.0 to 1.0. • 0.0: Displays the full blur effect. • 1.0: No blur processing is performed. Only the original image is displayed. • 0.0 to 1.0: A larger value results in a higher proportion of the original image, a smaller actual blur radius, and typically a larger edge feathering range.

0.0

LicensePlate

object

The license plate desensitization configuration.

Note

This feature is in public preview. If you have any questions, join the DingTalk group for feedback. For the DingTalk group number, see Contact us.

Confidence

number

The license plate confidence threshold, which sets the lower limit of confidence for license plate recognition. If the confidence value of a detected license plate is lower than this threshold, the license plate is not desensitized.

  • Value range: 0.0 to 1.0.

  • Default value: 0.0 (no confidence filtering is performed).

0.4

MinSize

integer

The minimum license plate size threshold, which sets the minimum size of license plates to be desensitized. If the width or height of a detected license plate is smaller than this threshold, the license plate is not desensitized. Unit: pixels. Default value: 0, which indicates no restriction on license plate size.

0.4

ScaleRatio

number

The detection box scaling ratio. Value range: 0.1 to 5.0. Scales both the width and height of the detection box based on its center. • > 1.0: Enlarges the blur area. • < 1.0: Reduces the blur area. • = 1.0: Uses the original detection box.

1.0

BlurRadius

integer

The blur radius. Value range: 1 to 100. A larger value typically results in a more blurred area.

100

Transparency

number

The transparency and edge feathering intensity of the blur area. Value range: 0.0 to 1.0. • 0.0: Displays the full blur effect. • 1.0: No blur processing is performed. Only the original image is displayed. • 0.0 to 1.0: A larger value results in a higher proportion of the original image, a smaller actual blur radius, and typically a larger edge feathering range.

0.0