SubmitTranscodeJob

Updated at:

Submits a video or audio transcoding job to Intelligent Media Services (IMS) by specifying the source file to be transcoded, the output format, and related parameters.

Operation description

  • This is an asynchronous operation. After you submit the job, a job ID is returned. The job is not completed at this time and enters the background queue for asynchronous execution. The final result is notified through a callback. You can also call Query a transcoding job to actively query the job status.

Try it now

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

Test

RAM authorization

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

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

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

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

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

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

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

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

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

Action

Access level

Resource type

Condition key

Dependent action

ice:SubmitTranscodeJob

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

No

The name of the job.

job-name

InputGroup

array<object>

Yes

The input group of the job. A single input indicates a transcoding job. Multiple inputs indicate an audio and video stream merging job.

job-name

object

Yes

The job input.

Type

string

Yes

The media object type. Valid values:

  • OSS: OSS file

  • Media: media asset ID

OSS

Media

string

Yes

The media value.

  • If Type is set to OSS, this parameter specifies a URL. Both the OSS and HTTP protocols are supported.

Note

The OSS bucket in the URL must be added to the Storage Management module of IMS before use.

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

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

InputUrl

string

No

The input stream path.

  • This parameter takes effect only when Type is set to Media. It allows you to select a specific file under the media asset as the input.

  • The system checks whether the 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. Valid values:

  • OSS: OSS file

  • Media: media asset ID

OSS

Media

string

Yes

The media value.

  • If Type is set to OSS, this parameter specifies a URL. Both the OSS and HTTP protocols are supported.

Note

The OSS bucket in the URL must be added to the Storage Management module of IMS before use.

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

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

OutputUrl

string

No

The output stream path. This parameter takes effect only when Type is set to Media, allowing you to select a specific file under the media asset as the output. Supported placeholders:

  • {MediaId}: the media asset ID.

  • {JobId}: the transcoding subtask ID.

  • {MediaBucket}: the bucket where the media asset ID is located.

  • {ExtName}: the file name extension, which is the output format of the transcoding template.

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

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

  2. The output bucket must be the same as the bucket where the media asset ID is located.

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 override the corresponding parameters in the template.

Video

object

No

The video settings.

Codec

string

No

The codec.

H.264

Profile

string

No

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

No

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

3000

Crf

string

No

The constant rate factor (CRF). Valid values: 0 to 51. Default value: 23 for H.264 and 26 for H.265.

Note

If CRF is specified, the Bitrate setting becomes invalid.

23

Width

string

No

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

1920

Height

string

No

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

1080

Fps

string

No

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

Note

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

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 algorithm preset. This parameter is supported only for H.264. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium

ScanMode

string

No

The scan mode. Valid values: interlaced and progressive.

progressive

PixFmt

string

No

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

yuv420p

Remove

string

No

Specifies whether to remove the video stream.

false

Crop

string

No

The video cropping settings. Two methods are supported:

  • Automatically detect and crop black borders. Set this parameter to border.

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

1280:800:0:140

Pad

string

No

The video padding settings. Parameter format: width:height:left:top. Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

No

Specifies whether to enable the adaptive landscape and portrait mode, which adjusts the output based on the long and short edges of the video.

false

Bufsize

string

No

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

6000

Maxrate

string

No

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

9000

AbrMax

string

No

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

6000

Audio

object

No

The audio settings.

Codec

string

No

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

AAC

Profile

string

No

The audio 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

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

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

-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 multiplexing settings.

Segment

object

No

The segment settings.

Duration

string

No

The segment duration.

10

ForceSegTime

string

No

The forced segmentation time points.

2,3

TransConfig

object

No

The conditional transcoding parameters.

TransMode

string

No

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

No

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

  • true: Checks the resolution. If the width or height of the input video resolution is smaller than the output setting, the input video resolution is used for transcoding.

  • false: Does not check the resolution. Default value: false.

true

IsCheckResoFail

string

No

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: Checks the resolution. If the width or height of the input video resolution is smaller than the output setting, a transcoding failure is returned.

  • false: Does not check the resolution. Default value: false.

true

IsCheckVideoBitrate

string

No

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

  • true: Checks the bitrate. If the input video bitrate is lower than the output setting, the input video bitrate is used for transcoding.

  • false: Does not check the bitrate. Default value: false.

true

IsCheckVideoBitrateFail

string

No

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: Checks the bitrate. If the input video bitrate is lower than the output setting, a transcoding failure is returned.

  • false: Does not check the bitrate. Default value: false.

true

IsCheckAudioBitrate

string

No

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

  • true: Checks the bitrate. If the input audio bitrate is lower than the output setting, the input audio bitrate is used for transcoding.

  • false: Does not check the bitrate. 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

No

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: Checks the bitrate. If the input audio bitrate is lower than the output setting, a transcoding failure is returned.

  • false: Does not check the bitrate. Default value: false.

true

AdjDarMethod

string

No

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.

none

ImageWatermarks

array<object>

No

The image watermark settings.

array<object>

No

The image watermark settings.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

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

Width

string

No

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

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

    • Unit: px.

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

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

32

Height

string

No

The height of the watermark image on the output video. The value can be in one of the following formats:

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

    • Unit: px.

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

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

32

Dx

string

No

The horizontal offset of the watermark image relative to the output video. Default value: 0. The value can be in one of the following formats:

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

    • Unit: px.

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

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

10

Dy

string

No

The vertical offset of the watermark image relative to the output video. Default value: 0. The value can be in one of the following formats:

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

    • Unit: px.

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

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

10

ReferPos

string

No

The position of the watermark.

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

  • Default value: TopRight.

TopLeft

Timeline

object

No

The display time settings for dynamic watermarks.

Start

string

No

The time when the watermark starts to appear.

  • Unit: seconds.

  • Valid values: numeric values.

  • Default value: 0.

00:00:05

Duration

string

No

The duration of the watermark.

  • Valid values: [numeric value, ToEND].

  • Default value: ToEND.

ToEND

File

object

No

The watermark image file.

Type

string

No

The media object type. Valid values:

  • OSS: OSS file

  • Media: media asset ID

OSS

Media

string

No

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

TextWatermarks

array<object>

No

The text watermark settings.

array<object>

No

The text watermark settings.

TemplateId

string

Yes

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

No

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

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

SimSun

FontColor

string

No

The color.

#006400

FontAlpha

string

No

The font transparency.

  • Valid values: (0, 1].

  • Default value: 1.0.

1.0

Top

string

No

The top margin of the text.

  • Default value: 0.

  • Valid values: 0 to 4096.

10

Left

string

No

The left margin of the text.

  • Default value: 0.

  • Valid values: 0 to 4096.

10

FontSize

integer

No

The font size.

  • Default value: 16.

  • Valid values: 5 to 119.

16

BorderWidth

integer

No

The border width.

  • Default value: 0.

  • Valid values: 1 to 4096.

0

BorderColor

string

No

The stroke color. Default value: Black. For more valid values, see BorderColor.

#006400

Adaptive

string

No

Specifies whether to adjust the font size based on the output video size. Valid values: true and false. Default value: 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 override the corresponding parameters in the template.

Format

string

No

The subtitle file format.

vtt

CharEnc

string

No

The file encoding format.

UTF-8

File

object

No

The subtitle file.

Type

string

No

The media object type. Valid values:

  • OSS: OSS file

  • Media: media asset ID

OSS

Media

string

No

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

Encryption

object

No

The encryption configuration.

EncryptType

string

No

The encryption type. Valid values:

  • PrivateEncryption: Alibaba Cloud proprietary encryption.

  • HLSEncryption: HLS standard encryption.

PrivateEncryption

CipherText

string

No

The ciphertext of the standard encryption key.

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

  • Base64

KMS

CombineConfigs

array<object>

No

The multi-input stream mixing configuration.

object

No

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

The custom settings in JSON format. The maximum length is 512 bytes. 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 client token that is used to ensure request idempotency.

****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 child job list.

array<object>

The child job details.

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 of the child job in the parent job.

0

InputGroup

array<object>

The input group of the job. A single input indicates a transcoding job. Multiple inputs indicate an audio and video stream 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 input stream path:

  • This parameter takes effect only when Type is set to Media, which allows you to select a specific file under the media asset as the input.

  • The system checks whether the 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 override the corresponding parameters in the template.

Video

object

The video settings.

Codec

string

The codec.

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 Crf is specified, the Bitrate setting 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 is set to 60.

  • 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 pixel format. Valid values: standard color formats such as yuv420p and yuvj420p.

yuv420p

Remove

string

Specifies whether to remove the video stream.

false

Crop

string

The video cropping settings. Two methods are supported:

  • Automatically detect and crop 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 video padding settings for adding black borders.

  • Format: width:height:left:top.

  • Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

Specifies whether to enable the adaptive landscape and portrait mode, which adjusts the output based on the long and short edges of the video.

false

Bufsize

string

The buffer size.

  • Valid values: 1000 to 128000.

  • Default value: 6000.

  • Unit: Kb.

6000

Maxrate

string

The peak 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 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 multiplexing settings.

Segment

object

The segment settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segmentation time points.

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 that of twopass. This is the default value.

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

  • CBR: Constant bitrate mode.

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: Checks the resolution. If the width or height of the input video resolution is smaller than the output settings, the video is transcoded based on the input video resolution.

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

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: Checks the resolution. If the width or height of the input video resolution is smaller than the output settings, a transcoding failure is returned.

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

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: Checks the bitrate. If the input video bitrate is lower than the output settings, the video is transcoded based on the input video bitrate.

  • false: Does not check the bitrate. This is the default value.

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: Checks the bitrate. If the input video bitrate is lower than the output settings, a transcoding failure is returned.

  • false: Does not check the bitrate. This is the default value.

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: Checks the bitrate. If the input audio bitrate is lower than the output settings, the audio is transcoded based on the input audio bitrate.

  • false: Does not check the bitrate.

Default value rules:

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

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

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: Checks the bitrate. If the input audio bitrate is lower than the output settings, a transcoding failure is returned.

  • false: Does not check the bitrate. This is the default value.

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.

none

ImageWatermarks

array<object>

The image watermark settings.

array<object>

The image watermark settings.

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 of the watermark image on the output video. The value can be in one of the following formats:

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

    • Unit: px.

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

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

32

Height

string

The height of the watermark image on the output video. The value can be in one of the following formats:

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

    • Unit: px.

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

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

32

Dx

string

The horizontal offset of the watermark image relative to the output video. Default value: 0. The value can be in one of the following formats:

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

    • Unit: px.

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

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

10

Dy

string

The vertical offset of the watermark image relative to the output video. Default value: 0. The value can be in one of the following formats:

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

    • Unit: px.

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

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

10

ReferPos

string

The position of the watermark.

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

  • Default value: TopRight.

TopLeft

Timeline

object

The display time settings for dynamic watermarks.

Start

string

The time when the watermark starts to appear.

  • Unit: seconds.

  • Valid values: numeric values.

  • Default value: 0.

00:00:05

Duration

string

The duration of the watermark.

  • Valid values: [numeric value, ToEND].

  • Default value: 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 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

TextWatermarks

array<object>

The text watermark settings.

array<object>

The text watermark settings.

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

SimSun

FontColor

string

The color.

#006400

FontAlpha

string

The font transparency.

  • Valid values: (0, 1].

  • Default value: 1.0.

1.0

Top

string

The top margin of the text.

  • Default value: 0.

  • Valid values: 0 to 4096.

10

Left

string

The left margin of the text.

  • Default value: 0.

  • Valid values: 0 to 4096.

10

FontSize

integer

The font size.

  • Default value: 16.

  • Valid values: 5 to 119.

16

BorderWidth

integer

The border width.

  • Default value: 0.

  • Valid values: 1 to 4096.

0

BorderColor

string

The stroke color. Default value: Black. For more valid values, see BorderColor.

#006400

Adaptive

string

Specifies whether to adjust the font size based on the output video size. Valid values: true and false. 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 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

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. Only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

The multi-input stream mixing configuration.

object

The 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

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

OutputUrl

string

The output stream path. This parameter takes effect only when Type is set to Media. It allows you to select a specific file under the media asset as the output. Supported placeholders:

  • {MediaId}: the media asset ID.

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

  • {MediaBucket}: the bucket where the media asset ID is located.

  • {ExtName}: the file name extension, which is the output format of the transcoding template.

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

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

  2. The output bucket must be the same as the bucket where the MediaId is located.

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

73e07de0f77171eca3fc7035d0b26402

FileName

string

The file name.

file.m3u8

FileStatus

string

The file status.

Normal

FileType

string

The file type. Valid values: source_file and transcode_file.

source_file

FileSize

string

The file size. Unit: bytes.

31737

FileUrl

string

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

aac

CodecLongName

string

The long name of the codec.

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

2

ChannelLayout

string

The channel layout.

stereo

Timebase

string

The time base.

1/90000

StartTime

string

The start time. Unit: seconds.

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

h264

Codec_long_name

string

The long name of the codec.

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

Profile

string

The encoder 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 B-frames exist. Valid values:

  • 0: No B-frames.

  • 1: One B-frame.

  • 2: Multiple consecutive B-frames.

2

Sar

string

The sample aspect ratio.

478:477

Dar

string

The display aspect ratio.

16:9

PixFmt

string

The pixel format.

yuv420p

Level

string

The encoding level.

31

Fps

string

The frame rate.

25.0

Avg_fps

string

The average frame rate.

25.0

Time_base

string

The time base.

1/90000

Start_time

string

The start time, in seconds.

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. 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 in UTC (ending with Z).

2022-01-12T08:49:41Z

FinishTime

string

The job completion time. The time is in ISO 8601 format and 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) and Fail (all child jobs fail).

Success

TriggerSource

string

The job source. Valid values: API, WorkFlow, and 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 input group of the job. A single input indicates a transcoding job. Multiple inputs indicate an audio and video stream 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

OutputGroup

array<object>

The task 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 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

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 override the corresponding parameters in the template.

Video

object

The video settings.

Codec

string

The codec.

H.264

Profile

string

The encoding profile. Valid values:

  • 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: 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 Crf is specified, the Bitrate setting 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 is set to 60.

  • 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 pixel format. Valid values: standard color formats such as yuv420p and yuvj420p.

yuv420p

Remove

string

Specifies whether to remove the video stream.

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. Parameter format: width:height:left:top. Example: 1280:800:0:140.

1280:800:0:140

Pad

string

The video padding settings for adding black borders.

  • Parameter format: width:height:left:top.

  • Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

Specifies whether to enable the adaptive landscape and portrait mode, which adjusts the output based on the long and short edges of the video.

false

Bufsize

string

The buffer size.

  • Valid values: 1000 to 128000.

  • Default value: 6000.

  • Unit: Kb.

6000

Maxrate

string

The peak 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 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 audio sampling rate.

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

  • Unit: Hz.

44100

Bitrate

string

The audio bitrate of the output file.

  • Valid values: 8 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 multiplexing settings.

Segment

object

The segment settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segmentation time points.

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: Checks the resolution. If the width or height of the input video resolution is smaller than the output setting, the input video resolution is used for transcoding.

  • false: Does not check the resolution. 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: Checks the resolution. If the width or height of the input video resolution is smaller than the output setting, a transcoding failure is returned.

  • false: Does not check the resolution. 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: Checks the bitrate. If the input video bitrate is lower than the output setting, the input video bitrate is used for transcoding.

  • false: Does not check the bitrate. 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: Checks the bitrate. If the input video bitrate is lower than the output setting, a transcoding failure is returned.

  • false: Does not check the bitrate. 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: Checks the bitrate. If the input audio bitrate is lower than the output setting, the input audio bitrate is used for transcoding.

  • false: Does not check the bitrate. 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: Checks the bitrate. If the input audio bitrate is lower than the output setting, a transcoding failure is returned.

  • false: Does not check the bitrate. 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.

none

ImageWatermarks

array<object>

The image watermark settings.

array<object>

The image watermark settings.

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 of the watermark image on the output video. The value can be in one of the following formats:

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

    • Unit: px.

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

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

32

Height

string

The height of the watermark image on the output video. The value can be in one of the following formats:

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

    • Unit: px.

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

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

32

Dx

string

The horizontal offset of the watermark image relative to the output video. Default value: 0. The value can be in one of the following formats:

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

    • Unit: px.

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

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

10

Dy

string

The vertical offset of the watermark image relative to the output video. Default value: 0. The value can be in one of the following formats:

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

    • Unit: px.

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

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

10

ReferPos

string

The position of the watermark.

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

  • Default value: TopRight.

TopLeft

Timeline

object

The display time settings for dynamic watermarks.

Start

string

The time when the watermark starts to appear.

  • Unit: seconds.

  • Valid values: numeric values.

  • Default value: 0.

00:00:05

Duration

string

The duration of the watermark.

  • Valid values: [numeric value, ToEND].

  • Default value: 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 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

TextWatermarks

array<object>

The text watermark settings.

array<object>

The text watermark settings.

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

SimSun

FontColor

string

The color.

#006400

FontAlpha

string

The font transparency.

  • Valid values: (0, 1].

  • Default value: 1.0.

1.0

Top

string

The top margin of the text.

  • Default value: 0.

  • Valid values: 0 to 4096.

10

Left

string

The left margin of the text.

  • Default value: 0.

  • Valid values: 0 to 4096.

10

FontSize

integer

The font size.

  • Default value: 16.

  • Valid values: 5 to 119.

16

BorderWidth

integer

The border width.

  • Default value: 0.

  • Valid values: 1 to 4096.

0

BorderColor

string

The stroke color. Default value: Black. For more valid values, see BorderColor.

#006400

Adaptive

string

Specifies whether to adjust the font size based on the size of the output video.

  • true: false

  • default: 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. When Type is set to OSS, the value is a URL. The OSS and HTTP protocols are supported. When Type is set to 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. 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 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.