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
Test
RAM authorization
|
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
|
{"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.
|
88c6ca184c0e432bbf5b665e2a15**** |
| Async |
boolean |
No |
Specify whether to run the job asynchronously. Valid values:
|
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.
|
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 |
| 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 |
| 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:
|
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.