All Products
Search
Document Center

:SubmitTranscodeJob

最終更新日:Mar 30, 2026

Submits a transcoding job.

Operation description

This operation will be discontinued on December 31, 2025. Please call SubmitMediaConvertJob - Submit Media Transcoding Task.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:SubmitTranscodeJob

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

No

The job name.

job-name

InputGroup

array<object>

Yes

The input group of the job. An input of a single file indicates a transcoding job. An input of multiple files indicates an audio and video stream merge job.

job-name

object

Yes

The input of the job.

Type

string

Yes

The type of the media object. Valid values:

  • OSS: an Object Storage Service (OSS) object.

  • Media: a media asset.

OSS

Media

string

Yes

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

Note

Before you use the OSS bucket in the URL, you must add the bucket on the Storage Management page of the Intelligent Media Services (IMS) console.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

InputUrl

string

No

The URL of the input stream.

  • This parameter takes effect only when Type is set to Media. You can select a specific file within the media asset as an input.

  • The system checks whether the input URL exists within the media asset.

oss://bucket/path/to/video.mp4

OutputGroup

array<object>

Yes

The output group of the job.

user-data

array<object>

Yes

The output of the job.

Output

object

Yes

The output file configuration.

Type

string

Yes

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

Yes

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

Note

Before you use the OSS bucket in the URL, you must add the bucket on the Storage Management page of the IMS console.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

OutputUrl

string

No

The URL of the output stream.
This parameter takes effect only when Type is set to Media. You can select a specific file within the media asset as an output.
Supported placeholders:

  • {MediaId}: the ID of the media asset.

  • {JobId}: the ID of the transcoding subjob.

  • {MediaBucket}: the bucket to which the media asset belongs.

  • {ExtName}: the file suffix, which uses the output format of the transcoding template.

  • {DestMd5}: the MD5 value of the transcoded output file.
    Notes:

  1. This parameter must contain the {MediaId} and {JobId} placeholders.

  2. The output bucket is the same as the bucket to which the media asset belongs.

oss://bucket/path/to/{MediaId}/{JobId}.mp4

ProcessConfig

object

Yes

The job processing configuration.

Transcode

object

Yes

The transcoding configuration.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

The parameters that are used to overwrite the corresponding parameters of the template.

Video

object

No

The video settings.

Codec

string

No

The encoding format.

H.264

Profile

string

No

The encoding profile. Valid values: baseline, main, and high.

  • baseline: applicable to mobile devices.

  • main: applicable to standard-definition devices.

  • high: applicable to high-definition devices.

Default value: high.

Main

Bitrate

string

No

The average video bitrate. Valid values: [10,50000]. Unit: Kbit/s.

3000

Crf

string

No

The constant rate factor (CRF). Valid values: [0,51]. Default value: 23 if the encoding format is H.264, or 26 if the encoding format is H.265.

Note

If this parameter is specified, the setting of the bitrate becomes invalid.

23

Width

string

No

The width of the video. Valid values: [128,4096]. Unit: pixels. Default value: the original width of the video.

1920

Height

string

No

The height of the video. Valid values: [128,4096]. Unit: pixels. Default value: the original height of the video.

1080

Fps

string

No

The frame rate. Valid values:(0,60]. Default value: the frame rate of the input file.

Note

The value is 60 if the frame rate of the input file exceeds 60.

25

Gop

string

No

The maximum number of frames between keyframes. Valid values: [1,1080000]. Default value: 250.

250

Preset

string

No

The preset video algorithm. This parameter takes effect only if the encoding format is H.264. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium

ScanMode

string

No

The scan mode. Valid values: interlaced and progressive.

progressive

PixFmt

string

No

The pixel format of the video. Valid values: standard pixel formats such as yuv420p and yuvj420p.

yuv420p

Remove

string

No

Specifies whether to remove the video.

false

Crop

string

No

The method of video cropping. Valid values:

  • border: automatically detects and removes black bars.

  • A value in the width:height:left:top format: crops the videos based on the custom settings. Example: 1280:800:0:140.

1280:800:0:140

Pad

string

No

The black bars added to the video. Format: width:height:left:top. Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

No

Specifies whether to enable the auto-rotate screen feature.

false

Bufsize

string

No

The buffer size. Valid values: [1000,128000]. Default value: 6000. Unit: KB.

6000

Maxrate

string

No

The maximum bitrate of the video. Valid values: [10,50000]. Unit: Kbit/s.

9000

AbrMax

string

No

The maximum adaptive bitrate (ABR). This parameter takes effect only for Narrowband HD 1.0. Valid values: [10,50000]. Unit: Kbit/s.

6000

Audio

object

No

The audio settings.

Codec

string

No

The audio codec. Valid values: AAC, MP3, VORBIS, and FLAC. Default value: AAC.

AAC

Profile

string

No

The audio codec profile. If the Codec parameter is set to AAC, the valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

aac_low

Samplerate

string

No

The sampling rate. Valid values: 22050, 32000, 44100, 48000, and 96000. Default value: 44100. Unit: Hz.

44100

Bitrate

string

No

The audio bitrate of the output file. Valid values: [8,1000]. Unit: Kbit/s. Default value: 128.

128

Channels

string

No

The number of sound channels. Default value: 2.

2

Remove

string

No

Specifies whether to delete the audio stream.

false

Volume

object

No

The volume configurations.

Method

string

No

The volume adjustment method. Valid values:

auto

IntegratedLoudnessTarget

string

No

The output volume.

-6

TruePeak

string

No

The peak volume.

-1

LoudnessRangeTarget

string

No

The volume range.

8

Container

object

No

The encapsulation format settings.

Format

string

No

The container format.

mp4

MuxConfig

object

No

The encapsulation settings.

Segment

object

No

The segment settings.

Duration

string

No

The segment length.

10

ForceSegTime

string

No

The forced segmentation point in time.

2,3

TransConfig

object

No

The conditional transcoding configurations.

TransMode

string

No

The video transcoding mode. Valid values:

  • onepass: You can set this parameter to onepass if the Bitrate parameter is set to ABR. The encoding speed of this mode is faster than that of the twopass mode.

  • twopass: You can set this parameter to twopass if the Bitrate parameter is set to VBR. The encoding speed of this mode is slower than that of the onepass mode.

  • CBR: the constant bitrate mode.

Default value: onepass.

onepass

IsCheckReso

string

No

Specifies whether to check the video resolution. You can specify only one of the IsCheckReso and IsCheckResoFail parameters. The priority of the IsCheckResoFail parameter is higher. Valid values:

  • true: checks the video resolution. If the width or height of the input video is less than that of the output video, the resolution of the input video is used for transcoding.

  • false: does not check the video resolution.

Default value: false.

true

IsCheckResoFail

string

No

Specifies whether to check the video resolution. You can specify only one of the IsCheckReso and IsCheckResoFail parameters. The priority of the IsCheckResoFail parameter is higher. Valid values:

  • true: checks the video resolution. If the width or height of the input video is less than that of the output video, the transcoding job fails.

  • false: does not check the video resolution.

Default value: false.

true

IsCheckVideoBitrate

string

No

Specifies whether to check the video bitrate. You can specify only one of the IsCheckVideoBitrate and IsCheckVideoBitrateFail parameters. The priority of the IsCheckVideoBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input video is less than that of the output video, the bitrate of the input video is used for transcoding.

  • false: does not check the video resolution.

Default value: false.

true

IsCheckVideoBitrateFail

string

No

Specifies whether to check the video bitrate. You can specify only one of the IsCheckVideoBitrate and IsCheckVideoBitrateFail parameters. The priority of the IsCheckVideoBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input video is less than that of the output video, the transcoding job fails.

  • false: does not check the video resolution.

Default value: false.

true

IsCheckAudioBitrate

string

No

Specifies whether to check the audio bitrate. You can specify only one of the IsCheckAudioBitrate and IsCheckAudioBitrateFail parameters. The priority of the IsCheckAudioBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input audio is less than that of the output audio, the bitrate of the input audio is used for transcoding.

  • false: does not check the video resolution.

Default value:

  • If this parameter is not specified and the codec of the output audio is different from that of the input audio, the default value is false.

  • If this parameter is not specified and the codec of the output audio is the same as that of the input audio, the default value is true.

true

IsCheckAudioBitrateFail

string

No

Specifies whether to check the audio bitrate. You can specify only one of the IsCheckAudioBitrate and IsCheckAudioBitrateFail parameters. The priority of the IsCheckAudioBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input audio is less than that of the output audio, the transcoding job fails.

  • false: does not check the video resolution.

Default value: false.

true

AdjDarMethod

string

No

The method that is used to adjust the resolution. This parameter takes effect only if both the Width and Height parameters are specified. You can use this parameter together with the LongShortMode parameter.

Valid values: rescale, crop, pad, and none.

Default value: none.

none

ImageWatermarks

array<object>

No

The watermark configuration of an image.

array<object>

No

The watermark configuration of an image.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

The parameters that are used to overwrite the corresponding parameters of the template.

Width

string

No

The width of the watermark in the output video. The following value types are supported:

  • Integer: the pixel value of the watermark width.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the watermark width to the width of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

32

Height

string

No

The height of the watermark image in the output video. The following value types are supported:

  • Integer: the pixel value of the watermark height.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the watermark height to the height of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

32

Dx

string

No

The horizontal offset of the watermark relative to the output video. Default value: 0.

The following value types are supported:

  • Integer: the pixel value of the horizontal offset.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the horizontal offset to the width of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

10

Dy

string

No

The vertical offset of the watermark relative to the output video. Default value: 0.

The following value types are supported:

  • Integer: the pixel value of the horizontal offset.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the vertical offset to the height of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

10

ReferPos

string

No

The position of the watermark.

  • Valid values: TopRight, TopLeft, BottomRight, and BottomLeft.

  • Default value: TopRight.

TopLeft

Timeline

object

No

The time settings of the dynamic watermark.

Start

string

No

The beginning of the time range in which the watermark is displayed.

  • Unit: seconds.

  • Value values: integers.

  • Default value: 0.

00:00:05

Duration

string

No

The time range in which the watermark is displayed.

  • Valid values: integers and ToEND.

  • Default value: ToEND.

ToEND

File

object

No

The watermark image file.

Type

string

No

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

No

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

TextWatermarks

array<object>

No

The configurations of the text watermark.

array<object>

No

The configurations of the text watermark.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

The parameters that are used to overwrite the corresponding parameters of the template.

Content

string

No

The watermark text. Base64 encoding is not required. The string must be encoded in UTF-8.

Test Watermark

FontName

string

No

The font of the text. Default value: SimSun.

SimSun

FontColor

string

No

The color of the text.

#006400

FontAlpha

string

No

The transparency of the text.

  • Valid values: (0,1].

  • Default value: 1.

1.0

Top

string

No

The top margin of the text.

  • Default value: 0.

  • Valid values: [0,4096].

10

Left

string

No

The left margin of the text watermark.

  • Default value: 0.

  • Valid values: [0,4096].

10

FontSize

integer

No

The size of the text.

  • Default value: 16.

  • Valid values: (4,120).

16

BorderWidth

integer

No

The outline width of the text watermark.

  • Default value: 0.

  • Valid values: (0,4096].

0

BorderColor

string

No

The outline color of the text watermark. Default value: black. For more information, see BorderColor.

#006400

Adaptive

string

No

Specifies whether to the font size based on the output video dimensions. true / false, default: false

false

Subtitles

array<object>

No

The subtitle configuration.

array<object>

No

The subtitle configuration.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

The parameters that are used to overwrite the corresponding parameters of the template.

Format

string

No

The format of the subtitle file.

vtt

CharEnc

string

No

The file encoding format.

UTF-8

File

object

No

The subtitle file.

Type

string

No

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

No

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

Encryption

object

No

The encryption settings.

EncryptType

string

No

Specifies the encryption type. Valid values:

  • PrivateEncryption: Alibaba Cloud proprietary cryptography

  • HLSEncryption: HTTP Live Streaming (HLS) encryption

PrivateEncryption

CipherText

string

No

The ciphertext of HTTP Live Streaming (HLS) encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

No

The address of the decryption service for HLS encryption.

https://sample.com/path?CipherText=MTYi00NDU0LTg5O****

KeyServiceType

string

No

The key service type for HLS encryption. Valid values:

  • KMS

  • Base64

KMS

CombineConfigs

array<object>

No

The multi-input stream merge configuration.

object

No

The stream merge configuration.

AudioIndex

string

Yes

The audio stream index.

0 or exclude

VideoIndex

string

Yes

The video stream index.

0 or exclude

Start

number

No

The start time of the input stream. Default value: 0.

0.0

Duration

number

No

The duration of the input stream. The default value is the duration of the video.

20.0

UserData

string

No

The custom settings. The value must be in the JSON format and can be up to 512 bytes in length. You can specify a custom callback URL.

user-data

ScheduleConfig

object

No

The scheduling information about the job.

job-name

PipelineId

string

No

The ID of the MPS queue to which the job was submitted.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

No

The priority of the job. Valid values: 1 to 10. The greater the value, the higher the priority.

5

ClientToken

string

No

The client token that is used to ensure the idempotence of the request.

****12e8864746a0a398****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

31E30781-9495-5E2D-A84D-759B0A01E262

TranscodeParentJob

object

TranscodeParentJobWithSubJobDTO

TranscodeJobList

array<object>

The list of subjobs.

array<object>

The details of the subjobs.

CreateTime

string

The time when the job was created.

2022-01-12T08:49:41Z

Name

string

The job name.

transcode-job

ParentJobId

string

The main job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobId

string

The subjob ID.

7d6a7e0d4db2457a8d45ff5d43e1bf0a

JobIndex

integer

The index number of the subjob in the entire job.

0

InputGroup

array<object>

The input group of the job. An input of a single file indicates a transcoding job. An input of multiple files indicates an audio and video stream merge job.

object

The information about the job input.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

InputUrl

string

The URL of the input stream:

  • This parameter takes effect only when Type is set to Media. You can select a specific file within the media asset as an input.

  • The system checks whether the input URL exists within the media asset.

oss://bucket/path/to/video.mp4

ProcessConfig

object

The transcoding configuration.

Transcode

object

The transcoding configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that are used to overwrite the corresponding parameters of the template.

Video

object

The video settings.

Codec

string

The encoding format.

H.264

Profile

string

The encoding profile. Valid values: baseline, main, and high.

  • baseline: applicable to mobile devices.

  • main: applicable to standard-definition devices.

  • high: applicable to high-definition devices.

Default value: high.

Main

Bitrate

string

The average bitrate of the video.

  • Valid values: [10,50000].

  • Unit: Kbit/s.

3000

Crf

string

The constant rate factor.

  • Valid values: [0,51].

  • Default value: 23 if the encoding format is H.264, or Default value when the Codec parameter is set to H.265: 26.

If this parameter is specified, the value of Bitrate becomes invalid.

23

Width

string

The width of the output video.

  • Valid values: [128,4096].

  • Unit: pixels.

  • Default value: the width of the input video.

1920

Height

string

The height of the output video.

  • Valid values: [128,4096].

  • Unit: pixels.

  • Default value: the height of the input video.

1080

Fps

string

The frame rate.

  • Valid values: (0,60].

  • The value is 60 if the frame rate of the input video exceeds 60.

  • Default value: the frame rate of the input video.

25

Gop

string

The maximum number of frames between two keyframes.

  • Valid values: [1,1080000].

  • Default value: 250.

250

Preset

string

The preset video algorithm. This parameter takes effect only if the encoding format is H.264. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium

ScanMode

string

The scan mode. Valid values: interlaced and progressive.

progressive

PixFmt

string

The pixel format of the video. Valid values: standard pixel formats such as yuv420p and yuvj420p.

yuv420p

Remove

string

Specifies whether to remove the video.

false

Crop

string

The method of video cropping. Valid values:

  • border: automatically detects and removes black bars.

  • A value in the width:height:left:top format: crops the videos based on the custom settings. Example: 1280:800:0:140.

1280:800:0:140

Pad

string

The black bars added to the video.

  • Format: width:height:left:top.

  • Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

Specifies whether to enable the auto-rotate screen feature.

false

Bufsize

string

The buffer size.

  • Valid values: [1000,128000].

  • Default value: 6000.

  • Unit: KB.

6000

Maxrate

string

The maximum bitrate of the output video. Valid values: [10,50000]. Unit: Kbit/s.

9000

AbrMax

string

The maximum ABR. This parameter takes effect only for Narrowband HD 1.0. Valid values: [10,50000]. Unit: Kbit/s.

6000

Audio

object

The audio settings.

Codec

string

The audio codec. Valid values: AAC, MP3, VORBIS, and FLAC. Default value: AAC.

AAC

Profile

string

The audio codec profile. If the Codec parameter is set to AAC, the valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

aac_low

Samplerate

string

The sampling rate.

  • Default value: 44100.

  • Valid values: 22050, 32000, 44100, 48000, and 96000.

  • Unit: Hz.

44100

Bitrate

string

The audio bitrate of the output file.

  • Valid values: [8,1000].

  • Unit: Kbit/s.

  • Default value: 128.

128

Channels

string

The number of sound channels. Default value: 2.

2

Remove

string

Specifies whether to delete the audio stream.

false

Volume

object

The volume configurations.

Method

string

The volume adjustment method. Valid values:

auto

IntegratedLoudnessTarget

string

The output volume.

-6

TruePeak

string

The peak volume.

-1

LoudnessRangeTarget

string

The volume range.

8

Container

object

The encapsulation format settings.

Format

string

The container format.

mp4

MuxConfig

object

The encapsulation settings.

Segment

object

The segment settings.

Duration

string

The segment length.

10

ForceSegTime

string

The forced segmentation point in time.

2,3

TransConfig

object

The conditional transcoding configurations.

TransMode

string

The video transcoding mode. Valid values:

  • onepass: You can set this parameter to onepass if the Bitrate parameter is set to ABR. This is the default value. The encoding speed of this mode is faster than that of the twopass mode.

  • twopass: You can set this parameter to twopass if the Bitrate parameter is set to VBR. The encoding speed of this mode is slower than that of the onepass mode.

  • CBR: the constant bitrate mode.

onepass

IsCheckReso

string

Specifies whether to check the video resolution. You can specify only one of the IsCheckReso and IsCheckResoFail parameters. The priority of the IsCheckResoFail parameter is higher. Valid values:

  • true: checks the video resolution. If the width or height of the input video is less than that of the output video, the resolution of the input video is used for transcoding.

  • false: does not check the video resolution. This is the default value.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. You can specify only one of the IsCheckReso and IsCheckResoFail parameters. The priority of the IsCheckResoFail parameter is higher. Valid values:

  • true: checks the video resolution. If the width or height of the input video is less than that of the output video, the transcoding job fails.

  • false: does not check the video resolution. This is the default value.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. You can specify only one of the IsCheckVideoBitrate and IsCheckVideoBitrateFail parameters. The priority of the IsCheckVideoBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input video is less than that of the output video, the bitrate of the input video is used for transcoding.

  • false: does not check the video resolution. This is the default value.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. You can specify only one of the IsCheckVideoBitrate and IsCheckVideoBitrateFail parameters. The priority of the IsCheckVideoBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input video is less than that of the output video, the transcoding job fails.

  • false: does not check the video resolution. This is the default value.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. You can specify only one of the IsCheckAudioBitrate and IsCheckAudioBitrateFail parameters. The priority of the IsCheckAudioBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input audio is less than that of the output audio, the bitrate of the input audio is used for transcoding.

  • false: does not check the video resolution.

Default values:

  • If this parameter is not specified and the codec of the output audio is different from that of the input audio, the default value is false.

  • If this parameter is not specified and the codec of the output audio is the same as that of the input audio, the default value is true.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. You can specify only one of the IsCheckAudioBitrate and IsCheckAudioBitrateFail parameters. The priority of the IsCheckAudioBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input audio is less than that of the output audio, the transcoding job fails.

  • false: does not check the video resolution. This is the default value.

true

AdjDarMethod

string

The method that is used to adjust the resolution. This parameter takes effect only if both the Width and Height parameters are specified. You can use this parameter together with the LongShortMode parameter.

Valid values: rescale, crop, pad, and none.

Default value: none.

none

ImageWatermarks

array<object>

The watermark configuration of an image.

array<object>

The watermark configuration of an image.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that are used to overwrite the corresponding parameters of the template.

Width

string

The width of the watermark in the output video. The following value types are supported:

  • Integer: the pixel value of the watermark width.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the watermark width to the width of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

32

Height

string

The height of the watermark image in the output video. The following value types are supported:

  • Integer: the pixel value of the watermark height.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the watermark height to the height of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

32

Dx

string

The horizontal offset of the watermark relative to the output video. Default value: 0.

The following value types are supported:

  • Integer: the pixel value of the horizontal offset.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the horizontal offset to the width of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

10

Dy

string

The vertical offset of the watermark relative to the output video. Default value: 0.

The following value types are supported:

  • Integer: the pixel value of the horizontal offset.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the vertical offset to the height of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

10

ReferPos

string

The position of the watermark.

  • Valid values: TopRight, TopLeft, BottomRight, and BottomLeft.

  • Default value: TopRight.

TopLeft

Timeline

object

The time settings of the dynamic watermark.

Start

string

The beginning of the time range in which the watermark is displayed.

  • Unit: seconds.

  • Value values: integers.

  • Default value: 0.

00:00:05

Duration

string

The time range in which the watermark is displayed.

  • Valid values: integers and ToEND.

  • Default value: ToEND.

ToEND

File

object

The watermark image file.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

TextWatermarks

array<object>

The configurations of the text watermark.

array<object>

The configurations of the text watermark.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that are used to overwrite the corresponding parameters of the template.

Content

string

The watermark text. Base64 encoding is not required. The string must be encoded in UTF-8.

Test Watermark

FontName

string

The font of the text. Default value: SimSun.

SimSun

FontColor

string

The color of the text.

#006400

FontAlpha

string

The transparency of the text.

  • Valid values: (0,1].

  • Default value: 1.

1.0

Top

string

The top margin of the text.

  • Default value: 0.

  • Valid values: [0,4096].

10

Left

string

The left margin of the text watermark.

  • Default value: 0.

  • Valid values: [0,4096].

10

FontSize

integer

The size of the text.

  • Default value: 16.

  • Valid values: (4,120).

16

BorderWidth

integer

The outline width of the text watermark.

  • Default value: 0.

  • Valid values: (0,4096].

0

BorderColor

string

The outline color of the text watermark. Default value: black. For more information, see BorderColor.

#006400

Adaptive

string

Specifies whether to the font size based on the output video dimensions. true / false, default: false

false

Subtitles

array<object>

The subtitle configuration.

array<object>

The subtitle configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that are used to overwrite the corresponding parameters of the template.

Format

string

The format of the subtitle file.

vtt

CharEnc

string

The file encoding format.

UTF-8

File

object

The subtitle file.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

Encryption

object

The encryption settings.

EncryptType

string

Specifies the encryption type.

PrivateEncryption

CipherText

string

The ciphertext of HLS encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

The address of the decryption service for HLS encryption.

https://sample.com/path?CipherText=MTYi00NDU0LTg5O****

KeyServiceType

string

The type of the key service. Valid values: KMS and Base64.

KMS

CombineConfigs

array<object>

The multi-input stream merge configuration.

object

The stream merge configuration.

AudioIndex

string

The audio stream index.

0 or exclude

VideoIndex

string

The video stream index.

0 or exclude

Start

number

The start time of the input stream. Default value: 0.

0.0

Duration

number

The duration of the input stream. The default value is the duration of the video.

20.0

Output

object

The output file configuration.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

OutputUrl

string

The URL of the output stream.
This parameter takes effect only when Type is set to Media. You can select a specific file within the media asset as an output.
Supported placeholders:

  • {MediaId}: the ID of the media asset.

  • {JobId}: the ID of the transcoding subjob.

  • {MediaBucket}: the bucket to which the media asset belongs.

  • {ExtName}: the file suffix, which uses the output format of the transcoding template.

  • {DestMd5}: the MD5 value of the transcoded output file.
    Notes:

  1. This parameter must contain the {MediaId} and {JobId} placeholders.

  2. The output bucket is the same as the bucket to which the media asset belongs.

oss://bucket/path/to/{MediaId}/{JobId}.mp4

UserData

string

The user data.

user-data

ScheduleConfig

object

The scheduling information about the job.

PipelineId

string

The ID of the MPS queue to which the job was submitted.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

The priority of the job. Valid values: 1 to 10. The greater the value, the higher the priority.

5

Status

string

The state of the transcoding job. Valid values:

  • Init: The job is submitted.

  • Processing: The job is in progress.

  • Success: The job is successful.

  • Fail: The job failed.

  • Deleted: The job is deleted.

Init

OutFileMeta

object

The media information about the video generated by the job.

FileBasicInfo

object

The basic file information.

MediaId

string

The ID of the media asset.

73e07de0f77171eca3fc7035d0b26402

FileName

string

The file name.

file.m3u8

FileStatus

string

The state of the file.

Normal

FileType

string

The file type. Valid values: source_file and transcode_file.

source_file

FileSize

string

The file size. Unit: bytes.

31737

FileUrl

string

The URL of the file.

http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8

Region

string

The region in which the file resides.

cn-shanghai

FormatName

string

The name of the video format.

hls,applehttp

Duration

string

The duration of the video. Unit: seconds.

403.039999

Bitrate

string

The video bitrate.

888.563

Width

string

The width of the output video.

848

Height

string

The height of the output video.

478

AudioStreamInfoList

array<object>

The information about the audio stream.

object

The information about the audio stream.

Index

string

The sequence number of the stream.

1

CodecName

string

The encoding format.

aac

CodecLongName

string

The name of the encoding format.

AAC (Advanced Audio Coding)

CodecTimeBase

string

The time base of the encoder.

1/44100

CodecTagString

string

The name of the encoder tag.

[15][0][0][0]

CodecTag

string

The encoder tag.

0x000f

SampleFmt

string

The sample format.

fltp

SampleRate

string

The sampling rate. Unit: Hz.

44100

Channels

string

The number of sound channels.

2

ChannelLayout

string

The sound channel layout.

stereo

Timebase

string

The time base.

1/90000

StartTime

string

The start time of the stream.

1.473556

Duration

string

The duration of the stream. Unit: seconds.

403.039989

Bitrate

string

The bitrate.

0.f

Lang

string

The language of the stream.

cn

VideoStreamInfoList

array<object>

The information about the video stream.

object

The information about the video stream.

Index

string

The sequence number of the stream.

0

Codec_name

string

The encoding format.

h264

Codec_long_name

string

The name of the encoding format.

H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

Profile

string

The encoder profile.

High

Codec_time_base

string

The time base of the encoder.

1/50

Codec_tag_string

string

The tag string of the encoding format.

[27][0][0][0]

Codec_tag

string

The tag of the encoding format.

0x001b

Width

string

The width of the output video.

848

Height

string

The height of the output video.

478

Has_b_frames

string

Indicates whether the video stream contains bidirectional frames (B-frames). Valid values:

  • 0: The stream contains no B-frames.

  • 1: The stream contains one B-frame.

  • 2: The stream contains multiple consecutive B-frames.

2

Sar

string

The aspect ratio of the area from which the sampling points are collected.

478:477

Dar

string

The display aspect ratio.

16:9

PixFmt

string

The pixel format.

yuv420p

Level

string

The codec level.

31

Fps

string

The frame rate.

25.0

Avg_fps

string

The average frame rate.

25.0

Time_base

string

The time base.

1/90000

Start_time

string

The start time of the stream.

1.473556

Duration

string

The duration of the stream. Unit: seconds.

403.039989

Bit_rate

string

The bitrate.

888.563

NumFrames

string

The total number of frames.

10040

Lang

string

The language of the stream.

cn

Rotate

string

The rotation angle of the video image. Valid values: 0, 90, 180, and 270. Default value: 0.

0

SubmitResultJson

object

The job submission result.

{}

SubmitTime

string

The time when the job was submitted.

2022-01-12T08:49:41Z

FinishTime

string

The time when the job was complete.

2022-01-12T08:49:41Z

RequestId

string

The ID of the request that submitted the job.

31E30781-9495-5E2D-A84D-759B0A01E262

CreateTime

string

The time when the job was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-01-12T08:49:41Z

Name

string

The job name.

transcode-job

RequestId

string

The ID of the request that submitted the job.

31E30781-9495-5E2D-A84D-759B0A01E262

ParentJobId

string

The main job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobCount

integer

The number of subjobs.

1

Status

string

The state of the job. Success: At least one of the subjobs is successful. Fail: All subjobs failed.

Success

TriggerSource

string

The source of the job. Valid values: API, WorkFlow, and Console.

API

Percent

integer

The completion percentage of the job.

0

SubmitTime

string

The time when the job was submitted. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-01-12T08:49:41Z

FinishTime

string

The time when the job was complete. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-01-12T08:49:41Z

InputGroup

array<object>

The input group of the job. An input of a single file indicates a transcoding job. An input of multiple files indicates an audio and video stream merge job.

object

The information about the job input.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

OutputGroup

array<object>

The output group of the job.

array<object>

The output of the job.

Output

object

The output file configuration.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

ProcessConfig

object

The job processing configuration.

Transcode

object

The transcoding configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that are used to overwrite the corresponding parameters of the template.

Video

object

The video settings.

Codec

string

The encoding format.

H.264

Profile

string

The encoding profile. Valid values: baseline, main, and high.

  • baseline: applicable to mobile devices.

  • main: applicable to standard-definition devices.

  • high: applicable to high-definition devices.

Default value: high.

Main

Bitrate

string

The average bitrate of the video.

  • Valid values: [10,50000].

  • Unit: Kbit/s.

3000

Crf

string

The constant rate factor.

  • Valid values: [0,51].

  • Default value: 23 if the encoding format is H.264, or Default value when the Codec parameter is set to H.265: 26.

If this parameter is specified, the value of Bitrate becomes invalid.

23

Width

string

The width of the output video.

  • Valid values: [128,4096].

  • Unit: pixels.

  • Default value: the width of the input video.

1920

Height

string

The height of the output video.

  • Valid values: [128,4096].

  • Unit: pixels.

  • Default value: the height of the input video.

1080

Fps

string

The frame rate.

  • Valid values: (0,60].

  • The value is 60 if the frame rate of the input video exceeds 60.

  • Default value: the frame rate of the input video.

25

Gop

string

The maximum number of frames between two keyframes.

  • Valid values: [1,1080000].

  • Default value: 250.

250

Preset

string

The preset video algorithm. This parameter takes effect only if the encoding format is H.264. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium

ScanMode

string

The scan mode. Valid values: interlaced and progressive.

progressive

PixFmt

string

The pixel format of the video. Valid values: standard pixel formats such as yuv420p and yuvj420p.

yuv420p

Remove

string

Specifies whether to remove the video.

false

Crop

string

The method of video cropping. Valid values:

  • border: automatically detects and removes black bars.

  • A value in the width:height:left:top format: crops the videos based on the custom settings. Example: 1280:800:0:140.

1280:800:0:140

Pad

string

The black bars added to the video.

  • Format: width:height:left:top.

  • Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

Specifies whether to enable the auto-rotate screen feature.

false

Bufsize

string

The buffer size.

  • Valid values: [1000,128000].

  • Default value: 6000.

  • Unit: KB.

6000

Maxrate

string

The maximum bitrate of the output video.

  • Valid values: [10,50000].

  • Unit: Kbit/s.

9000

AbrMax

string

The maximum ABR. This parameter takes effect only for Narrowband HD 1.0.

  • Valid values: [10,50000].

  • Unit: Kbit/s.

6000

Audio

object

The audio settings.

Codec

string

The audio codec. Valid values: AAC, MP3, VORBIS, and FLAC. Default value: AAC.

AAC

Profile

string

The audio codec profile. If the Codec parameter is set to AAC, the valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

aac_low

Samplerate

string

The sampling rate.

  • Valid values: 22050, 32000, 44100, 48000, and 96000. Default value: 44100.

  • Unit: Hz.

44100

Bitrate

string

The audio bitrate of the output file.

  • Valid values: [8,1000].

  • Unit: Kbit/s.

  • Default value: 128.

128

Channels

string

The number of sound channels. Default value: 2.

2

Remove

string

Specifies whether to delete the audio stream.

false

Volume

object

The volume configurations.

Method

string

The volume adjustment method. Valid values:

auto

IntegratedLoudnessTarget

string

The output volume.

-6

TruePeak

string

The peak volume.

-1

LoudnessRangeTarget

string

The volume range.

8

Container

object

The encapsulation format settings.

Format

string

The container format.

mp4

MuxConfig

object

The encapsulation settings.

Segment

object

The segment settings.

Duration

string

The segment length.

10

ForceSegTime

string

The forced segmentation point in time.

2,3

TransConfig

object

The conditional transcoding configurations.

TransMode

string

The video transcoding mode. Valid values:

  • onepass: You can set this parameter to onepass if the Bitrate parameter is set to ABR. The encoding speed of this mode is faster than that of the twopass mode.

  • twopass: You can set this parameter to twopass if the Bitrate parameter is set to VBR. The encoding speed of this mode is slower than that of the onepass mode.

  • CBR: the constant bitrate mode.

Default value: onepass.

onepass

IsCheckReso

string

Specifies whether to check the video resolution. You can specify only one of the IsCheckReso and IsCheckResoFail parameters. The priority of the IsCheckResoFail parameter is higher. Valid values:

  • true: checks the video resolution. If the width or height of the input video is less than that of the output video, the resolution of the input video is used for transcoding.

  • false: does not check the video resolution.

Default value: false.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. You can specify only one of the IsCheckReso and IsCheckResoFail parameters. The priority of the IsCheckResoFail parameter is higher. Valid values:

  • true: checks the video resolution. If the width or height of the input video is less than that of the output video, the transcoding job fails.

  • false: does not check the video resolution.

Default value: false.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. You can specify only one of the IsCheckVideoBitrate and IsCheckVideoBitrateFail parameters. The priority of the IsCheckVideoBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input video is less than that of the output video, the bitrate of the input video is used for transcoding.

  • false: does not check the video resolution.

Default value: false.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. You can specify only one of the IsCheckVideoBitrate and IsCheckVideoBitrateFail parameters. The priority of the IsCheckVideoBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input video is less than that of the output video, the transcoding job fails.

  • false: does not check the video resolution.

Default value: false.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. You can specify only one of the IsCheckAudioBitrate and IsCheckAudioBitrateFail parameters. The priority of the IsCheckAudioBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input audio is less than that of the output audio, the bitrate of the input audio is used for transcoding.

  • false: does not check the video resolution.

Default value:

  • If this parameter is not specified and the codec of the output audio is different from that of the input audio, the default value is false.

  • If this parameter is not specified and the codec of the output audio is the same as that of the input audio, the default value is true.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. You can specify only one of the IsCheckAudioBitrate and IsCheckAudioBitrateFail parameters. The priority of the IsCheckAudioBitrateFail parameter is higher. Valid values:

  • true: checks the video resolution. If the bitrate of the input audio is less than that of the output audio, the transcoding job fails.

  • false: does not check the video resolution.

Default value: false.

true

AdjDarMethod

string

The method that is used to adjust the resolution. This parameter takes effect only if both the Width and Height parameters are specified. You can use this parameter together with the LongShortMode parameter.

Valid values: rescale, crop, pad, and none.

Default value: none.

none

ImageWatermarks

array<object>

The watermark configuration of an image.

array<object>

The watermark configuration of an image.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that are used to overwrite the corresponding parameters of the template.

Width

string

The width of the watermark in the output video. The following value types are supported:

  • Integer: the pixel value of the watermark width.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the watermark width to the width of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

32

Height

string

The height of the watermark image in the output video. The following value types are supported:

  • Integer: the pixel value of the watermark height.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the watermark height to the height of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

32

Dx

string

The horizontal offset of the watermark relative to the output video. Default value: 0.

The following value types are supported:

  • Integer: the pixel value of the horizontal offset.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the horizontal offset to the width of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

10

Dy

string

The vertical offset of the watermark relative to the output video. Default value: 0.

The following value types are supported:

  • Integer: the pixel value of the horizontal offset.

    • Valid values: [8,4096].

    • Unit: pixels.

  • Decimal: the ratio of the vertical offset to the height of the output video.

    • Valid values: (0,1).

    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically discarded.

10

ReferPos

string

The position of the watermark.

  • Valid values: TopRight, TopLeft, BottomRight, and BottomLeft.

  • Default value: TopRight.

TopLeft

Timeline

object

The time settings of the dynamic watermark.

Start

string

The beginning of the time range in which the watermark is displayed.

  • Unit: seconds.

  • Value values: integers.

  • Default value: 0.

00:00:05

Duration

string

The time range in which the watermark is displayed.

  • Valid values: integers and ToEND.

  • Default value: ToEND.

ToEND

File

object

The watermark image file.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.

  • If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

TextWatermarks

array<object>

The configurations of the text watermark.

array<object>

The configurations of the text watermark.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that are used to overwrite the corresponding parameters of the template.

Content

string

The watermark text. Base64 encoding is not required. The string must be encoded in UTF-8.

Test Watermark

FontName

string

The font of the text. Default value: SimSun.

SimSun

FontColor

string

The color of the text.

#006400

FontAlpha

string

The transparency of the text.

  • Valid values: (0,1].

  • Default value: 1.

1.0

Top

string

The top margin of the text.

  • Default value: 0.

  • Valid values: [0,4096].

10

Left

string

The left margin of the text watermark.

  • Default value: 0.

  • Valid values: [0,4096].

10

FontSize

integer

The size of the text.

  • Default value: 16.

  • Valid values: (4,120).

16

BorderWidth

integer

The outline width of the text watermark.

  • Default value: 0.

  • Valid values: (0,4096].

0

BorderColor

string

The outline color of the text watermark. Default value: black. For more information, see BorderColor.

#006400

Adaptive

string

Specifies whether to the font size based on the output video dimensions.

  • true: false

  • default: false

false

Subtitles

array<object>

The subtitle configuration.

array<object>

The subtitle configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that are used to overwrite the corresponding parameters of the template.

Format

string

The format of the subtitle file.

vtt

CharEnc

string

The file encoding format.

UTF-8

File

object

The subtitle file.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS object.

  • Media: a media asset.

OSS

Media

string

The media object. If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported. If Type is set to Media, set this parameter to the ID of a media asset.

oss://bucket/path/to/video.mp4

Encryption

object

The encryption settings.

EncryptType

string

Specifies the encryption type.

PrivateEncryption

CipherText

string

The ciphertext of HLS encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

The address of the decryption service for HLS encryption.

https://sample.com/path?CipherText=MTYi00NDU0LTg5O****

KeyServiceType

string

The type of the key service. Valid values: KMS and Base64.

KMS

CombineConfigs

array<object>

The multi-input stream merge configuration.

object

The multi-input stream merge configuration.

AudioIndex

string

The audio stream index.

0 or exclude

VideoIndex

string

The video stream index.

0 or exclude

Start

number

The start time of the input stream. Default value: 0.

0.0

Duration

number

The duration of the input stream. The default value is the duration of the video.

20.0

UserData

string

The user data.

user-data

ScheduleConfig

object

The scheduling configuration of the job.

PipelineId

string

The ID of the MPS queue to which the job was submitted.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

The priority of the job. Valid values: 1 to 10. The greater the value, the higher the priority.

5

Examples

Success response

JSON format

{
  "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
  "TranscodeParentJob": {
    "TranscodeJobList": [
      {
        "CreateTime": "2022-01-12T08:49:41Z",
        "Name": "transcode-job",
        "ParentJobId": "8b2198504dd340b7b3c9842a74fc9baa",
        "JobId": "7d6a7e0d4db2457a8d45ff5d43e1bf0a",
        "JobIndex": 0,
        "InputGroup": [
          {
            "Type": "OSS",
            "Media": "oss://bucket/path/to/video.mp4",
            "InputUrl": "oss://bucket/path/to/video.mp4\n"
          }
        ],
        "ProcessConfig": {
          "Transcode": {
            "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
            "OverwriteParams": {
              "Video": {
                "Codec": "H.264",
                "Profile": "Main",
                "Bitrate": "3000",
                "Crf": "23",
                "Width": "1920",
                "Height": "1080",
                "Fps": "25",
                "Gop": "250",
                "Preset": "medium",
                "ScanMode": "progressive",
                "PixFmt": "yuv420p",
                "Remove": "false",
                "Crop": "1280:800:0:140",
                "Pad": "1280:800:0:140",
                "LongShortMode": "false",
                "Bufsize": "6000",
                "Maxrate": "9000",
                "AbrMax": "6000"
              },
              "Audio": {
                "Codec": "AAC",
                "Profile": "aac_low",
                "Samplerate": "44100",
                "Bitrate": "128",
                "Channels": "2",
                "Remove": "false",
                "Volume": {
                  "Method": "auto",
                  "IntegratedLoudnessTarget": "-6",
                  "TruePeak": "-1",
                  "LoudnessRangeTarget": "8"
                }
              },
              "Container": {
                "Format": "mp4"
              },
              "MuxConfig": {
                "Segment": {
                  "Duration": "10",
                  "ForceSegTime": "2,3"
                }
              },
              "TransConfig": {
                "TransMode": "onepass",
                "IsCheckReso": "true",
                "IsCheckResoFail": "true",
                "IsCheckVideoBitrate": "true",
                "IsCheckVideoBitrateFail": "true",
                "IsCheckAudioBitrate": "true",
                "IsCheckAudioBitrateFail": "true",
                "AdjDarMethod": "none"
              }
            }
          },
          "ImageWatermarks": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Width": "32",
                "Height": "32",
                "Dx": "10",
                "Dy": "10",
                "ReferPos": "TopLeft",
                "Timeline": {
                  "Start": "00:00:05",
                  "Duration": "ToEND"
                },
                "File": {
                  "Type": "OSS",
                  "Media": "oss://bucket/path/to/video.mp4"
                }
              }
            }
          ],
          "TextWatermarks": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Content": "Test Watermark",
                "FontName": "SimSun",
                "FontColor": "#006400",
                "FontAlpha": "1.0",
                "Top": "10",
                "Left": "10",
                "FontSize": 16,
                "BorderWidth": 0,
                "BorderColor": "#006400",
                "Adaptive": "false"
              }
            }
          ],
          "Subtitles": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Format": "vtt",
                "CharEnc": "UTF-8",
                "File": {
                  "Type": "OSS",
                  "Media": "oss://bucket/path/to/video.mp4"
                }
              }
            }
          ],
          "Encryption": {
            "EncryptType": "PrivateEncryption",
            "CipherText": "MTYi00NDU0LTg5O****",
            "DecryptKeyUri": "https://sample.com/path?CipherText=MTYi00NDU0LTg5O****",
            "KeyServiceType": "KMS"
          },
          "CombineConfigs": [
            {
              "AudioIndex": "0  or  exclude",
              "VideoIndex": "0  or  exclude",
              "Start": 0,
              "Duration": 20
            }
          ]
        },
        "Output": {
          "Type": "OSS",
          "Media": "oss://bucket/path/to/video.mp4",
          "OutputUrl": "oss://bucket/path/to/{MediaId}/{JobId}.mp4\n"
        },
        "UserData": "user-data",
        "ScheduleConfig": {
          "PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
          "Priority": 5
        },
        "Status": "Init",
        "OutFileMeta": {
          "FileBasicInfo": {
            "MediaId": "73e07de0f77171eca3fc7035d0b26402",
            "FileName": "file.m3u8",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "31737",
            "FileUrl": "http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8",
            "Region": "cn-shanghai",
            "FormatName": "hls,applehttp",
            "Duration": "403.039999",
            "Bitrate": "888.563",
            "Width": "848",
            "Height": "478"
          },
          "AudioStreamInfoList": [
            {
              "Index": "1",
              "CodecName": "aac",
              "CodecLongName": "AAC (Advanced Audio Coding)",
              "CodecTimeBase": "1/44100",
              "CodecTagString": "[15][0][0][0]",
              "CodecTag": "0x000f",
              "SampleFmt": "fltp",
              "SampleRate": "44100",
              "Channels": "2",
              "ChannelLayout": "stereo",
              "Timebase": "1/90000",
              "StartTime": "1.473556",
              "Duration": "403.039989",
              "Bitrate": "0.f",
              "Lang": "cn"
            }
          ],
          "VideoStreamInfoList": [
            {
              "Index": "0",
              "Codec_name": "h264",
              "Codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
              "Profile": "High",
              "Codec_time_base": "1/50",
              "Codec_tag_string": "[27][0][0][0]",
              "Codec_tag": "0x001b",
              "Width": "848",
              "Height": "478",
              "Has_b_frames": "2",
              "Sar": "478:477",
              "Dar": "16:9",
              "PixFmt": "yuv420p",
              "Level": "31",
              "Fps": "25.0",
              "Avg_fps": "25.0",
              "Time_base": "1/90000",
              "Start_time": "1.473556",
              "Duration": "403.039989",
              "Bit_rate": "888.563",
              "NumFrames": "10040",
              "Lang": "cn",
              "Rotate": "0"
            }
          ]
        },
        "SubmitResultJson": {},
        "SubmitTime": "2022-01-12T08:49:41Z",
        "FinishTime": "2022-01-12T08:49:41Z",
        "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262"
      }
    ],
    "CreateTime": "2022-01-12T08:49:41Z",
    "Name": "transcode-job",
    "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
    "ParentJobId": "8b2198504dd340b7b3c9842a74fc9baa",
    "JobCount": 1,
    "Status": "Success",
    "TriggerSource": "API",
    "Percent": 0,
    "SubmitTime": "2022-01-12T08:49:41Z",
    "FinishTime": "2022-01-12T08:49:41Z",
    "InputGroup": [
      {
        "Type": "OSS",
        "Media": "oss://bucket/path/to/video.mp4"
      }
    ],
    "OutputGroup": [
      {
        "Output": {
          "Type": "OSS",
          "Media": "oss://bucket/path/to/video.mp4"
        },
        "ProcessConfig": {
          "Transcode": {
            "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
            "OverwriteParams": {
              "Video": {
                "Codec": "H.264",
                "Profile": "Main",
                "Bitrate": "3000",
                "Crf": "23",
                "Width": "1920",
                "Height": "1080",
                "Fps": "25",
                "Gop": "250",
                "Preset": "medium",
                "ScanMode": "progressive",
                "PixFmt": "yuv420p",
                "Remove": "false",
                "Crop": "1280:800:0:140",
                "Pad": "1280:800:0:140",
                "LongShortMode": "false",
                "Bufsize": "6000",
                "Maxrate": "9000",
                "AbrMax": "6000"
              },
              "Audio": {
                "Codec": "AAC",
                "Profile": "aac_low",
                "Samplerate": "44100",
                "Bitrate": "128",
                "Channels": "2",
                "Remove": "false",
                "Volume": {
                  "Method": "auto",
                  "IntegratedLoudnessTarget": "-6",
                  "TruePeak": "-1",
                  "LoudnessRangeTarget": "8"
                }
              },
              "Container": {
                "Format": "mp4"
              },
              "MuxConfig": {
                "Segment": {
                  "Duration": "10",
                  "ForceSegTime": "2,3"
                }
              },
              "TransConfig": {
                "TransMode": "onepass",
                "IsCheckReso": "true",
                "IsCheckResoFail": "true",
                "IsCheckVideoBitrate": "true",
                "IsCheckVideoBitrateFail": "true",
                "IsCheckAudioBitrate": "true",
                "IsCheckAudioBitrateFail": "true",
                "AdjDarMethod": "none"
              }
            }
          },
          "ImageWatermarks": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Width": "32",
                "Height": "32",
                "Dx": "10",
                "Dy": "10",
                "ReferPos": "TopLeft",
                "Timeline": {
                  "Start": "00:00:05",
                  "Duration": "ToEND"
                },
                "File": {
                  "Type": "OSS",
                  "Media": "oss://bucket/path/to/video.mp4"
                }
              }
            }
          ],
          "TextWatermarks": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Content": "Test Watermark",
                "FontName": "SimSun",
                "FontColor": "#006400",
                "FontAlpha": "1.0",
                "Top": "10",
                "Left": "10",
                "FontSize": 16,
                "BorderWidth": 0,
                "BorderColor": "#006400",
                "Adaptive": "false"
              }
            }
          ],
          "Subtitles": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Format": "vtt",
                "CharEnc": "UTF-8",
                "File": {
                  "Type": "OSS",
                  "Media": "oss://bucket/path/to/video.mp4"
                }
              }
            }
          ],
          "Encryption": {
            "EncryptType": "PrivateEncryption",
            "CipherText": "MTYi00NDU0LTg5O****",
            "DecryptKeyUri": "https://sample.com/path?CipherText=MTYi00NDU0LTg5O****",
            "KeyServiceType": "KMS"
          },
          "CombineConfigs": [
            {
              "AudioIndex": "0  or  exclude",
              "VideoIndex": "0  or  exclude",
              "Start": 0,
              "Duration": 20
            }
          ]
        }
      }
    ],
    "UserData": "user-data",
    "ScheduleConfig": {
      "PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
      "Priority": 5
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.