All Products
Search
Document Center

ApsaraVideo Media Processing:SubmitJobs

Last Updated:Jul 17, 2023

Submits transcoding jobs.

Operation Description

  • If the transcoding jobs and workflows created in the ApsaraVideo Media Processing (MPS) console cannot meet your business requirements, you can call the SubmitJobs operation to submit transcoding jobs. Set transcoding parameters as required when you call the SubmitJobs operation.

  • If you want to use multiple accounts in MPS, you can create RAM users by using your Alibaba Cloud account and grant the MPSfullaccess permission to the RAM users. If the Alibaba Cloud account that is used to query transcoding jobs is not the Alibaba Cloud account that is used to create the transcoding jobs, no data is returned. For more information, see Create and grant permissions to a RAM user.

  • A transcoding job is generated for each transcoding output. This API operation returns the transcoding jobs that are generated.

  • A video is re-encoded during transcoding in MPS. The bitrate of the transcoded video may be different from that of the source video. If you want to retain the bitrate of a video during transcoding, you can use a container format conversion template. For more information, see Preset template details.

  • Jobs are added to an MPS queue in which the jobs are scheduled and executed. After the jobs are executed, you can call the QueryJobList operation to query the results of the jobs. Alternatively, you can enable asynchronous notifications so that you can be automatically notified of the job results.

NoteTo enable asynchronous notifications, you must bind a Message Service (MNS) topic to the MPS queue in which the transcoding jobs are executed. If an asynchronous message is returned for a transcoding job in the MPS queue, MPS forwards the message to the specified MNS topic.
  • To use an intelligent preset template to transcode a video, you must first call the SubmitAnalysisJob operation to submit a preset template analysis job for the video. After the preset template analysis job is complete, you can call the QueryAnalysisJobList operation to obtain the intelligent preset templates that are applicable to the video.
NoteWhen you submit a transcoding job, set the TemplateId parameter to the ID of an applicable preset template. If you specify a preset template that is not in the applicable preset templates when you submit a transcoding job, the transcoding job fails.
  • If you use a static preset template to transcode a video, you do not need to submit a preset template analysis job first.

  • The size of the file in a transcoding job is up to 100 GB. Otherwise, the transcoding job may fail.

  • For information about transcoding FAQ, see FAQs in MPS.

QPS limit

You can call this API operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InputstringYes

The input of the jobs. Specify the value in a JSON object. Referer is an optional parameter. If you need to set a referer whitelist in a transcoding job, you must set the Referer parameter in the input. For more information about the fields in the Input parameter, see Input.

NoteYou can specify the {ObjectPrefix}, {FileName}, and {ExtName} variables in an OSS URL. MPS can dynamically replace the variables with the actual values. For example, if you specify a/b/c/test.flv as the object to be used as the input file and {ObjectPrefix}{FileName}-cn.srt as the object to be used as the external subtitle file, MPS replaces the variables to obtain the OSS URL a/b/c/test-cn.srt of the external subtitle file. The OSS URL that you specify must be URL-encoded. Therefore, you must specify the OSS URL of the external subtitle file as %7bObjectPrefix%7d%7bFileName%7d-cn.srt. Therefore, you must specify the OSS URL of the external subtitle file as a/b/c/test-cn.srt.
a/b/c/test-cn.srt
OutputsstringYes

The outputs of the jobs.

  • Specify the value in a JSON array of Output objects. You can specify up to 30 Output objects.
  • For more information about job outputs, see Terms.
  • For more information about the fields in each Output object, see Output.
NoteIf you need to merge images in a transcoding job, set the width and height of each image to be processed to even numbers. Otherwise, the job may fail.
[{"OutputObject":"exampleOutput.mp4","TemplateId":"6181666213ab41b9bc21da8ff5ff****","WaterMarks":[{"InputFile":{"Bucket":"exampleBucket","Location":"oss-cn-hangzhou","Object":"image_01.png"},"WaterMarkTemplateId":"9b772ce2740d4d55876d8b542d47****"}],"UserData":"testid-001"}]
OutputBucketstringYes

The name of the output bucket. To obtain the name of an output bucket, you can log on to the MPS console and choose Workflows > Media Buckets in the left-side navigation pane.

exampleBucket
OutputLocationstringNo

The region in which the output bucket resides.

oss-cn-hangzhou
PipelineIdstringYes

The ID of the MPS queue. To obtain the ID of an MPS queue, you can log on to the MPS console and choose Global Settings > Pipelines in the left-side navigation pane.

dd3dae411e704030b921e52698e5****

Response parameters

ParameterTypeDescriptionExample
object
JobResultListobject []

The transcoding jobs that are generated.

Jobobject

The details of the job. If the job fails to be submitted, no job ID is generated.

CreationTimestring

The time when the job was created.

2014-01-10T12:00:00Z
Percentlong

The transcoding progress.

100
FinishTimestring

The time when the job was complete.

2014-01-10T12:20:00Z
Statestring

The state of the job. Valid values:

  • Submitted: The job is submitted.
  • TranscodeFail: The job is failed.
Submitted
JobIdstring

The ID of the job.

31fa3c9ca8134f9cec2b4b0b0f78****
Codestring

The error code returned if the job failed. This parameter is not returned if the job is successful.

InternalError
Messagestring

The error message returned if the job failed. This parameter is not returned if the job is successful.

The operation has failed due to some unknown error, exception or failure.
Outputobject

The outputs of the jobs.

Videoobject

The video configurations.

NoteIf this parameter is specified in the request, the setting of the AliyunVideoCodec parameter in the template specified by the TemplateId parameter is overwritten by the setting of this parameter.
Bufsizestring

The size of the buffer.

  • Unit: KB.
  • Default value: 6000.
1000
Degrainstring

The level of the independent denoising algorithm.

5
BitrateBndobject

The average bitrate range of the video.

Maxstring

The upper limit of the total bitrate. Unit: Kbit/s.

20
Minstring

The lower limit of the total bitrate. Unit: Kbit/s.

10
PixFmtstring

The pixel format for video color encoding.

  • Valid values: standard pixel formats such as yuv420p and yuvj420p.

    **

    Note If a non-standard pixel format such as yuvj420p(pc, bt470bg/bt470bg/smpte170m) is used, compatibility with the pixel format must be configured. Otherwise, the transcoding fails. Default value: yuv420p or the original pixel format. )

yuvj420p
Padstring

The black borders to be added to the video.

  • Format: width:height:left:top.
  • Unit: pixel.
1280:800:0:140
Codecstring

The video codec.

  • Valid values: H.264, H.265, GIF, and WEBP.
  • Default value: H.264.
H.264
Heightstring

The height of the video.

  • Unit: pixel.
  • Default value: the original video height.
1280
Qscalestring

The level of quality control on the video.

15
Cropstring

The method of video cropping. Valid values:

  • border: automatically detects and removes borders.
  • A value in the format of width:height:left:top: crops the video based on the custom settings.
1280:800:0:140
Bitratestring

The bitrate of the output video. Unit: Kbit/s.

10
Maxratestring

The maximum bitrate of the video. Unit: Kbit/s.

10
MaxFpsstring

The maximum frame rate.

15
Profilestring

The encoding profile. This parameter is returned only for the H.264 codec. Default value: high. Valid values:

NoteIf multiple definitions exist, we recommend that you set this parameter to baseline for the lowest definition to ensure normal playback on low-end devices. Set this parameter to main or high for other definitions.
  • baseline: applicable to mobile devices.
  • main: applicable to standard-definition devices.
  • high: applicable to high-definition devices.
baseline
Crfstring

The constant rate factor.

  • If the Crf parameter is specified, the setting of the Bitrate parameter becomes invalid.
  • Default value when the value of the Codec parameter is H.264: 23. Default value when the value of the Codec parameter is H.265: 26.
22
Gopstring

The Group of Pictures (GOP) size. The GOP size can be the maximum interval of keyframes or the maximum number of frames in a frame group. Unit: seconds.

  • Default value: 10s.
  • If the value specifies the maximum number of frames, the value does not contain a unit.
1
Widthstring

The width of the video.

  • Unit: pixel.
  • Default value: the original video width.
1080
Fpsstring

The frame rate of the video.

  • Unit: frames per second.
  • Valid values: 0 to 60. The value is 60 if the frame rate of the input file exceeds 60.
  • Default value: the frame rate of the input file.
60
Presetstring

The preset video algorithm. Default value: medium. Valid values:

  • veryfast
  • fast
  • medium
  • slow
  • slower
veryfast
ScanModestring

The scan mode. Valid values:

  • interlaced: An interlaced scan is performed.
  • progressive: A progressive scan is performed.
  • auto: A scan is performed based on the video source.
interlaced
ResoPrioritystring

The priority of the resource.

1
TransConfigobject

The general transcoding configurations.

NoteIf this parameter is specified in the request, the value overwrites the corresponding parameter in the specified transcoding template.
IsCheckAudioBitratestring

Indicates whether the audio bitrate is checked. If the output audio bitrate is higher than the input audio bitrate, the system considers that the output bitrate equals the input bitrate.

NoteIf the same audio encoder is used before and after transcoding and the audio bitrate after transcoding is greater than the audio bitrate before transcoding, the audio bitrate is reset, and the specified audio bitrate does not take effect.
  • true: The audio bitrate is checked.
  • false: The video bitrate is not checked.
  • Default value: false.
false
TransModestring

The transcoding mode. Valid values:

  • onepass: transcoding based on one-pass algorithms, which has higher accuracy.
  • twopass: transcoding based on two-pass algorithms, which has lower accuracy.
  • CBR: transcoding based on a fixed bitrate.
onepass
IsCheckResostring

Indicates whether the resolution is checked. If the output resolution is higher than the input resolution based on the width or height, the system considers that the output resolution equals the input resolution.

  • true: The resolution is checked.
  • false: The resolution is not checked.
  • Default value: false.
false
IsCheckVideoBitrateFailstring

Indicates whether the video bitrate is checked. If the bitrate of the output video is higher than that of the input video, a transcoding failure is returned without video transcoding. This parameter takes precedence over the IsCheckVideoBitrate parameter.

  • true: The video bitrate is checked.
  • false: The video bitrate is not checked.
  • Default value: false.
true
AdjDarMethodstring

The method of resolution adjustment. Default value: none. Valid values:

  • rescale: resizes the video image.
  • crop:crops the video image.
  • pad: scales out the video image to fill the view.
  • none: no adjustment.
crop
IsCheckVideoBitratestring

Indicates whether the video bitrate is checked. If the bitrate of the output video is higher than that of the input video, the system considers that the output bitrate equals the input bitrate.

  • true: The video bitrate is checked.
  • false: The video bitrate is not checked.
  • Default value: false.
false
IsCheckResoFailstring

Indicates whether the resolution is checked. If the output resolution is higher than the input resolution based on the width or height, a transcoding failure is returned without video transcoding. This parameter takes precedence over the IsCheckReso parameter.

  • true: The resolution is checked.
  • false: The resolution is not checked.
  • Default value: false.
false
IsCheckAudioBitrateFailstring

Indicates whether the audio bitrate is checked. If the output audio bitrate is higher than the input audio bitrate, a transcoding failure is returned without video transcoding. This parameter takes precedence over the IsCheckAudioBitrate parameter.

  • false: The audio bitrate is checked.
  • true: The audio bitrate is not checked.
true
Encryptionobject

The encryption configuration. Only outputs in the M3U8 format are supported.

Typestring

The encryption type. The value is hls-aes-128.

hls-aes-128
Keystring

The key that is used to encrypt the video.

encryptionkey128
KeyTypestring

The key encryption method. Keys cannot be transmitted to MPS in plaintext. Keys must be encrypted by using Base64 or Key Management Service (KMS). For example, if the key is encryptionkey128, you can encrypt the key by using the following method: Base64("encryptionkey128") or KMS(Base64("encryptionkey128").

Base64
Idstring

The encryption ID.

31fa3c9ca8134f9cec2b4b0b0f78****
KeyUristring

The URL that is used to request the key. The URL is Base64-encoded.

https://1161758785*****.cn-shanghai.fc.aliyuncs.com/2016-08-15/proxy/HLS-decyptServer/decyptServer/
SkipCntstring

The number of unencrypted frames at the beginning of the video. Leaving these frames unencrypted enables video playback to quickly start.

3
WaterMarkListobject []

The list of watermarks.

NoteIf watermarks are truncated or fail to be added to the video, check whether the text watermarks that you add contain special characters. If the text watermarks contain special characters, you must escape the special characters. Alternatively, <prop="china">submit a ticket</prop><prop="intl">submit a ticket</prop> to contact Alibaba Cloud customer service for compatibility processing.
Typestring

The type of the watermark. If this parameter is specified in the request, the value overwrites the corresponding parameter in the watermark template. For more information, see Parameter details. Valid values:

  • Image: an image watermark.
  • Text: a text watermark.
Image
ReferPosstring

The position of the watermark. If this parameter is specified in the request, the value overwrites the corresponding parameter in the watermark template. Valid values:

  • TopRight: the upper-right corner.
  • TopLeft: the upper-left corner.
  • BottomRight: the lower-right corner.
  • BottomLeft: the lower-left corner.
TopRight
Dxstring

The horizontal offset of the watermark relative to the output video. If this parameter is specified in the request, the value overwrites the corresponding parameter in the watermark template. Default value: 0. The value can be an integer or a decimal.

  • An integer indicates the pixel value of the horizontal offset.

    • Valid values: [8,4096].
    • Unit: pixel.
  • A decimal indicates the ratio of the horizontal offset to the width in the output video resolution.

    • Valid values: (0,1).
    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically deleted.
1
Widthstring

The width of the watermark image. If this parameter is specified in the request, the value overwrites the corresponding parameter in the watermark template. The value can be an integer or a decimal.

  • An integer indicates the pixel value of the watermark width.

    • Valid values: [8,4096].
    • Unit: pixel.
  • A decimal indicates the ratio of the watermark width to the width in the output video resolution.

    • Valid values: (0,1).
    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically deleted.
1080
Heightstring

The height of the watermark image. If this parameter is specified in the request, the value overwrites the corresponding parameter in the watermark template. The value can be an integer or a decimal.

  • An integer indicates the pixel value of the watermark height.

    • Valid values: [8,4096].
    • Unit: pixel.
  • A decimal indicates the ratio of the watermark height to the height in the output video resolution.

    • Valid values: (0,1).
    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically deleted.
1280
InputFileobject

The watermark input file. You can use an image in the PNG format or a file in the MOV format as the watermark input.

Objectstring

The name of the OSS object that is used as the input file.

example-logo-****.png
Locationstring

The ID of the OSS region in which the input file resides.

oss-cn-hangzhou
Bucketstring

The name of the OSS bucket in which the input file is stored.

example-bucket
WaterMarkTemplateIdstring

The ID of the watermark template.

88c6ca184c0e47098a5b665e2a12****
Dystring

The vertical offset of the watermark image relative to the output video. If this parameter is specified in the request, the value overwrites the corresponding parameter in the watermark template. The value can be an integer or a decimal.

  • An integer indicates the pixel value of the vertical offset.

    • Valid values: [8,4096].
    • Unit: pixel.
  • A decimal indicates the ratio of the vertical offset to the height in the output video resolution.

    • Valid values: (0,1).
    • The decimal number can be accurate to four decimal places, such as 0.9999. Excessive digits are automatically deleted.
1
WaterMarkConfigUrlstring

The URL of the watermark configuration file.

http://example.com/configure
DeWatermarkstring

The configurations of watermark blurring. The value is a JSON object. For more information, see DeWatermark in Parameter details.

{"0": [{"l": 10,"t": 10,"w": 10,"h": 10},{"l": 100,"t": 0.1,"w": 10,"h": 10}],"128000": [],"250000": [{"l": 0.2,"t": 0.1,"w": 0.01,"h": 0.05}]}
M3U8NonStandardSupportobject

The non-standard support configuration for M3U8. The value is a JSON object. For more information, see M3U8NonStandardSupport in Parameter details.

TSobject

The non-standard support configuration for TS files. The value is a JSON object. For more information, see TS in Parameter details.

SizeSupportboolean

Indicates whether to support the output of the size of the TS file in the M3U8 video. Valid values:

  • true: supported.
  • false: not supported.
true
Md5Supportboolean

Indicates whether to support the output of the MD5 value of the TS file in the M3U8 video. Valid values:

  • true: supported.
  • false: not supported.
true
Prioritystring

The priority of the job in the MPS queue to which the job is added.

  • A value of 10 indicates the highest priority.
  • Default value: 6.
5
Audioobject

The audio configurations.

NoteIf this parameter is specified in the request, the value overwrites the corresponding parameter in the specified transcoding template.
Profilestring

The codec profile of the audio.

NoteValid values when the value of the Codec parameter is aac: aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.
aac_low
Codecstring

The audio codec.

  • Valid values: aac, mp3, vorbis, and flac.
  • Default value: aac.
aac
Sampleratestring

The sampling rate.

  • Valid values: 22050, 32000, 44100, 48000, and 96000.
  • Unit: Hz.
  • Default value: 44100.
NoteIf the video container format is FLV and the audio codec is MP3, the sampling rate cannot be 32000, 48000, or 96000. If the audio codec is MP3, the sampling rate cannot be 96000.
32000
Qscalestring

The level of quality control on the audio.

15
Channelsstring

The number of sound channels.

  • If the value of the Codec parameter is mp3, the value of this parameter can only be 1 or 2.
  • If the value of the Codec parameter is aac, the value of this parameter can only be 1, 2, 4, 5, 6, or 8.
  • Default value: 2.
6
Volumeobject

The volume configurations.

Methodstring

The volume adjustment method. Valid values:

  • auto: The volume is automatically adjusted.
  • dynamic: The volume is dynamically adjusted.
  • linear: The volume is linearly adjusted.
auto
Levelstring

The volume adjustment range.

  • Unit: dB.
  • Default value: -20db.
-20
Bitratestring

The audio bitrate of the output file.

  • Unit: Kbit/s.
  • Default value: 128.
128
AudioStreamMapstring

The sequence number of the audio stream.

  • Format: 0:a:{Sequence number}. Example: 0:a:0.
  • The sequence number is the index of the audio stream in the list and starts from 0.
  • If you do not specify a sequence number, the default audio stream is used.
0:a:0
MergeListobject []

The configurations for merging clips.

Startstring

The start point in time of the clip.

  • Format: hh:mm:ss[.SSS] or sssss[.SSS].
  • Examples: 01:59:59.999 and 32000.23.
00000.50
RoleArnstring

The Alibaba Cloud Resource Name (ARN) of the role used for delegated authorization.

acs:ram::<your uid>:role/<your role name>
MergeURLstring

The OSS URL of the clip.

  • Example: http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/example-object-****.flv.
  • The object must be URL-encoded by using the UTF-8 standard.
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/example-object-****.flv
Durationstring

The duration of the clip.

  • Format: hh:mm:ss[.SSS] or sssss[.SSS].
  • Examples: 01:59:59.999 and 32000.23.
00000.20
SuperResoobject

The configurations for using the resolution of the source video.

IsHalfSamplestring

Indicates whether to obtain parameters related to the sampling rate. Valid values:

  • true: The parameters are obtained.
  • false: The parameters are not obtained.
true
UserDatastring

The custom data.

example data
OutSubtitleListobject []

The output subtitle list.

Mapstring

The video stream. Format: 0:{Stream}:{Stream sequence number}, which is 0:v:{video_index}. The value of Stream is v, which indicates a video stream. The sequence number is the index of the video stream in the list and starts from 0.

0:v:0
OutSubtitleFileobject

The details of the output file.

RoleArnstring

The ARN of the role used for delegated authorization.

acs:ram::<your uid>:role/<your role name>
Objectstring

The name of the OSS object that is used as the output file.

example-output.flv
Locationstring

The ID of the OSS region in which the output file resides.

oss-cn-hangzhou
Bucketstring

The name of the OSS bucket in which the output file is stored.

example-bucket-****
Successboolean

Indicates whether the job is created. Valid values:

  • true: The job is created.
  • false: The job fails to be created.
true
Messagestring

The error message returned if the job fails to be created. This parameter is not returned if the job is created.

The specified parameter “%s” cannot be null.
DigiWaterMarkobject

The digital watermarks.

Typestring

The type of the watermark. If this parameter is specified in the request, this value overwrites the corresponding parameter in the watermark template. Valid values:

  • Image: an image watermark. This is the default value.
  • Text: a text watermark.
Image
Alphastring

The transparency of the text or image.

  • Value values: (0,1].
  • Default value: 1.0.
1.0
InputFileobject

The input file.

Objectstring

The name of the OSS object that is used as the input file.

example-intput.flv
Locationstring

The ID of the OSS region in which the input file resides.

oss-cn-hangzhou
Bucketstring

The name of the OSS bucket in which the output file is stored.

example-bucket-****
VideoStreamMapstring

The sequence number of the video stream.

  • Format: 0:a:{Sequence number}. Example: 0:a:0.
  • The sequence number is the index of the video stream in the list and starts from 0.
  • If you do not specify a sequence number, the default video stream is used.
0:a:0
OutputFileobject

The details of the output file.

RoleArnstring

The ARN of the role used for delegated authorization.

acs:ram::<your uid>:role/<your role name>
Objectstring

The name of the OSS object that is used as the output file.

example-output.flv
Locationstring

The ID of the OSS region in which the output file resides.

oss-cn-hangzhou
Bucketstring

The name of the OSS bucket in which the output file is stored.

example-bucket-****
AmixListobject []

The list of audio tracks to be mixed.

Mapstring

The audio track to be mixed. Format: 0:a:{audio_index}. Example: 0:a:0.

0:a:0
Startstring

The start point in time of the audio track. The value is in the number or time format. Examples: 1:25:36.240 and 32000.23.

0
AmixURLstring

The URL of the audio track to be mixed as the background music.

  • The URL can be an OSS URL or the value of the Input parameter in the form of a string.
  • If you want to mix two audio tracks in a video, set this parameter to the value of the Input parameter in the form of a string.
https://outpu***.oss-cn-shanghai.aliyuncs.com/mp4-to-mp3%5E1571025263578816%40.mp3
Durationstring

The duration of the audio track. The value is in the number or time format.

20
MixDurModestring

The mode to specify the mixing duration. Valid values: first and long.

  • first: The length of the output media equals the length of the input media.
  • long: The length of the output media equals the length of the output media or the length of the input media, whichever is longer.
  • Default value: long.
long
Rotatestring

The rotation angle of the video, in the clockwise direction.

180
Containerobject

The container configurations.

Formatstring

The container format.

  • Default value: mp4.
  • Video formats include FLV, MP4, HLS (M3U8 + TS), and MPEG-DASH (MPD + fMP4).
  • Audio formats include MP3, MP4, Ogg, FLAC, and M4A.
  • Image formats include GIF and WebP.
  • If the container format is GIF, the video codec must be GIF.
  • If the container format is WebP, the video codec must be WebP.
  • If the container format is FLV, the video codec cannot be H.265.
flv
Clipobject

The information about the clip.

TimeSpanobject

The time span of the clip.

Seekstring

The time when the clip starts.

  • Format: hh:mm:ss[.SSS] or sssss[.SSS].
  • Valid values: [00:00:00.000,23:59:59.999] or [0.000,86399.999].
01:59:59.999
Durationstring

The duration of the clip.

  • Format: hh:mm:ss[.SSS] or sssss[.SSS].
  • Valid values: [00:00:00.000,23:59:59.999] or [0.000,86399.999].
01:00:59.999
MergeConfigUrlstring

You can specify either the MergeList or MergeConfigUrl parameter.

  • The configuration file that you specify by using the MergeConfigUrl parameter can contain up to 50 merged clips.
  • The MergeConfigUrl parameter specifies the URL of the configuration file for merging clips.
  • Make sure that the configuration file is stored as an object in OSS and that MPS can access the OSS object. For information about the file content, see the details about merging parameters.
  • Example of the content of mergeConfigfile: {"MergeList":[{"MergeURL":"http://exampleBucket****.oss-cn-hangzhou.aliyuncs.com/video_01.mp4"}]}.
`{"MergeList":[{"MergeURL":"http://exampleBucket****.oss-cn-hangzhou.aliyuncs.com/video_01.mp4"}]}
OpeningListobject []

The list of opening parts. The value is a JSON object.

openUrlstring

The OSS URL of the opening part of the video.

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv
Startstring

The amount of time after which the opening part is played. The value starts from 0.

  • Unit: seconds.
  • Default value: 0.
1
Widthstring

The width of the opening part.

  • Valid values: 0 to 4096, -1, and full.
  • Default value: -1.
  • A value of -1 indicates that the height of the source of the opening part is retained.
  • A value of full indicates that the height of the main part is used for the opening part.
1920
Heightstring

The height of the opening part.

  • Valid values: 0 to 4096, -1, and full.
  • Default value: -1.
  • A value of -1 indicates that the height of the source of the opening part is retained.
  • A value of full indicates that the height of the main part is used for the opening part.
1080
MuxConfigobject

The transmuxing configurations. If this parameter is specified in the request, the value overwrites the corresponding parameter in the specified transcoding template.

Webpobject

The transmuxing configuration for WebP.

Loopstring

The loop count.

0
Gifobject

The transmuxing configuration for GIF.

FinalDelaystring

The duration for which the final frame is paused. Unit: centiseconds.

0
DitherModestring

The color dithering algorithm of the palette. Valid values: sierra and bayer.

bayer
Loopstring

The loop count.

0
IsCustomPalettestring

Indicates whether the custom palette is used. Valid values:

  • true: The custom palette is used.
  • false: The custom palette is not used.
false
Segmentobject

The segment configurations. The value is a JSON object.

Durationstring

The length of the segment. The value is an integer. Unit: seconds.

  • Valid values: [1,10].
  • Default value: 10.
20
TailSlateListobject []

The list of ending parts. The value is a JSON object.

Startstring

The start time.

1
BgColorstring

The color of the bars that are added to the ending part if the size of the ending part is smaller than that of the main part. Default value: White. For more information, see Background colors.

White
IsMergeAudioboolean

Indicates whether to merge the audio content of the ending part. Valid values:

  • true: The audio content of the ending part is merged.
  • false: The audio content of the ending part is not merged.
false
Widthstring

The width of the ending part.

  • Valid values: 0 to 4096, -1, and full.
  • A value of -1 indicates that the height of the source of the ending part is retained. A value of full indicates that the height of the main part is used for the ending part.
  • Default value: -1.
1920
Heightstring

The height of the ending part.

  • Valid values: 0 to 4096, -1, and full.
  • A value of -1 indicates that the height of the source of the ending part is retained. A value of full indicates that the height of the main part is used for the ending part.
  • Default value: -1.
1080
BlendDurationstring

The amount of time between the end of the main part and the beginning of the ending part. During the transition, the last frame of the main part fades out, and the first frame of the ending part fades in. Unit: seconds. Default value: 0.

2
TailUrlstring

The OSS URL of the ending part.

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv
TemplateIdstring

The ID of the transcoding template.

S00000000-000010
SubtitleConfigobject

The subtitle configurations.

ExtSubtitleListobject []

The list of external subtitles. The value is a JSON array that contains up to four objects.

CharEncstring

The character set used by the external subtitle.

  • Valid values: UTF-8, GBK, BIG5, and auto.
  • Default value: auto.
NoteIf you set this parameter to auto, the detected character set may not be the actual character set. We recommend that you set this parameter to another value.
UTF-8
FontNamestring

The font of the hard subtitles converted from external subtitles. Default value: SimSun. For more information, see Fonts.

"WenQuanYi Zen Hei", "Yuanti SC Regular", "SimSun"
Inputobject

The OSS object that is used as the external subtitle. The value is a JSON object. Files in the SRT or ASS format are supported.

Objectstring

The name of the OSS object that is used as the input file.

example-output.flv
Locationstring

The ID of the OSS region in which the input file resides.

oss-cn-hangzhou
Bucketstring

The name of the OSS bucket in which the input file is stored.

example-bucket-****
SubtitleListobject []

The list of subtitles.

Mapstring

The audio track. Format: 0:{Stream}:{Stream sequence number}, which is 0:a:{audio_index}. The value of Stream is a, which indicates an audio stream. The sequence number is the index of the audio stream in the list and starts from 0.

0:a:0
Propertiesobject

The media properties.

Widthstring

The width of the video.

1280
Heightstring

The length of the video.

720
Durationstring

The duration of the video.

55
Fpsstring

The frame rate of the video. The value is a number.

25
Bitratestring

The bitrate of the video.

1000
FileFormatstring

The format of the video.

QuickTime / MOV
Streamsobject

The stream information.

VideoStreamListobject []

The list of video streams.

Indexstring

The sequence number of the video stream. The value indicates the position of the video stream in all video streams.

0
Timebasestring

The time base of the video stream.

1/24000
AvgFPSstring

The average frame rate of the video stream.

23.976025
PixFmtstring

The pixel format of the video stream.

yuv420p
Sarstring

The sample aspect ratio (SAR) of the video stream.

1:1
Langstring

The language of the video stream. For more information, see FFmpeg language definition and ISO 639.

eng
CodecLongNamestring

The full name of the encoding format.

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

The height of the video stream in pixels.

720
NumFramesstring

The total number of frames.

25
Bitratestring

The bitrate of the video stream.

1496.46
CodecTagStringstring

The tag string of the encoding format.

avc1
HasBFramesstring

Indicates whether the video stream contains bidirectional frames (B-frames).

2
Profilestring

The codec profile.

high
StartTimestring

The start point in time of the video stream.

0.000000
NetworkCostobject

The network bandwidth consumption.

PreloadTimestring

The amount of preload time.

8
AvgBitratestring

The average bitrate of the video stream.

100
CostBandwidthstring

The maximum bandwidth that is consumed.

10
Darstring

The display aspect ratio (DAR) of the video stream.

16:9
CodecNamestring

The short name of the encoding format.

h264
Widthstring

The width of the video stream in pixels.

1280
Durationstring

The duration of the video stream.

17.225542
Fpsstring

The frame rate of the video stream.

23.976025
CodecTagstring

The tag of the encoding format.

0x31637661
CodecTimeBasestring

The codec time base.

1001/48000
Levelstring

The codec level.

51
AudioStreamListobject []

The list of audio streams.

Timebasestring

The time base of the audio stream.

1/44100
Indexstring

The sequence number of the audio stream. The value indicates the position of the audio stream in all audio streams.

1
SampleFmtstring

The sampling format of the audio stream.

fltp
ChannelLayoutstring

The output layout of the sound channels.

stereo
Langstring

The language of the audio stream. For more information, see FFmpeg language definition and ISO 639.

eng
Sampleratestring

The sampling rate of the audio stream.

44100
CodecLongNamestring

The full name of the encoding format.

AAC (Advanced Audio Coding)
Channelsstring

The number of sound channels.

2
NumFramesstring

The total number of frames.

25
Bitratestring

The bitrate of the audio stream.

128.806
CodecTagStringstring

The tag string of the encoding format.

mp4a
StartTimestring

The start point in time of the audio stream.

0.000000
CodecNamestring

The short name of the encoding format.

aac
Durationstring

The duration of the audio stream.

17.159546
CodecTagstring

The tag of the encoding format.

0x6134706d
CodecTimeBasestring

The codec time base.

1/44100
SubtitleStreamListobject []

The list of subtitle streams.

Indexstring

The sequence number of the subtitle stream. The value indicates the position of the subtitle stream in all subtitle streams.

1
Langstring

The language of the subtitle stream. For more information, see FFmpeg language definition and ISO 639.

eng
Formatobject

The format information.

StartTimestring

The start time.

0.000000
NumProgramsstring

The total number of program streams.

0
Sizestring

The size of the file.

3509895
NumStreamsstring

The total number of media streams.

2
FormatLongNamestring

The full name of the container format.

QuickTime / MOV
Durationstring

The total duration.

55
Bitratestring

The total bitrate.

1000
FormatNamestring

The short name of the container format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2.

mov
FileSizestring

The size of the file.

3509895
PipelineIdstring

The ID of the MPS queue.

88c6ca184c0e47098a5b665e2a126797
Inputobject

The information about the job input.

Objectstring

The name of the OSS object that is used as the job input.

example.flv
Locationstring

The ID of the OSS region in which the job input resides.

oss-cn-hangzhou
Bucketstring

The name of the OSS bucket in which the job input is stored.

example-bucket-****
MNSMessageResultobject

The message sent by MNS to notify users of the job result.

MessageIdstring

The ID of the error message returned if the job failed. This parameter is not returned if the job is successful.

123
ErrorMessagestring

The error message returned if the job failed. This parameter is not returned if the job is successful.

The resource operated "%s" cannot be found.
ErrorCodestring

The error code returned if the job failed. This parameter is not returned if the job is successful.

InvalidParameter.ResourceNotFound
Successboolean

Indicates whether the job is created. Valid values:

  • true: The job is created.
  • false: The job fails to be created.
true
Codestring

The error code returned if the job fails to be created. This parameter is not returned if the job is created.

InvalidParameter.NullValue
Messagestring

The error message returned if the job fails to be created. This parameter is not returned if the job is created.

The specified parameter "%s" cannot be null.
RequestIdstring

The ID of the request.

25818875-5F78-4A45S71F6-D73936451234

Examples

Sample success responses

JSONformat

{
  "JobResultList": {
    "JobResult": [
      {
        "Job": {
          "CreationTime": "2014-01-10T12:00:00Z",
          "Percent": 100,
          "FinishTime": "2014-01-10T12:20:00Z",
          "State": "Submitted",
          "JobId": "31fa3c9ca8134f9cec2b4b0b0f78****",
          "Code": "InternalError",
          "Message": "The operation has failed due to some unknown error, exception or failure.",
          "Output": {
            "Video": {
              "Bufsize": "1000",
              "Degrain": "5",
              "BitrateBnd": {
                "Max": "20",
                "Min": "10"
              },
              "PixFmt": "yuvj420p",
              "Pad": "1280:800:0:140",
              "Codec": "H.264",
              "Height": "1280",
              "Qscale": "15",
              "Crop": "1280:800:0:140",
              "Bitrate": "10",
              "Maxrate": "10",
              "MaxFps": "15",
              "Profile": "baseline",
              "Crf": "22",
              "Gop": "1",
              "Width": "1080",
              "Fps": "60",
              "Preset": "veryfast",
              "ScanMode": "interlaced",
              "ResoPriority": "1"
            },
            "TransConfig": {
              "IsCheckAudioBitrate": "false",
              "TransMode": "onepass",
              "IsCheckReso": "false",
              "IsCheckVideoBitrateFail": "true",
              "AdjDarMethod": "crop",
              "IsCheckVideoBitrate": "false",
              "IsCheckResoFail": "false",
              "IsCheckAudioBitrateFail": "true"
            },
            "Encryption": {
              "Type": "hls-aes-128",
              "Key": "encryptionkey128",
              "KeyType": "Base64",
              "Id": "31fa3c9ca8134f9cec2b4b0b0f78****",
              "KeyUri": "https://1161758785*****.cn-shanghai.fc.aliyuncs.com/2016-08-15/proxy/HLS-decyptServer/decyptServer/",
              "SkipCnt": "3"
            },
            "WaterMarkList": {
              "WaterMark": [
                {
                  "Type": "Image",
                  "ReferPos": "TopRight",
                  "Dx": "1",
                  "Width": "1080",
                  "Height": "1280",
                  "InputFile": {
                    "Object": "example-logo-****.png",
                    "Location": "oss-cn-hangzhou",
                    "Bucket": "example-bucket"
                  },
                  "WaterMarkTemplateId": "88c6ca184c0e47098a5b665e2a12****",
                  "Dy": "1"
                }
              ]
            },
            "WaterMarkConfigUrl": "http://example.com/configure",
            "DeWatermark": "{\"0\": [{\"l\": 10,\"t\": 10,\"w\": 10,\"h\": 10},{\"l\": 100,\"t\": 0.1,\"w\": 10,\"h\": 10}],\"128000\": [],\"250000\": [{\"l\": 0.2,\"t\": 0.1,\"w\": 0.01,\"h\": 0.05}]}",
            "M3U8NonStandardSupport": {
              "TS": {
                "SizeSupport": true,
                "Md5Support": true
              }
            },
            "Priority": "5",
            "Audio": {
              "Profile": "aac_low",
              "Codec": "aac",
              "Samplerate": "32000",
              "Qscale": "15",
              "Channels": "6",
              "Volume": {
                "Method": "auto",
                "Level": "-20"
              },
              "Bitrate": "128"
            },
            "AudioStreamMap": "0:a:0",
            "MergeList": {
              "Merge": [
                {
                  "Start": "00000.50",
                  "RoleArn": "acs:ram::<your uid>:role/<your role name>",
                  "MergeURL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/example-object-****.flv",
                  "Duration": "00000.20"
                }
              ]
            },
            "SuperReso": {
              "IsHalfSample": "true"
            },
            "UserData": "example data",
            "OutSubtitleList": {
              "OutSubtitle": [
                {
                  "Map": "0:v:0",
                  "OutSubtitleFile": {
                    "RoleArn": "acs:ram::<your uid>:role/<your role name>",
                    "Object": "example-output.flv",
                    "Location": "oss-cn-hangzhou",
                    "Bucket": "example-bucket-****"
                  },
                  "Success": true,
                  "Message": "The specified parameter “%s” cannot be null."
                }
              ]
            },
            "DigiWaterMark": {
              "Type": "Image",
              "Alpha": "1.0",
              "InputFile": {
                "Object": "example-intput.flv",
                "Location": "oss-cn-hangzhou",
                "Bucket": "example-bucket-****"
              }
            },
            "VideoStreamMap": "0:a:0",
            "OutputFile": {
              "RoleArn": "acs:ram::<your uid>:role/<your role name>",
              "Object": "example-output.flv",
              "Location": "oss-cn-hangzhou",
              "Bucket": "example-bucket-****"
            },
            "AmixList": {
              "Amix": [
                {
                  "Map": "0:a:0",
                  "Start": "0",
                  "AmixURL": "https://outpu***.oss-cn-shanghai.aliyuncs.com/mp4-to-mp3%5E1571025263578816%40.mp3",
                  "Duration": "20",
                  "MixDurMode": "long"
                }
              ]
            },
            "Rotate": "180",
            "Container": {
              "Format": "flv"
            },
            "Clip": {
              "TimeSpan": {
                "Seek": "01:59:59.999",
                "Duration": "01:00:59.999"
              }
            },
            "MergeConfigUrl": "`{\"MergeList\":[{\"MergeURL\":\"http://exampleBucket****.oss-cn-hangzhou.aliyuncs.com/video_01.mp4\"}]}",
            "OpeningList": {
              "Opening": [
                {
                  "openUrl": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv",
                  "Start": "1",
                  "Width": "1920",
                  "Height": "1080"
                }
              ]
            },
            "MuxConfig": {
              "Webp": {
                "Loop": "0"
              },
              "Gif": {
                "FinalDelay": "0",
                "DitherMode": "bayer",
                "Loop": "0",
                "IsCustomPalette": "false"
              },
              "Segment": {
                "Duration": "20"
              }
            },
            "TailSlateList": {
              "TailSlate": [
                {
                  "Start": "1",
                  "BgColor": "White",
                  "IsMergeAudio": false,
                  "Width": "1920",
                  "Height": "1080",
                  "BlendDuration": "2",
                  "TailUrl": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/opening_01.flv"
                }
              ]
            },
            "TemplateId": "S00000000-000010",
            "SubtitleConfig": {
              "ExtSubtitleList": {
                "ExtSubtitle": [
                  {
                    "CharEnc": "UTF-8",
                    "FontName": "\"WenQuanYi Zen Hei\", \"Yuanti SC Regular\", \"SimSun\"",
                    "Input": {
                      "Object": "example-output.flv",
                      "Location": "oss-cn-hangzhou",
                      "Bucket": "example-bucket-****"
                    }
                  }
                ]
              },
              "SubtitleList": {
                "Subtitle": [
                  {
                    "Map": "0:a:0"
                  }
                ]
              }
            },
            "Properties": {
              "Width": "1280",
              "Height": "720",
              "Duration": "55",
              "Fps": "25",
              "Bitrate": "1000",
              "FileFormat": "QuickTime / MOV",
              "Streams": {
                "VideoStreamList": {
                  "VideoStream": [
                    {
                      "Index": "0",
                      "Timebase": "1/24000",
                      "AvgFPS": "23.976025",
                      "PixFmt": "yuv420p",
                      "Sar": "1:1",
                      "Lang": "eng",
                      "CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
                      "Height": "720",
                      "NumFrames": "25",
                      "Bitrate": "1496.46",
                      "CodecTagString": "avc1",
                      "HasBFrames": "2",
                      "Profile": "high",
                      "StartTime": "0.000000",
                      "NetworkCost": {
                        "PreloadTime": "8",
                        "AvgBitrate": "100",
                        "CostBandwidth": "10"
                      },
                      "Dar": "16:9",
                      "CodecName": "h264",
                      "Width": "1280",
                      "Duration": "17.225542",
                      "Fps": "23.976025",
                      "CodecTag": "0x31637661",
                      "CodecTimeBase": "1001/48000",
                      "Level": "51"
                    }
                  ]
                },
                "AudioStreamList": {
                  "AudioStream": [
                    {
                      "Timebase": "1/44100",
                      "Index": "1",
                      "SampleFmt": "fltp",
                      "ChannelLayout": "stereo",
                      "Lang": "eng",
                      "Samplerate": "44100",
                      "CodecLongName": "AAC (Advanced Audio Coding)",
                      "Channels": "2",
                      "NumFrames": "25",
                      "Bitrate": "128.806",
                      "CodecTagString": "mp4a",
                      "StartTime": "0.000000",
                      "CodecName": "aac",
                      "Duration": "17.159546",
                      "CodecTag": "0x6134706d",
                      "CodecTimeBase": "1/44100"
                    }
                  ]
                },
                "SubtitleStreamList": {
                  "SubtitleStream": [
                    {
                      "Index": "1",
                      "Lang": "eng"
                    }
                  ]
                }
              },
              "Format": {
                "StartTime": "0.000000",
                "NumPrograms": "0",
                "Size": "3509895",
                "NumStreams": "2",
                "FormatLongName": "QuickTime / MOV",
                "Duration": "55",
                "Bitrate": "1000",
                "FormatName": "mov"
              },
              "FileSize": "3509895"
            }
          },
          "PipelineId": "88c6ca184c0e47098a5b665e2a126797",
          "Input": {
            "Object": "example.flv",
            "Location": "oss-cn-hangzhou",
            "Bucket": "example-bucket-****"
          },
          "MNSMessageResult": {
            "MessageId": "123",
            "ErrorMessage": "The resource operated \"%s\" cannot be found.",
            "ErrorCode": "InvalidParameter.ResourceNotFound"
          }
        },
        "Success": true,
        "Code": "InvalidParameter.NullValue",
        "Message": "The specified parameter \"%s\" cannot be null."
      }
    ]
  },
  "RequestId": "25818875-5F78-4A45S71F6-D73936451234"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history