使用媒体ID查询媒体。
接口说明
本接口一次最多查询 10 个媒体文件。
QPS 限制
本接口的单用户 QPS 限制为 100 次/秒。超过限制,API 调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见 QPS 限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
mts:QueryMediaList |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| MediaIds |
string |
是 |
需要查询的媒体文件 ID 列表,可以登录 MPS 控制台,通过媒体管理 > 媒体列表获取。用半角逗号(,)分隔,一次最多查询 10 个。 |
3e1cd21131a94525be55acf65888****,e26cfa29e784402388463f61dbec**** |
| IncludePlayList |
boolean |
否 |
返回结果中是否包含播放信息。
|
true |
| IncludeSnapshotList |
boolean |
否 |
返回结果中是否包含截图信息。
|
true |
| IncludeMediaInfo |
boolean |
否 |
返回结果中是否包含媒体信息。
|
true |
| IncludeSummaryList |
boolean |
否 |
返回结果中是否包含摘要。
|
true |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回参数。 |
||
| NonExistMediaIds |
object |
||
| MediaId |
array |
不存在的媒体 ID 列表。 |
|
|
string |
不存在的媒体 ID。无数据时此参数不返回。 |
{"MediaId":[e26cfa29e784402388463f61dbec****]} |
|
| MediaList |
object |
||
| Media |
array<object> |
媒体列表。 |
|
|
array<object> |
媒体文件详细信息。 |
||
| CreationTime |
string |
创建时间。 |
2016-09-14T08:30:33Z |
| CateId |
integer |
类目 ID。 |
1 |
| Height |
string |
媒体文件高。 |
1080 |
| CensorState |
string |
视频审核状态。取值:
|
Initiated |
| Tags |
object |
||
| Tag |
array |
标签信息。 |
|
|
string |
标签列表。 |
tag1,tag2 |
|
| PlayList |
object |
||
| Play |
array<object> |
播放列表。 |
|
|
array<object> |
播放文件详细信息。 |
||
| Encryption |
string |
加密。取值:
|
0 |
| Height |
string |
高。 |
1080 |
| Bitrate |
string |
码率。 |
2659.326 |
| File |
object |
播放文件。 |
|
| State |
string |
文件状态。取值:
|
Normal |
| URL |
string |
输出文件的 OSS Bucket。 |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
| MediaWorkflowId |
string |
产生播放文件的工作流 ID。 |
93ab850b4f6f44eab54b6e91d24d**** |
| Width |
string |
媒体文件宽。 |
760 |
| Size |
string |
文件大小。 |
2647692 |
| Fps |
string |
帧率。 |
25.0 |
| Duration |
string |
时长。 |
7.965000 |
| ActivityName |
string |
媒体工作流活动名称。 |
example-activity-**** |
| Format |
string |
编码格式。支持 mov、mp4、m4a、3gp、3g2、mj2。 |
mp4 |
| MediaWorkflowName |
string |
产生播放文件的工作流。 |
example-mediaworkflow-**** |
| Bitrate |
string |
码率。 |
2659.326 |
| MediaId |
string |
媒体 ID。 |
3e1cd21131a94525be55acf65888**** |
| 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 |
摘要类型。取值:
|
Video |
| MediaWorkflowId |
string |
产生摘要的工作流 ID。 |
93ab850b4f6f44eab54b6e91d24d**** |
| ActivityName |
string |
媒体工作流活动名称。 |
example-activity-**** |
| MediaWorkflowName |
string |
产生摘要的工作流名称。 |
example-mediaworkflow-**** |
| File |
object |
输入文件信息。 |
|
| State |
string |
文件状态。范围:
|
Normal |
| URL |
string |
输入文件的 OSS Bucket。 |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
| PublishState |
string |
媒体发布状态,表示是否对外发布媒体。取值:
|
Published |
| MediaInfo |
object |
媒体信息。 |
|
| Streams |
object |
流信息。 |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
视频流列表。 |
|
|
array<object> |
视频流数据。 |
||
| Sar |
string |
编码信号分辨率比。 |
1:1 |
| Height |
string |
视频分辨率高。 |
1080 |
| CodecTagString |
string |
编码格式标记文本。 |
avc1 |
| NetworkCost |
object |
网络带宽消耗。 |
|
| PreloadTime |
string |
预加载时间。 |
0.01 |
| AvgBitrate |
string |
平均码率。 |
2659.326 |
| CostBandwidth |
string |
最大消耗带宽。 |
100 |
| Width |
string |
视频分辨率宽。 |
100 |
| Index |
string |
视频流序号。标识视频流在整个媒体流中的位置。 |
5 |
| Timebase |
string |
时基。 |
1/30000 |
| AvgFPS |
string |
平均帧率。 |
29.97003 |
| PixFmt |
string |
像素格式。 |
yuv420p |
| Lang |
string |
语言。更多信息,请参见 FFmpeg 语言定义。 |
und |
| CodecLongName |
string |
编码格式长述名。 |
QuickTime/MOV |
| NumFrames |
string |
总帧数。 |
12 |
| Rotate |
string |
视频旋转角度。 |
90 |
| Bitrate |
string |
码率。 |
2659.326 |
| HasBFrames |
string |
是否有 B 帧。1 表示有,2 表示没有。 |
2 |
| Profile |
string |
编码预置。 |
High |
| StartTime |
string |
开始时间。 |
0.000000 |
| Dar |
string |
编码显示分辨率比。 |
16:9 |
| CodecName |
string |
编码格式简述名。支持 mov、mp4、m4a、3gp、3g2、mj2。 |
mov |
| Duration |
string |
时长。 |
182.683000 |
| Fps |
string |
帧率。 |
29.97003 |
| CodecTag |
string |
编码格式标记。 |
0x31637661 |
| CodecTimeBase |
string |
编码时基。 |
1001/60000 |
| Level |
string |
编码等级。 |
40 |
| 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 |
码率。 |
160.008 |
| CodecTagString |
string |
编码格式标记文本。 |
mp4a |
| StartTime |
string |
开始时间。 |
0.000000 |
| CodecName |
string |
编码格式简述名。支持 H264、mov、aac、avc、mpeg。 |
mov |
| Duration |
string |
时长。 |
182.591995 |
| CodecTag |
string |
编码格式标记。 |
0x6134706d |
| CodecTimeBase |
string |
编码时基。 |
1/44100 |
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
字幕流列表。 |
|
|
object |
字幕流数据。 |
||
| Index |
string |
字幕流序号,标识字幕流在整个媒体流中的位置。 |
3 |
| Lang |
string |
语言。更多信息,请参见 FFmpeg 语言定义。 |
und |
| Format |
object |
格式信息。 |
|
| StartTime |
string |
起始时间。 |
0.000000 |
| NumPrograms |
string |
节目流总数。 |
2 |
| Size |
string |
文件大小。 |
2647692 |
| NumStreams |
string |
媒体流总数。 |
2 |
| FormatLongName |
string |
容器/封装格式长述名。 |
QuickTime/MOV |
| Duration |
string |
总时长。 |
7.965000 |
| Bitrate |
string |
码率。 |
2659.326 |
| FormatName |
string |
容器/封装格式简述名,支持 mov,mp4,m4a,3gp,3g2,mj2。 |
mov |
| Description |
string |
描述。 |
This is description **** |
| Size |
string |
文件大小。 |
2647692 |
| Width |
string |
宽。 |
1920 |
| CoverURL |
string |
封面的 OSS Bucket。 |
http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png |
| SnapshotList |
object |
||
| Snapshot |
array<object> |
截图列表。 |
|
|
array<object> |
截图文件数据。 |
||
| Type |
string |
截图类型。取值:
|
Sequence |
| MediaWorkflowId |
string |
产生截图文件的工作流 ID。 |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| ActivityName |
string |
产生截图文件的工作流活动名称。 |
example-activity1-**** |
| Count |
string |
截图张数。此值只在 Type 为 Sequence 时有意义。 |
5 |
| 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。 |
{"RunId":["47b42486019c4f688bf144c1a6ba****"]} |
|
| Duration |
string |
时长。 |
7.965000 |
| Fps |
string |
帧率。 |
25.0 |
| Title |
string |
标题。 |
example-title-**** |
| Format |
string |
编码格式。支持 mov,mp4,m4a,3gp,3g2,mj2。 |
mov |
| RequestId |
string |
请求 ID。 |
283DC68C-146F-4489-A2A1-2F88F1472A56 |
示例
正常返回示例
JSON格式
{
"NonExistMediaIds": {
"MediaId": [
"{\"MediaId\":[e26cfa29e784402388463f61dbec****]}"
]
},
"MediaList": {
"Media": [
{
"CreationTime": "2016-09-14T08:30:33Z",
"CateId": 1,
"Height": "1080",
"CensorState": "Initiated",
"Tags": {
"Tag": [
"tag1,tag2"
]
},
"PlayList": {
"Play": [
{
"Encryption": "0",
"Height": "1080",
"Bitrate": "2659.326",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
},
"MediaWorkflowId": "93ab850b4f6f44eab54b6e91d24d****",
"Width": "760",
"Size": "2647692",
"Fps": "25.0",
"Duration": "7.965000",
"ActivityName": "example-activity-****",
"Format": "mp4",
"MediaWorkflowName": "example-mediaworkflow-****"
}
]
},
"Bitrate": "2659.326",
"MediaId": "3e1cd21131a94525be55acf65888****",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
},
"SummaryList": {
"Summary": [
{
"Type": "Video",
"MediaWorkflowId": "93ab850b4f6f44eab54b6e91d24d****",
"ActivityName": "example-activity-****",
"MediaWorkflowName": "example-mediaworkflow-****",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
}
}
]
},
"PublishState": "Published",
"MediaInfo": {
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Sar": "1:1",
"Height": "1080",
"CodecTagString": "avc1",
"NetworkCost": {
"PreloadTime": "0.01",
"AvgBitrate": "2659.326",
"CostBandwidth": "100"
},
"Width": "100",
"Index": "5",
"Timebase": "1/30000",
"AvgFPS": "29.97003",
"PixFmt": "yuv420p",
"Lang": "und",
"CodecLongName": "QuickTime/MOV",
"NumFrames": "12",
"Rotate": "90",
"Bitrate": "2659.326",
"HasBFrames": "2",
"Profile": "High",
"StartTime": "0.000000",
"Dar": "16:9",
"CodecName": "mov",
"Duration": "182.683000",
"Fps": "29.97003",
"CodecTag": "0x31637661",
"CodecTimeBase": "1001/60000",
"Level": "40"
}
]
},
"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": "160.008",
"CodecTagString": "mp4a",
"StartTime": "0.000000",
"CodecName": "mov",
"Duration": "182.591995",
"CodecTag": "0x6134706d",
"CodecTimeBase": "1/44100"
}
]
},
"SubtitleStreamList": {
"SubtitleStream": [
{
"Index": "3",
"Lang": "und"
}
]
}
},
"Format": {
"StartTime": "0.000000",
"NumPrograms": "2",
"Size": "2647692",
"NumStreams": "2",
"FormatLongName": "QuickTime/MOV",
"Duration": "7.965000",
"Bitrate": "2659.326",
"FormatName": "mov"
}
},
"Description": "This is description ****",
"Size": "2647692",
"Width": "1920",
"CoverURL": "http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png",
"SnapshotList": {
"Snapshot": [
{
"Type": "Sequence",
"MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
"ActivityName": "example-activity1-****",
"Count": "5",
"MediaWorkflowName": "example-workflow-****",
"File": {
"State": "Normal",
"URL": "http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png"
}
}
]
},
"RunIdList": {
"RunId": [
"{\"RunId\":[\"47b42486019c4f688bf144c1a6ba****\"]}"
]
},
"Duration": "7.965000",
"Fps": "25.0",
"Title": "example-title-****",
"Format": "mov"
}
]
},
"RequestId": "283DC68C-146F-4489-A2A1-2F88F1472A56"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。