SubmitTranscodeJob

更新时间:
复制 MD 格式

Call the SubmitTranscodeJob operation to submit a video or audio transcoding job to Intelligent Media Services. In the request, you must specify the source file to transcode, the output format, and related parameters.

Operation description

  • This operation will be discontinued on December 31, 2025. Use SubmitMediaConvertJob instead.

  • This is an asynchronous operation. After you submit a job, the system returns a job ID. The job is not completed immediately but is queued for asynchronous execution in the background. You will receive the final result through a callback notification. You can also call QueryTranscodeJob to query the job status.

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 for the job. A single input creates a transcoding job. Multiple inputs create a media merging job.

job-name

object

Yes

The job input.

Type

string

Yes

The media object type. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

Yes

The media value:

  • If Type is OSS, this is a URL that supports the OSS or HTTP protocol.

Note

You must add the OSS bucket in the URL to IMS storage management before you use it.

  • If Type is Media, this is a media asset ID.

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

InputUrl

string

No

The input stream path:

  • This parameter takes effect only when Type is Media. It lets you select a specific file from the media asset as the input.

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

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

OutputGroup

array<object>

Yes

The output group for the job.

user-data

array<object>

Yes

The job output.

Output

object

Yes

The output media configuration.

Type

string

Yes

The media object type. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

Yes

The media value:

  • If Type is OSS, this is a URL that supports the OSS or HTTP protocol.

Note

You must add the OSS bucket in the URL to IMS storage management before you use it.

  • If Type is Media, this is a media asset ID.

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

OutputUrl

string

No

The output stream path:
This parameter takes effect only when Type is Media. It lets you select a specific file from the media asset as the output.
Valid placeholders:

  • {MediaId}: The media asset ID.

  • {JobId}: The sub-job ID.

  • {MediaBucket}: The bucket where the media asset resides.

  • {ExtName}: The file extension. This is the output format specified in the transcoding template.

  • {DestMd5}: The MD5 hash of the transcoded output file.

Note
  1. You must include both {MediaId} and {JobId} in this parameter.

  2. The output bucket must be the same as the bucket where the media asset resides.

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

Parameters to overwrite. If you specify these, they replace the corresponding parameters in 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: For mobile devices.

  • main: For standard-resolution devices.

  • high: For high-resolution devices.

Default value: high.

Main

Bitrate

string

No

The average video bitrate. Valid values: [10, 50000]. Unit: Kbps.

3000

Crf

string

No

The constant rate factor (CRF), which controls the trade-off between quality and bitrate. Valid values: [0, 51]. Default values: 23 for H.264 and 26 for H.265.

Note

If you set Crf, the Bitrate setting is ignored.

23

Width

string

No

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

1920

Height

string

No

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

1080

Fps

string

No

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

Note

If the frame rate of the input file exceeds 60, the system uses 60.

25

Gop

string

No

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

250

Preset

string

No

The video encoder preset. Only H.264 supports this parameter. 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 video color format. Valid values include yuv420p and yuvj420p.

yuv420p

Remove

string

No

Specifies whether to remove the video.

false

Crop

string

No

The video cropping method. Two options are available:

  • Automatically detect and crop black bars. Set this to border.

  • Custom cropping. Format: width:height:left:top. Example: 1280:800:0:140

1280:800:0:140

Pad

string

No

The padding configuration for black bars. Format: width:height:left:top. Example: 1280:800:0:140

1280:800:0:140

LongShortMode

string

No

Specifies whether to enable automatic rotation for portrait or landscape videos (also known as long-side/short-side mode).

false

Bufsize

string

No

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

6000

Maxrate

string

No

The peak video bitrate. Valid values: [10, 50000]. Unit: Kbps.

9000

AbrMax

string

No

The maximum bitrate for adaptive bitrate streaming (ABR). This applies only to narrow-high 1. Valid values: [10, 50000]. Unit: Kbps.

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 encoding profile. When Codec is AAC, valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

aac_low

Samplerate

string

No

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

44100

Bitrate

string

No

The audio bitrate of the output file. Valid values: [8, 1000]. Unit: Kbps. 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 control.

Method

string

No

The volume adjustment method.

auto

IntegratedLoudnessTarget

string

No

The target loudness level.

-6

TruePeak

string

No

The true peak volume.

-1

LoudnessRangeTarget

string

No

The loudness range.

8

Container

object

No

The container format settings.

Format

string

No

The container format.

mp4

MuxConfig

object

No

The multiplexing settings.

Segment

object

No

The segment settings.

Duration

string

No

The segment duration.

10

ForceSegTime

string

No

The forced segment time points.

2,3

TransConfig

object

No

The conditional transcoding parameters.

TransMode

string

No

The video transcoding mode. Valid values:

  • onepass: Used for adaptive bitrate (ABR) streaming. Encoding is faster than twopass.

  • twopass: Used for variable bitrate (VBR) streaming. Encoding is slower than onepass.

  • CBR: Constant bitrate mode.

Default value: onepass.

onepass

IsCheckReso

string

No

Specifies whether to check the video resolution. IsCheckReso and IsCheckResoFail are mutually exclusive. IsCheckResoFail has higher priority.

  • true: Check the resolution. If the input video resolution (width or height) is smaller than the output setting, transcode at the input resolution.

  • false: Do not check the resolution.

Default value: false.

true

IsCheckResoFail

string

No

Specifies whether to check the video resolution. IsCheckReso and IsCheckResoFail are mutually exclusive. IsCheckResoFail has higher priority.

  • true: Check the resolution. If the input video resolution (width or height) is smaller than the output setting, return a failure.

  • false: Do not check the resolution.

Default value: false.

true

IsCheckVideoBitrate

string

No

Specifies whether to check the video bitrate. IsCheckVideoBitrate and IsCheckVideoBitrateFail are mutually exclusive. IsCheckVideoBitrateFail has higher priority.

  • true: Check the bitrate. If the input video bitrate is lower than the output setting, transcode at the input bitrate.

  • false: Do not check the bitrate.

Default value: false.

true

IsCheckVideoBitrateFail

string

No

Specifies whether to check the video bitrate. IsCheckVideoBitrate and IsCheckVideoBitrateFail are mutually exclusive. IsCheckVideoBitrateFail has higher priority.

  • true: Check the bitrate. If the input video bitrate is lower than the output setting, return a failure.

  • false: Do not check the bitrate.

Default value: false.

true

IsCheckAudioBitrate

string

No

Specifies whether to check the audio bitrate. IsCheckAudioBitrate and IsCheckAudioBitrateFail are mutually exclusive. IsCheckAudioBitrateFail has higher priority.

  • true: Check the bitrate. If the input audio bitrate is lower than the output setting, transcode at the input bitrate.

  • false: Do not check the bitrate.

Default value:

  • Empty and the codec differs from the input source: false.

  • Empty and the codec matches the input source: true.

true

IsCheckAudioBitrateFail

string

No

Specifies whether to check the audio bitrate. IsCheckAudioBitrate and IsCheckAudioBitrateFail are mutually exclusive. IsCheckAudioBitrateFail has higher priority.

  • true: Check the bitrate. If the input audio bitrate is lower than the output setting, return a failure.

  • false: Do not check the bitrate.

Default value: false.

true

AdjDarMethod

string

No

The method used to adjust the display aspect ratio. This parameter takes effect only when both Width and Height are specified. You can use it with LongShortMode.

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

Default value: none.

none

ImageWatermarks

array<object>

No

The image watermark configuration.

array<object>

No

The image watermark configuration.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template.

Width

string

No

The width of the image watermark on the output video. Values can be one of the following:

  • Integer: The pixel width of the watermark image.
    • Valid values: [8, 4096]

    • Unit: px

  • Decimal: The ratio of the watermark width to the output video width.
    • Valid values: (0, 1)

    • Up to four decimal places are supported, such as 0.9999. Extra digits are automatically discarded.

32

Height

string

No

The height of the image watermark on the output video. Values can be one of the following:

  • Integer: The pixel height of the watermark image.
    • Valid values: [8, 4096]

    • Unit: px

  • Decimal: The ratio of the watermark height to the output video height.
    • Valid values: (0, 1)

    • Up to four decimal places are supported, such as 0.9999. Extra digits are automatically discarded.

32

Dx

string

No

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

Values can be one of the following:

  • Integer: The offset in pixels.
    • Valid values: [8, 4096]

    • Unit: px

  • Decimal: The ratio of the horizontal offset to the output video width.
    • Valid values: (0, 1)

    • Up to four decimal places are supported, such as 0.9999. Extra digits are automatically discarded.

10

Dy

string

No

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

Values can be one of the following:

  • Integer: The offset in pixels.
    • Valid values: [8, 4096]

    • Unit: px

  • Decimal: The ratio of the vertical offset to the output video height.
    • Valid values: (0, 1)

    • Up to four decimal places are supported, such as 0.9999. Extra digits are automatically discarded.

10

ReferPos

string

No

The position of the watermark.

  • Valid values: TopRight (top-right), TopLeft (top-left), BottomRight (bottom-right), and BottomLeft (bottom-left).

  • Default value: TopRight.

TopLeft

Timeline

object

No

The display time settings for a dynamic watermark.

Start

string

No

The start time of the watermark.

  • Unit: seconds

  • Valid values: numbers

  • Default value: 0

00:00:05

Duration

string

No

The duration of the watermark.

  • Valid values: [number, ToEND]

  • Default value: ToEND

ToEND

File

object

No

The watermark image file.

Type

string

No

The media object type. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

No

The media value:

  • If Type is OSS, this is a URL that supports the OSS or HTTP protocol.

  • If Type is Media, this is a media asset ID.

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

TextWatermarks

array<object>

No

The text watermark configuration.

array<object>

No

The text watermark configuration.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template.

Content

string

No

The watermark text. It does not need to be Base64 encoded. The string must be UTF-8 encoded.

测试水印

FontName

string

No

The font. Default: SimSun.

SimSun

FontColor

string

No

The color.

#006400

FontAlpha

string

No

The font transparency.

  • Valid values: (0, 1]

  • Default: 1.0

1.0

Top

string

No

The top margin of the text.

  • Default: 0

  • Valid values: [0, 4096]

10

Left

string

No

The left margin of the text.

  • Default: 0

  • Valid values: [0, 4096]

10

FontSize

integer

No

The font size.

  • Default value: 16

  • Valid values: (4, 120)

16

BorderWidth

integer

No

The outline width.

  • Default: 0

  • Valid values: (0, 4096]

0

BorderColor

string

No

The outline color. Default: Black. For more values, see BorderColor.

#006400

Adaptive

string

No

Adjusts the font size based on the output video size. Valid values: true or false. Default: false.

false

Subtitles

array<object>

No

The subtitle burn-in configuration.

array<object>

No

The subtitle burn-in configuration.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template.

Format

string

No

The subtitle file format.

vtt

CharEnc

string

No

The file encoding format.

UTF-8

File

object

No

The subtitle file.

Type

string

No

The media object type. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

No

The media value:

  • If Type is OSS, this is a URL that supports the OSS or HTTP protocol.

  • If Type is Media, this is a media asset ID.

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

Encryption

object

No

The encryption configuration.

EncryptType

string

No

The encryption type. Valid values:

  • PrivateEncryption: Alibaba Cloud proprietary cryptography.

  • HLSEncryption: HLS standard encryption.

PrivateEncryption

CipherText

string

No

The ciphertext of the key for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

No

The decryption service endpoint for standard encryption.

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

KeyServiceType

string

No

The key service type for standard encryption. Valid values:

  • KMS

  • Base64

KMS

CombineConfigs

array<object>

No

The configuration for merging multiple inputs.

object

No

The merging configuration.

AudioIndex

string

Yes

The audio stream index.

0 或 exclude

VideoIndex

string

Yes

The video stream index.

0 或 exclude

Start

number

No

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

0.0

Duration

number

No

The duration of the input stream. Default: The video duration.

20.0

UserData

string

No

Custom settings in JSON format. The length is limited to 512 bytes. Supports custom webhook address configuration.

user-data

ScheduleConfig

object

No

The job scheduling information.

job-name

PipelineId

string

No

The MPS queue ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

No

The job priority. A larger number indicates a higher priority. Valid values: 1 to 10.

5

ClientToken

string

No

The idempotence key. Ensures request idempotence.

****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 sub-jobs.

array<object>

The sub-job details.

CreateTime

string

The time the job was created.

2022-01-12T08:49:41Z

Name

string

The job name.

transcode-job

ParentJobId

string

The parent job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobId

string

The sub-job ID.

7d6a7e0d4db2457a8d45ff5d43e1bf0a

JobIndex

integer

The index of the sub-job within the entire job.

0

InputGroup

array<object>

The input group for the job. A single input creates a transcoding job. Multiple inputs create a media merging job.

object

The job input.

Type

string

The media object type. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

The media value:

  • If Type is OSS, this is a URL that supports the OSS or HTTP protocol.

  • If Type is Media, this is a media asset ID.

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

InputUrl

string

The input stream path:

  • This parameter takes effect only when Type is Media. It lets you select a specific file from the media asset as the input.

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

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

ProcessConfig

object

The transcoding processing configuration.

Transcode

object

The transcoding configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Parameters to overwrite. If you specify these, they replace the corresponding parameters in 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: For mobile devices.

  • main: For standard-resolution devices.

  • high: For high-resolution devices.

Default value: high.

Main

Bitrate

string

The average video bitrate.

  • Valid values: [10, 50000].

  • Unit: Kbps.

3000

Crf

string

The constant rate factor (CRF), which controls the trade-off between quality and bitrate.

  • Valid values: [0, 51].

  • Default values: 23 for H.264 and 26 for H.265.

If you set Crf, the Bitrate setting is ignored.

23

Width

string

The width.

  • Valid values: [128, 4096].

  • Unit: px.

  • Default value: The original video width.

1920

Height

string

The height.

  • Valid values: [128, 4096].

  • Unit: px.

  • Default value: The original video height.

1080

Fps

string

The frame rate.

  • Valid values: (0, 60].

  • If the frame rate of the input file exceeds 60, the system uses 60.

  • Default value: The frame rate of the input file.

25

Gop

string

The maximum number of frames between keyframes.

  • Valid values: [1, 1080000].

  • Default value: 250.

250

Preset

string

The video encoder preset. Only H.264 supports this parameter. 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 video color format. Valid values include yuv420p and yuvj420p.

yuv420p

Remove

string

Specifies whether to remove the video.

false

Crop

string

The video cropping method. Two options are available.

  • Automatically detect and crop black bars. Set this to border.

  • Custom cropping. Format: width:height:left:top. Example: 1280:800:0:140

1280:800:0:140

Pad

string

The padding configuration for black bars.

  • Format: width:height:left:top.

  • Example: 1280:800:0:140

1280:800:0:140

LongShortMode

string

Specifies whether to enable automatic rotation for portrait or landscape videos (also known as long-side/short-side mode).

false

Bufsize

string

The buffer size.

  • Valid values: [1000, 128000]

  • Default value: 6000

  • Unit: Kb

6000

Maxrate

string

The peak video bitrate. Valid values: [10, 50000]. Unit: Kbps.

9000

AbrMax

string

The maximum bitrate for adaptive bitrate streaming (ABR). This applies only to narrow-high 1. Valid values: [10, 50000]. Unit: Kbps.

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 encoding profile. When Codec is AAC, valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

aac_low

Samplerate

string

The sample 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: Kbps

  • 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 control.

Method

string

The volume adjustment method.

auto

IntegratedLoudnessTarget

string

The target loudness level.

-6

TruePeak

string

The true peak level.

-1

LoudnessRangeTarget

string

The loudness range.

8

Container

object

The container format settings.

Format

string

The container format.

mp4

MuxConfig

object

The multiplexing settings.

Segment

object

The segment settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segment time points.

2,3

TransConfig

object

The conditional transcoding parameters.

TransMode

string

The video transcoding mode. Valid values:

  • onepass (default): Used for ABR. Encoding is faster than twopass.

  • twopass: Used for VBR. Encoding is slower than onepass.

  • CBR: Constant bitrate mode.

onepass

IsCheckReso

string

Specifies whether to check the video resolution. IsCheckReso and IsCheckResoFail are mutually exclusive. IsCheckResoFail has higher priority.

  • true: Check the resolution. If the input video resolution (width or height) is smaller than the output setting, transcode at the input resolution.

  • false (default): Do not check the resolution.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. IsCheckReso and IsCheckResoFail are mutually exclusive. This parameter has higher priority.

  • true: Check the resolution. If the input video resolution (width or height) is smaller than the output setting, return a failure.

  • false (default): Do not check the resolution.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. IsCheckVideoBitrate and IsCheckVideoBitrateFail are mutually exclusive. IsCheckVideoBitrateFail has higher priority.

  • true: Check the bitrate. If the input video bitrate is lower than the output setting, transcode at the input bitrate.

  • false (default): Do not check the bitrate.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. IsCheckVideoBitrate and IsCheckVideoBitrateFail are mutually exclusive. This parameter has higher priority.

  • true: Check the bitrate. If the input video bitrate is lower than the output setting, return a failure.

  • false (default): Do not check the bitrate.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. IsCheckAudioBitrate and IsCheckAudioBitrateFail are mutually exclusive. IsCheckAudioBitrateFail has higher priority.

  • true: Check the bitrate. If the input audio bitrate is lower than the output setting, transcode at the input bitrate.

  • false: Do not check the bitrate.

Default value rules:

  • Empty and the codec differs from the input source: false.

  • Empty and the codec matches the input source: true.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. IsCheckAudioBitrate and IsCheckAudioBitrateFail are mutually exclusive. This parameter has higher priority.

  • true: Check the bitrate. If the input audio bitrate is lower than the output setting, return a failure.

  • false (default): Do not check the bitrate.

true

AdjDarMethod

string

The method used to adjust the display aspect ratio. This parameter takes effect only when both Width and Height are specified. You can use it with LongShortMode.

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

Default value: none.

none

ImageWatermarks

array<object>

The image watermark configuration.

array<object>

The image watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template.

Width

string

The width of the image watermark on the output video. Values can be one of the following:

  • Integer: The pixel width of the watermark image.
    • Valid values: [8, 4096]

    • Unit: px

  • Decimal: The ratio of the watermark width to the output video width.
    • Valid values: (0, 1)

    • Up to four decimal places are supported, such as 0.9999. Extra digits are automatically discarded.

32

Height

string

The height of the image watermark on the output video. Values can be one of the following:

  • Integer: The pixel height of the watermark image.
    • Valid values: [8, 4096]

    • Unit: px

  • Decimal: The ratio of the watermark height to the output video height.
    • Valid values: (0, 1)

    • Up to four decimal places are supported, such as 0.9999. Extra digits are automatically discarded.

32

Dx

string

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

Values can be one of the following:

  • Integer: The offset in pixels.
    • Valid values: [8, 4096]

    • Unit: px

  • Decimal: The ratio of the horizontal offset to the output video width.
    • Valid values: (0, 1)

    • Up to four decimal places are supported, such as 0.9999. Extra digits are automatically discarded.

10

Dy

string

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

Values can be one of the following:

  • Integer: The offset in pixels.
    • Valid values: [8, 4096]

    • Unit: px

  • Decimal: The ratio of the vertical offset to the output video height.
    • Valid values: (0, 1)

    • Up to four decimal places are supported, such as 0.9999. Extra digits are automatically discarded.

10

ReferPos

string

The position of the watermark.

  • Valid values: TopRight (top-right), TopLeft (top-left), BottomRight (bottom-right), and BottomLeft (bottom-left).

  • Default value: TopRight.

TopLeft

Timeline

object

The display time settings for a dynamic watermark.

Start

string

The start time of the watermark.

  • Unit: seconds

  • Valid values: numbers

  • Default value: 0

00:00:05

Duration

string

The duration of the watermark.

  • Valid values: [number, ToEND]

  • Default value: ToEND

ToEND

File

object

The watermark image file.

Type

string

The media object type. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

The media value:

  • If Type is OSS, this is a URL that supports the OSS or HTTP protocol.

  • If Type is Media, this is a media asset ID.

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

TextWatermarks

array<object>

The text watermark configuration.

array<object>

The text watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template.

Content

string

The watermark text. It does not need to be Base64 encoded. The string must be UTF-8 encoded.

测试水印

FontName

string

The font. Default: SimSun.

SimSun

FontColor

string

The color.

#006400

FontAlpha

string

The font transparency.

  • Valid values: (0, 1]

  • Default: 1.0

1.0

Top

string

The top margin of the text.

  • Default: 0

  • Valid values: [0, 4096]

10

Left

string

The left margin of the text.

  • Default: 0

  • Valid values: [0, 4096]

10

FontSize

integer

The font size.

  • Default value: 16

  • Valid values: (4, 120)

16

BorderWidth

integer

The outline width.

  • Default: 0

  • Range: (0,4096]

0

BorderColor

string

The outline color. Default: Black. For more values, see BorderColor.

#006400

Adaptive

string

Adjusts the font size based on the output video size. The default is false.

false

Subtitles

array<object>

The configuration for burning in captions.

array<object>

The configuration for burning in subtitles.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Parameters to overwrite. If you specify these, they replace the corresponding parameters in the template.

Format

string

The file format of the caption.

vtt

CharEnc

string

The encoding format of the file.

UTF-8

File

object

The subtitle file.

Type

string

The type of the media object. Valid values:

  • OSS: An OSS file.

  • Media: The ID of a media asset.

OSS

Media

string

The value of Media:

  • If type is OSS, the value is a URL. The URL supports the OSS and HTTP protocols.

  • If type is Media, the value is the media asset ID.

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

Encryption

object

The encryption configuration.

EncryptType

string

The encryption type.

PrivateEncryption

CipherText

string

The ciphertext of the key for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

The decryption service endpoint for standard encryption.

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

KeyServiceType

string

The type of the key service. Only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

The configuration for mixing multiple input streams.

object

The stream combination configuration.

AudioIndex

string

The index of the audio stream.

0 或 exclude

VideoIndex

string

The index of the video stream.

0 或 exclude

Start

number

The start time of the input stream. The default value is 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 media configuration.

Type

string

The media object type. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

The value of the media asset:

  • If type is OSS, the value is a URL. The OSS and HTTP protocols are supported.

  • If type is Media, the value is the media asset ID.

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

OutputUrl

string

The path of the output stream.
This parameter is valid only when `Type` is set to `Media`. It lets you select a specific file from the media asset for output.
The following placeholders are supported:

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

  • {JobId}: The ID of the transcoding subtask.

  • {MediaBucket}: The bucket where the media asset is stored.

  • {ExtName}: The file extension. The value is the output format specified in the transcoding template.

  • {DestMd5}: The MD5 hash of the output file.
    Note:

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

  2. The output bucket is the same as the bucket where the media asset is stored.

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

UserData

string

User data.

user-data

ScheduleConfig

object

The scheduling information for the job.

PipelineId

string

The ID of the pipeline.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

The priority of the task. A larger value indicates a higher priority. The value can be an integer from 1 to 10.

5

Status

string

The status of the transcoding job.

  • Init: The job is submitted.

  • Processing: The job is being transcoded.

  • Success: The transcoding is successful.

  • Fail: The transcoding failed.

  • Deleted: The job is deleted.

Init

OutFileMeta

object

The media information of the video generated by the job.

FileBasicInfo

object

Basic file information.

MediaId

string

The media asset ID.

73e07de0f77171eca3fc7035d0b26402

FileName

string

The name of the file.

file.m3u8

FileStatus

string

The status of the file.

Normal

FileType

string

The file type. Valid values: source_file and transcode_file.

source_file

FileSize

string

The size of the file in bytes.

31737

FileUrl

string

The URL of the file.

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

Region

string

The region where the file is located.

cn-shanghai

FormatName

string

The name of the video format.

hls,applehttp

Duration

string

The duration of the video in seconds.

403.039999

Bitrate

string

The video bitrate.

888.563

Width

string

The width of the output file.

848

Height

string

The height.

478

AudioStreamInfoList

array<object>

The audio stream information.

object

The audio stream information.

Index

string

The index 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 encoder tag name.

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

CodecTag

string

The encoder tag.

0x000f

SampleFmt

string

The sampling format.

fltp

SampleRate

string

The sample rate in Hz.

44100

Channels

string

The number of sound channels.

2

ChannelLayout

string

The channel layout.

stereo

Timebase

string

The time base.

1/90000

StartTime

string

The start time.

1.473556

Duration

string

The duration in seconds.

403.039989

Bitrate

string

The bitrate.

0.f

Lang

string

The language.

cn

VideoStreamInfoList

array<object>

The video stream information.

object

The video stream information.

Index

string

The index 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 preset.

High

Codec_time_base

string

The codec time base.

1/50

Codec_tag_string

string

The text of the encoding format tag.

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

Codec_tag

string

The encoding format tag.

0x001b

Width

string

The video width.

848

Height

string

The height of the output video stream.

478

Has_b_frames

string

Indicates whether B-frames exist. Valid values:

  • 0: No B-frames.

  • 1: One B-frame.

  • 2: Multiple consecutive B-frames.

2

Sar

string

The sample aspect ratio.

478:477

Dar

string

The display aspect ratio.

16:9

PixFmt

string

The color storage format.

yuv420p

Level

string

The encoding 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.

1.473556

Duration

string

The duration in seconds.

403.039989

Bit_rate

string

The bitrate.

888.563

NumFrames

string

The total number of frames.

10040

Lang

string

The language.

cn

Rotate

string

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

0

SubmitResultJson

object

The result of the job submission.

{}

SubmitTime

string

The time when the job was submitted.

2022-01-12T08:49:41Z

FinishTime

string

The time when the job finished.

2022-01-12T08:49:41Z

RequestId

string

The ID of the request to submit the job.

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

CreateTime

string

The time when the job was created. The format is yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

Name

string

The name of the job.

transcode-job

RequestId

string

The ID of the request.

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

ParentJobId

string

The ID of the parent job.

8b2198504dd340b7b3c9842a74fc9baa

JobCount

integer

The number of sub-jobs.

1

Status

string

The status of the job. Success: At least one sub-job succeeded after all sub-jobs are complete. Fail: All sub-jobs 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 format is yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

FinishTime

string

The time when the job finished. The format is yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

InputGroup

array<object>

The input group for the job. A single input creates a transcoding job. Multiple inputs create a job to merge audio and video streams.

object

The job input.

Type

string

The type of the media object. Valid values:

  • OSS: an OSS file.

  • Media: a media asset ID.

OSS

Media

string

The value of the media asset:

  • If type is OSS, this is a URL. Both the OSS and HTTP protocols are supported.

  • If type is Media, this is the media asset ID.

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

OutputGroup

array<object>

The output group of the job.

array<object>

The job output.

Output

object

The output media configuration.

Type

string

The media object type. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

The value of the media asset:

  • If type is set to OSS, the value is a URL. The OSS and HTTP protocols are supported.

  • If type is set to Media, the value is the media asset ID.

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 overwrite parameters. If specified, these parameters overwrite the corresponding parameters in the template.

Video

object

Video settings

Codec

string

The encoding format.

H.264

Profile

string

The encoding profile. Supported values are baseline, main, and high.

  • baseline: For mobile devices.

  • main: For standard-resolution devices.

  • high: For high-resolution devices.

Default value: high.

Main

Bitrate

string

The average video bitrate.

  • Value range: [10, 50000].

  • Unit: Kbps.

3000

Crf

string

The Constant Rate Factor (CRF).

  • The value can be from 0 to 51.

  • The default value is 23 for H264 encoding and 26 for H265 encoding.

If Crf is set, the Bitrate setting is ignored.

23

Width

string

The width of the output video.

  • Valid values: 128 to 4096.

  • Unit: px.

  • Default value: The original width of the video.

1920

Height

string

The height of the video.

  • Valid values: [128, 4096].

  • Unit: px.

  • Default value: The original height of the video.

1080

Fps

string

The frame rate.

  • Valid values: (0, 60].

  • If the input file has a frame rate greater than 60, the frame rate is capped at 60.

  • Default: The frame rate of the input file.

25

Gop

string

The maximum number of frames between two keyframes.

  • The value must be in the range of [1, 1080000].

  • The default value is 250.

250

Preset

string

The video algorithm preset. This parameter is supported only for H.264. Supported values are veryfast, fast, medium, slow, and slower. The default value is medium.

medium

ScanMode

string

The scan mode. Valid values are interlaced and progressive.

progressive

PixFmt

string

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

yuv420p

Remove

string

Specifies whether to remove the video.

false

Crop

string

Crops the video frame. Two methods are available.

  • To automatically detect and crop black bars, set the parameter to "border".

  • To specify a custom crop area, use the width:height:left:top format. Example: 1280:800:0:140

1280:800:0:140

Pad

string

Adds black bars to the video.

  • Format: width:height:left:top

  • Example: 1280:800:0:140

1280:800:0:140

LongShortMode

string

Specifies whether to enable automatic rotation for landscape and portrait orientations (long and short edge pattern).

false

Bufsize

string

The buffer size.

  • Value range: [1000, 128000]

  • Default value: 6000

  • Unit: Kb

6000

Maxrate

string

The peak video bitrate.

  • Value range: [10, 50000]

  • Unit: Kbps

9000

AbrMax

string

The maximum bitrate for adaptive bitrate (ABR) streaming. This parameter is valid only for Narrowband HD 1.0.

  • Value range: [10, 50000]

  • Unit: Kbps

6000

Audio

object

Audio settings.

Codec

string

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

AAC

Profile

string

The audio encoding preset. When Codec is set to AAC, valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

aac_low

Samplerate

string

The sample rate.

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

  • Unit: Hz

44100

Bitrate

string

The audio bitrate of the output file.

  • Value range: [8, 1000]

  • Unit: Kbps

  • Default value: 128

128

Channels

string

The number of sound channels. Default value: 2.

2

Remove

string

Specifies whether to remove the audio stream.

false

Volume

object

The volume control settings.

Method

string

The volume adjustment method.

auto

IntegratedLoudnessTarget

string

The target volume.

-6

TruePeak

string

The true peak.

-1

LoudnessRangeTarget

string

The loudness range.

8

Container

object

The container format settings.

Format

string

The container format.

mp4

MuxConfig

object

The encapsulation settings.

Segment

object

Segment settings.

Duration

string

The segment length.

10

ForceSegTime

string

The time points for forced segmentation.

2,3

TransConfig

object

The conditional transcoding parameters.

TransMode

string

The video transcoding mode. Valid values:

  • onepass: Typically used for ABR. The encoding speed is faster than twopass.

  • twopass: Typically used for VBR. The encoding speed is slower than onepass.

  • CBR: Constant Bitrate mode.

Default value: onepass.

onepass

IsCheckReso

string

Specifies whether to check the video resolution. The IsCheckReso and IsCheckResoFail parameters are mutually exclusive. IsCheckResoFail takes precedence.

  • true: Enables the resolution check. If the resolution (width or height) of the input video is lower than the output resolution, the transcoding job uses the input resolution.

  • false: Disables the resolution check.

Default value: false.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. You can use either IsCheckReso or IsCheckResoFail, but not both. This parameter has a higher priority.

  • true: Checks the resolution. The transcoding job fails if the width or height of the input video is smaller than the output resolution.

  • false: Does not check the resolution.

Default value: false.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. You can set either IsCheckVideoBitrate or IsCheckVideoBitrateFail. IsCheckVideoBitrateFail has a higher priority.

  • true: Checks the bitrate. If the input video bitrate is lower than the output bitrate, the video is transcoded at the input bitrate.

  • false: Does not check the bitrate.

Default value: false.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. This parameter and IsCheckVideoBitrate are mutually exclusive. IsCheckVideoBitrateFail has a higher priority.

  • true: Enables the check. The transcoding job fails if the input video bitrate is lower than the output bitrate setting.

  • false: Disables the check.

Default value: false.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. You can set either this parameter or IsCheckAudioBitrateFail. IsCheckAudioBitrateFail takes precedence.

  • true: Checks the audio bitrate. If the input audio bitrate is lower than the configured output bitrate, the service uses the input audio bitrate for transcoding.

  • false: Does not check the audio bitrate.

Default value:

  • false: If this parameter is empty and the output codec is different from the input codec.

  • true: If this parameter is empty and the output codec is the same as the input codec.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. You can set either IsCheckAudioBitrate or IsCheckAudioBitrateFail. This parameter has a higher priority.

  • true: The transcoding job fails if the input audio bitrate is lower than the output bitrate setting.

  • false: The audio bitrate is not checked.

Default value: false.

true

AdjDarMethod

string

The method to adjust the resolution. This setting takes effect only when both Width and Height are specified. It can be used with LongShortMode.

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

Default value: none.

none

ImageWatermarks

array<object>

The image watermark settings.

array<object>

The image watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The parameters that, when specified, overwrite the corresponding parameters in the template.

Width

string

The width of the watermark image on the output video. The value can be specified in two formats:

  • An integer that specifies the width of the watermark image in pixels.
    • Range: [8, 4096].

    • Unit: px.

  • A decimal that represents the width of the watermark relative to the width of the output video.
    • Range: (0, 1).

    • The value supports up to four decimal places, such as 0.9999. Digits beyond the fourth decimal place are automatically discarded.

32

Height

string

The height of the image watermark on the output video. The value can be specified in two ways:

  • An integer that represents the watermark height in pixels.
    • Range: [8, 4096].

    • Unit: px.

  • A decimal that represents the watermark height as a ratio of the output video's height.
    • Range: (0, 1).

    • The value supports up to four decimal places, such as 0.9999. Digits beyond the fourth decimal place are automatically discarded.

32

Dx

string

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

The value can be specified in two formats:

  • An integer that specifies the offset in pixels.
    • Range: [8, 4096]

    • Unit: px

  • A decimal that specifies the ratio of the horizontal offset to the width of the output video.
    • Range: (0, 1)

    • The value can have up to four decimal places, such as 0.9999. The system automatically discards any digits beyond the fourth decimal place.

10

Dy

string

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

The value can be in one of the following two formats:

  • An integer that specifies the offset in pixels.
    • Range: [8, 4096].

    • Unit: px.

  • A decimal that specifies the ratio of the vertical offset to the output video height.
    • Range: (0, 1).

    • The value supports up to four decimal places, such as 0.9999. Any additional 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 display time settings for the dynamic watermark.

Start

string

The time when the watermark appears.

  • Unit: seconds

  • The value must be numeric.

  • Default value: 0

00:00:05

Duration

string

The duration of the watermark.

  • Valid values: [Number, ToEND]

  • Default value: ToEND

ToEND

File

object

The image file for the watermark.

Type

string

The object type of the media asset. Valid values:

  • OSS: An OSS file.

  • Media: A media asset ID.

OSS

Media

string

The value of the media asset:

  • If type is OSS, the value is a URL that supports the OSS and HTTP protocols.

  • If type is Media, the value is the media asset ID.

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

TextWatermarks

array<object>

The text watermark configurations.

array<object>

The text watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The overwrite parameters. If specified, these parameters overwrite the corresponding parameters in the template.

Content

string

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

测试水印

FontName

string

The font. Default: SimSun.

SimSun

FontColor

string

The font color.

#006400

FontAlpha

string

The transparency of the font.

  • Range: (0, 1].

  • Default: 1.0.

1.0

Top

string

The top margin of the text.

  • Default: 0.

  • Range: [0,4096].

10

Left

string

The left margin of the text.

  • Default: 0

  • Range: [0,4096]

10

FontSize

integer

The font size.

  • Default value: 16

  • Range: (4, 120)

16

BorderWidth

integer

The width of the border.

  • Default: 0

  • Range: (0, 4096]

0

BorderColor

string

The outline color. Default: Black For more values, see BorderColor.

#006400

Adaptive

string

Adjusts the font size based on the size of the output video.

  • Valid values: true, false

  • default: false

false

Subtitles

array<object>

The caption burn-in configuration.

array<object>

The caption burn-in configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The overwrite parameters. If specified, these parameters overwrite the corresponding parameters in the template.

Format

string

The caption file format.

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 file.

  • Media: a media asset ID.

OSS

Media

string

The value of the media asset. If the type is OSS, the value is a URL that supports the OSS and HTTP protocols. If the type is Media, the value is the media asset ID.

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

Encryption

object

The encryption configuration.

EncryptType

string

The encryption type.

PrivateEncryption

CipherText

string

The ciphertext of the key for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

The decryption endpoint for standard encryption.

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

KeyServiceType

string

The type of the key service. Only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

The settings for combining multiple input streams.

object

The configuration for combining multiple input streams.

AudioIndex

string

The index of the audio stream.

0 或 exclude

VideoIndex

string

The index of the video stream.

0 或 exclude

Start

number

The start time of the input stream. The default value is 0.

0.0

Duration

number

The duration of the input stream. By default, this is the duration of the video.

20.0

UserData

string

The user data.

user-data

ScheduleConfig

object

The job scheduling configuration.

PipelineId

string

The pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

The priority of the job. A larger value indicates a higher priority. The value can be an integer from 1 to 10.

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": "测试水印",
                "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 或 exclude",
              "VideoIndex": "0 或 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": "测试水印",
                "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 或 exclude",
              "VideoIndex": "0 或 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.