Creates an asynchronous job to retrieve media information.
Operation description
This is an asynchronous API. When you submit a task, the API returns a task ID and queues the task for background processing. You can retrieve the final result via a callback or by querying media information tasks.
Use this API to perform media analysis on input files. It is ideal for use cases that are not time-sensitive or that require high concurrency.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitMediaInfoJob |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
No |
The job name. |
job-name |
| Input |
object |
Yes |
The input for the job. |
job-name |
| Type |
string |
Yes |
The type of the input media.
|
OSS |
| Media |
string |
Yes |
The source of the input media:
Note
You must first add the OSS bucket specified in the URL to Intelligent Media Management Service (IMS) by using Storage Management.
|
oss://bucket/path/to/video.mp4 |
| UserData |
string |
No |
The custom user data. |
user-data |
| ScheduleConfig |
object |
No |
The scheduling settings. |
user-data |
| PipelineId |
string |
No |
The pipeline ID. |
e37ebee5d98b4781897f6086e89f9c56 |
| Priority |
integer |
No |
The job priority. A higher value means a higher priority. Valid values range from 1 to 10. |
5 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
31E30781-9495-5E2D-A84D-759B0A01E262 |
| MediaInfoJob |
object |
The media information job. |
|
| Name |
string |
The job name. |
job-name |
| TriggerSource |
string |
The source of the job. Valid values:
|
API |
| JobId |
string |
The job ID. |
ab4802364a2e49208c99efab82dfa8e8 |
| Input |
object |
The job input. |
|
| Type |
string |
The type of input media. Valid values:
|
OSS |
| Media |
string |
The value of the media object. This value depends on the
|
oss://bucket/path/to/video.mp4 |
| Async |
boolean |
Indicates whether to process the job asynchronously. |
true |
| UserData |
string |
The user data. |
user-data |
| ScheduleConfig |
object |
The scheduling configuration. |
|
| PipelineId |
string |
The pipeline ID. |
e37ebee5d98b4781897f6086e89f9c56 |
| Priority |
integer |
The job priority. Higher values indicate higher priority. Valid values range from 1 to 10. |
5 |
| Status |
string |
The job status. Valid values:
|
Init |
| SubmitResultJson |
object |
The job submission details. |
{} |
| MediaInfoProperty |
object |
Details of the media information. |
|
| FileBasicInfo |
object |
Basic information about the file. |
|
| MediaId |
string |
The media ID. |
2b36bd19c13f4145b094c0cad80dbce5 |
| FileName |
string |
The file name. |
file.m3u8 |
| FileStatus |
string |
The file status. |
Normal |
| FileType |
string |
The file type. |
source_file |
| FileSize |
string |
The file size, in bytes. |
31737 |
| FileUrl |
string |
The URL of the file. |
http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8 |
| Region |
string |
The region where the file is stored. |
cn-shanghai |
| FormatName |
string |
The name of the video format. |
hls,applehttp |
| Duration |
string |
The duration of the video, in seconds. |
403.039999 |
| Bitrate |
string |
The video bitrate, in Kbit/s. |
888.563 |
| Width |
string |
The width of the video, in pixels. |
848 |
| Height |
string |
The height of the video, in pixels. |
478 |
| AudioStreamInfoList |
array<object> |
A list of audio stream details. |
|
|
object |
The audio stream information. |
||
| Index |
string |
The stream index. |
1 |
| CodecName |
string |
The stream's codec. |
aac |
| CodecLongName |
string |
The full name of the codec. |
AAC (Advanced Audio Coding) |
| CodecTimeBase |
string |
The time base of the codec. |
1/44100 |
| CodecTagString |
string |
The codec tag string. |
[15][0][0][0] |
| CodecTag |
string |
The codec tag. |
0x000f |
| SampleFmt |
string |
The sample format. |
fltp |
| SampleRate |
string |
The sample rate, in Hz. |
44100 |
| Channels |
string |
The number of audio channels. |
2 |
| ChannelLayout |
string |
The channel layout. |
stereo |
| Timebase |
string |
The stream's time base. |
1/90000 |
| StartTime |
string |
The start time of the stream, in seconds. |
1.473556 |
| Duration |
string |
The duration of the stream, in seconds. |
403.039989 |
| Bitrate |
string |
The bitrate of the stream. |
0.f |
| Lang |
string |
The stream's language. |
us |
| VideoStreamInfoList |
array<object> |
A list of video stream details. |
|
|
object |
The video stream information. |
||
| Index |
string |
The stream index. |
0 |
| Codec_name |
string |
The stream's codec. |
h264 |
| Codec_long_name |
string |
The full name of the codec. |
H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 |
| Profile |
string |
The codec profile. |
High |
| Codec_time_base |
string |
The time base of the codec. |
1/50 |
| Codec_tag_string |
string |
The codec tag string. |
[27][0][0][0] |
| Codec_tag |
string |
The codec tag. |
0x001b |
| Width |
string |
The width of the video, in pixels. |
848 |
| Height |
string |
The height of the video, in pixels. |
478 |
| Has_b_frames |
string |
Indicates whether the stream contains B-frames. Valid values:
|
2 |
| Sar |
string |
The sample aspect ratio (SAR). |
478:477 |
| Dar |
string |
The display aspect ratio (DAR). |
16:9 |
| PixFmt |
string |
The pixel format. |
yuv420p |
| Level |
string |
The codec level. |
31 |
| Fps |
string |
The frame rate. |
25.0 |
| Avg_fps |
string |
The average frame rate. |
25.0 |
| Time_base |
string |
The stream's time base. |
1/90000 |
| Start_time |
string |
The start time of the stream, in seconds. |
1.473556 |
| Duration |
string |
The duration of the stream, in seconds. |
403.039989 |
| Bit_rate |
string |
The bitrate of the stream, in Kbit/s. |
888.563 |
| NumFrames |
string |
The total number of frames. |
10040 |
| Lang |
string |
The stream's language. |
zh |
| Rotate |
string |
The rotation angle of the video, in degrees. |
0 |
| SubmitTime |
string |
The time when the job was submitted. |
2022-01-12T08:49:41Z |
| FinishTime |
string |
The time when the job was completed. |
2022-01-12T08:49:41Z |
| RequestId |
string |
The request ID. |
4879B9DE-E4B6-19DC-91F5-9D5F4DCE4168 |
Examples
Success response
JSON format
{
"RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
"MediaInfoJob": {
"Name": "job-name",
"TriggerSource": "API",
"JobId": "ab4802364a2e49208c99efab82dfa8e8",
"Input": {
"Type": "OSS",
"Media": "oss://bucket/path/to/video.mp4"
},
"Async": true,
"UserData": "user-data",
"ScheduleConfig": {
"PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
"Priority": 5
},
"Status": "Init",
"SubmitResultJson": {},
"MediaInfoProperty": {
"FileBasicInfo": {
"MediaId": "2b36bd19c13f4145b094c0cad80dbce5",
"FileName": "file.m3u8",
"FileStatus": "Normal",
"FileType": "source_file",
"FileSize": "31737",
"FileUrl": "http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8",
"Region": "cn-shanghai",
"FormatName": "hls,applehttp",
"Duration": "403.039999",
"Bitrate": "888.563",
"Width": "848",
"Height": "478"
},
"AudioStreamInfoList": [
{
"Index": "1",
"CodecName": "aac",
"CodecLongName": "AAC (Advanced Audio Coding)",
"CodecTimeBase": "1/44100",
"CodecTagString": "[15][0][0][0]",
"CodecTag": "0x000f",
"SampleFmt": "fltp",
"SampleRate": "44100",
"Channels": "2",
"ChannelLayout": "stereo",
"Timebase": "1/90000",
"StartTime": "1.473556",
"Duration": "403.039989",
"Bitrate": "0.f",
"Lang": "us"
}
],
"VideoStreamInfoList": [
{
"Index": "0",
"Codec_name": "h264",
"Codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"Profile": "High",
"Codec_time_base": "1/50",
"Codec_tag_string": "[27][0][0][0]",
"Codec_tag": "0x001b",
"Width": "848",
"Height": "478",
"Has_b_frames": "2",
"Sar": "478:477",
"Dar": "16:9",
"PixFmt": "yuv420p",
"Level": "31",
"Fps": "25.0",
"Avg_fps": "25.0",
"Time_base": "1/90000",
"Start_time": "1.473556",
"Duration": "403.039989",
"Bit_rate": "888.563",
"NumFrames": "10040",
"Lang": "zh",
"Rotate": "0"
}
]
},
"SubmitTime": "2022-01-12T08:49:41Z",
"FinishTime": "2022-01-12T08:49:41Z",
"RequestId": "4879B9DE-E4B6-19DC-91F5-9D5F4DCE4168"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.