Queries media information analysis jobs.
Operation description
In asynchronous mode, media information can be queried only after the Message Service (MNS) callback for Submit a media information analysis job succeeds. If the media information cannot be queried for an extended period, the submitted media information analysis job may have failed.
You can query up to 10 media information analysis jobs at a time by calling this operation.
By default, the returned results are sorted in descending order of CreationTime.
Rate limit
The rate limit for this operation is 100 queries per second (QPS) per user. If the limit is exceeded, API calls are throttled, which may affect your services. Make API calls at a reasonable rate. For more information, see Rate limit.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mts:QueryMediaInfoJobList |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| MediaInfoJobIds |
string |
Yes |
The IDs of the media information analysis jobs.
Note
If you do not specify this parameter, the InvalidParameter error code is returned. |
23ca1d184c0e4341e5b665e2a12**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NonExistMediaInfoJobIds |
object |
||
| String |
array |
The non-existent media information analysis jobs. |
|
|
string |
The list of IDs of non-existent media information analysis jobs. This parameter is not returned if no data is available. |
11ce1d184c0e4341e5b665e2a12**** |
|
| RequestId |
string |
The request ID. |
46A04AA5-B119-41BB-B750-7C5327AC3E7A |
| MediaInfoJobList |
object |
||
| MediaInfoJob |
array<object> |
The list of media information analysis jobs. |
|
|
array<object> |
|||
| CreationTime |
string |
The time when the job was added. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. |
2014-01-10T12:00:00Z |
| State |
string |
The job status. Valid values:
|
Success |
| JobId |
string |
The ID of the media information analysis job. |
23ca1d184c0e4341e5b665e2a12**** |
| UserData |
string |
The custom user data. |
testid-001 |
| Code |
string |
The error code returned when the media information analysis fails. |
InvalidParameter.JsonObjectFormatInvalid |
| Message |
string |
The error message returned when the media information analysis fails. |
The parameter ”*” does not conform to the JSON Object specification |
| PipelineId |
string |
The ID of the MPS queue. |
88c6ca184c0e432bbf5b665e2a15**** |
| Async |
boolean |
Indicates whether the job is asynchronous. |
true |
| Input |
object |
The job input. |
|
| Object |
string |
The OSS object. |
example.mp4 |
| Location |
string |
The OSS region. |
oss-cn-hangzhou |
| Bucket |
string |
The OSS bucket of the input file. |
example-bucket |
| MNSMessageResult |
object |
The result of the Message Service (MNS) message sent to notify the user that the job is complete. |
|
| MessageId |
string |
The message ID returned when the notification is successful. This parameter is not returned if the notification fails. |
123 |
| ErrorMessage |
string |
The error message returned when the notification fails. This parameter is not returned if the notification is successful. |
The parameter \"Input\" does not conform to the JSON Object specification |
| ErrorCode |
string |
The error code returned when the notification fails. This parameter is not returned if the notification is successful. |
InvalidParameter.JsonObjectFormatInvalid |
| Properties |
object |
The detailed media properties. For more information, see AliyunProperties data type. |
|
| Width |
string |
The width of the video in pixels. |
1280 |
| Height |
string |
The height of the video in pixels. |
720 |
| Duration |
string |
The duration. |
17.226000 |
| Fps |
string |
The frame rate. |
25 |
| Bitrate |
string |
The bitrate. |
1630.045 |
| FileFormat |
string |
The file format. |
QuickTime/MOV |
| Streams |
object |
The stream information. |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
The list of video stream information. |
|
|
array<object> |
|||
| Sar |
string |
The sample aspect ratio. |
1:1 |
| Height |
string |
The height of the video resolution. |
1080 |
| CodecTagString |
string |
The encoding format mark text. |
[0][0][0][0] |
| NetworkCost |
object |
The network bandwidth consumption. |
|
| PreloadTime |
string |
The preload time. |
8 |
| AvgBitrate |
string |
The average bitrate. |
300.34 |
| CostBandwidth |
string |
The maximum consumed bandwidth. |
10 |
| Width |
string |
The width of the video resolution. |
1920 |
| Index |
string |
The index of the video stream, which identifies the position of the video stream in the entire media stream. |
1 |
| Timebase |
string |
The time base. |
1/1000 |
| AvgFPS |
string |
The average frame rate. |
23.976025 |
| PixFmt |
string |
The pixel format. |
yuv420p |
| Lang |
string |
The language. |
eng |
| CodecLongName |
string |
The long name of the encoding format. |
H.264/AVC/MPEG-4 AVC/MPEG-4 part 10 |
| NumFrames |
string |
The total number of frames. |
100 |
| Rotate |
string |
The video rotation angle. |
180 |
| Bitrate |
string |
The bitrate. |
30541090 |
| HasBFrames |
string |
Indicates whether the video contains B-frames. A value of 0 indicates that the video does not contain B-frames, and a value of 1 indicates that the video contains B-frames. |
0 |
| Profile |
string |
The encoding profile. |
Main |
| StartTime |
string |
The start time, in seconds. |
0.042000 |
| Dar |
string |
The display aspect ratio. |
16:9 |
| CodecName |
string |
The short name of the encoding format. Valid values:
|
h264 |
| Duration |
string |
The duration. |
100 |
| Fps |
string |
The frame rate. |
25 |
| CodecTag |
string |
The encoding format mark. |
0x0000 |
| CodecTimeBase |
string |
The codec time base. |
1001/48000 |
| Level |
string |
The encoding level. |
41 |
| ColorRange |
string |
The color range. |
700 |
| ColorTransfer |
string |
The color transfer. |
R255 G83 B170 |
| ColorPrimaries |
string |
The color primaries. |
700 |
| DurationInaccurate |
string |
true |
|
| DolbyVision |
object |
||
| Profile |
string |
8 |
|
| Level |
string |
5 |
|
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
The list of audio stream information. |
|
|
object |
|||
| Timebase |
string |
The time base. |
1/1000 |
| Index |
string |
The index of the audio stream, which identifies the position of the audio stream in the entire media stream. |
1 |
| SampleFmt |
string |
The sample format. |
fltp |
| ChannelLayout |
string |
The channel layout. |
5.1(side) |
| Lang |
string |
The language. For more information, see FFmpeg language definitions. |
eng |
| Samplerate |
string |
The sample rate. |
48000 |
| CodecLongName |
string |
The long name of the encoding format. |
DCA (DTS Coherent Acoustics) |
| Channels |
string |
The number of output channels. |
2 |
| NumFrames |
string |
The total number of frames. |
123 |
| Bitrate |
string |
The bitrate. |
1536000 |
| CodecTagString |
string |
The encoding format mark text. |
[0][0][0][0] |
| StartTime |
string |
The start time, in seconds. |
0.042000 |
| CodecName |
string |
The short name of the encoding format. Valid values:
|
acc |
| Duration |
string |
The duration. |
123 |
| CodecTag |
string |
The encoding format mark. |
0x0000 |
| CodecTimeBase |
string |
The codec time base. |
1/48000 |
| DurationInaccurate |
string |
true |
|
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
The list of caption stream information. |
|
|
object |
|||
| Timebase |
string |
The time base. |
1/1000 |
| Index |
string |
The index of the caption stream, which identifies the position of the caption stream in the entire media stream. |
3 |
| StartTime |
string |
The start time, in seconds. |
0.000000 |
| CodecName |
string |
The short name of the encoding format. Valid values:
|
ass |
| Lang |
string |
The language. |
eng |
| CodecLongName |
string |
The long name of the encoding format. |
ASS (Advanced SSA) subtitle |
| Duration |
string |
The duration in seconds. |
1370.116000 |
| CodecTag |
string |
The encoding format tag. |
0x0000 |
| CodecTimeBase |
string |
The codec time base. |
0/1 |
| CodecTagString |
string |
The encoding format tag string. |
[0][0][0][0] |
| Format |
object |
The format information. |
|
| StartTime |
string |
The start time, in seconds. |
0.042000 |
| NumPrograms |
string |
The total number of program streams. |
2 |
| Size |
string |
The file size. |
3509895 |
| NumStreams |
string |
The total number of media streams. |
1 |
| FormatLongName |
string |
The long name of the container and encapsulation format. |
QuickTime/MOV |
| Duration |
string |
The total duration. |
17.226000 |
| Bitrate |
string |
The total bitrate. |
1630.045 |
| FormatName |
string |
The short name of the container and encapsulation format. |
mov |
| Tags |
object |
The tag information of the media file format. |
|
| FileSize |
string |
The file size. |
3509895 |
| FileMd5 |
string |
The MD5 checksum of the media file. |
ad195fd1317a761d4425232867759d1e |
Callback message format
When the execution status of a media information analysis job changes, MPS sends a message to the user-specified queue (for more information about how to specify a callback queue, see UpdatePipeline). The message body is a JSON string that contains the following fields:
{
"Type": "MediaInfo",
"State": "Success",
"JobId": "bb558c1cc25b45309aab5be44d19****",
"UserData": "{\"key\":\"value\"}",
"RequestId": "B52658D4-07AB-43CD-82B0-210958A6****"
}
| Name | Type | Description |
| Type | String | The fixed string "MediaInfo", which indicates a media information analysis job. |
| JobId | String | The unique ID of the job. |
| State | String | The current status of the job. The value is the same as the State value in QueryMediaInfoJobList. |
| UserData | String | The UserData passed by the user in SubmitMediaInfoJob. |
Examples
Success response
JSON format
{
"NonExistMediaInfoJobIds": {
"String": [
"11ce1d184c0e4341e5b665e2a12****"
]
},
"RequestId": "46A04AA5-B119-41BB-B750-7C5327AC3E7A",
"MediaInfoJobList": {
"MediaInfoJob": [
{
"CreationTime": "2014-01-10T12:00:00Z",
"State": "Success",
"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.mp4",
"Location": "oss-cn-hangzhou",
"Bucket": "example-bucket"
},
"MNSMessageResult": {
"MessageId": "123",
"ErrorMessage": "The parameter \\\"Input\\\" does not conform to the JSON Object specification",
"ErrorCode": "InvalidParameter.JsonObjectFormatInvalid"
},
"Properties": {
"Width": "1280",
"Height": "720",
"Duration": "17.226000",
"Fps": "25",
"Bitrate": "1630.045",
"FileFormat": "QuickTime/MOV",
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Sar": "1:1",
"Height": "1080",
"CodecTagString": "[0][0][0][0]",
"NetworkCost": {
"PreloadTime": "8",
"AvgBitrate": "300.34",
"CostBandwidth": "10"
},
"Width": "1920",
"Index": "1",
"Timebase": "1/1000",
"AvgFPS": "23.976025",
"PixFmt": "yuv420p",
"Lang": "eng",
"CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
"NumFrames": "100",
"Rotate": "180",
"Bitrate": "30541090",
"HasBFrames": "0",
"Profile": "Main",
"StartTime": "0.042000",
"Dar": "16:9",
"CodecName": "h264",
"Duration": "100",
"Fps": "25",
"CodecTag": "0x0000",
"CodecTimeBase": "1001/48000",
"Level": "41",
"ColorRange": "700",
"ColorTransfer": "R255 G83 B170",
"ColorPrimaries": "700",
"DurationInaccurate": "true",
"DolbyVision": {
"Profile": "8",
"Level": "5"
}
}
]
},
"AudioStreamList": {
"AudioStream": [
{
"Timebase": "1/1000",
"Index": "1",
"SampleFmt": "fltp",
"ChannelLayout": "5.1(side)",
"Lang": "eng",
"Samplerate": "48000",
"CodecLongName": "DCA (DTS Coherent Acoustics)",
"Channels": "2",
"NumFrames": "123",
"Bitrate": "1536000",
"CodecTagString": "[0][0][0][0]",
"StartTime": "0.042000",
"CodecName": "acc",
"Duration": "123",
"CodecTag": "0x0000",
"CodecTimeBase": "1/48000",
"DurationInaccurate": "true"
}
]
},
"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.042000",
"NumPrograms": "2",
"Size": "3509895",
"NumStreams": "1",
"FormatLongName": "QuickTime/MOV",
"Duration": "17.226000",
"Bitrate": "1630.045",
"FormatName": "mov",
"Tags": {
"test": "test",
"test2": 1
}
},
"FileSize": "3509895",
"FileMd5": "ad195fd1317a761d4425232867759d1e"
}
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.