Submits a preset template analysis job.
Operation description
- After you call the SubmitAnalysisJob operation to submit a preset template analysis job, ApsaraVideo Media Processing (MPS) intelligently analyzes the input file of the job and recommends a suitable preset template. You can call the QueryAnalysisJobList operation to query the analysis result or enable asynchronous notifications to receive the analysis result.
- The analysis result is retained only for two weeks after it is generated. The analysis result is deleted after two weeks. If you use the recommended preset template in a transcoding job after two weeks, the job fails, and the
AnalysisResultNotFound
error code is returned.
QPS limit
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 limit.
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:SubmitAnalysisJob | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Input | string | Yes | The input information about the preset template analysis job to be submitted. The value must be a JSON object. You must log on to the Object Storage Service (OSS) console to grant the read permissions on the specified OSS bucket to MPS. For more information, see the "Input" section of the Parameter details topic. Note
The OSS bucket must reside in the same region as your MPS service.
| {"Bucket":"example-bucket","Location":"oss-cn-hangzhou","Object":"example.flv"} |
AnalysisConfig | string | No | The job configurations. Set this parameter as required. For more information, see the "AnalysisConfig" section of the Parameter details topic. | {"QualityControl":{"RateQuality":25,"MethodStreaming":"network"}} |
UserData | string | No | The custom data. The custom data can contain letters, digits, and hyphens (-), and can be up to 1,024 bytes in length. The custom data cannot start with a special character. | testid-001 |
PipelineId | string | Yes | The ID of the MPS queue to which the job is submitted. To view the ID of the MPS queue, log on to the MPS console and choose Global Settings > Pipelines in the left-side navigation pane. If you want to enable asynchronous notifications, make sure that the MPS queue is bound to a Message Service (MNS) topic. | bb558c1cc25b45309aab5be44d19**** |
Priority | string | No | The priority of the job in the MPS queue to which the job is submitted.
| 10 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "B52658D4-07AB-43CD-82B0-210958A65E23",
"AnalysisJob": {
"CreationTime": "2014-01-10T12:00:00Z",
"Percent": 100,
"State": "Success",
"AnalysisConfig": {
"QualityControl": {
"MethodStreaming": "network",
"RateQuality": "50"
},
"PropertiesControl": {
"Deinterlace": "Force",
"Crop": {
"Top": "8",
"Width": "8",
"Height": "8",
"Left": "8",
"Mode": "Auto"
}
}
},
"Message": "The resource operated \\\"PipelineId\\\" cannot be found",
"Priority": "10",
"MNSMessageResult": {
"MessageId": "3ca84a39a9024f19853b21be9cf9****",
"ErrorMessage": "The resource operated \\\"PipelineId\\\" cannot be found",
"ErrorCode": "InvalidParameter.ResourceNotFound"
},
"TemplateList": {
"Template": [
{
"Video": {
"Bufsize": "5000",
"Degrain": "5",
"BitrateBnd": {
"Max": "20",
"Min": "10"
},
"PixFmt": "yuvj420p",
"Codec": "H.264",
"Height": "1880",
"Qscale": "15",
"Bitrate": "10",
"Maxrate": "10",
"Profile": "baseline",
"Crf": "27",
"Gop": "1",
"Width": "1990",
"Fps": "60",
"Preset": "medium",
"ScanMode": "progressive"
},
"TransConfig": {
"TransMode": "onepass"
},
"State": "Normal",
"MuxConfig": {
"Gif": {
"FinalDelay": "0",
"Loop": "0"
},
"Segment": {
"Duration": "60"
}
},
"Name": "FLV-UD",
"Audio": {
"Profile": "aac_low",
"Codec": "mp3",
"Samplerate": "32000",
"Qscale": "10",
"Channels": "1",
"Bitrate": "8"
},
"Id": "S00000000-00****",
"Container": {
"Format": "flv"
}
}
]
},
"UserData": "testid-001",
"Code": "InvalidParameter.ResourceNotFound",
"InputFile": {
"Object": "example.flv",
"Location": "oss-cn-hangzhou",
"Bucket": "example-bucket"
},
"PipelineId": "bb558c1cc25b45309aab5be44d19****",
"Id": "57f6aa3f84824309bcba67231b40****"
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|