批量擷取媒資資訊,支援傳入多個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****"
]
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。