批量獲取媒資基礎資訊和來源檔案資訊。
介面說明
調試
您可以在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 |
分類 ID。 |
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 |
來源檔案的 MD5 值。 |
6d5f8c9a3b2e1d4c7a8b9c0d1e2f3a4b |
| 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": "6d5f8c9a3b2e1d4c7a8b9c0d1e2f3a4b"
},
"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****"
}
]
}
]
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。