批量擷取媒資基礎資訊和源檔案資訊。
介面說明
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vod:BatchGetMediaInfos |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| MediaIds |
string |
是 |
媒資 ID,即音/視頻 ID(VideoId)。多個 ID 之間使用半形逗號(,)分隔,最多支援 20 個。可通過以下方式擷取:
|
61ccbdb06fa83012be4d8083f6****,7d2fbc380b0e08e55f**** |
| ReferenceIds |
string |
否 |
自訂 ID 列表。由一個或多個自訂 ID 組成,多個 ID 之間使用半形逗號(,)分隔。最多支援 20 個。 |
123-123,1234-1234 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
9E290613-04F4-47F4-795D30732077**** |
| NonExistMediaIds |
array |
不存在的媒資 ID 列表。 |
|
|
string |
不存在的媒資 ID 列表。 |
["bbc65bba53f6ed90de118a7849****"] |
|
| NonExistReferenceIds |
array |
不存在的自訂 ID 列表。 |
|
|
string |
不存在的自訂 ID 列表。 |
123-123 |
|
| 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 |
分類別識別碼。 |
781111**** |
| MediaId |
string |
媒資 ID。 |
7753d144efd74d6c45fe0570**** |
| DownloadSwitch |
string |
離線下載開關狀態,開啟離線下載功能後,則允許移動端使用者通過阿里雲播放器將視頻緩衝至本地觀看。具體操作,請參見離線下載。取值:
|
on |
| Tags |
string |
音/視頻標籤。多個標籤之間使用半形逗號(,)分隔。 |
tag1, tag2 |
| ModificationTime |
string |
音/視頻的最後一次更新時間。格式為:yyyy-MM-ddTHH:mm:ssZ(UTC 時間)。 |
2017-06-26T06:38:48Z |
| CateName |
string |
分類名稱。 |
cate1 |
| Description |
string |
音/視頻描述。 |
Alibaba Cloud VOD video description |
| AppId |
string |
應用 ID。 |
app-**** |
| CoverURL |
string |
音/視頻封面 URL。 |
https://example.aliyundoc.com/****.jpg |
| TemplateGroupId |
string |
轉碼模板組 ID。 |
b4039216985f4312a5382a4ed**** |
| Title |
string |
音/視頻標題。 |
Alibaba Cloud VOD Video Title |
| 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"} |
| ReferenceId |
string |
自訂 ID,僅支援小寫字母、大寫字母、數字、橫線、底線,長度 6-64 位元。使用者維度唯一。 |
123-123 |
| 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****\"]"
],
"NonExistReferenceIds": [
"123-123"
],
"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": "tag1, tag2",
"ModificationTime": "2017-06-26T06:38:48Z",
"CateName": "cate1",
"Description": "Alibaba Cloud VOD video description",
"AppId": "app-****",
"CoverURL": "https://example.aliyundoc.com/****.jpg",
"TemplateGroupId": "b4039216985f4312a5382a4ed****",
"Title": "Alibaba Cloud VOD Video Title",
"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\"}",
"ReferenceId": "123-123"
},
"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****"
}
]
}
]
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。