GetTranscodeJob

Updated at:

Queries the details of a single transcoding job.

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:GetTranscodeJob

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ParentJobId

string

Yes

The job ID.

ab4802364a2e49208c99efab82dfa8e8

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

9EDC30DC-0050-5459-B788-F761B2BE359B

TranscodeParentJob

object

TranscodeParentJobWithSubJobDTO

TranscodeJobList

array<object>

The child job list.

array<object>

The child job.

CreateTime

string

The job creation time. The time follows the ISO 8601 standard and is displayed in UTC (ending with Z).

2022-01-12T08:49:41Z

Name

string

The job name.

transcode-job

ParentJobId

string

The parent job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobId

string

The child job ID.

7d6a7e0d4db2457a8d45ff5d43e1bf0a

JobIndex

integer

The index number of the child job within the parent job.

0

InputGroup

array<object>

The job input group. A single input indicates a transcoding job, whereas multiple inputs indicate an audio and video merging job.

object

The job input.

Type

string

The media object type. Valid values:

  • OSS: OSS file.

  • Media: media asset ID.

OSS

Media

string

The media value. If Type is set to OSS, the value is a URL that supports the OSS and HTTP protocols. If Type is set to Media, the value is a media asset ID.

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

InputUrl

string

The media asset stream URL. This parameter is returned only when a media asset stream is transcoded.

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

The override parameters. If specified, these parameters override 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: 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 to 50000. Unit: Kbit/s.

3000

Crf

string

The constant rate factor (CRF) for bitrate-quality control. Valid values: 0 to 51. Default value: 23 for H.264 and 26 for H.265. If this parameter is specified, the Bitrate parameter becomes invalid.

23

Width

string

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

1920

Height

string

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

1080

Fps

string

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

25

Gop

string

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

250

Preset

string

The video algorithm preset. This parameter is supported only for H.264. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium

ScanMode

string

The scan mode. Valid values: interlaced and progressive.

progressive

PixFmt

string

The video color format. Valid values: standard color formats such as yuv420p and yuvj420p.

yuv420p

Remove

string

Specifies whether to remove the video.

false

Crop

string

The video cropping settings. Two methods are supported:

  • Automatic detection and cropping of black borders: set the value to border.

  • Custom cropping: use the format width:height:left:top.

1280:800:0:140

Pad

string

The video padding settings for adding black borders. Use the format width:height:left:top.

1280:800:0:140

LongShortMode

string

Specifies whether to enable adaptive screen orientation (long-short side mode).

false

Bufsize

string

The buffer size. Valid values: 1000 to 128000. Default value: 6000. Unit: KB.

6000

Maxrate

string

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

9000

AbrMax

string

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

6000

Audio

object

The audio settings.

Codec

string

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

AAC

Profile

string

The audio encoding profile. 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. Valid values: 22050, 32000, 44100, 48000, and 96000. Default value: 44100. Unit: Hz.

44100

Bitrate

string

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

128

Channels

string

The number of audio 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 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 segmentation settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segmentation time.

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. You can specify only one of IsCheckReso and IsCheckResoFail. IsCheckResoFail has a higher priority. Valid values:

  • true: Check. If the width or height of the input video resolution is smaller than the output setting, the video is transcoded based on the input video resolution.

  • false: Do not check.

Default value: false.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. You can specify only one of IsCheckReso and IsCheckResoFail. This parameter has a higher priority. Valid values:

  • true: Check. If the width or height of the input video resolution is smaller than the output setting, a transcoding failure is returned.

  • false: Do not check.

Default value: false.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. You can specify only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail. IsCheckVideoBitrateFail has a higher priority. Valid values:

  • true: Check. If the input video bitrate is lower than the output setting, the video is transcoded based on the input video bitrate.

  • false: Do not check.

Default value: false.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. You can specify only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail. This parameter has a higher priority. Valid values:

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

  • false: Do not check.

Default value: false.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. You can specify only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail. IsCheckAudioBitrateFail has a higher priority. Valid values:

  • true: Check. If the input audio bitrate is lower than the output setting, the audio is transcoded based on the input audio bitrate.

  • false: Do not check.

Default value:

  • false if the parameter is empty and the codec is different from the input source.

  • true if the parameter is empty and the codec is the same as the input source.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. You can specify only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail. This parameter has a higher priority. Valid values:

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

  • false: Do not check.

Default value: false.

true

AdjDarMethod

string

The resolution adjustment method. This parameter takes effect only when both Width and Height are specified. It can be used together with LongShortMode. Valid values: rescale, crop, pad, and none. Default value: none. Example: See how to set the resolution.

none

Tags

object

Adds tags to the media stream.

string

The tag value.

value

ImageWatermarks

array<object>

The image watermark configuration.

array<object>

The image watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

Width

string

The width.

32

Height

string

The height.

32

Dx

string

The X-coordinate of the watermark position.

10

Dy

string

The Y-coordinate of the watermark position.

10

ReferPos

string

The reference position. Valid values: TopLeft, TopRight, BottomLeft, and BottomRight. Default value: TopLeft.

TopLeft

Timeline

object

The display time settings.

Start

string

The start time.

00:00:05

Duration

string

The display duration, in seconds, or ToEND.

ToEND

File

object

The watermark image file.

Type

string

The media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

The media value:

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

  • If type is Media, the value 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

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.

SimSun

FontColor

string

The color.

#006400

FontAlpha

string

The transparency.

1.0

Top

string

The top margin of the watermark.

10

Left

string

The left margin of the watermark.

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. Default value: false.

false

Subtitles

array<object>

The subtitle burn-in configuration.

array<object>

The subtitle burn-in configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

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. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

The media value:

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

  • If type is Media, the value is a 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 standard encryption key.

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 mixing configuration.

object

The multi-input stream mixing 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

IsInheritTags

boolean

Specifies whether to inherit the tags of the input stream. This parameter does not take effect if the input is not a media asset. Default value: false.

true

Output

object

The output media configuration.

Type

string

The media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

The media value:

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

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

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

OutputUrl

string

The URL of the transcoded output stream. This parameter is required only when the output is a media asset stream.

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

UserData

string

The user data.

user-data

ScheduleConfig

object

The job scheduling information.

PipelineId

string

The pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

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

5

Status

string

The transcoding job status. Valid values:

  • Init: Submitted.

  • Processing: Transcoding.

  • Success: Transcoding succeeded.

  • Fail: Transcoding failed.

  • Deleted: Deleted.

Init

OutFileMeta

object

The media information of the generated video.

FileBasicInfo

object

The basic file information.

MediaId

string

The media asset ID.

486c2890096871edba6f81848c016303

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 in 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 located.

cn-shanghai

FormatName

string

The name of the video format.

hls,applehttp

Duration

string

The video duration in 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 long name of the codec.

AAC (Advanced Audio Coding)

CodecTimeBase

string

The time base of the codec.

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 in 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 in seconds.

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 stream index.

0

Codec_name

string

The encoding format.

h264

Codec_long_name

string

The long name of the codec.

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 stream contains B-frames. 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 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. Unit: seconds.

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 video rotation angle. Valid values: 0, 90, 180, and 270. Default value: 0.

0

SubmitResultJson

object

The job submission result.

{}

SubmitTime

string

The job submission time. The time is in ISO 8601 format and displayed in UTC (ending with Z).

2022-01-12T08:49:41Z

FinishTime

string

The job completion time. The time is in ISO 8601 format and displayed in UTC (ending with Z).

2022-01-12T08:49:41Z

RequestId

string

The request ID for the job submission.

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

CreateTime

string

The job creation time. Format: yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

Name

string

The job name.

transcode-job

RequestId

string

The request ID for the job submission.

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

ParentJobId

string

The parent job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobCount

integer

The number of child jobs.

1

Status

string

The job status. Valid values:

  • Success: At least one child job succeeds after all child jobs are completed.

  • Fail: All child jobs fail.

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. Format: yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

FinishTime

string

The job completion time. Format: yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

InputGroup

array<object>

The job input group. A single input indicates a transcoding job, whereas multiple inputs indicate an audio and video merging job.

object

The job input.

Type

string

The media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

The media value:

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

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

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

OutputGroup

array<object>

The job output group.

array<object>

The job output.

Output

object

The output media configuration.

Type

string

The media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

The media value:

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

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

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

OutputUrl

string

The output stream URL.

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

Video

object

The video settings.

Codec

string

The encoding format.

H.264

Profile

string

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

  • baseline: For shift devices.

  • main: For standard resolution devices.

  • high: For high resolution devices.

Default value: high.

Main

Bitrate

string

The average video bitrate. Valid values: 10 to 50000. Unit: Kbps.

3000

Crf

string

The constant rate factor (CRF) for bitrate-quality control.

  • Valid values: 0 to 51.

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

  • If Crf is specified, the Bitrate parameter does not take effect.

23

Width

string

The width of the video.

  • Valid values: 128 to 4096.

  • Unit: pixels.

  • Default value: the original width of the video.

1920

Height

string

The height of the video.

  • Valid values: 128 to 4096.

  • Unit: pixels.

  • Default value: the original height of the video.

1080

Fps

string

The frame rate.

  • Valid values: greater than 0 and less than or equal to 60.

  • If the frame rate of the input file exceeds 60, the value 60 is used.

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

25

Gop

string

The maximum number of frames between two keyframes.

  • Valid values: 1 to 1080000.

  • Default value: 250.

250

Preset

string

The preset for the video algorithm. This parameter is supported only for H.264. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium

ScanMode

string

The scan mode. Valid values: interlaced and progressive.

progressive

PixFmt

string

The video color format. Valid values: standard color formats such as yuv420p and yuvj420p.

yuv420p

Remove

string

Specifies whether to remove the video.

false

Crop

string

The cropping settings for the video. Two methods are supported:

  • Automatic detection and cropping of black borders: set the value to border.

  • Custom cropping: use the format width:height:left:top. Example: 1280:800:0:140.

1280:800:0:140

Pad

string

The padding settings for adding black borders to the video.

  • Format: width:height:left:top.

  • Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

Specifies whether to enable adaptive screen orientation (long-short side mode).

false

Bufsize

string

The buffer size.

  • Valid values: 1000 to 128000.

  • Default value: 6000.

  • Unit: Kbit.

6000

Maxrate

string

The peak video bitrate.

  • Valid values: 10 to 50000.

  • Unit: Kbit/s.

9000

AbrMax

string

The maximum bitrate for ABR. This parameter is valid only for Narrowband HD 1.0.

  • Valid values: 10 to 50000.

  • Unit: Kbit/s.

6000

Audio

object

The audio settings.

Codec

string

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

AAC

Profile

string

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

  • Valid values: 8 to 1000.

  • Unit: Kbit/s.

  • Default value: 128.

128

Channels

string

The number of audio 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 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 segmentation settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segmentation time.

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. You can specify only one of IsCheckReso and IsCheckResoFail. IsCheckResoFail has a higher priority. Valid values:

  • true: Check. If the width or height of the input video resolution is smaller than the output setting, the video is transcoded based on the input video resolution.

  • false: Do not check.

Default value: false.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. You can specify only one of IsCheckReso and IsCheckResoFail. This parameter has a higher priority. Valid values:

  • true: Check. If the width or height of the input video resolution is smaller than the output setting, a transcoding failure is returned.

  • false: Do not check.

Default value: false.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. You can specify only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail. IsCheckVideoBitrateFail has a higher priority. Valid values:

  • true: Check. If the input video bitrate is lower than the output setting, the video is transcoded based on the input video bitrate.

  • false: Do not check.

Default value: false.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. You can specify only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail. This parameter has a higher priority. Valid values:

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

  • false: Do not check.

Default value: false.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. You can specify only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail. IsCheckAudioBitrateFail has a higher priority. Valid values:

  • true: Check. If the input audio bitrate is lower than the output setting, the audio is transcoded based on the input audio bitrate.

  • false: Do not check.

Default value:

  • false if the parameter is empty and the codec is different from the input source.

  • true if the parameter is empty and the codec is the same as the input source.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. You can specify only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail. This parameter has a higher priority. Valid values:

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

  • false: Do not check.

Default value: false.

true

AdjDarMethod

string

The method for adjusting the display aspect ratio (DAR). This parameter takes effect only when both Width and Height are specified. It can be used together 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

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

Width

string

The width.

32

Height

string

The height.

32

Dx

string

The X-coordinate of the watermark position.

10

Dy

string

The Y-coordinate of the watermark position.

10

ReferPos

string

The reference position. Valid values: TopLeft, TopRight, BottomLeft, and BottomRight. Default value: TopLeft.

TopLeft

Timeline

object

The display time settings.

Start

string

The start time.

00:00:05

Duration

string

The display duration, in seconds, or ToEND.

ToEND

File

object

The watermark image file.

Type

string

The media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

The media value.

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

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.

SimSun

FontColor

string

The color.

#006400

FontAlpha

string

The transparency.

1.0

Top

string

The top margin of the watermark.

10

Left

string

The left margin of the watermark.

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. Default value: false.

false

Subtitles

array<object>

The subtitle burn-in configuration.

array<object>

The subtitle burn-in configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

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

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. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

The media value.

  • 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 a 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 standard encryption key.

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 mixing configuration.

object

The multi-input stream mixing 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 job scheduling configuration.

PipelineId

string

The pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

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

5

Examples

Success response

JSON format

{
  "RequestId": "9EDC30DC-0050-5459-B788-F761B2BE359B",
  "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"
          }
        ],
        "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"
              },
              "Tags": {
                "key": "value"
              }
            }
          },
          "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
            }
          ],
          "IsInheritTags": true
        },
        "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": "486c2890096871edba6f81848c016303",
            "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",
          "OutputUrl": "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
            }
          ]
        }
      }
    ],
    "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.