Queries media by using OSS file URLs.
Operation description
This operation queries up to 10 media files at a time.
Before you call this operation, call the Add media operation to add media files, and then call this operation to query media information.
This operation only supports querying file information processed by workflows. For newly uploaded media files, the file information obtained by using this operation is complete only after the workflow execution is completed. To obtain video data information for non-workflow processing tasks, you must call the SubmitMediaInfoJob operation to submit a media information analysis job before you can view the information.
QPS limits
The QPS limit for a single user is 100 queries per second. If the limit is exceeded, API calls are throttled, which may affect your business. Make API calls at a reasonable rate. For more information, see QPS limits.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mts:QueryMediaListByURL |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileURLs |
string |
Yes |
The URLs of the media files to be queried. You can log on to the MPS console, choose Media management > Media list to find the media file to be queried, click Manage in the Actions column, and obtain the media file URL on the Obtain transcoding URL tab. Separate multiple URLs with commas (,). You can query up to 10 URLs at a time.
|
http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| IncludePlayList |
boolean |
No |
Specifies whether the response includes playback information. Valid values:
Default value: false. |
true |
| IncludeSnapshotList |
boolean |
No |
Specifies whether the response includes snapshot information. Valid values:
Default value: false. |
true |
| IncludeMediaInfo |
boolean |
No |
Specifies whether the response includes media information. Valid values:
Default value: false. |
true |
| IncludeSummaryList |
boolean |
No |
Specifies whether the response includes the summary list. Valid values:
Default value: false. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| MediaList |
object |
||
| Media |
array<object> |
The media list. |
|
|
array<object> |
The media details. |
||
| CreationTime |
string |
The creation time. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. |
2021-07-14T13:05:00Z |
| CateId |
integer |
The category ID. |
123 |
| Height |
string |
The height of the queried media file. |
360 |
| CensorState |
string |
The video moderation status. Valid values:
|
Initiated |
| Tags |
object |
||
| Tag |
array |
The tag information. |
|
|
string |
The tag list. |
tag1,tag2 |
|
| PlayList |
object |
||
| Play |
array<object> |
The playlist. |
|
|
array<object> |
The playback file details. |
||
| Encryption |
string |
The encryption status. Valid values:
|
1 |
| Height |
string |
The height. |
10 |
| Bitrate |
string |
The bitrate. |
25.067 |
| File |
object |
The playback file. |
|
| State |
string |
The file status. Valid values:
|
Normal |
| URL |
string |
The input OSS bucket of the playback file. |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4 |
| MediaWorkflowId |
string |
The ID of the workflow that generated the playback file. |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| Width |
string |
The width. |
11 |
| Size |
string |
The size. |
100 |
| Fps |
string |
The frame rate. |
25.0 |
| Duration |
string |
The duration. |
7.965000 |
| ActivityName |
string |
The name of the media workflow activity. |
test name |
| Format |
string |
The encoding format. Supported formats include mov, mp4, m4a, 3gp, 3g2, and mj2. |
mov |
| MediaWorkflowName |
string |
The workflow that generated the playback file. |
example-mediaworkflow-**** |
| Bitrate |
string |
The bitrate. |
593.192 |
| MediaId |
string |
The media ID. |
52d7e98b05e648199612290bb819**** |
| File |
object |
The input file details. |
|
| State |
string |
The file status. Valid values:
|
Normal |
| URL |
string |
The OSS bucket of the input file. |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
| SummaryList |
object |
||
| Summary |
array<object> |
The video summary list. |
|
|
array<object> |
The video summary data. |
||
| Type |
string |
The summary type. Valid values:
|
Gif |
| MediaWorkflowId |
string |
The ID of the workflow that generated the summary. |
93ab850b4f6f44eab54b6e91d24d**** |
| ActivityName |
string |
The name of the media workflow activity. |
example-activity-**** |
| MediaWorkflowName |
string |
The workflow that generated the summary. |
example-mediaworkflow-**** |
| File |
object |
The source file. |
|
| State |
string |
The file status. Valid values:
|
Normal |
| URL |
string |
The OSS bucket of the input file. |
http://example-bucket-****.o |
| PublishState |
string |
The publish status of the media, which indicates whether the media is published. Valid values:
|
Published |
| MediaInfo |
object |
The media information. |
|
| Streams |
object |
The stream information. |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
The video stream list. |
|
|
array<object> |
The video stream data. |
||
| Sar |
string |
The sample aspect ratio. |
1:1 |
| Height |
string |
The height of the video resolution. |
360 |
| CodecTagString |
string |
The encoding format mark text. |
avc1 |
| NetworkCost |
object |
The network bandwidth consumption. |
|
| PreloadTime |
string |
The preload time. |
0.01 |
| AvgBitrate |
string |
The average bitrate. |
2659.326 |
| CostBandwidth |
string |
The maximum consumed bandwidth. |
100 |
| Width |
string |
The width of the video resolution. The value is a number and cannot be negative. |
640 |
| Index |
string |
The index of the video stream, which identifies the position of the video stream in the entire media stream. |
5 |
| Timebase |
string |
The time base. |
1/15360 |
| AvgFPS |
string |
The average frame rate. |
15.0 |
| PixFmt |
string |
The pixel format. |
yuv420p |
| Lang |
string |
The language. For more information, see FFmpeg language definitions. |
und |
| 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. |
12 |
| Rotate |
string |
The video rotation angle. |
90 |
| Bitrate |
string |
The bitrate. |
512.701 |
| HasBFrames |
string |
Indicates whether B-frames exist. A value of 1 indicates that B-frames exist, and a value of 2 indicates that B-frames do not exist. |
2 |
| Profile |
string |
The encoding profile. |
High |
| StartTime |
string |
The start time, in seconds. |
0.046029 |
| Dar |
string |
The display aspect ratio. |
16:9 |
| CodecName |
string |
The short name of the encoding format. Supported encoding formats include H264, mov, aac, avc, and mpeg. |
H264 |
| Duration |
string |
The duration. |
79.200000 |
| Fps |
string |
The frame rate. |
15.0 |
| CodecTag |
string |
The encoding format mark. |
0x31637661 |
| CodecTimeBase |
string |
The codec time base. |
1/30 |
| Level |
string |
The encoding level. |
31 |
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
The audio stream list. |
|
|
object |
The audio stream data. |
||
| Timebase |
string |
The time base. |
1/44100 |
| 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. |
stereo |
| Lang |
string |
The language. For more information, see FFmpeg language definitions. |
und |
| Samplerate |
string |
The sample rate. |
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. |
100 |
| Bitrate |
string |
The bitrate. |
76.356 |
| CodecTagString |
string |
The text of the encoding format mark. |
mp4a |
| StartTime |
string |
The start time, in seconds. |
0.000000 |
| CodecName |
string |
The short name of the encoding format. Supported values include H264, mov, aac, avc, and mpeg. |
aac |
| Duration |
string |
The duration. |
79.203265 |
| CodecTag |
string |
The encoding format mark. |
0x6134706d |
| CodecTimeBase |
string |
The codec time base. |
1/44100 |
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
The list of subtitle streams. |
|
|
object |
The subtitle stream data. |
||
| Index |
string |
The index of the subtitle stream, which identifies the position of the subtitle stream in all media streams. |
1 |
| Lang |
string |
The language. For more information, see FFmpeg language definitions. |
und |
| Format |
object |
The format information. |
|
| StartTime |
string |
The start time, in seconds. |
0.000000 |
| NumPrograms |
string |
The total number of program streams. |
0 |
| Size |
string |
The size. |
5872904 |
| NumStreams |
string |
The total number of media streams. |
2 |
| FormatLongName |
string |
The long name of the encoding format. |
QuickTime/MOV |
| Duration |
string |
The duration. |
79.204000 |
| Bitrate |
string |
The bitrate. |
593.192 |
| FormatName |
string |
The short name of the container or packaging format. Supported values include mov, mp4, m4a, 3gp, 3g2, and mj2. |
mov |
| Description |
string |
The description. |
This is description **** |
| Size |
string |
The file size. |
5872904 |
| Width |
string |
The width. |
640 |
| CoverURL |
string |
The OSS bucket of the cover image. |
http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png |
| SnapshotList |
object |
||
| Snapshot |
array<object> |
The list of snapshots. |
|
|
array<object> |
The detailed information about the snapshot file. |
||
| Type |
string |
The snapshot type. Valid values:
|
Single |
| MediaWorkflowId |
string |
The ID of the workflow that generated the snapshot file. |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| ActivityName |
string |
The name of the workflow activity that generated the snapshot file. |
example-activity1-**** |
| Count |
string |
The number of snapshots. This value is valid only when Type is set to Sequence. |
3 |
| MediaWorkflowName |
string |
The name of the workflow that generated the snapshot file. |
example-workflow-**** |
| File |
object |
The snapshot file. |
|
| State |
string |
The file status. Valid values:
|
Normal |
| URL |
string |
The OSS bucket of the snapshot file. |
http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png |
| RunIdList |
object |
||
| RunId |
array |
The list of media workflows. |
|
|
string |
The list of media workflow IDs. |
9343bd0e7bb54ae19228529908e5**** |
|
| Duration |
string |
The duration. |
79.204000 |
| Fps |
string |
The frame rate. |
15.0 |
| Title |
string |
The title. |
kled.mp4 |
| Format |
string |
The encoding format. Supported values include mov, mp4, m4a, 3gp, 3g2, and mj2. |
mov |
| NonExistFileURLs |
object |
||
| FileURL |
array |
The list of non-existent media files. |
|
|
string |
The ID of the non-existent media file. This parameter is not returned if no data is available. |
null |
|
| RequestId |
string |
The request ID. |
1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42 |
Examples
Success response
JSON format
{
"MediaList": {
"Media": [
{
"CreationTime": "2021-07-14T13:05:00Z",
"CateId": 123,
"Height": "360",
"CensorState": "Initiated",
"Tags": {
"Tag": [
"tag1,tag2"
]
},
"PlayList": {
"Play": [
{
"Encryption": "1",
"Height": "10",
"Bitrate": "25.067",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4"
},
"MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
"Width": "11",
"Size": "100",
"Fps": "25.0",
"Duration": "7.965000",
"ActivityName": "test name",
"Format": "mov",
"MediaWorkflowName": "example-mediaworkflow-****"
}
]
},
"Bitrate": "593.192",
"MediaId": "52d7e98b05e648199612290bb819****",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
},
"SummaryList": {
"Summary": [
{
"Type": "Gif",
"MediaWorkflowId": "93ab850b4f6f44eab54b6e91d24d****",
"ActivityName": "example-activity-****",
"MediaWorkflowName": "example-mediaworkflow-****",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.o"
}
}
]
},
"PublishState": "Published",
"MediaInfo": {
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Sar": "1:1",
"Height": "360",
"CodecTagString": "avc1",
"NetworkCost": {
"PreloadTime": "0.01",
"AvgBitrate": "2659.326",
"CostBandwidth": "100"
},
"Width": "640",
"Index": "5",
"Timebase": "1/15360",
"AvgFPS": "15.0",
"PixFmt": "yuv420p",
"Lang": "und",
"CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
"NumFrames": "12",
"Rotate": "90",
"Bitrate": "512.701",
"HasBFrames": "2",
"Profile": "High",
"StartTime": "0.046029",
"Dar": "16:9",
"CodecName": "H264",
"Duration": "79.200000",
"Fps": "15.0",
"CodecTag": "0x31637661",
"CodecTimeBase": "1/30",
"Level": "31"
}
]
},
"AudioStreamList": {
"AudioStream": [
{
"Timebase": "1/44100",
"Index": "1",
"SampleFmt": "fltp",
"ChannelLayout": "stereo",
"Lang": "und",
"Samplerate": "44100",
"CodecLongName": "AAC (Advanced Audio Coding)",
"Channels": "2",
"NumFrames": "100",
"Bitrate": "76.356",
"CodecTagString": "mp4a",
"StartTime": "0.000000",
"CodecName": "aac",
"Duration": "79.203265",
"CodecTag": "0x6134706d",
"CodecTimeBase": "1/44100"
}
]
},
"SubtitleStreamList": {
"SubtitleStream": [
{
"Index": "1",
"Lang": "und"
}
]
}
},
"Format": {
"StartTime": "0.000000",
"NumPrograms": "0",
"Size": "5872904",
"NumStreams": "2",
"FormatLongName": "QuickTime/MOV",
"Duration": "79.204000",
"Bitrate": "593.192",
"FormatName": "mov"
}
},
"Description": "This is description ****",
"Size": "5872904",
"Width": "640",
"CoverURL": "http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png",
"SnapshotList": {
"Snapshot": [
{
"Type": "Single",
"MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
"ActivityName": "example-activity1-****",
"Count": "3",
"MediaWorkflowName": "example-workflow-****",
"File": {
"State": "Normal",
"URL": "http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png"
}
}
]
},
"RunIdList": {
"RunId": [
"9343bd0e7bb54ae19228529908e5****"
]
},
"Duration": "79.204000",
"Fps": "15.0",
"Title": "kled.mp4",
"Format": "mov"
}
]
},
"NonExistFileURLs": {
"FileURL": [
"null"
]
},
"RequestId": "1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.