GetTranscodeJob

更新时间:
复制 MD 格式

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

Job ID

ab4802364a2e49208c99efab82dfa8e8

Response elements

Element

Type

Description

Example

object

Response.

RequestId

string

Request ID.

9EDC30DC-0050-5459-B788-F761B2BE359B

TranscodeParentJob

object

TranscodeParentJobWithSubJobDTO

TranscodeJobList

array<object>

List of sub-jobs.

array<object>

Sub-job.

CreateTime

string

Job creation time.

2022-01-12T08:49:41Z

Name

string

Job name.

transcode-job

ParentJobId

string

Parent job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobId

string

Sub-job ID.

7d6a7e0d4db2457a8d45ff5d43e1bf0a

JobIndex

integer

Index of the sub-job in the entire job.

0

InputGroup

array<object>

Job input group. A single input is a transcoding job. Multiple inputs are an audio-video compositing job.

object

Job input.

Type

string

Media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

Media value:

  • If Type is OSS, this field is a URL that supports OSS and HTTP protocols.

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

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

InputUrl

string

Media stream URL. Specify this parameter only when transcoding a media stream.

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

ProcessConfig

object

Transcoding processing configuration.

Transcode

object

Transcoding configuration.

TemplateId

string

Template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Override parameters. If specified, these parameters override those in the template.

Video

object

Video settings.

Codec

string

Encoding format.

H.264

Profile

string

Encoding profile. Supported values: baseline, main, high.

  • baseline: for mobile devices.

  • main: for standard-resolution devices.

  • high: for high-resolution devices.

Default value: high.

Main

Bitrate

string

Average video bitrate.

  • Valid range: [10, 50000].

  • Unit: Kbps.

3000

Crf

string

Constant rate factor (CRF) for quality control.

  • Valid range: [0, 51].

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

If Crf is set, the Bitrate setting is ignored.

23

Width

string

Width.

  • Valid range: [128, 4096].

  • Unit: px.

Default value: original video width.

1920

Height

string

Height.

  • Valid range: [128, 4096].

  • Unit: px.

Default value: original video height.

1080

Fps

string

Frame rate.

  • Valid range: (0, 60]. If the input file frame rate exceeds 60, use 60.

  • Default value: input file frame rate.

25

Gop

string

Maximum number of frames between keyframes.

  • Valid range: [1, 1080000].

  • Default value: 250.

250

Preset

string

Video encoder preset. This parameter is supported only for H.264. Supported values: veryfast, fast, medium, slow, slower. Default value: medium.

Default value: medium.

medium

ScanMode

string

Scan mode. Supported values: interlaced, progressive.

progressive

PixFmt

string

Video color format. Valid values: yuv420p, yuvj420p, and other standard color formats.

yuv420p

Remove

string

Whether to remove the video stream.

false

Crop

string

Video cropping. Two methods are supported:

  • Automatically detect and crop black bars by setting this parameter to "border".

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

1280:800:0:140

Pad

string

Add black bars to the video. Format: width:height:left:top.

1280:800:0:140

LongShortMode

string

Whether to enable automatic rotation (long-short side mode).

false

Bufsize

string

Buffer size:

  • Valid range: [1000, 128000].

  • Default value: 6000.

  • Unit: Kb.

6000

Maxrate

string

Peak video bitrate:

  • Valid range: [10, 50000].

  • Unit: Kbps.

9000

AbrMax

string

Maximum ABR bitrate (valid only for narrow-high 1):

  • Valid range: [10, 50000].

  • Unit: Kbps.

6000

Audio

object

Audio settings.

Codec

string

Audio codec format: AAC, MP3, VORBIS, FLAC. Default value: AAC

Default value: AAC.

AAC

Profile

string

Audio encoding preset. When Codec is AAC, valid values are aac_low, aac_he, aac_he_v2, aac_ld, aac_eld.

aac_low

Samplerate

string

Sample rate.

  • Supported values: 22050, 32000, 44100, 48000, 96000,

  • Unit: Hz

44100

Bitrate

string

Audio bitrate of the output file.

  • Valid range: [8, 1000]

  • Unit: Kbps

  • Default value: 128

128

Channels

string

Number of sound channels. Default value: 2

2

Remove

string

Whether to remove the audio stream.

false

Volume

object

Volume control.

Method

string

Volume adjustment method.

auto

IntegratedLoudnessTarget

string

Target volume.

-6

TruePeak

string

Peak Volume.

-1

LoudnessRangeTarget

string

Volume range.

8

Container

object

Container format settings.

Format

string

Container format.

mp4

MuxConfig

object

Muxing settings.

Segment

object

Segment settings.

Duration

string

Segment length.

10

ForceSegTime

string

Forced segment time points.

2,3

TransConfig

object

Conditional transcoding parameters.

TransMode

string

Video transcoding mode. Valid values:

  • onepass: generally used for ABR. Faster encoding than twopass.

  • twopass: generally used for VBR. Slower encoding than onepass.

  • CBR: constant bitrate mode.

Default value: onepass.

onepass

IsCheckReso

string

Whether to check video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. IsCheckResoFail has higher priority.

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

  • false: Do not check.

Default value: false.

true

IsCheckResoFail

string

Whether to check video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. This parameter has higher priority.

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

  • false: Do not check.

Default value: false.

true

IsCheckVideoBitrate

string

Whether to check video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. IsCheckVideoBitrateFail has higher priority.

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

  • false: Do not check.

Default value: false.

true

IsCheckVideoBitrateFail

string

Whether to check video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. This parameter has higher priority.

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

  • false: Do not check.

Default value: false.

true

IsCheckAudioBitrate

string

Whether to check audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. IsCheckAudioBitrateFail has higher priority.

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

  • false: Do not check.

Default value:

  • If this parameter is empty and the codec differs from the input source: false.

  • If this parameter is empty and the codec matches the input source: true.

true

IsCheckAudioBitrateFail

string

Whether to check audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. This parameter has higher priority.

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

  • false: Do not check.

Default value: false.

true

AdjDarMethod

string

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, none.

Default value: none.

Example: see how to set the resolution.

none

Tags

object

string

ImageWatermarks

array<object>

Image watermark configuration.

array<object>

Image watermark configuration.

TemplateId

string

Template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Override parameters. If specified, these parameters override those in the template.

Width

string

Width.

32

Height

string

Height.

32

Dx

string

Watermark X position.

10

Dy

string

Watermark Y position.

10

ReferPos

string

Reference position: TopLeft, TopRight, BottomLeft, BottomRight.
Default value: TopLeft.

TopLeft

Timeline

object

Display time settings.

Start

string

Start time.

00:00:05

Duration

string

Display duration in seconds or "ToEND".

ToEND

File

object

Watermark image file.

Type

string

Media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

Media value:

  • If Type is OSS, this field is a URL that supports OSS and HTTP protocols.

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

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

TextWatermarks

array<object>

Text watermark configuration.

array<object>

Text watermark configuration.

TemplateId

string

Template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Override parameters. If specified, these parameters override those in the template.

Content

string

Watermark text. Do not Base64 encode. The string must be UTF-8 encoded.

test watermark

FontName

string

Font.

SimSun

FontColor

string

Color.

#006400

FontAlpha

string

Transparency.

1.0

Top

string

Watermark vertical position (distance from top).

10

Left

string

Watermark horizontal position (distance from left).

10

FontSize

integer

Font size.

16

BorderWidth

integer

Border width.

0

BorderColor

string

Border color.

#006400

Adaptive

string

Adjust font size based on output video size. Valid values: true, false. Default: false.

false

Subtitles

array<object>

Subtitle burn-in configuration.

array<object>

Subtitle burn-in configuration.

TemplateId

string

Template ID

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Override parameters. If specified, these parameters override those in the template.

Format

string

Subtitle file format.

vtt

CharEnc

string

File encoding format.

UTF-8

File

object

Subtitle file.

Type

string

Media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

Media value:

  • If Type is OSS, this field is a URL that supports OSS and HTTP protocols.

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

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

Encryption

object

Encryption configuration.

EncryptType

string

Encryption type.

PrivateEncryption

CipherText

string

Ciphertext of the encryption key for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

Decryption service endpoint for standard encryption.

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

KeyServiceType

string

Key service type. Only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

Multi-input compositing configuration

object

AudioIndex

string

Audio stream index

0 or exclude

VideoIndex

string

Video stream index

0 or exclude

Start

number

Start time of the input stream. Default: 0

0.0

Duration

number

Duration of the input stream. Default: video duration.

20.0

IsInheritTags

boolean

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

true

Output

object

Output media configuration.

Type

string

Media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

Media value:

  • If Type is OSS, this field is a URL that supports OSS and HTTP protocols.

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

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

OutputUrl

string

Transcoded stream URL. Specify this parameter only when outputting to a media stream.

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

UserData

string

User data.

user-data

ScheduleConfig

object

Job scheduling information.

PipelineId

string

Pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

Job priority. Higher numbers indicate higher priority. Valid range: 1–10.

5

Status

string

Transcoding job status

  • Init: Submitted.

  • Processing: Transcoding in progress.

  • Success: Transcoding succeeded.

  • Fail: Transcoding failed.

  • Deleted: Deleted.

Init

OutFileMeta

object

Generated video media information.

FileBasicInfo

object

Basic file information.

MediaId

string

Media asset ID.

486c2890096871edba6f81848c016303

FileName

string

File name.

file.m3u8

FileStatus

string

File status.

Normal

FileType

string

File type. Valid values: source_file, transcode_file

source_file

FileSize

string

File size. Unit: Byte.

31737

FileUrl

string

File URL.

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

Region

string

Region where the file is located.

cn-shanghai

FormatName

string

Video format name.

hls,applehttp

Duration

string

Video duration (unit: seconds).

403.039999

Bitrate

string

Video bitrate.

888.563

Width

string

Width.

848

Height

string

Height.

478

AudioStreamInfoList

array<object>

Audio stream information.

object

Audio stream information.

Index

string

Stream index.

1

CodecName

string

Encoding format.

aac

CodecLongName

string

Codec long name.

AAC (Advanced Audio Coding)

CodecTimeBase

string

Codec time base.

1/44100

CodecTagString

string

Codec tag string.

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

CodecTag

string

Codec tag.

0x000f

SampleFmt

string

Sample format.

fltp

SampleRate

string

Sample rate (unit: Hz).

44100

Channels

string

Number of sound channels.

2

ChannelLayout

string

Channel layout.

stereo

Timebase

string

Time base.

1/90000

StartTime

string

Start time.

1.473556

Duration

string

Duration (unit: seconds).

403.039989

Bitrate

string

Bitrate.

0.f

Lang

string

Language.

cn

VideoStreamInfoList

array<object>

Video stream information.

object

Video stream information.

Index

string

Stream index.

0

Codec_name

string

Encoding format.

h264

Codec_long_name

string

Codec long name.

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

Profile

string

Encoder preset.

High

Codec_time_base

string

Codec time base.

1/50

Codec_tag_string

string

Codec tag string.

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

Codec_tag

string

Codec tag.

0x001b

Width

string

Width.

848

Height

string

Height.

478

Has_b_frames

string

Presence of B-frames. Valid values:

  • 0: No B-frames,

  • 1: One B-frame,

  • 2: Multiple consecutive B-frames.

2

Sar

string

Sample aspect ratio.

478:477

Dar

string

Display aspect ratio.

16:9

PixFmt

string

Pixel format.

yuv420p

Level

string

Encoding level.

31

Fps

string

Frame rate.

25.0

Avg_fps

string

Average frame rate.

25.0

Time_base

string

Time base.

1/90000

Start_time

string

Start time.

1.473556

Duration

string

Duration (unit: seconds).

403.039989

Bit_rate

string

Bitrate.

888.563

NumFrames

string

Total number of frames.

10040

Lang

string

Language.

cn

Rotate

string

Video rotation angle. Valid values: 0, 90, 180, 270. Default value: 0

0

SubmitResultJson

object

Job submission result.

{}

SubmitTime

string

Job submission time.

2022-01-12T08:49:41Z

FinishTime

string

Job completion time.

2022-01-12T08:49:41Z

RequestId

string

Request ID at job submission.

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

CreateTime

string

Job creation time. Format: yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

Name

string

Job name.

transcode-job

RequestId

string

Request ID at job submission.

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

ParentJobId

string

Parent job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobCount

integer

Number of sub-jobs.

1

Status

string

Job status.

  • Success: All sub-jobs completed successfully.

  • Fail: All sub-jobs failed.

Success

TriggerSource

string

Job source.

  • API: API

  • WorkFlow: Workflow

  • Console: Console

API

Percent

integer

Job completion percentage.

0

SubmitTime

string

Job submission time. Format: yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

FinishTime

string

Job completion time. Format: yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

InputGroup

array<object>

Job input group. A single input represents a transcoding job. Multiple inputs represent an audio-video merging job.

object

Job input.

Type

string

Media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

Media value:

  • If Type is OSS, this field is a URL that supports OSS and HTTP protocols.

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

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

OutputGroup

array<object>

Job output group.

array<object>

Job output.

Output

object

Output media configuration.

Type

string

Media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

Media value:

  • If Type is OSS, this field is a URL that supports OSS and HTTP protocols.

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

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

OutputUrl

string

Output stream URL.

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

ProcessConfig

object

Job processing configuration.

Transcode

object

Transcoding configuration.

TemplateId

string

Template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Override parameters. If specified, these parameters override those in the template.

Video

object

Video settings.

Codec

string

Encoding format.

H.264

Profile

string

Encoding profile. Supported values: baseline, main, high.

  • baseline: for mobile devices.

  • main: for standard-resolution devices.

  • high: for high-resolution devices.

Default value: high.

Main

Bitrate

string

Average video bitrate.

  • Valid range: [10, 50000].

  • Unit: Kbps.

3000

Crf

string

Constant rate factor (CRF) for quality control.

  • Valid range: [0, 51].

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

  • If Crf is set, the Bitrate setting is ignored.

23

Width

string

Width.

  • Valid range: [128, 4096].

  • Unit: px.

  • Default value: original video width.

1920

Height

string

Height.

  • Valid range: [128, 4096].

  • Unit: px.

  • Default value: original video height.

1080

Fps

string

Frame rate.

  • Valid range: (0, 60].

  • If the input file frame rate exceeds 60, use 60.

  • Default value: input file frame rate.

25

Gop

string

Maximum number of frames between keyframes.

  • Valid range: [1, 1080000].

  • Default value: 250.

250

Preset

string

Video encoder preset. This parameter is supported only for H.264. Supported values: veryfast, fast, medium, slow, slower. Default value: medium.

medium

ScanMode

string

Scan mode. Supported values: interlaced, progressive.

progressive

PixFmt

string

Video color format. Valid values: yuv420p, yuvj420p, and other standard color formats.

yuv420p

Remove

string

Whether to remove the video stream.

false

Crop

string

Video cropping. Two methods are supported. Automatically detect and crop black bars by setting this parameter to "border". Custom cropping with the format: width:height:left:top. Example: 1280:800:0:140

1280:800:0:140

Pad

string

Black bar padding parameters

  • Format: width:height:left:top.

  • Example: 1280:800:0:140

1280:800:0:140

LongShortMode

string

Whether to enable automatic rotation (long-short side mode).

false

Bufsize

string

Buffer size

  • Valid range: [1000, 128000]

  • Default value: 6000

  • Unit: Kb

6000

Maxrate

string

Peak video bitrate

  • Valid range: [10, 50000]

  • Unit: Kbps.

9000

AbrMax

string

Maximum ABR bitrate (valid only for narrow-high 1)

  • Valid range: [10, 50000],

  • Unit: Kbps.

6000

Audio

object

Audio settings.

Codec

string

Audio codec format: AAC, MP3, VORBIS, FLAC. Default value: AAC

AAC

Profile

string

Audio encoding preset. When Codec is AAC, valid values are aac_low, aac_he, aac_he_v2, aac_ld, aac_eld.

aac_low

Samplerate

string

Sample rate.

  • Default value: 44100

  • Supported values: 22050, 32000, 44100, 48000, 96000,

  • Unit: Hz

44100

Bitrate

string

Audio bitrate of the output file.

  • Valid range: [8, 1000]

  • Unit: Kbps

  • Default value: 128

128

Channels

string

Number of sound channels. Default value: 2

2

Remove

string

Whether to remove the audio stream.

false

Volume

object

Volume control.

Method

string

Volume adjustment method.

auto

IntegratedLoudnessTarget

string

Target volume.

-6

TruePeak

string

Peak Volume.

-1

LoudnessRangeTarget

string

Volume range.

8

Container

object

Container format settings.

Format

string

Container format.

mp4

MuxConfig

object

Muxing settings.

Segment

object

Segment settings.

Duration

string

Segment length.

10

ForceSegTime

string

Forced segment time points.

2,3

TransConfig

object

Conditional transcoding parameters.

TransMode

string

Video transcoding mode. Valid values:

  • onepass: generally used for ABR. Faster encoding than twopass.

  • twopass: generally used for VBR. Slower encoding than onepass.

  • CBR: constant bitrate mode.

Default value: onepass.

onepass

IsCheckReso

string

Whether to check video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. IsCheckResoFail has higher priority.

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

  • false: Do not check.

Default value: false.

true

IsCheckResoFail

string

Whether to check video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. This parameter has higher priority.

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

  • false: Do not check.

Default value: false.

true

IsCheckVideoBitrate

string

Whether to check video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. IsCheckVideoBitrateFail has higher priority.

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

  • false: Do not check.

Default value: false.

true

IsCheckVideoBitrateFail

string

Whether to check video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. This parameter has higher priority.

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

  • false: Do not check.

Default value: false.

true

IsCheckAudioBitrate

string

Whether to check audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. IsCheckAudioBitrateFail has higher priority.

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

  • false: Do not check.

Default value:

  • If this parameter is empty and the codec differs from the input source: false.

  • If this parameter is empty and the codec matches the input source: true.

true

IsCheckAudioBitrateFail

string

Whether to check audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. This parameter has higher priority.

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

  • false: Do not check.

Default value: false.

true

AdjDarMethod

string

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, none.

Default value: none.

none

ImageWatermarks

array<object>

Image watermark configuration.

array<object>

Image watermark configuration.

TemplateId

string

Template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Override parameters. If specified, these parameters override those in the template.

Width

string

Width.

32

Height

string

Height.

32

Dx

string

Watermark X position.

10

Dy

string

Watermark Y position.

10

ReferPos

string

Reference position: TopLeft, TopRight, BottomLeft, BottomRight. Default: TopLeft.

TopLeft

Timeline

object

Display time settings.

Start

string

Start time.

00:00:05

Duration

string

Display duration in seconds or "ToEND".

ToEND

File

object

Watermark image file.

Type

string

Media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

Media value:

  • If Type is OSS, this field is a URL that supports OSS and HTTP protocols.

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

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

TextWatermarks

array<object>

Text watermark configuration.

array<object>

Text watermark configuration.

TemplateId

string

Template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Override parameters. If specified, these parameters override those in the template.

Content

string

Watermark text. Do not Base64 encode. The string must be UTF-8 encoded.

test watermark

FontName

string

Font.

SimSun

FontColor

string

Color.

#006400

FontAlpha

string

Transparency.

1.0

Top

string

Watermark vertical position (distance from top).

10

Left

string

Watermark horizontal position (distance from left).

10

FontSize

integer

Font size.

16

BorderWidth

integer

Border width.

0

BorderColor

string

Border color.

#006400

Adaptive

string

Adjust font size based on output video size. Valid values: true, false. Default: false.

false

Subtitles

array<object>

Subtitle burn-in configuration.

array<object>

Subtitle burn-in configuration.

TemplateId

string

Template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Override parameters. If specified, these parameters override those in the template.

Format

string

Subtitle file format.

vtt

CharEnc

string

File encoding format.

UTF-8

File

object

Subtitle file.

Type

string

Media object type. Valid values:

  • OSS: OSS file.

  • Media: Media asset ID.

OSS

Media

string

Media value:

  • If Type is OSS, this field is a URL that supports OSS and HTTP protocols.

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

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

Encryption

object

Encryption configuration.

EncryptType

string

Encryption type.

PrivateEncryption

CipherText

string

Ciphertext of the encryption key for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

Decryption service endpoint for standard encryption.

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

KeyServiceType

string

Key service type. Only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

Multi-input compositing configuration

object

AudioIndex

string

Audio stream index

0 or exclude

VideoIndex

string

Video stream index

0 or exclude

Start

number

Start time of the input stream. Default: 0

0.0

Duration

number

Duration of the input stream. Default: video duration.

20.0

UserData

string

User data.

user-data

ScheduleConfig

object

Job scheduling configuration.

PipelineId

string

Pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

Job priority. Higher numbers indicate higher priority. Valid range: 1–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": ""
              }
            }
          },
          "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.