Submits a media information analysis job. After this operation is called, ApsaraVideo Media Processing (MPS) analyzes the input file and returns its media information.
Operation description
Make sure that the file is successfully uploaded to OSS before you submit a media information analysis job. Otherwise, the execution fails. You can verify the file upload status by configuring OSS callback messages.
Media information analysis jobs support synchronous and asynchronous modes.
The asynchronous mode does not guarantee timeliness. After a media information analysis job is submitted, the task is added to an MPS queue for scheduling and execution. Therefore, the job may not be generated when the API response is returned. After the execution is complete, you must call the Query media information analysis jobs operation to poll the execution results, or bind an MNS queue to the MPS queue to receive the execution results. For more information, see Receive message notifications.
QPS limits
The QPS limit for a single user is 50 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Make API calls at a reasonable frequency. 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 |
The job input. For more information, see Input details. Note
|
{"Bucket":"example-bucket","Location":"example-location","Object":"example%2Fexample.flv"} |
| UserData |
string |
No |
The custom user data. The value can contain letters, digits, and hyphens (-), and cannot start with a special character. The maximum length is 1,024 bytes. |
testid-001 |
| PipelineId |
string |
No |
The ID of the MPS queue. For more information, see Terms.
|
88c6ca184c0e432bbf5b665e2a15**** |
| Async |
boolean |
No |
Specifies whether to submit an asynchronous job. Valid values:
|
true |
| Config |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| MediaInfoJob |
object |
The detailed information about the media information analysis job. |
|
| 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 status of the job. Valid values:
|
Analyzing |
| 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 job fails. |
InvalidParameter.JsonObjectFormatInvalid |
| Message |
string |
The error message returned when the media information analysis job fails. |
The parameter ”*” does not conform to the JSON Object specification |
| PipelineId |
string |
The ID of the MPS queue. |
88c6ca184c0e432bbf5b665e2a15**** |
| Async |
boolean |
Specifies whether the job is asynchronous. |
true |
| Input |
object |
The job input information. |
|
| Object |
string |
The OSS object of the input file. |
example.flv |
| Location |
string |
The region where the OSS bucket that stores the input file resides. |
example-location |
| Bucket |
string |
The OSS bucket that stores the input file. |
example-bucket |
| MNSMessageResult |
object |
The result of the Message Service (MNS) notification sent to notify the user of the job completion. |
|
| MessageId |
string |
The ID of the message if the job succeeds. This parameter is not returned if the job fails. |
16f01ad6175e4230ac42bb5182cd**** |
| ErrorMessage |
string |
The error message if the job fails. This parameter is not returned if the job succeeds. |
InvalidParameter.JsonObjectFormatInvalid |
| ErrorCode |
string |
The 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 |
The properties of the media file. |
|
| Width |
string |
The width of the video. Unit: px. |
1920 |
| Height |
string |
The height of the video. Unit: px. |
1080 |
| Duration |
string |
The total duration. Unit: seconds. |
17.226000 |
| Fps |
string |
The frame rate. |
25 |
| Bitrate |
string |
The bitrate. Unit: Kbps. |
1630.045 |
| FileFormat |
string |
The file format. |
QuickTime/MOV |
| Streams |
object |
The stream information. |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
The list of video streams. The list contains up to four elements. |
|
|
array<object> |
The response parameters. |
||
| Sar |
string |
The sample aspect ratio of the encoded signal. |
1:1 |
| Height |
string |
The height of the video. Unit: px. |
1080 |
| CodecTagString |
string |
The encoding format mark text. |
avc1 |
| NetworkCost |
object |
The network bandwidth consumption. |
|
| PreloadTime |
string |
The preload time. |
8 |
| AvgBitrate |
string |
The average bitrate. Unit: Kbps. |
300.34 |
| CostBandwidth |
string |
The maximum consumed bandwidth. |
10 |
| Width |
string |
The width of the video. Unit: px. |
1920 |
| Index |
string |
The index of the video stream. This parameter identifies the position of the video stream in all media streams. Some playback platforms allow you to specify the index of the video stream to start playback, while others start playback from index 1 by default. |
1 |
| Timebase |
string |
The time base. |
1/24000 |
| 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 rotation angle of the video. |
90 |
| Bitrate |
string |
The bitrate. Unit: Kbps. |
1496.46 |
| HasBFrames |
string |
Specifies whether the video contains B-frames. A value of 0 indicates that the video does not contain B-frames. A value of 1 indicates that the video contains B-frames. |
0 |
| Profile |
string |
The encoding profile. |
High |
| StartTime |
string |
The start time. Unit: seconds. |
0.042000 |
| Dar |
string |
The display aspect ratio (DAR). DAR = Video width / Video height. This parameter can be used to determine whether the video is in landscape or portrait mode. |
16:9 |
| CodecName |
string |
The short name of the encoding format. Valid values:
|
h264 |
| Duration |
string |
The duration. Unit: seconds. |
17.225542 |
| Fps |
string |
The frame rate. |
25 |
| CodecTag |
string |
The encoding format mark. |
0x31637661 |
| 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 |
||
| DolbyVision |
object |
||
| Profile |
string |
||
| Level |
string |
||
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
The list of audio streams. The list contains up to four elements. |
|
|
object |
The response parameters. |
||
| Timebase |
string |
The time base. |
1/44100 |
| Index |
string |
The index of the audio stream. This parameter identifies the position of the audio stream in all media streams. |
1 |
| SampleFmt |
string |
The sample format. |
fltp |
| ChannelLayout |
string |
The channel layout. |
stereo |
| Lang |
string |
The language. |
eng |
| Samplerate |
string |
The sample rate. Unit: Hz. |
44100 |
| CodecLongName |
string |
The long name of the encoding format. |
AAC (Advanced Audio Coding) |
| Channels |
string |
The number of channels. |
2 |
| NumFrames |
string |
The total number of frames. |
123 |
| Bitrate |
string |
The bitrate. Unit: Kbps. |
128.806 |
| CodecTagString |
string |
The encoding format mark text. |
mp4a |
| StartTime |
string |
The start time. Unit: seconds. |
0.000000 |
| CodecName |
string |
The short name of the encoding format. Default value: acc. Valid values:
|
aac |
| Duration |
string |
The duration. Unit: seconds. |
17.159546 |
| CodecTag |
string |
The encoding format mark. |
0x6134706d |
| CodecTimeBase |
string |
The codec time base. |
1/44100 |
| DurationInaccurate |
string |
||
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
The list of caption streams. The list contains up to four elements. |
|
|
object |
The response parameters. |
||
| Timebase |
string |
The time base. |
1/1000 |
| Index |
string |
The index of the caption stream. This parameter identifies the position of the caption stream in all media streams. |
3 |
| StartTime |
string |
The start time. Unit: 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. Unit: seconds. |
1370.116000 |
| CodecTag |
string |
The tag of the encoding format. |
0x0000 |
| CodecTimeBase |
string |
The codec time base. |
0/1 |
| CodecTagString |
string |
The tag string of the encoding format. |
[0][0][0][0] |
| Format |
object |
The format information. |
|
| StartTime |
string |
The start time. Unit: seconds. |
0.000000 |
| NumPrograms |
string |
The total number of program streams. |
0 |
| Size |
string |
The size of the file, in bytes. |
3509895 |
| NumStreams |
string |
The total number of media streams. |
2 |
| FormatLongName |
string |
The long name of the container or encapsulation format. |
QuickTime/MOV |
| Duration |
string |
The total duration. Unit: seconds. |
17.226000 |
| Bitrate |
string |
The total bitrate, in Kbit/s. |
1630.045 |
| FormatName |
string |
The short name of the container or encapsulation format. For more information, see Parameter details. |
mov |
| Tags |
object |
The tag information of the media file format. |
|
| FileSize |
string |
The size of the file, in bytes. |
3509895 |
| MD5 |
string |
The MD5 checksum of the media file. |
ad195fd1317a761d4425232867759d1e |
| RequestId |
string |
The 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": "ad195fd1317a761d4425232867759d1e"
}
},
"RequestId": "62D9BE16-B7D5-550C-A482-7A0F60E09877"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.