批量获取媒资基础信息和源文件信息。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vod:BatchGetMediaInfos |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| MediaIds |
string |
是 |
媒资 ID,即音/视频 ID(VideoId)。多个 ID 之间使用半角逗号(,)分隔,最多支持 20 个。可通过以下方式获取:
|
61ccbdb06fa83012be4d8083f6****,7d2fbc380b0e08e55f**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
9E290613-04F4-47F4-795D30732077**** |
| NonExistMediaIds |
array |
不存在的媒资 ID 列表。 |
|
|
string |
不存在的媒资 ID 列表。 |
["bbc65bba53f6ed90de118a7849****"] |
|
| ForbiddenMediaIds |
array |
被禁止操作的媒资 ID 列表,通常是由于没有多应用的权限而导致被禁止操作,更多信息,请参见多应用。 |
|
|
string |
被禁止操作的媒资 ID 列表,通常是由于没有多应用的权限而导致被禁止操作,更多信息,请参见多应用。 |
["bbc65bba53f6ed90de118a7849****"] |
|
| MediaInfos |
array<object> |
媒资列表。 |
|
|
array<object> |
媒资列表。 |
||
| MediaId |
string |
媒资 ID。 |
10a5fa364a5b71ef89246733a78e**** |
| MediaInfo |
object |
媒资基础信息。 |
|
| StorageLocation |
string |
音/视频存储地址。 |
outin-***.oss-cn-shanghai.aliyuncs.com |
| CreationTime |
string |
音/视频创建时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。 |
2017-11-14T09:15:50Z |
| Status |
string |
视频状态。取值:
|
Normal |
| CateId |
integer |
分类 ID。 |
781111**** |
| MediaId |
string |
媒资 ID。 |
7753d144efd74d6c45fe0570**** |
| DownloadSwitch |
string |
离线下载开关状态,打开离线下载功能后,则允许移动端用户通过阿里云播放器将视频缓存至本地观看。具体操作,请参见离线下载。取值:
|
on |
| Tags |
string |
音/视频标签。多个标签之间使用半角逗号(,)分隔。 |
标签1, 标签2 |
| ModificationTime |
string |
音/视频的最后一次更新时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。 |
2017-06-26T06:38:48Z |
| CateName |
string |
分类名称。 |
分类名称 |
| Description |
string |
音/视频描述。 |
阿里云VOD视频描述 |
| AppId |
string |
应用 ID。 |
app-**** |
| CoverURL |
string |
音/视频封面 URL。 |
https://example.aliyundoc.com/****.jpg |
| TemplateGroupId |
string |
转码模板组 ID。 |
b4039216985f4312a5382a4ed**** |
| Title |
string |
音/视频标题。 |
阿里云VOD视频标题 |
| Snapshots |
array |
视频截图 URL 数组。 |
|
|
string |
视频截图 URL 数组。 说明
本接口仅会返回视频的封面截图数据,通过视频截图功能截取的普通截图、雪碧截图、雪碧图原始图、WebVTT 截图的截图数据,请调用 ListSnapshots 接口查询。 |
["http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****","http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27243****",...] |
|
| StorageClass |
string |
媒资存储类型。取值:
|
Standard |
| RestoreStatus |
string |
媒资解冻状态。取值:
|
Success |
| RestoreExpiration |
string |
媒资解冻有效期。 |
2023-03-30T10:14:14Z |
| UserData |
string |
自定义参数。 |
{"Extend":"xxx","MessageCallback":"xxx"} |
| MezzanineInfo |
object |
源文件信息。 |
|
| CreationTime |
string |
文件创建时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。 |
2017-11-14T09:15:50Z |
| Status |
string |
文件状态。取值:
|
Normal |
| FileURL |
string |
源文件地址。 |
http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/27ffc438-164h67f57ef-0005-6884-51a-1****.mp4 |
| MediaId |
string |
媒资 ID。 |
1f1a6fc03ca04814031b8a6559e**** |
| Height |
integer |
文件高度。单位:px。 |
540 |
| Bitrate |
string |
文件码率。单位:Kbps。 |
771.2280 |
| FileName |
string |
文件名称。 |
27ffc438-164h67f57ef-0005-6884-51a-1****.mp4 |
| Width |
integer |
文件宽度。单位:px。 |
960 |
| Size |
integer |
文件大小。单位:Byte。 |
4096477 |
| Duration |
string |
文件时长。单位:秒。 |
42.4930 |
| Fps |
string |
文件帧率,每秒多少帧。 |
25.0000 |
| AudioStreamList |
array<object> |
音频流信息。 |
|
|
object |
音频流详情 |
||
| Index |
string |
音频流序号,标识音频流在整个媒体流中的位置。 |
0 |
| Timebase |
string |
时基。 |
0.000000 |
| SampleFmt |
string |
采样格式。 |
fltp |
| SampleRate |
string |
采样率。 |
44100 |
| ChannelLayout |
string |
声道输出样式。取值:
|
mono |
| Lang |
string |
语言。 |
und |
| CodecLongName |
string |
编码格式长述名。 |
AAC (Advanced Audio Coding) |
| Channels |
string |
声道数。 |
1 |
| NumFrames |
string |
总帧数。 |
1 |
| Bitrate |
string |
码率。 |
62.885 |
| CodecTagString |
string |
编码格式标记文本。 |
mp4a |
| StartTime |
string |
起始时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。 |
2017-01-11T12:00:00Z |
| CodecName |
string |
编码格式简述名。 |
aac |
| Duration |
string |
时长。 |
3.227574 |
| CodecTag |
string |
编码格式标记。 |
0x6134706d |
| CodecTimeBase |
string |
编码时基。 |
1/44100 |
| VideoStreamList |
array<object> |
视频流信息。 |
|
|
object |
视频流详情。 |
||
| Timebase |
string |
时基。 |
0.000000 |
| Index |
string |
视频流序号,标识视频流在整个媒体流中的位置 |
1 |
| AvgFPS |
string |
平均帧率。 |
30.0 |
| PixFmt |
string |
像素格式。 |
yuv420p |
| Lang |
string |
语言。 |
und |
| Sar |
string |
编码信号分辨率比。 |
0:1 |
| Height |
string |
视频分辨率长。 |
320 |
| CodecLongName |
string |
编码格式长述名。 |
H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 |
| NumFrames |
string |
总帧数。 |
0 |
| Bitrate |
string |
文件码率。单位:Kbps。 |
500 |
| Rotate |
string |
视频旋转角度,取值范围:[0,360)。 |
90 |
| CodecTagString |
string |
编码格式标记文本。 |
avc1 |
| HasBFrames |
string |
是否有 B 帧。 |
0 |
| Profile |
string |
编码预置。 |
Main |
| StartTime |
string |
起始时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。 |
2017-01-11T12:00:00Z |
| Dar |
string |
编码显示分辨率比。 |
0:1 |
| CodecName |
string |
编码格式简述名。 |
h264 |
| Width |
string |
视频分辨率宽。 |
568 |
| Duration |
string |
时长。 |
3.166667 |
| Fps |
string |
目标帧率。 |
30.0 |
| CodecTag |
string |
编码格式标记。 |
0x31637661 |
| CodecTimeBase |
string |
编码时基。 |
1/60 |
| Level |
string |
编码等级。 |
30 |
| HDRType |
string |
视频流 HDR 类型 |
HDR |
| FileMD5 |
string |
||
| PlayInfoList |
array<object> |
音/视频播放信息(流信息)。 |
|
|
object |
音/视频详细信息。 |
||
| CreationTime |
string |
创建时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。 |
2022-04-18T07:37:15Z |
| Status |
string |
媒体流状态,取值:
|
Normal |
| Specification |
string |
音视频转码输出规格。各取值及描述,请参见输出规格:Specification。 |
H264.LD |
| NarrowBandType |
string |
转码类型。取值:
|
0 |
| Height |
integer |
媒体流高度。单位:px。 |
640 |
| Bitrate |
string |
媒体流码率。单位:Kbps。 |
450.878 |
| ModificationTime |
string |
更新时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。 |
2022-04-20T06:32:19Z |
| WatermarkId |
string |
当前媒体流关联的水印模板 ID。 |
dgfn26457856**** |
| Encrypt |
integer |
媒体流是否加密流,取值:
|
1 |
| Definition |
string |
视频流清晰度定义。取值:
|
LD |
| EncryptType |
string |
媒体流加密类型。取值:
说明
如果加密类型为 AliyunVoDEncryption,则只能使用阿里云播放器 SDK 才能正常播放。 |
AliyunVoDEncryption |
| EncryptMode |
string |
媒体流加密模式。取值:
说明
如果加密模式为 License,则只能使用阿里云播放器 SDK 才能正常播放。 |
License |
| StreamType |
string |
媒体流类型。 若媒体流为视频则取值:video,若是纯音频则取值:audio。 |
video |
| JobId |
string |
媒体流转码的作业 ID。作为媒体流的唯一标识。 |
80e9c6580e754a798c3c19c59b16**** |
| Size |
integer |
媒体流大小。单位:Byte。 |
418112 |
| Width |
integer |
媒体流宽度。单位:px。 |
360 |
| Fps |
string |
媒体流帧率。单位:帧/每秒。 |
25 |
| Duration |
string |
媒体流长度。单位:秒。 |
9.0464 |
| PlayURL |
string |
视频流的播放地址。 |
https://example.aliyundoc.com/d52ee123f331466aabf6ab32a93d****/a777f9e24e6e47a2a942467d5c38ea37-8ee8e04293c6657fdda282bc422704****.m3u8 |
| Format |
string |
媒体流格式。
|
m3u8 |
| HDRType |
string |
媒体流 HDR 类型。取值:
|
HLG |
| BitDepth |
integer |
颜色位深。取值为整数。 |
8 |
| JobType |
integer |
数字水印类型。取值:
|
2 |
| JobExt |
string |
版权水印的自定义水印信息。仅当 |
CopyrightMarkTest |
| CodecName |
string |
编码格式简述名。 |
h264 |
| TemplateId |
string |
转码模板 ID。 |
a86a4338dd2e83da45154004a541**** |
| TemplateGroupId |
string |
转码模板组 ID。 |
fb0716154b21a4ecb5b70a26ccc8**** |
示例
正常返回示例
JSON格式
{
"RequestId": "9E290613-04F4-47F4-795D30732077****",
"NonExistMediaIds": [
"[\"bbc65bba53f6ed90de118a7849****\"]"
],
"ForbiddenMediaIds": [
"[\"bbc65bba53f6ed90de118a7849****\"]"
],
"MediaInfos": [
{
"MediaId": "10a5fa364a5b71ef89246733a78e****",
"MediaInfo": {
"StorageLocation": "outin-***.oss-cn-shanghai.aliyuncs.com",
"CreationTime": "2017-11-14T09:15:50Z",
"Status": "Normal",
"CateId": 0,
"MediaId": "7753d144efd74d6c45fe0570****",
"DownloadSwitch": "on",
"Tags": "标签1, 标签2",
"ModificationTime": "2017-06-26T06:38:48Z",
"CateName": "分类名称",
"Description": "阿里云VOD视频描述",
"AppId": "app-****",
"CoverURL": "https://example.aliyundoc.com/****.jpg",
"TemplateGroupId": "b4039216985f4312a5382a4ed****",
"Title": "阿里云VOD视频标题",
"Snapshots": [
"[\"http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****\",\"http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27243****\",...]"
],
"StorageClass": "Standard",
"RestoreStatus": "Success",
"RestoreExpiration": "2023-03-30T10:14:14Z",
"UserData": "{\"Extend\":\"xxx\",\"MessageCallback\":\"xxx\"}"
},
"MezzanineInfo": {
"CreationTime": "2017-11-14T09:15:50Z",
"Status": "Normal",
"FileURL": "http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/27ffc438-164h67f57ef-0005-6884-51a-1****.mp4",
"MediaId": "1f1a6fc03ca04814031b8a6559e****",
"Height": 540,
"Bitrate": "771.2280",
"FileName": "27ffc438-164h67f57ef-0005-6884-51a-1****.mp4\n",
"Width": 960,
"Size": 4096477,
"Duration": "42.4930",
"Fps": "25.0000",
"AudioStreamList": [
{
"Index": "0",
"Timebase": "0.000000",
"SampleFmt": "fltp",
"SampleRate": "44100",
"ChannelLayout": "mono",
"Lang": "und",
"CodecLongName": "AAC (Advanced Audio Coding)\n",
"Channels": "1",
"NumFrames": "1",
"Bitrate": "62.885",
"CodecTagString": "mp4a",
"StartTime": "2017-01-11T12:00:00Z",
"CodecName": "aac",
"Duration": "3.227574",
"CodecTag": "0x6134706d",
"CodecTimeBase": "1/44100"
}
],
"VideoStreamList": [
{
"Timebase": "0.000000",
"Index": "1",
"AvgFPS": "30.0",
"PixFmt": "yuv420p",
"Lang": "und",
"Sar": "0:1",
"Height": "320",
"CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"NumFrames": "0",
"Bitrate": "500",
"Rotate": "90",
"CodecTagString": "avc1",
"HasBFrames": "0",
"Profile": "Main",
"StartTime": "2017-01-11T12:00:00Z",
"Dar": "0:1",
"CodecName": "h264",
"Width": "568",
"Duration": "3.166667",
"Fps": "30.0",
"CodecTag": "0x31637661",
"CodecTimeBase": "1/60",
"Level": "30",
"HDRType": "HDR"
}
],
"FileMD5": ""
},
"PlayInfoList": [
{
"CreationTime": "2022-04-18T07:37:15Z\n",
"Status": "Normal",
"Specification": "H264.LD",
"NarrowBandType": "0",
"Height": 640,
"Bitrate": "450.878",
"ModificationTime": "2022-04-20T06:32:19Z",
"WatermarkId": "dgfn26457856****",
"Encrypt": 1,
"Definition": "LD",
"EncryptType": "AliyunVoDEncryption",
"EncryptMode": "License",
"StreamType": "video",
"JobId": "80e9c6580e754a798c3c19c59b16****",
"Size": 418112,
"Width": 360,
"Fps": "25",
"Duration": "9.0464",
"PlayURL": "https://example.aliyundoc.com/d52ee123f331466aabf6ab32a93d****/a777f9e24e6e47a2a942467d5c38ea37-8ee8e04293c6657fdda282bc422704****.m3u8",
"Format": "m3u8",
"HDRType": "HLG",
"BitDepth": 8,
"JobType": 2,
"JobExt": "CopyrightMarkTest",
"CodecName": "h264",
"TemplateId": "a86a4338dd2e83da45154004a541****",
"TemplateGroupId": "fb0716154b21a4ecb5b70a26ccc8****"
}
]
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。