批量获取媒资信息,支持传入多个mediaId。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ice:BatchGetMediaInfos |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| MediaIds |
string |
否 |
所有待查询的媒资 ID,以逗号分隔。 |
******b48fb04483915d4f2cd8******,******c48fb37407365d4f2cd8****** |
| AdditionType |
string |
否 |
批量查询的媒资额外信息,默认只返回 BasicInfo,额外文件信息内容包括: -FileInfo -DynamicMetaData |
FileInfo,DynamicMetaData |
| AuthTimeout |
integer |
否 |
鉴权过期时间,单位:秒。
|
30 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
******11-DB8D-4A9A-875B-275798****** |
| MediaInfos |
array<object> |
符合要求的媒资集合。 |
|
|
array<object> |
符合要求的媒资集合。 |
||
| MediaId |
string |
媒资 ID。 |
******c48fb37407365d4f2cd8****** |
| MediaBasicInfo |
object |
媒资基础信息。 |
|
| MediaId |
string |
媒资 ID。 |
******c48fb37407365d4f2cd8****** |
| InputURL |
string |
待注册的媒资在相应系统中的地址。 |
https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| MediaType |
string |
媒资媒体类型。取值为:
|
video |
| BusinessType |
string |
媒资业务类型。 |
general |
| Source |
string |
来源。取值为:
|
oss |
| Title |
string |
标题。 |
title |
| Description |
string |
内容描述。 |
description |
| Category |
string |
分类。 |
category1 |
| MediaTags |
string |
标签。 |
tag1, tag2 |
| CoverURL |
string |
封面地址。 |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires= |
| UserData |
string |
用户数据。 |
userDataTest |
| Snapshots |
string |
截图。 |
[ "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00001.png?Expires=&OSSAccessKeyId=&Signature=&security-token=", "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00002.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=", "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00003.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=" ] |
| Status |
string |
资源状态。 |
Normal |
| TranscodeStatus |
string |
转码状态。 |
Init |
| CreateTime |
string |
媒资创建时间。 |
2020-12-26T04:11:10Z |
| ModifiedTime |
string |
媒资修改时间。 |
2020-12-26T04:11:12Z |
| DeletedTime |
string |
媒资删除时间。 |
2020-12-26T04:11:10Z |
| SpriteImages |
string |
雪碧图。 |
[{"bucket":"example-bucket","count":"32","iceJobId":"******83ec44d58b2069def2e******","location":"oss-cn-shanghai","snapshotRegular":"example/example-{Count}.jpg","spriteRegular":"example/example-{TileCount}.jpg","templateId":"******e438b14ff39293eaec25******","tileCount":"1"}] |
| Biz |
string |
媒资所属业务。 |
ICE |
| FileInfoList |
array<object> |
文件基础信息列表。 |
|
|
array<object> |
文件基础信息。 |
||
| FileBasicInfo |
object |
文件基础信息,包含时长,大小等。 |
|
| FileName |
string |
文件名。 |
example |
| FileStatus |
string |
文件状态。 |
Normal |
| FileType |
string |
文件类型。 |
source_file |
| FileSize |
string |
文件大小(字节)。 |
30611502 |
| FileUrl |
string |
文件 OSS 地址。 |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires= |
| Region |
string |
文件存储区域。 |
cn-shanghai |
| FormatName |
string |
封装格式。 |
mov,mp4,m4a,3gp,3g2,mj2 |
| Duration |
string |
时长。 |
200 |
| Bitrate |
string |
码率。 |
1132.68 |
| Width |
string |
宽。 |
1920 |
| Height |
string |
高。 |
1080 |
| AudioStreamInfoList |
array<object> |
||
|
object |
|||
| Index |
string |
||
| CodecName |
string |
||
| CodecLongName |
string |
||
| CodecTimeBase |
string |
||
| CodecTagString |
string |
||
| CodecTag |
string |
||
| Profile |
string |
||
| SampleFmt |
string |
||
| SampleRate |
string |
||
| Channels |
string |
||
| ChannelLayout |
string |
||
| Timebase |
string |
||
| StartTime |
string |
||
| Duration |
string |
||
| Bitrate |
string |
||
| Fps |
string |
||
| NumFrames |
string |
||
| Lang |
string |
||
| VideoStreamInfoList |
array<object> |
||
|
object |
|||
| Index |
string |
||
| CodecName |
string |
||
| CodecLongName |
string |
||
| Profile |
string |
||
| CodecTimeBase |
string |
||
| CodecTagString |
string |
||
| CodecTag |
string |
||
| Width |
string |
||
| Height |
string |
||
| HasBFrames |
string |
||
| Sar |
string |
||
| Dar |
string |
||
| PixFmt |
string |
||
| Level |
string |
||
| Fps |
string |
||
| AvgFPS |
string |
||
| Timebase |
string |
||
| StartTime |
string |
||
| Duration |
string |
||
| Bitrate |
string |
||
| NumFrames |
string |
||
| Lang |
string |
||
| Rotate |
string |
||
| Nb_frames |
string |
||
| SubtitleStreamInfoList |
array<object> |
||
|
object |
|||
| Index |
string |
||
| CodecName |
string |
||
| CodecLongName |
string |
||
| CodecTimeBase |
string |
||
| CodecTagString |
string |
||
| CodecTag |
string |
||
| Timebase |
string |
||
| StartTime |
string |
||
| Duration |
string |
||
| Lang |
string |
||
| MediaDynamicInfo |
object |
媒资类型。 |
|
| DynamicMetaData |
object |
类型。取值范围:
|
|
| Data |
string |
媒资类型。 |
system |
| IgnoredList |
array |
获取失败的媒资信息列表。 |
|
|
string |
媒资信息。 |
****20b48fb04483915d4f2cd8ac**** |
示例
正常返回示例
JSON格式
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"MediaInfos": [
{
"MediaId": "******c48fb37407365d4f2cd8******",
"MediaBasicInfo": {
"MediaId": "******c48fb37407365d4f2cd8******",
"InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
"MediaType": "video",
"BusinessType": "general",
"Source": "oss",
"Title": "title",
"Description": "description",
"Category": "category1",
"MediaTags": "tag1, tag2",
"CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=",
"UserData": "userDataTest",
"Snapshots": "[\n \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00001.png?Expires=&OSSAccessKeyId=&Signature=&security-token=\",\n \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00002.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=\",\n \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00003.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=\"\n]",
"Status": "Normal",
"TranscodeStatus": "Init",
"CreateTime": "2020-12-26T04:11:10Z",
"ModifiedTime": "2020-12-26T04:11:12Z",
"DeletedTime": "2020-12-26T04:11:10Z",
"SpriteImages": "[{\"bucket\":\"example-bucket\",\"count\":\"32\",\"iceJobId\":\"******83ec44d58b2069def2e******\",\"location\":\"oss-cn-shanghai\",\"snapshotRegular\":\"example/example-{Count}.jpg\",\"spriteRegular\":\"example/example-{TileCount}.jpg\",\"templateId\":\"******e438b14ff39293eaec25******\",\"tileCount\":\"1\"}]",
"Biz": "ICE"
},
"FileInfoList": [
{
"FileBasicInfo": {
"FileName": "example",
"FileStatus": "Normal",
"FileType": "source_file",
"FileSize": "30611502",
"FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=&OSSAccessKeyId=&Signature=&security-token=",
"Region": "cn-shanghai",
"FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
"Duration": "200",
"Bitrate": "1132.68",
"Width": "1920",
"Height": "1080"
},
"AudioStreamInfoList": [
{
"Index": "",
"CodecName": "",
"CodecLongName": "",
"CodecTimeBase": "",
"CodecTagString": "",
"CodecTag": "",
"Profile": "",
"SampleFmt": "",
"SampleRate": "",
"Channels": "",
"ChannelLayout": "",
"Timebase": "",
"StartTime": "",
"Duration": "",
"Bitrate": "",
"Fps": "",
"NumFrames": "",
"Lang": ""
}
],
"VideoStreamInfoList": [
{
"Index": "",
"CodecName": "",
"CodecLongName": "",
"Profile": "",
"CodecTimeBase": "",
"CodecTagString": "",
"CodecTag": "",
"Width": "",
"Height": "",
"HasBFrames": "",
"Sar": "",
"Dar": "",
"PixFmt": "",
"Level": "",
"Fps": "",
"AvgFPS": "",
"Timebase": "",
"StartTime": "",
"Duration": "",
"Bitrate": "",
"NumFrames": "",
"Lang": "",
"Rotate": "",
"Nb_frames": ""
}
],
"SubtitleStreamInfoList": [
{
"Index": "",
"CodecName": "",
"CodecLongName": "",
"CodecTimeBase": "",
"CodecTagString": "",
"CodecTag": "",
"Timebase": "",
"StartTime": "",
"Duration": "",
"Lang": ""
}
]
}
],
"MediaDynamicInfo": {
"DynamicMetaData": {
"Data": "system"
}
}
}
],
"IgnoredList": [
"****20b48fb04483915d4f2cd8ac****"
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。