All Products
Search
Document Center

Intelligent Media Services:SubmitTranscodeJob

Last Updated:Aug 03, 2026

Submits a transcoding job for a video or audio file to Intelligent Media Services by specifying the source file, output format, and related parameters.

Operation description

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 name of the job.

job-name

InputGroup

array<object>

Yes

The job input group. A single input creates a transcoding job. Multiple inputs create an audio and video stream merging job.

job-name

object

Yes

The job input.

Type

string

Yes

The media object type.

OSS

Media

string

Yes

The media value.

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

InputUrl

string

No

The input stream path. This parameter takes effect only when Type is set to Media, which allows you to specify a specific file under the media asset as the input. The system checks whether the specified inputUrl exists under the media asset.

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

OutputGroup

array<object>

Yes

The task output group.

user-data

array<object>

Yes

The task output.

Output

object

Yes

The output media configuration.

Type

string

Yes

The media object type.

OSS

Media

string

Yes

The media value.

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

OutputUrl

string

No

The output stream path.

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

ProcessConfig

object

Yes

The task processing configuration.

Transcode

object

Yes

The transcoding configuration.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

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

Video

object

No

The video settings.

Codec

string

No

The encoding format.

H.264

Profile

string

No

The encoding profile.

Main

Bitrate

string

No

The average video bitrate. Valid values: 10 to 50000. Unit: Kbit/s.

3000

Crf

string

No

The bitrate-quality control factor. Valid values: 0 to 51. Default value: 23 if the encoding format is H.264, or 26 if the encoding format is H.265.

23

Width

string

No

The width. Valid values: 128 to 4096. Unit: px. Default value: the original width of the video.

1920

Height

string

No

The height. Valid values: 128 to 4096. Unit: px. 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.

25

Gop

string

No

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

250

Preset

string

No

The video encoder preset. Only H.264 supports this parameter.

medium

ScanMode

string

No

The scan mode.

progressive

PixFmt

string

No

The video pixel format.

yuv420p

Remove

string

No

Specifies whether to remove the video stream.

false

Crop

string

No

The video cropping parameter. Two methods are supported.

1280:800:0:140

Pad

string

No

The video padding parameter. Format: width:height:left:top. Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

No

Specifies whether to enable landscape and portrait auto-adaptation (long-short side mode).

false

Bufsize

string

No

The buffer size. Valid values: 1000 to 128000. Default value: 6000. Unit: Kbit/s.

6000

Maxrate

string

No

The peak video bitrate. Valid values: 10 to 50000. Unit: Kbit/s.

9000

AbrMax

string

No

The ABR maximum bitrate. This parameter is effective only for Narrowband HD 1.0. Valid values: 10 to 50000. Unit: Kbit/s.

6000

Audio

object

No

The audio settings.

Codec

string

No

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

AAC

Profile

string

No

The audio encoding preset.

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 to 1000. Unit: Kbit/s. Default value: 128.

128

Channels

string

No

The number of audio channels.

2

Remove

string

No

Specifies whether to remove the audio stream.

false

Volume

object

No

The volume control settings.

Method

string

No

The volume adjustment method.

auto

IntegratedLoudnessTarget

string

No

The target loudness.

-6

TruePeak

string

No

The 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 muxing settings.

Segment

object

No

The segment settings.

Duration

string

No

The segment duration.

10

ForceSegTime

string

No

The forced segment time point.

2,3

TransConfig

object

No

The conditional transcoding parameters.

TransMode

string

No

The video transcoding mode. Valid values:

onepass

IsCheckReso

string

No

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. IsCheckResoFail takes higher priority.

true

IsCheckResoFail

string

No

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. This parameter takes higher priority.

true

IsCheckVideoBitrate

string

No

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. IsCheckVideoBitrateFail takes higher priority.

true

IsCheckVideoBitrateFail

string

No

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. This parameter takes higher priority.

true

IsCheckAudioBitrate

string

No

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. IsCheckAudioBitrateFail takes higher priority.

true

IsCheckAudioBitrateFail

string

No

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. This parameter takes higher priority.

true

AdjDarMethod

string

No

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

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

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

Width

string

No

The width of the watermark image on the output video.

32

Height

string

No

The height of the watermark image on the output video.

32

Dx

string

No

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

10

Dy

string

No

The vertical offset of the watermark image relative to the output video.

10

ReferPos

string

No

The position of the watermark.

TopLeft

Timeline

object

No

The dynamic watermark display time settings.

Start

string

No

The time when the watermark starts to appear.

00:00:05

Duration

string

No

The duration for which the watermark is displayed.

ToEND

File

object

No

The watermark image file.

Type

string

No

The media object type.

OSS

Media

string

No

The media value.

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

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

Content

string

No

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

Test watermark

FontName

string

No

The font name. Default value: SimSun.

SimSun

FontColor

string

No

The font color.

#006400

FontAlpha

string

No

The font transparency.

1.0

Top

string

No

The top margin of the text.

10

Left

string

No

The left margin of the text.

10

FontSize

integer

No

The font size.

16

BorderWidth

integer

No

The border width.

0

BorderColor

string

No

The border color.

#006400

Adaptive

string

No

Specifies whether to adjust the font size based on the output video size. true / 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

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

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.

OSS

Media

string

No

The media value.

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

Encryption

object

No

The encryption configuration.

EncryptType

string

No

The encryption type. Valid values:

PrivateEncryption

CipherText

string

No

The key ciphertext for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

No

The decryption service URL for standard encryption.

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

KeyServiceType

string

No

The key service type for standard encryption. Valid values:

KMS

CombineConfigs

array<object>

No

The multi-input stream merging configuration.

object

No

The stream merging 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. Default value: the video duration.

20.0

UserData

string

No

Custom settings in JSON format. The value can be up to 512 bytes in length. Custom callback URL configuration is supported.

user-data

ScheduleConfig

object

No

The task scheduling information.

job-name

PipelineId

string

No

The pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

No

The task priority. A larger value indicates a higher priority. Valid values: 1 to 10.

5

ClientToken

string

No

The idempotency key 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 subtasks.

array<object>

The subtask details.

CreateTime

string

The time when the task was created.

2022-01-12T08:49:41Z

Name

string

The task name.

transcode-job

ParentJobId

string

The parent job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobId

string

The subtask ID.

7d6a7e0d4db2457a8d45ff5d43e1bf0a

JobIndex

integer

The index number of the subtask within the entire job.

0

InputGroup

array<object>

The job input group. A single input creates a transcoding job. Multiple inputs create an audio and video stream merging job.

object

The job input.

Type

string

The media object type.

OSS

Media

string

The media value.

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

InputUrl

string

The input stream path. This parameter takes effect only when Type is set to Media, which allows you to specify a specific file under the media asset as the input. The system checks whether the specified inputUrl exists under 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 override parameters. If specified, these parameters overwrite the corresponding template parameters.

Video

object

The video settings.

Codec

string

The encoding format.

H.264

Profile

string

The encoding profile.

Main

Bitrate

string

The average video bitrate.

3000

Crf

string

The bitrate-quality control factor.

23

Width

string

The width.

1920

Height

string

The height.

1080

Fps

string

The frame rate.

25

Gop

string

The maximum number of frames between keyframes.

250

Preset

string

The video encoder preset. Only H.264 supports this parameter.

medium

ScanMode

string

The scan mode.

progressive

PixFmt

string

The video pixel format.

yuv420p

Remove

string

Specifies whether to remove the video stream.

false

Crop

string

The video cropping setting. Two methods are supported.

1280:800:0:140

Pad

string

The video padding setting.

1280:800:0:140

LongShortMode

string

Specifies whether to enable landscape and portrait auto-adaptation (long-short side mode).

false

Bufsize

string

The buffer size.

6000

Maxrate

string

The peak video bitrate.

9000

AbrMax

string

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

6000

Audio

object

The audio settings.

Codec

string

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

AAC

Profile

string

The audio encoding preset.

aac_low

Samplerate

string

The sample rate.

44100

Bitrate

string

The audio bitrate of the output file.

128

Channels

string

The number of audio channels.

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

-6

TruePeak

string

The Peak Volume.

-1

LoudnessRangeTarget

string

The loudness range.

8

Container

object

The container format settings.

Format

string

The container format.

mp4

MuxConfig

object

The muxing settings.

Segment

object

The segment settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segment time point.

2,3

TransConfig

object

The conditional transcoding parameters.

TransMode

string

The video transcoding mode. Valid values:

onepass

IsCheckReso

string

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. IsCheckResoFail takes higher priority.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. This parameter takes higher priority.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. IsCheckVideoBitrateFail takes higher priority.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. This parameter takes higher priority.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. IsCheckAudioBitrateFail takes higher priority.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. This parameter takes higher priority.

true

AdjDarMethod

string

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

none

ImageWatermarks

array<object>

The image watermark configurations.

array<object>

The image watermark configurations.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

Width

string

The width of the watermark image on the output video.

32

Height

string

The height of the watermark image on the output video.

32

Dx

string

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

10

Dy

string

The vertical offset of the watermark image relative to the output video.

10

ReferPos

string

The position of the watermark.

TopLeft

Timeline

object

The dynamic watermark display time settings.

Start

string

The time when the watermark starts to appear.

00:00:05

Duration

string

The duration for which the watermark is displayed.

ToEND

File

object

The watermark image file.

Type

string

The media object type.

OSS

Media

string

The media value.

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

TextWatermarks

array<object>

The text watermark configurations.

array<object>

The text watermark configurations.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

Content

string

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

Test watermark

FontName

string

The font name. Default value: SimSun.

SimSun

FontColor

string

The font color.

#006400

FontAlpha

string

The font transparency.

1.0

Top

string

The top margin of the text.

10

Left

string

The left margin of the text.

10

FontSize

integer

The font size.

16

BorderWidth

integer

The border width.

0

BorderColor

string

The border color.

#006400

Adaptive

string

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

false

Subtitles

array<object>

The subtitle burn-in configurations.

array<object>

The subtitle burn-in configurations.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

Format

string

The subtitle file format.

vtt

CharEnc

string

The file encoding format.

UTF-8

File

object

The subtitle file.

Type

string

The media object type.

OSS

Media

string

The media value.

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

Encryption

object

The encryption configuration.

EncryptType

string

The encryption type.

PrivateEncryption

CipherText

string

The key ciphertext for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

The decryption service URL for standard encryption.

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

KeyServiceType

string

The key service type. Currently, only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

The multi-input stream merging configuration.

object

The stream merging 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. Default value: the video duration.

20.0

Output

object

The output media configuration.

Type

string

The media object type.

OSS

Media

string

The media value.

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

OutputUrl

string

The output stream path.

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

UserData

string

The user data.

user-data

ScheduleConfig

object

The task scheduling information.

PipelineId

string

The pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

The task priority. A larger value indicates a higher priority. Valid values: 1 to 10.

5

Status

string

The transcoding job status.

Init

OutFileMeta

object

The media information of the output video generated by the job.

FileBasicInfo

object

The basic file information.

MediaId

string

The media asset ID.

73e07de0f77171eca3fc7035d0b26402

FileName

string

The file name.

file.m3u8

FileStatus

string

The file status.

Normal

FileType

string

The file type. Valid values: source_file, transcode_file.

source_file

FileSize

string

The file size. Unit: bytes.

31737

FileUrl

string

The file URL.

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

Region

string

The region where the file is stored.

cn-shanghai

FormatName

string

The video format name.

hls,applehttp

Duration

string

The video duration. Unit: seconds.

403.039999

Bitrate

string

The video bitrate.

888.563

Width

string

The width.

848

Height

string

The height.

478

AudioStreamInfoList

array<object>

The audio stream information.

object

The audio stream information.

Index

string

The stream index.

1

CodecName

string

The encoding format.

aac

CodecLongName

string

The codec format name.

AAC (Advanced Audio Coding)

CodecTimeBase

string

The codec time base.

1/44100

CodecTagString

string

The codec tag string.

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

CodecTag

string

The codec tag.

0x000f

SampleFmt

string

The sample format.

fltp

SampleRate

string

The sample rate. Unit: Hz.

44100

Channels

string

The number of audio 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. Unit: 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 stream index.

0

Codec_name

string

The encoding format.

h264

Codec_long_name

string

The codec format name.

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

Profile

string

The codec profile.

High

Codec_time_base

string

The codec time base.

1/50

Codec_tag_string

string

The codec tag string.

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

Codec_tag

string

The codec tag.

0x001b

Width

string

The width.

848

Height

string

The height.

478

Has_b_frames

string

Indicates whether the video contains B-frames.

2

Sar

string

The sample aspect ratio (SAR).

478:477

Dar

string

The display aspect ratio (DAR).

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.

1.473556

Duration

string

The duration. Unit: 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 video rotation angle.

0

SubmitResultJson

object

The job submission result.

{}

SubmitTime

string

The job submission time.

2022-01-12T08:49:41Z

FinishTime

string

The job completion time.

2022-01-12T08:49:41Z

RequestId

string

The request ID returned when the job was submitted.

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

CreateTime

string

The job creation time. The time is in the yyyy-MM-ddTHH:mm:ssZ format.

2022-01-12T08:49:41Z

Name

string

The task name.

transcode-job

RequestId

string

The request ID returned when the job was submitted.

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

ParentJobId

string

The parent job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobCount

integer

The number of sub-jobs.

1

Status

string

The job status. Valid values:

  • Success: After all sub-jobs are completed, the job is successful if at least one sub-job succeeds.

  • Fail: All sub-jobs failed.

Success

TriggerSource

string

The job source. Valid values:

  • API: API.

  • WorkFlow: workflow.

  • Console: console.

API

Percent

integer

The job completion percentage.

0

SubmitTime

string

The job submission time. The time is in the yyyy-MM-ddTHH:mm:ssZ format.

2022-01-12T08:49:41Z

FinishTime

string

The job completion time. The time is in the yyyy-MM-ddTHH:mm:ssZ format.

2022-01-12T08:49:41Z

InputGroup

array<object>

The job input group. A single input creates a transcoding job. Multiple inputs create an audio and video stream merging job.

object

The job input.

Type

string

The media object type.

OSS

Media

string

The media value.

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

OutputGroup

array<object>

The task output group.

array<object>

The job output.

Output

object

The output media configuration.

Type

string

The media object type.

OSS

Media

string

The media value.

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

ProcessConfig

object

The task processing configuration.

Transcode

object

The transcoding configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

Video

object

The video settings.

Codec

string

The encoding format.

H.264

Profile

string

The encoding profile.

Main

Bitrate

string

The average video bitrate.

3000

Crf

string

The bitrate-quality control factor.

23

Width

string

The width.

1920

Height

string

The height.

1080

Fps

string

The frame rate.

25

Gop

string

The maximum number of frames between keyframes.

250

Preset

string

The video encoder preset. Only H.264 supports this parameter.

medium

ScanMode

string

The scan mode.

progressive

PixFmt

string

The video pixel format.

yuv420p

Remove

string

Specifies whether to remove the video stream.

false

Crop

string

The video cropping settings.

1280:800:0:140

Pad

string

The video padding (black border) settings.

1280:800:0:140

LongShortMode

string

Specifies whether to enable landscape and portrait auto-adaptation (long-short side mode).

false

Bufsize

string

The buffer size.

6000

Maxrate

string

The peak video bitrate.

9000

AbrMax

string

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

6000

Audio

object

The audio settings.

Codec

string

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

AAC

Profile

string

The audio encoding preset.

aac_low

Samplerate

string

The sample rate.

44100

Bitrate

string

The audio bitrate of the output file.

128

Channels

string

The number of audio channels.

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

-6

TruePeak

string

The Peak Volume.

-1

LoudnessRangeTarget

string

The loudness range.

8

Container

object

The container format settings.

Format

string

The container format.

mp4

MuxConfig

object

The muxing settings.

Segment

object

The segment settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segment time point.

2,3

TransConfig

object

The conditional transcoding parameters.

TransMode

string

The video transcoding mode. Valid values:

onepass

IsCheckReso

string

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. IsCheckResoFail takes higher priority.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. This parameter takes higher priority.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. IsCheckVideoBitrateFail takes higher priority.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. This parameter takes higher priority.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. IsCheckAudioBitrateFail takes higher priority.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. This parameter takes higher priority.

true

AdjDarMethod

string

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

none

ImageWatermarks

array<object>

The image watermark configurations.

array<object>

The image watermark configurations.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

Width

string

The width of the watermark image on the output video.

32

Height

string

The height of the watermark image on the output video.

32

Dx

string

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

10

Dy

string

The vertical offset of the watermark image relative to the output video.

10

ReferPos

string

The position of the watermark.

TopLeft

Timeline

object

The dynamic watermark display time settings.

Start

string

The time when the watermark starts to appear.

00:00:05

Duration

string

The duration for which the watermark is displayed.

ToEND

File

object

The watermark image file.

Type

string

The media object type.

OSS

Media

string

The media value.

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

TextWatermarks

array<object>

The text watermark configurations.

array<object>

The text watermark configurations.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

Content

string

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

Test watermark

FontName

string

The font name. Default value: SimSun.

SimSun

FontColor

string

The font color.

#006400

FontAlpha

string

The font transparency.

1.0

Top

string

The top margin of the text.

10

Left

string

The left margin of the text.

10

FontSize

integer

The font size.

16

BorderWidth

integer

The border width.

0

BorderColor

string

The border color.

#006400

Adaptive

string

Adjusts the font size based on the output video size.

false

Subtitles

array<object>

The subtitle burn-in configurations.

array<object>

The subtitle burn-in configurations.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

Format

string

The subtitle file format.

vtt

CharEnc

string

The file encoding format.

UTF-8

File

object

The subtitle file.

Type

string

The media object type.

OSS

Media

string

The media value.

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

Encryption

object

The encryption configuration.

EncryptType

string

The encryption type.

PrivateEncryption

CipherText

string

The key ciphertext for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

The decryption service URL for standard encryption.

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

KeyServiceType

string

The key service type. Currently, only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

The multi-input stream merging configuration.

object

The multi-input stream merging 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. Default value: the video duration.

20.0

UserData

string

The user data.

user-data

ScheduleConfig

object

The task scheduling configuration.

PipelineId

string

The pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

The task priority. A larger value indicates a higher priority. Valid values: 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": "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.