All Products
Search
Document Center

Intelligent Media Management:TargetVideo

Last Updated:Mar 24, 2026

Parameter

Type

Description

Example

object

Specifies the parameters for video processing.

DisableVideo

boolean

Specifies whether to disable the generation of the video stream. Valid values:

  • true: Disables the video stream. The output file contains no video stream.

  • false (Default): Enables the video stream.

false

Stream

array

A list of video stream indexes from the source file to process. If left empty (the default), the service processes the video stream with the smallest index (the first video stream). An index greater than 100 indicates that all video streams are processed.

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

Note

The service ignores indexes that do not correspond to an existing video stream.

integer

The index of the video stream to process.

0

TranscodeVideo

object

Specifies the video transcoding parameters. If this parameter is left empty, video processing is disabled, and the output file contains no video stream.

Note

Disabling video processing by leaving this parameter empty is not recommended. Use the DisableVideo parameter instead.

Codec

string

The video codec. Valid values:

  • For CreateMediaConvert API calls: copy (default), h264, h265, and vp9.
    Warning When this parameter is set to copy, the selected video stream is directly copied to the output file without re-encoding. In this case, other parameters under TranscodeVideo are ignored. The copy value cannot be used for video stitching and is typically used for remuxing.
  • For GenerateVideoPlaylist API calls: h264 (default) and h265.

h264

PixelFormat

string

The pixel format. Defaults to the source video's pixel format. Valid values:

  • yuv420p

  • yuv422p

  • yuv444p

  • yuv420p10le

  • yuv422p10le

  • yuv444p10le

  • yuva420p

Note

The yuva420p value is available only for CreateMediaConvert API calls and requires the Codec parameter to be vp9.

yuv420p

FrameRateOption

string

The frame rate option. Valid values:

  • fixed: Always use the specified target frame rate.

  • adaptive: Use the source frame rate if it is lower than the target frame rate.

  • fall: The job fails if the source frame rate is lower than the target frame rate.

Default value:

  • For CreateMediaConvert API calls, the default is fixed.

  • For GenerateVideoPlaylist API calls, the default is adaptive.

Note

This parameter must be set together with the FrameRate parameter.

fixed

FrameRate

number

The video frame rate. By default, the frame rate of the source video is used.

25

ResolutionOption

string

The resolution option. Valid values:

  • fixed: Always use the specified target resolution.

  • adaptive: Use the source resolution if its area is smaller than the target resolution area.

  • fall: The job fails if the source resolution area is smaller than the target resolution area.

Default value:

  • For CreateMediaConvert API calls, the default is fixed.

  • For GenerateVideoPlaylist API calls, the default is adaptive.

Note

This parameter must be set together with the Resolution parameter.

fixed

Resolution

string

The resolution of the output video in widthxheight format. Defaults to the source video's playback resolution. You can specify the width, the height, or both. You can also configure the long and short sides by using the AdaptiveResolutionDirection parameter. The value for a single side must be in the range (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 retains the source height; x720 sets the height to 720 and retains the source width.

  • Example 2: If AdaptiveResolutionDirection is true, 1280x720 sets the long side to 1280 and the short side to 720; 1280x sets the long side to 1280 and retains the source short side; x720 sets the short side to 720 and retains the source long side.

Note

If the source video contains rotation metadata, the system determines width, height, and long and short sides based on the rotated video, which corresponds to its playback resolution.

640x480

AdaptiveResolutionDirection

boolean

Specifies whether to enable adaptive sizing for long and short sides. Valid values:

  • true (Default): Enabled. The Resolution parameter is interpreted as long_sidexshort_side.

  • false: Disabled. The Resolution parameter is interpreted as widthxheight.

true

ScaleType

string

The scaling mode. Valid values:

  • stretch (Default): Stretches the video to fit the specified dimensions, which may alter the aspect ratio.

  • crop: Scales the video proportionally to be at least as large as the specified dimensions, then applies a center crop.

  • fill: Scales the video proportionally to fit within the specified dimensions, then adds black bars (center fill).

  • fit: Scales the video proportionally to fit within the specified dimensions without cropping or filling.

Note

This parameter must be set together with the Resolution parameter.

crop

Rotation

integer

The clockwise rotation angle in degrees. Valid values:

  • 0 (Default)

  • 90

  • 180

  • 270

90

BitrateOption

string

The video bitrate option. Valid values:

  • fixed: Always use the specified target video bitrate.

  • adaptive: Use the source video bitrate if it is lower than the target video bitrate.

  • fall: The job fails if the source video bitrate is lower than the target video bitrate.

Default value:

  • For CreateMediaConvert API calls, the default is fixed.

  • For GenerateVideoPlaylist API calls, the default is adaptive.

Note

This parameter must be set together with the Bitrate parameter.

fixed

Bitrate

integer

The video bitrate, in bits per second (bps).

Note

This parameter is mutually exclusive with CRF. If both this parameter and the CRF parameter are omitted, the system encodes the video with a default CRF value of 23.

128000

GOPSize

integer

The keyframe interval, in frames. Default: 150.

Note

This parameter is not supported for GenerateVideoPlaylist API calls.

60

CRF

number

Specifies the Constant Rate Factor (CRF). This parameter is mutually exclusive with Bitrate. The valid range is [0, 51]. A higher value results in lower quality. The recommended range is [18, 38].

18

BufferSize

integer

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

Note

This parameter is effective only when used with the CRF parameter.

4000000

MaxBitrate

integer

Sets the maximum bitrate for variable bitrate encoding. This parameter requires the BufferSize parameter.

Note

This parameter is effective only when used with the CRF parameter.

128000

BFrames

integer

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

3

Refs

integer

The number of reference frames. Default: 2.

2

VideoSlim

integer

Specifies whether to enable Video Slim mode. Valid values:

0: (Default) Disabled.

1: Enabled. Transcodes the video using Video Slim mode.

Note

For optimal results, use the recommended Bitrate or CRF parameters when transcoding with Video Slim.

Important Video Slim supports only the H.264 and H.265 codecs, the yuv420p pixel format, and an 8-bit depth. It does not support transcoding to multiple target video outputs or video stitching. For more information, see Video Slim.

0

FilterVideo

object

Specifies video filtering parameters. The system ignores this parameter if TranscodeVideo is empty or if TranscodeVideo.Codec is copy.

Note

This parameter is not supported for GenerateVideoPlaylist API calls.

Watermarks

array

A list of video watermarks to apply.

object

The configuration for a video watermark.

Type

string

The type of watermark. Valid values:

  • text (Default): A text watermark.

  • file: An image or animated watermark.

text

Dx

number

The horizontal offset. The interpretation of the value depends on its type:

  • 0 (Default): No offset.

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

  • Decimal: The offset specified as a ratio of the output video's width. Valid range: (0, 1).

0

Dy

number

The vertical offset. The interpretation of the value depends on its type:

  • 0 (Default): No offset.

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

  • Decimal: The offset specified as a ratio of the output video's height. Valid range: (0, 1).

0

StartTime

number

The time, in seconds (s), when the watermark first appears. By default, it appears at the start of the video.

0

Duration

number

The duration, in seconds (s), to display the watermark. By default, it remains visible until the end of the video.

0

ReferPos

string

The reference position for the watermark. Valid values:

  • topleft (Default): The top-left corner.

  • topright: The top-right corner.

  • bottomright: The bottom-right corner.

  • bottomleft: The bottom-left corner.

topleft

Content

string

The content of the text watermark. Default: empty.

Important This parameter is effective only when Type is text.

example

FontName

string

The font name for the text watermark. Valid values:

  • SourceHanSans-Regular (Default)

  • SourceHanSans-Bold

  • SourceHanSerif-Regular

  • SourceHanSerif-Bold

Important This parameter is effective only when Type is text.

SourceHanSans-Bold

FontSize

integer

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

Important This parameter is effective only when Type is text.

18

FontColor

string

The font color of the text watermark. The value can be in #RRGGBB format or a color name such as red or green. Default: #000000.

Important This parameter is effective only when Type is text.

red

FontApha

number

The font alpha (transparency) for the text watermark. The value must be in the range (0, 1]. A value of 1 (the default) means the text is fully opaque.

Important This parameter is effective only when Type is text.

0.8

BorderWidth

integer

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

Important This parameter is effective only when Type is text.

2

BorderColor

string

The border color of the text watermark. The value can be in #RRGGBB format or a color name such as red or green. Default: #000000.

Important This parameter is effective only when Type is text.

red

URI

string

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

The OSS URI must follow the format 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 extension.

Important This parameter is effective only when Type is file.

oss://test-bucket/watermark.jpg

Width

number

The width of the watermark image. By default, the original width of the watermark image is used. The interpretation of the value depends on its type:

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

  • Decimal: The width as a ratio of the output video's width. Valid range: (0, 1).

80

Height

number

The height of the watermark image. By default, the original height of the watermark image is used. The interpretation of the value depends on its type:

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

  • Decimal: The height as a ratio of the output video's height. Valid range: (0, 1).

40

Delogos

array

Applies blurring to rectangular areas of the video, typically to remove logos or on-screen graphics.

object

The parameters for video blurring.

StartTime

number

The start time for applying the blur effect, in seconds (s). By default, the effect is applied from the beginning of the video.

0

Duration

number

The duration for which the blur effect is applied, in seconds (s). By default, the effect lasts until the end of the video.

15

Dx

number

The horizontal offset. The interpretation of the value depends on its type:

  • 0 (Default): No offset.

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

  • Decimal: The offset specified as a ratio of the output video's width. Valid range: (0, 1).

0

Dy

number

The vertical offset. The interpretation of the value depends on its type:

  • 0 (Default): No offset.

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

  • Decimal: The offset specified as a ratio of the output video's height. Valid range: (0, 1).

0

Width

number

The width of the blur area. By default, the value is 1.0 (a decimal), which covers the full width of the output video. The interpretation of the value depends on its type:

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

  • Decimal: The width as a ratio of the output video's width. Valid range: (0, 1).

100

Height

number

The height of the blur area. By default, the value is 1.0 (a decimal), which covers the full height of the output video. The interpretation of the value depends on its type:

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

  • Decimal: The height as a ratio of the output video's height. Valid range: (0, 1).

40

ReferPos

string

The reference position for the blur area. Valid values:

  • topleft (Default): The top-left corner.

  • topright: The top-right corner.

  • bottomright: The bottom-right corner.

  • bottomleft: The bottom-left corner.

topleft

Speed

number

The video playback speed multiplier. The valid range is [0.5, 1.0]. Default: 1.0.

Note
  • This parameter sets the ratio of the playback speed of the transcoded file to that of the source file. It does not perform speed transcoding.

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

1.0

Desensitization

object

Specifies the video desensitization settings.

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

Face

object

Specifies the face desensitization settings.

Note

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

Confidence

number

The confidence threshold for face detection. The system does not desensitize faces with a confidence score below this threshold.

  • Valid range: 0.0 to 1.0.

  • Default: 0.0 (no confidence filtering).

0.4

MinSize

integer

The minimum face size threshold. The system does not desensitize faces with a width or height smaller than this threshold. Unit: pixels. Default: 0, which means no size limit.

0.4

LicensePlate

object

Specifies the license plate desensitization settings.

Note

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

Confidence

number

The confidence threshold for license plate detection. The system does not desensitize license plates with a confidence score below this threshold.

  • Valid range: 0.0 to 1.0.

  • Default: 0.0 (no confidence filtering).

0.4

MinSize

integer

The minimum license plate size threshold. The system does not desensitize license plates with a width or height smaller than this threshold. Unit: pixels. Default: 0, which means no size limit.

0.4