All Products
Search
Document Center

ApsaraVideo Media Processing:SubmitJobs

Last Updated:Sep 27, 2024

Submits transcoding jobs. 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. Specify transcoding parameters as required when you call the SubmitJobs operation.

Operation description

  • SubmitJobs is an asynchronous operation. After you submit transcoding jobs, the jobs are added to an MPS queue to be scheduled and run. The transcoding jobs may not have been complete when the response is returned. After you call this operation, you can call the QueryJobList operation to query the job results. You can also associate a Message Service (MNS) queue or topic with the MPS queue to receive notifications on the jobs. For more information, see Receive notifications.
  • An input file can be up to 100 GB in size. If the size of the input file exceeds this limit, the job may fail.
  • If you use an intelligent preset template to transcode an input file, you must first call the SubmitAnalysisJob operation to submit a preset template analysis job. After the analysis job is complete, you can call the QueryAnalysisJobList operation to obtain the available preset templates for the input file. When you submit a transcoding job, set TemplateId to the ID of an available preset template. If you specify a preset template that is not in the available preset templates, the transcoding job fails.
  • If you use a static preset template to transcode an input file, you do not need to submit a preset template analysis job.
  • If you want to use multiple accounts in MPS, you can create Resource Access Management (RAM) users by using your Alibaba Cloud account. For more information, see Create a RAM user and grant permissions to the RAM user. If the Alibaba Cloud account that is used to query transcoding jobs is not the one that is used to submit the transcoding jobs, no data is returned.
  • For information about transcoding FAQ, see FAQ about MPS.

QPS limits

You can call this operation up to 100 times per second per account. Requests that exceed this limit are dropped, and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
mts:SubmitJobs
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InputstringYes

The information about the input file. For more information, see the "Input" section of the Parameter details topic.

Note
  • The path of an Object Storage Service (OSS) object must be URL-encoded in UTF-8 before you use the path in MPS.

  • The OSS bucket must reside in the same region as your MPS service.

a/b/c/test-cn.srt
OutputsstringYes

The job output configurations. For more information, see the "Output" section of the Parameter details topic.

  • Specify the value in a JSON array of Output objects. You can specify up to 30 Output objects.
[{"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 OSS bucket that stores the output file.

  • For more information about the term bucket, see Terms .
exampleBucket
OutputLocationstringNo

The region in which the OSS bucket that stores the output file resides.

  • The OSS bucket must reside in the same region as MPS.
  • For more information about the term bucket, see Terms .
oss-cn-hangzhou
PipelineIdstringYes

The ID of the MPS queue. For more information, see Terms .

  • To obtain the ID of an MPS queue, you can log on to the MPS console and choose Global Settings > MPS Queue and Callback in the left-side navigation pane.
  • If you want to receive asynchronous message notifications, associate an MNS queue or topic with the MPS queue. For more information, see Receive notifications.
dd3dae411e704030b921e52698e5****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

JobResultListarray<object>

The transcoding jobs that are generated.

JobResultobject
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
  • TranscodeFail
Submitted
JobIdstring

The job ID.

31fa3c9ca8134f9cec2b4b0b0f78****
Codestring

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

InternalError
Messagestring

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

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

The output of the job.

Videoobject

The video configurations.

Note If this parameter is specified, AliyunVideoCodec in the template specified by TemplateId is overwritten.
Bufsizestring

The size of the buffer.

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

The strength of the independent noise reduction 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 of the video.

  • The default pixel format can be yuv420p or the pixel format of the input file.

  • 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 job fails.

yuvj420p
Padstring

The black borders that are added to the video.

  • The value is in the width:height:left:top format.
  • 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 height of the input video.
1280
Qscalestring

The level of quality control on the video.

15
Cropstring

The method of video cropping. Valid values:

  • border: Black borders are automatically detected and removed.
  • A value in the format of width:height:left:top: The video is cropped 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:

Note If multiple definitions are involved, we recommend that you use baseline for the lowest definition to ensure normal playback on low-definition devices, and use 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 Crf is returned, the value of Bitrate is invalid.
  • Default value if the value of Codec is H.264: 23. Default value if the value of Codec is H.265: 26.
22
Gopstring

The maximum interval between keyframes or the maximum number of frames in a frame group. Unit: seconds.

  • Default value: 10.
  • If the maximum number of frames is returned, the value does not have a unit.
1
Widthstring

The width of the video.

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

The frame rate.

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

  • If this parameter is empty, the scan mode of the input file is used.
  • auto: automatic deinterlacing.
  • progressive: progressive scan.
  • interlaced: interlaced scan.
  • By default, this parameter is empty.

Best practice: Interlaced scan consumes less bandwidth than progressive scan, but the image quality is poor. Therefore, mainstream video production uses progressive scan.

  • If progressive scan or interlaced scan is used when the scan mode of the input file is neither of them, the transcoding job fails.
  • We recommend that you use the scan mode of the input file or automatic deinterlacing to improve compatibility.
interlaced
ResoPrioritystring

The priority of the resource.

1
TransConfigobject

The general transcoding configurations.

Note If this parameter is specified in the request, the corresponding parameter in the specified transcoding template are overwritten.
IsCheckAudioBitratestring

Indicates whether the audio bitrate is checked. If the bitrate of the output audio is higher than that of the input audio, the input bitrate is retained and the specified audio bitrate does not take effect. This parameter has a lower priority than IsCheckAudioBitrateFail. Valid values:

  • true

  • false

  • Default value:

    • If this parameter is empty and the codec of the output audio is different from the codec of the input audio, the default value is false.
    • If this parameter is empty and the codec of the output audio is the same as the codec of the input audio, the default value is true.
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 input resolution is retained. Valid values:

  • true
  • false
  • 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 transcoding the video. This parameter has a higher priority thanIsCheckVideoBitrate. Valid values:

  • true
  • false
  • Default value: false.
true
AdjDarMethodstring

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

  • rescale: The video image is resized.
  • crop: The video image is cropped.
  • pad: The video image is scaled out to fill the view.
  • none: The resolution is not adjusted.
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 input bitrate is retained. Valid values:

  • true
  • false
  • Default value: false.
false
IsCheckResoFailstring

Indicates whether the resolution is checked. This parameter has a higher priority than IsCheckReso. If the output resolution is higher than the input resolution based on the width or height, a transcoding failure is returned without transcoding the video. Valid values:

  • true
  • false
  • Default value: false.
false
IsCheckAudioBitrateFailstring

Indicates whether the audio bitrate is checked. This parameter has a higher priority than IsCheckAudioBitrate. If the bitrate of the output audio is higher than that of the input audio, a transcoding failure is returned without transcoding the audio. Valid values:

  • false
  • true
true
Encryptionobject

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

Typestring

The encryption type. Only hls-aes-128 may be returned.

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

The watermarks.

Note If watermarks are truncated or fail to be generated, check whether the text watermarks that you add contain special characters. If the text watermarks contain special characters, you must escape the special characters before you add the watermarks. Alternatively, you can submit a ticket to contact Alibaba Cloud customer service for compatibility processing.
WaterMarkobject
Typestring

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

  • Image
  • Text
Image
ReferPosstring

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

  • TopRight
  • TopLeft
  • BottomRight
  • BottomLeft
TopRight
Dxstring

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

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

    • Valid values: [8,4096].
    • Unit: pixel.
  • A decimal number 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. Excess digits are automatically deleted.
1
Widthstring

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

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

    • Valid values: [8,4096].
    • Unit: pixel.
  • A decimal number 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. Excess digits are automatically deleted.
1080
Heightstring

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

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

    • Valid values: [8,4096].
    • Unit: pixel.
  • A decimal number 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. Excess digits are automatically deleted.
1280
InputFileobject

The watermark input file. PNG images and MOV files are supported.

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

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 corresponding parameter in the watermark template is overwritten. The value can be an integer or a decimal number.

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

    • Valid values: [8,4096].
    • Unit: pixel.
  • A decimal number 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. Excess 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 the DeWatermark section of the Parameter details topic.

{"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 the M3U8NonStandardSupport section of the Parameter details topic.

TSobject

The non-standard support configurations for TS files. The value is a JSON object. For more information, see the TS section of the Parameter details topic.

SizeSupportboolean

Indicates whether the size of the TS file is generated in the output M3U8 video. Valid values:

  • true
  • false
true
Md5Supportboolean

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

  • true
  • false
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.

Note If this parameter is specified in the request, the corresponding configurations in the specified transcoding template are overwritten.
Profilestring

The codec profile of the audio.

Note Valid values if the value of Codec 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.
Note If the video container format is FLV and the audio codec is MP3, the value of this parameter cannot be 32000, 48000, or 96000. If the audio codec is MP3, the value of this parameter cannot be 96000.
32000
Qscalestring

The level of quality control on the audio.

15
Channelsstring

The number of sound channels.

  • If the value of Codec is mp3, the value of this parameter can only be 1 or 2.
  • If the value of Codec 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 method that is used to adjust the volume. Valid values:

  • auto
  • dynamic
  • linear
auto
Levelstring

The volume adjustment range.

  • Unit: decibel.
  • Default value: -20.
-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 no sequence number is specified, the default audio stream is used.
0:a:0
MergeListarray<object>

The configurations for merging clips.

Mergeobject
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 Resource Access Management (RAM) 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 OSS URL of 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 parameters related to the sampling rate are obtained. Valid values:

  • true
  • false
true
UserDatastring

The custom data.

example data
OutSubtitleListarray<object>

The output subtitles.

OutSubtitleobject
Mapstring

The video track. 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 RAM 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 is stored.

oss-cn-hangzhou
Bucketstring

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

example-bucket-****
Successboolean

Indicates whether the job was created. Valid values:

  • true
  • false
true
Messagestring

The error message returned if the job failed to be created. This parameter is not returned if the job was 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, the corresponding parameter in the watermark template is overwritten. Valid values:

  • Image (default)
  • Text
Image
Alphastring

The transparency of the text or image.

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

The details of 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 is stored.

oss-cn-hangzhou
Bucketstring

The name of the OSS bucket in which the input 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 no sequence number is specified, the default video stream is used.
0:a:0
OutputFileobject

The details of the output file.

RoleArnstring

The ARN of the RAM 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 is stored.

oss-cn-hangzhou
Bucketstring

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

example-bucket-****
AmixListarray<object>

The audio tracks that are mixed.

Amixobject
Mapstring

The audio track that is mixed. Format: 0:a:{audio_index}. Example: 0:a:0.

0:a:0
Startstring

The start time. 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 that is mixed as the background music.

  • The URL can be an OSS URL or the string input.
  • A value of input indicates that two audio tracks are mixed in a video.
https://outpu***.oss-cn-shanghai.aliyuncs.com/mp4-to-mp3%5E1571025263578816%40.mp3
Durationstring

The duration of the mixed 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 format 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 start time.

  • 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

The URL of the merging configuration file. Only one of MergeList and MergeConfigUrl takes effect.

  • The configuration file specified by MergeConfigUrl can contain up to 50 clips.
  • MergeConfigUrl indicates 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 the merging configuration file: {"MergeList":[{"MergeURL":"http://exampleBucket****.oss-cn-hangzhou.aliyuncs.com/video_01.mp4"}]}.
`{"MergeList":[{"MergeURL":"http://exampleBucket****.oss-cn-hangzhou.aliyuncs.com/video_01.mp4"}]}
OpeningListarray<object>

The opening parts. The value is a JSON object.

Openingobject
openUrlstring

The OSS URL of the opening part.

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: values in the range of (0,4096), -1, and full.
  • Default value: -1.
  • A value of -1 indicates that the width of the source of the opening part is retained.
  • A value of full indicates that the width of the main part is used for the opening part.
1920
Heightstring

The height of the opening part.

  • Valid values: values in the range of (0,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 corresponding configurations in the specified transcoding template are overwritten.

Webpobject

The transmuxing configurations for WebP.

Loopstring

The loop count.

0
Gifobject

The transmuxing configurations for GIF.

FinalDelaystring

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

0
DitherModestring

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

bayer
Loopstring

The loop count.

0
IsCustomPalettestring

Indicates whether a custom palette is used. Valid values:

  • true
  • false
false
Segmentobject

The segment configuration. 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
TailSlateListarray<object>

The ending parts. The value is a JSON object.

TailSlateobject
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 the audio content of the ending part is merged. Valid values:

  • true
  • false
false
Widthstring

The width of the ending part.

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

The height of the ending part.

  • Valid values: values in the range of (0,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 duration of the transition between the main part and the ending part. A fade transition is used: 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.

ExtSubtitleListarray<object>

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

ExtSubtitleobject
CharEncstring

The character set used by the external subtitle.

  • Valid values: UTF-8, GBK, BIG5, and auto.
  • Default value: auto.
Note If this parameter is set 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 hardcoded 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 is stored.

oss-cn-hangzhou
Bucketstring

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

example-bucket-****
SubtitleListarray<object>

The subtitles.

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

VideoStreamListarray<object>

The video streams.

VideoStreamobject
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 documentation and ISO 639.

eng
CodecLongNamestring

The full name of the codec.

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

avc1
HasBFramesstring

Indicates whether the video stream contains B-frames.

2
Profilestring

The codec profile.

high
StartTimestring

The start time of the video stream.

0.000000
NetworkCostobject

The network bandwidth that was consumed.

PreloadTimestring

The amount of time consumed to preload the video stream.

8
AvgBitratestring

The average bitrate of the video stream.

100
CostBandwidthstring

The maximum bandwidth that was consumed.

10
Darstring

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

16:9
CodecNamestring

The short name of the codec.

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

0x31637661
CodecTimeBasestring

The codec time base.

1001/48000
Levelstring

The codec level.

51
AudioStreamListarray<object>

The audio streams.

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

fltp
ChannelLayoutstring

The output layout of the sound channels.

stereo
Langstring

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

eng
Sampleratestring

The sampling rate of the audio stream.

44100
CodecLongNamestring

The full name of the codec.

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

mp4a
StartTimestring

The start time of the audio stream.

0.000000
CodecNamestring

The short name of the codec.

aac
Durationstring

The duration of the audio stream.

17.159546
CodecTagstring

The tag of the codec.

0x6134706d
CodecTimeBasestring

The codec time base.

1/44100
SubtitleStreamListarray<object>

The subtitle streams.

SubtitleStreamobject
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 documentation 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 is stored.

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

123
ErrorMessagestring

The error message returned if the job failed. This parameter is not returned if the job was 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 was successful.

InvalidParameter.ResourceNotFound
Successboolean

Indicates whether the job was successful. Valid values:

  • true
  • false
true
Codestring

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

InvalidParameter.NullValue
Messagestring

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

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

The request ID.

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