使用媒体ID查询媒体。
接口说明
本接口一次最多查询 10 个媒体文件。
QPS 限制
本接口的单用户 QPS 限制为 100 次/秒。超过限制,API 调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见 QPS 限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
mts:QueryMediaList | get | *全部资源 * |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
MediaIds | string | 是 | 需要查询的媒体文件 ID 列表,可以登录 MPS 控制台,通过媒体管理 > 媒体列表获取。用半角逗号(,)分隔,一次最多查询 10 个。 | 3e1cd21131a94525be55acf65888****,e26cfa29e784402388463f61dbec**** |
IncludePlayList | boolean | 否 | 返回结果中是否包含播放信息。
| true |
IncludeSnapshotList | boolean | 否 | 返回结果中是否包含截图信息。
| true |
IncludeMediaInfo | boolean | 否 | 返回结果中是否包含媒体信息。
| true |
IncludeSummaryList | boolean | 否 | 返回结果中是否包含摘要。
| true |
返回参数
示例
正常返回示例
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"
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|
暂无变更历史