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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
mts:SubmitJobs |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Input | string | Yes | The information about the input file. For more information, see the "Input" section of the Parameter details topic. Note
| a/b/c/test-cn.srt |
Outputs | string | Yes | The job output configurations. For more information, see the "Output" section of the Parameter details topic.
| [{"OutputObject":"exampleOutput.mp4","TemplateId":"6181666213ab41b9bc21da8ff5ff****","WaterMarks":[{"InputFile":{"Bucket":"exampleBucket","Location":"oss-cn-hangzhou","Object":"image_01.png"},"WaterMarkTemplateId":"9b772ce2740d4d55876d8b542d47****"}],"UserData":"testid-001"}] |
OutputBucket | string | Yes | The name of the OSS bucket that stores the output file.
| exampleBucket |
OutputLocation | string | No | The region in which the OSS bucket that stores the output file resides.
| oss-cn-hangzhou |
PipelineId | string | Yes | The ID of the MPS queue. For more information, see Terms .
| dd3dae411e704030b921e52698e5**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 time | Summary of changes | Operation |
---|