All Products
Search
Document Center

ApsaraVideo Media Processing:SubmitMediaInfoJob

Last Updated:Feb 25, 2026

Submits a media information analysis job. After you call this operation, ApsaraVideo Media Processing (MPS) analyzes the media information of the input file and returns the results.

Operation description

  • Ensure that the file is uploaded to OSS before you submit a media information analysis job. Otherwise, the job fails. You can use OSS callback messages to confirm the upload status.

  • Media information analysis jobs support synchronous and asynchronous modes.

  • The asynchronous mode does not guarantee timeliness. After you submit a job, it enters the MPS queue and waits for scheduling. The job may not be created at the time the API returns a response. To retrieve the result, you can poll the QueryMediaInfoJob operation or configure MNS message notifications for the MPS queue. For more information, see and Receive message notifications.

QPS limit

The maximum queries per second (QPS) for a single user is 50. If you exceed this limit, API calls are rate-limited. This may affect your business. Plan your API calls accordingly. For more information, see QPS limits.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mts:SubmitMediaInfoJob

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Input

string

Yes

Job input. For more information, see Input details.

Note
  • In MPS APIs, the Object value must be URL encoded using UTF-8.

  • The region of the OSS bucket must match the region where MPS is deployed.

{"Bucket":"example-bucket","Location":"example-location","Object":"example%2Fexample.flv"}

UserData

string

No

User-defined data. You can use letters, digits, and hyphens (-). It cannot start with a special character. Maximum length: 1024 bytes.

testid-001

PipelineId

string

No

Pipeline ID. For more information, see Terms.

  • You can find or create pipelines in the MPS console>Settings>Pipelines.

  • To receive asynchronous notifications, attach an MNS topic to the pipeline. For more information, see and Receive message notifications.

88c6ca184c0e432bbf5b665e2a15****

Async

boolean

No

Specify whether to run the job asynchronously. Valid values:

  • true: Run the job asynchronously. We recommend this option.

  • false: Run the job synchronously.

true

Config

string

No

Response elements

Element

Type

Description

Example

object

Response parameters.

MediaInfoJob

object

Detailed information about the media information analysis job.

CreationTime

string

Time when the job was submitted.

2014-01-10T12:00:00Z

State

string

Job status.

  • Success: The job succeeded.

  • Fail: The job failed.

  • Analyzing: The job is running.

Analyzing

JobId

string

ID of the media information analysis job.

23ca1d184c0e4341e5b665e2a12****

UserData

string

User-defined data.

testid-001

Code

string

Error code if the job fails.

InvalidParameter.JsonObjectFormatInvalid

Message

string

Error message if the job fails.

The parameter ”*” does not conform to the JSON Object specification

PipelineId

string

Pipeline ID.

88c6ca184c0e432bbf5b665e2a15****

Async

boolean

Whether the job runs asynchronously.

true

Input

object

Job input information.

Object

string

OSS object of the input file.

example.flv

Location

string

Region of the OSS bucket.

example-location

Bucket

string

OSS bucket of the input file.

example-bucket

MNSMessageResult

object

MNS notification result for job completion.

MessageId

string

Message ID if the job succeeds. This parameter is not returned if the job fails.

16f01ad6175e4230ac42bb5182cd****

ErrorMessage

string

Error message if the job fails. This parameter is not returned if the job succeeds.

InvalidParameter.JsonObjectFormatInvalid

ErrorCode

string

Error code if the job fails. This parameter is not returned if the job succeeds.

The parameter \"Input\" does not conform to the JSON Object specification

Properties

object

Media file properties.

Width

string

Video width, in pixels (px).

1920

Height

string

Video height, in pixels (px).

1080

Duration

string

Total duration, in seconds (s).

17.226000

Fps

string

Frame rate.

25

Bitrate

string

Bitrate, in Kbps.

1630.045

FileFormat

string

File format.

QuickTime/MOV

Streams

object

Stream information.

VideoStreamList

object

VideoStream

array<object>

Video stream list. Maximum: 4 items.

array<object>

Response parameters.

Sar

string

Sample aspect ratio.

1:1

Height

string

Video height, in pixels (px).

1080

CodecTagString

string

Codec tag string.

avc1

NetworkCost

object

Network bandwidth consumption.

PreloadTime

string

Preload time.

8

AvgBitrate

string

Average bitrate, in Kbps.

300.34

CostBandwidth

string

Maximum bandwidth consumption.

10

Width

string

Video width, in pixels (px).

1920

Index

string

Video stream index. Identifies the position of the video stream in the media file. Some players let you specify which video stream to start playback from. Others start from index 1 by default.

1

Timebase

string

Time base.

1/24000

AvgFPS

string

Average frame rate.

23.976025

PixFmt

string

Pixel format.

yuv420p

Lang

string

Language.

eng

CodecLongName

string

Codec long name.

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

NumFrames

string

Total number of frames.

100

Rotate

string

Video rotation angle, in degrees.

90

Bitrate

string

Bitrate, in Kbps.

1496.46

HasBFrames

string

Whether B-frames exist. 0 means no. 1 means yes.

0

Profile

string

Codec profile.

High

StartTime

string

Start time.

0.042000

Dar

string

Display aspect ratio. Dar = video width / video height. Use this value to determine whether the video is landscape or portrait.

16:9

CodecName

string

Codec short name. Valid values:

  • h264

  • h265

  • gif

  • webp

h264

Duration

string

Duration, in seconds (s).

17.225542

Fps

string

Frame rate.

25

CodecTag

string

Codec tag.

0x31637661

CodecTimeBase

string

Codec time base.

1001/48000

Level

string

Codec level.

41

ColorRange

string

Color range.

700

ColorTransfer

string

Color transfer.

R255 G83 B170

ColorPrimaries

string

Color primaries.

700

DurationInaccurate

string

DolbyVision

object

Profile

string

Level

string

AudioStreamList

object

AudioStream

array<object>

Audio stream list. Maximum: 4 items.

object

Response parameters.

Timebase

string

Time base.

1/44100

Index

string

Audio stream index. Identifies the position of the audio stream in the media file.

1

SampleFmt

string

Sample format.

fltp

ChannelLayout

string

Channel layout.

stereo

Lang

string

Language.

eng

Samplerate

string

Sample rate, in Hz.

44100

CodecLongName

string

Codec long name.

AAC (Advanced Audio Coding)

Channels

string

Number of sound channels.

2

NumFrames

string

Total number of frames.

123

Bitrate

string

Bitrate, in Kbps.

128.806

CodecTagString

string

Codec tag string.

mp4a

StartTime

string

Start time.

0.000000

CodecName

string

Codec short name. Default value: aac. Valid values:

  • aac

  • mp3

  • mp4

  • ogg

  • flac

aac

Duration

string

Duration, in seconds (s).

17.159546

CodecTag

string

Codec tag.

0x6134706d

CodecTimeBase

string

Codec time base.

1/44100

DurationInaccurate

string

SubtitleStreamList

object

SubtitleStream

array<object>

Subtitle stream list. Maximum: 4 items.

object

Response parameters.

Timebase

string

Time base.

1/1000

Index

string

Subtitle stream index. Identifies the position of the subtitle stream in the media file.

3

StartTime

string

Start time.

0.000000

CodecName

string

Codec short name. Valid values:

  • srt

  • ass

ass

Lang

string

Language.

eng

CodecLongName

string

Codec long name.

ASS (Advanced SSA) subtitle

Duration

string

Duration, in seconds (s).

1370.116000

CodecTag

string

Codec tag.

0x0000

CodecTimeBase

string

Codec time base.

0/1

CodecTagString

string

Codec tag string.

[0][0][0][0]

Format

object

Format information.

StartTime

string

Start time.

0.000000

NumPrograms

string

Total number of program streams.

0

Size

string

File size, in bytes.

3509895

NumStreams

string

Total number of media streams.

2

FormatLongName

string

Container or wrapper format long name.

QuickTime/MOV

Duration

string

Total duration, in seconds (s).

17.226000

Bitrate

string

Total bitrate, in Kbps.

1630.045

FormatName

string

Container or wrapper format short name. For more information, see Parameter details.

mov

Tags

object

FileSize

string

File size, in bytes.

3509895

MD5

string

RequestId

string

Request ID.

62D9BE16-B7D5-550C-A482-7A0F60E09877

Examples

Success response

JSON format

{
  "MediaInfoJob": {
    "CreationTime": "2014-01-10T12:00:00Z",
    "State": "Analyzing",
    "JobId": "23ca1d184c0e4341e5b665e2a12****",
    "UserData": "testid-001",
    "Code": "InvalidParameter.JsonObjectFormatInvalid",
    "Message": "The parameter ”*” does not conform to the JSON Object specification",
    "PipelineId": "88c6ca184c0e432bbf5b665e2a15****",
    "Async": true,
    "Input": {
      "Object": "example.flv",
      "Location": "example-location",
      "Bucket": "example-bucket"
    },
    "MNSMessageResult": {
      "MessageId": "16f01ad6175e4230ac42bb5182cd****",
      "ErrorMessage": "InvalidParameter.JsonObjectFormatInvalid",
      "ErrorCode": "The parameter \\\"Input\\\" does not conform to the JSON Object specification"
    },
    "Properties": {
      "Width": "1920",
      "Height": "1080",
      "Duration": "17.226000",
      "Fps": "25",
      "Bitrate": "1630.045",
      "FileFormat": "QuickTime/MOV",
      "Streams": {
        "VideoStreamList": {
          "VideoStream": [
            {
              "Sar": "1:1",
              "Height": "1080",
              "CodecTagString": "avc1",
              "NetworkCost": {
                "PreloadTime": "8",
                "AvgBitrate": "300.34",
                "CostBandwidth": "10"
              },
              "Width": "1920",
              "Index": "1",
              "Timebase": "1/24000",
              "AvgFPS": "23.976025",
              "PixFmt": "yuv420p",
              "Lang": "eng",
              "CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
              "NumFrames": "100",
              "Rotate": "90",
              "Bitrate": "1496.46",
              "HasBFrames": "0",
              "Profile": "High",
              "StartTime": "0.042000",
              "Dar": "16:9",
              "CodecName": "h264",
              "Duration": "17.225542",
              "Fps": "25",
              "CodecTag": "0x31637661",
              "CodecTimeBase": "1001/48000",
              "Level": "41",
              "ColorRange": "700",
              "ColorTransfer": "R255 G83 B170",
              "ColorPrimaries": "700",
              "DurationInaccurate": "",
              "DolbyVision": {
                "Profile": "",
                "Level": ""
              }
            }
          ]
        },
        "AudioStreamList": {
          "AudioStream": [
            {
              "Timebase": "1/44100",
              "Index": "1",
              "SampleFmt": "fltp",
              "ChannelLayout": "stereo",
              "Lang": "eng",
              "Samplerate": "44100",
              "CodecLongName": "AAC (Advanced Audio Coding)",
              "Channels": "2",
              "NumFrames": "123",
              "Bitrate": "128.806",
              "CodecTagString": "mp4a",
              "StartTime": "0.000000",
              "CodecName": "aac",
              "Duration": "17.159546",
              "CodecTag": "0x6134706d",
              "CodecTimeBase": "1/44100",
              "DurationInaccurate": ""
            }
          ]
        },
        "SubtitleStreamList": {
          "SubtitleStream": [
            {
              "Timebase": "1/1000",
              "Index": "3",
              "StartTime": "0.000000",
              "CodecName": "ass",
              "Lang": "eng",
              "CodecLongName": "ASS (Advanced SSA) subtitle",
              "Duration": "1370.116000",
              "CodecTag": "0x0000",
              "CodecTimeBase": "0/1",
              "CodecTagString": "[0][0][0][0]"
            }
          ]
        }
      },
      "Format": {
        "StartTime": "0.000000",
        "NumPrograms": "0",
        "Size": "3509895",
        "NumStreams": "2",
        "FormatLongName": "QuickTime/MOV",
        "Duration": "17.226000",
        "Bitrate": "1630.045",
        "FormatName": "mov",
        "Tags": {
          "test": "test",
          "test2": 1
        }
      },
      "FileSize": "3509895",
      "MD5": ""
    }
  },
  "RequestId": "62D9BE16-B7D5-550C-A482-7A0F60E09877"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.