使用OSS文件地址查询媒体。
接口说明
本接口一次最多查询 10 个媒体文件。
调用本接口前,请先调用新增媒体接口新增媒体文件,再调用本接口查询媒体信息。
本接口仅支持查询工作流处理的文件信息。新上传的媒体文件,需要工作流执行完成后,通过本接口获取的文件信息才会完整。非工作流处理任务要想获得视频数据信息,需要调用 SubmitMediaInfoJob 处理媒体信息作业之后方可查看。
QPS 限制
本接口的单用户 QPS 限制为 100 次/秒。超过限制,API 调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见 QPS 限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
mts:QueryMediaListByURL |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| FileURLs |
string |
是 |
需要查询的媒体文件地址,可以登录 MPS 控制台,通过媒体管理 > 媒体列表找到需要查询的媒体文件,单击操作列管理,在获取转码地址页签中获取媒体文件地址。用半角逗号(,)分隔,一次最多查询 10 个。
|
http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| IncludePlayList |
boolean |
否 |
返回结果中是否包含播放信息。
|
true |
| IncludeSnapshotList |
boolean |
否 |
返回结果中是否包含截图信息。
|
true |
| IncludeMediaInfo |
boolean |
否 |
返回结果中是否包含媒体信息。
|
true |
| IncludeSummaryList |
boolean |
否 |
返回结果中是否包含摘要列表。
|
true |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回参数。 |
||
| MediaList |
object |
||
| Media |
array<object> |
媒体列表。 |
|
|
array<object> |
媒体详细信息。 |
||
| CreationTime |
string |
创建时间。 |
2021-07-14T13:05:00Z |
| CateId |
integer |
类目 ID。 |
123 |
| Height |
string |
查询到的媒体文件的高。 |
360 |
| CensorState |
string |
视频审核状态。取值:
|
Initiated |
| Tags |
object |
||
| Tag |
array |
标签信息。 |
|
|
string |
标签列表。 |
tag1,tag2 |
|
| PlayList |
object |
||
| Play |
array<object> |
播放列表。 |
|
|
array<object> |
播放文件详细信息。 |
||
| Encryption |
string |
加密。取值:
|
1 |
| Height |
string |
高。 |
10 |
| Bitrate |
string |
码率。 |
25.067 |
| File |
object |
播放文件。 |
|
| State |
string |
文件状态。取值范围:
|
Normal |
| URL |
string |
播放文件的输入 OSS Bucket。 |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4 |
| MediaWorkflowId |
string |
产生播放文件的工作流 ID。 |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| Width |
string |
宽。 |
11 |
| Size |
string |
大小。 |
100 |
| Fps |
string |
帧率。 |
25.0 |
| Duration |
string |
时长。 |
7.965000 |
| ActivityName |
string |
媒体工作流活动名称。 |
test name |
| Format |
string |
编码格式。支持 mov、mp4、m4a、3gp、3g2、mj2。 |
mov |
| MediaWorkflowName |
string |
产生播放文件的工作流。 |
example-mediaworkflow-**** |
| Bitrate |
string |
码率。 |
593.192 |
| MediaId |
string |
媒体 ID。 |
52d7e98b05e648199612290bb819**** |
| File |
object |
输入文件详细信息。 |
|
| State |
string |
文件状态。取值范围:
|
Normal |
| URL |
string |
输入文件的 OSS Bucket。 |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
| SummaryList |
object |
||
| Summary |
array<object> |
视频摘要列表。 |
|
|
array<object> |
视频摘要数据。 |
||
| Type |
string |
摘要类型。取值范围:
|
Gif |
| MediaWorkflowId |
string |
产生摘要的工作流 ID。 |
93ab850b4f6f44eab54b6e91d24d**** |
| ActivityName |
string |
媒体工作流活动名称。 |
example-activity-**** |
| MediaWorkflowName |
string |
产生摘要的工作流。 |
example-mediaworkflow-**** |
| File |
object |
原文件。 |
|
| State |
string |
文件状态。取值范围:
|
Normal |
| URL |
string |
输入文件的 OSS Bucket。 |
http://example-bucket-****.o |
| PublishState |
string |
媒体发布状态,表示是否对外发布媒体。取值范围:
|
Published |
| MediaInfo |
object |
媒体信息。 |
|
| Streams |
object |
流信息。 |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
视频流列表。 |
|
|
array<object> |
视频流数据。 |
||
| Sar |
string |
编码信号分辨率比。 |
1:1 |
| Height |
string |
视频分辨率高。 |
360 |
| CodecTagString |
string |
编码格式标记文本。 |
avc1 |
| NetworkCost |
object |
网络带宽消耗。 |
|
| PreloadTime |
string |
预加载时间。 |
0.01 |
| AvgBitrate |
string |
平均码率。 |
2659.326 |
| CostBandwidth |
string |
最大消耗带宽。 |
100 |
| Width |
string |
视频分辨率宽,数字,不能为负数。 |
640 |
| Index |
string |
视频流序号,标识视频流在整个媒体流中的位置。 |
5 |
| Timebase |
string |
时基。 |
1/15360 |
| AvgFPS |
string |
平均帧率。 |
15.0 |
| PixFmt |
string |
像素格式。 |
yuv420p |
| Lang |
string |
语言。更多信息,请参见 FFmpeg 语言定义。 |
und |
| CodecLongName |
string |
编码格式长述名。 |
H.264/AVC/MPEG-4 AVC/MPEG-4 part 10 |
| NumFrames |
string |
总帧数。 |
12 |
| Rotate |
string |
视频旋转角度。 |
90 |
| Bitrate |
string |
码率。 |
512.701 |
| HasBFrames |
string |
是否有 B 帧。1 表示有,2 表示没有。 |
2 |
| Profile |
string |
编码预置。 |
High |
| StartTime |
string |
起始时间。 |
0.046029 |
| Dar |
string |
编码显示分辨率比。 |
16:9 |
| CodecName |
string |
编码格式简述名。支持 H264、mov、aac、avc、mpeg。 |
H264 |
| Duration |
string |
时长。 |
79.200000 |
| Fps |
string |
帧率。 |
15.0 |
| CodecTag |
string |
编码格式标记。 |
0x31637661 |
| CodecTimeBase |
string |
编码时基。 |
1/30 |
| Level |
string |
编码等级。 |
31 |
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
音频流列表。 |
|
|
object |
音频流数据。 |
||
| Timebase |
string |
时基。 |
1/44100 |
| Index |
string |
音频流序号,标识音频流在整个媒体流中的位置。 |
1 |
| SampleFmt |
string |
采样格式。 |
fltp |
| ChannelLayout |
string |
声道输出样式。 |
stereo |
| Lang |
string |
语言。参考 FFmpeg 语言定义。 |
und |
| Samplerate |
string |
采样率。 |
44100 |
| CodecLongName |
string |
编码格式长述名。 |
AAC (Advanced Audio Coding) |
| Channels |
string |
声道数。 |
2 |
| NumFrames |
string |
总帧数。 |
100 |
| Bitrate |
string |
码率。 |
76.356 |
| CodecTagString |
string |
编码格式标记文本。 |
mp4a |
| StartTime |
string |
起始时间。 |
0.000000 |
| CodecName |
string |
编码格式简述名。支持 H264、mov、aac、avc、mpeg。 |
aac |
| Duration |
string |
时长。 |
79.203265 |
| CodecTag |
string |
编码格式标记。 |
0x6134706d |
| CodecTimeBase |
string |
编码时基。 |
1/44100 |
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
字幕流列表。 |
|
|
object |
字幕流数据。 |
||
| Index |
string |
字幕流序号,标识字幕流在整个媒体流中的位置。 |
1 |
| Lang |
string |
语言。参考 FFmpeg 语言定义。 |
und |
| Format |
object |
格式信息。 |
|
| StartTime |
string |
开始时间。 |
0.000000 |
| NumPrograms |
string |
节目流总数。 |
0 |
| Size |
string |
大小。 |
5872904 |
| NumStreams |
string |
媒体流总数。 |
2 |
| FormatLongName |
string |
编码格式长述名。 |
QuickTime/MOV |
| Duration |
string |
时长。 |
79.204000 |
| Bitrate |
string |
码率。 |
593.192 |
| FormatName |
string |
容器/封装格式简述名,支持 mov,mp4,m4a,3gp,3g2,mj2。 |
mov |
| Description |
string |
描述。 |
This is description **** |
| Size |
string |
文件大小。 |
5872904 |
| Width |
string |
宽。 |
640 |
| CoverURL |
string |
封面的 OSS Bucket。 |
http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png |
| SnapshotList |
object |
||
| Snapshot |
array<object> |
截图列表。 |
|
|
array<object> |
截图文件详细信息。 |
||
| Type |
string |
截图类型。取值范围:
|
Single |
| MediaWorkflowId |
string |
产生截图文件的工作流 ID。 |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| ActivityName |
string |
产生截图文件的工作流活动名称。 |
example-activity1-**** |
| Count |
string |
截图张数。此值只在 Type 为 Sequence 时有意义。 |
3 |
| MediaWorkflowName |
string |
产生截图文件的工作流。 |
example-workflow-**** |
| File |
object |
截图文件。 |
|
| State |
string |
文件状态。取值范围:
|
Normal |
| URL |
string |
截图文件的 OSS Bucket。 |
http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png |
| RunIdList |
object |
||
| RunId |
array |
媒体工作流列表。 |
|
|
string |
媒体工作流 ID 列表。 |
9343bd0e7bb54ae19228529908e5**** |
|
| Duration |
string |
时长。 |
79.204000 |
| Fps |
string |
帧率。 |
15.0 |
| Title |
string |
标题。 |
kled.mp4 |
| Format |
string |
编码格式。支持 mov,mp4,m4a,3gp,3g2,mj2。 |
mov |
| NonExistFileURLs |
object |
||
| FileURL |
array |
不存在的媒体列表信息。 |
|
|
string |
不存在的媒体 ID,无数据时此参数不返回。 |
null |
|
| RequestId |
string |
请求 ID。 |
1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42 |
示例
正常返回示例
JSON格式
{
"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"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。