All Products
Search
Document Center

ApsaraVideo Media Processing:SubmitAnalysisJob

Last Updated:Mar 03, 2024

Submits a preset template analysis job.

Operation description

The ID of the MPS queue to which the job is added. To view the MPS queue ID, 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 queue is bound to a Message Service (MNS) topic.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InputstringYes

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

  • Valid values: 1 to 10. A value of 10 indicates the highest priority.
  • Default value: 6.
{"Bucket":"example-bucket","Location":"oss-cn-hangzhou","Object":"example.flv"}
AnalysisConfigstringNo

The ID of the request.

{"QualityControl":{"RateQuality":25,"MethodStreaming":"network"}}
UserDatastringNo

The information about the preset template analysis job that was submitted.

testid-001
PipelineIdstringYes

The time when the job was created.

bb558c1cc25b45309aab5be44d19****
PrioritystringNo

The transcoding progress.

10

Response parameters

ParameterTypeDescriptionExample
object

The status of the job. Valid values:

  • Submitted: The job has been submitted.
  • Analyzing: The job is being run.
  • Success: The job is successful.
  • Fail: The job fails.
RequestIdstring

The job configuration.

B52658D4-07AB-43CD-82B0-210958A65E23
AnalysisJobobject

The quality control on the job output.

CreationTimestring

The playback mode. Valid values:

  • network: online playback
  • local: playback on on-premises devices
  • Default value: network.
2014-01-10T12:00:00Z
Percentlong

The quality level of the job output.

100
Statestring

The control on the attributes of the job output.

Success
AnalysisConfigobject

Indicates whether deinterlacing was forced to run. Valid values:

  • Auto: Deinterlacing was automatically run.
  • Force: Deinterlacing was forced to run.
  • None: Deinterlacing was forced not to run.
QualityControlobject

The cropping configuration of video images.

MethodStreamingstring

The top margin that was cropped out.

Note This parameter is invalid if the Mode parameter is set to Auto or None.
network
RateQualitystring

The width of the video after the margins were cropped out.

Note This parameter is invalid if the Mode parameter is set to Auto or None.
50
PropertiesControlobject

The height of the video after the margins were cropped out.

Note This parameter is invalid if the Mode parameter is set to Auto or None.
Deinterlacestring

The left margin that was cropped out.

Note This parameter is invalid if the Mode parameter is set to Auto or None.
Force
Cropobject

The cropping mode. Valid values: Valid values:

  • Auto: Cropping was automatically run. This is the default value.
  • Force: Cropping was forced to run.
  • None: Cropping was forced not to run.
Topstring

The error message returned when the job fails.

8
Widthstring

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

  • Valid values: 1 to 10. A value of 10 indicates the highest priority.
  • Default value: 10.
8
Heightstring

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

8
Leftstring

The ID of the success message. This parameter is not returned if the job fails.

8
Modestring

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

Auto
Messagestring

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

The resource operated \"PipelineId\" cannot be found
Prioritystring

The list of matched preset templates.

10
MNSMessageResultobject

The video codec configuration.

MessageIdstring

The size of the buffer.

  • Unit: KB.
  • Default value: 6000.
3ca84a39a9024f19853b21be9cf9****
ErrorMessagestring

The level of the independent denoising algorithm.

The resource operated \"PipelineId\" cannot be found
ErrorCodestring

The average bitrate range of the video.

InvalidParameter.ResourceNotFound
TemplateListobject []

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

Videoobject

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

Bufsizestring

The video codec format. Default value: H.264.

5000
Degrainstring

The height of the video.

  • Unit: pixel.
  • Default value: the original height of the video.
5
BitrateBndobject

The level of quality control on the video.

Maxstring

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

20
Minstring

The maximum video bitrate. Unit: Kbit/s.

10
PixFmtstring

The codec profile. Valid values:

  • baseline: applicable to mobile devices.
  • main: applicable to standard-definition devices.
  • high: applicable to high-definition devices.
  • Default value: high.
yuvj420p
Codecstring

The constant rate factor, which is the default quality control setting.

  • Default value when the Codec parameter is set to H.264: 23. Default value when the Codec parameter is set to H.265: 26.
  • If this parameter is returned, the setting of the Bitrate parameter is invalid.
H.264
Heightstring

The maximum number of frames between two keyframes. Default value: 250.

1880
Qscalestring

The width of the video.

  • Unit: pixel.
  • Default value: the original width of the video.
15
Bitratestring

The frame rate.

  • The value is 60 if the frame rate of the input file exceeds 60.
  • Default value: the frame rate of the input file.
10
Maxratestring

The preset video algorithm. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

10
Profilestring

The scan mode. Valid values:

  • interlaced: An interlaced scan was performed.
  • progressive: A progressive scan was performed.
baseline
Crfstring

The general transcoding configuration.

27
Gopstring

The transcoding mode. Valid values: onepass, twopass, and CBR. Default value: onepass.

1
Widthstring

The status of the template. Valid values:

  • Normal: The template is in the normal state.
  • Deleted: The template is deleted.
1990
Fpsstring

The transmuxing configuration.

60
Presetstring

The GIF format.

medium
ScanModestring

The interval between two consecutive loops for the GIF format. Unit: 0.01s. For example, a value of 500 indicates 5 seconds.

progressive
TransConfigobject

The number of loops for the GIF or WebP format. Default value: 0.

TransModestring

The segment configuration.

onepass
Statestring

The length of the segment. Unit: seconds.

Normal
MuxConfigobject

The name of the template.

Gifobject

The audio codec configuration.

FinalDelaystring

The codec profile of the audio file. Valid values when the Codec parameter is set to aac: aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

0
Loopstring

The audio codec format. Default value: aac.

0
Segmentobject

The sampling rate.

  • Unit: Hz.
  • Default value: 44100.
Durationstring

The level of quality control on the audio.

60
Namestring

The number of sound channels. Default value: 2.

FLV-UD
Audioobject

The audio bitrate of the output file.

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

The ID of the transcoding template.

aac_low
Codecstring

The container configuration.

mp3
Sampleratestring

The container format.

32000
Qscalestring

The custom data.

10
Channelsstring

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

1
Bitratestring

The information about the job input.

8
Idstring

The name of the input file uploaded to the OSS bucket.

S00000000-00****
Containerobject

The ID of the OSS region.

Formatstring

The name of the OSS bucket to which the input file is uploaded.

flv
UserDatastring

The ID of the MPS queue to which the job is added.

testid-001
Codestring

The ID of the template analysis job.

InvalidParameter.ResourceNotFound
InputFileobject
  • 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 since it is generated. It 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. 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.

Objectstring

The scan mode. Valid values:

  • interlaced: An interlaced scan was performed.
  • progressive: A progressive scan was performed.
example.flv
Locationstring

The length of the segment. Unit: seconds.

oss-cn-hangzhou
Bucketstring

The transcoding progress.

example-bucket
PipelineIdstring

The preset video algorithm. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

bb558c1cc25b45309aab5be44d19****
Idstring

The level of the independent denoising algorithm.

57f6aa3f84824309bcba67231b40****

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
No change history