根據IMS mediaId或媒資InputURL,擷取並返回媒資資訊。
介面說明
MediaId 不為空白時,優先使用 MediaId。如果 MediaId 為空白,則 InputURL 必須非空。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ice:GetMediaInfo |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| MediaId |
string |
否 |
IMS 媒資 ID,若為空白,則必須有 InputURL。 |
****20b48fb04483915d4f2cd8ac**** |
| InputURL |
string |
否 |
待查詢的媒資在相應系統中的地址,使用前必須在 IMS 內容庫中註冊並與 IMS 的 mediaId 綁定
http(s)://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 或者 oss://example-bucket/example.mp4 此格式預設 oss region 與服務接入地區一致。 |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| OutputType |
string |
否 |
傳回值中媒資檔案地址的類型:
|
cdn |
| ReturnDetailedInfo |
string |
否 |
配置對應媒資欄位是否返回詳細資料,支援欄位: AiRoughData.StandardSmartTagJob: 如果媒資提交過標籤分析,是否返回詳細標籤結果。
|
{"AiRoughData.StandardSmartTagJob": false} |
| AuthTimeout |
integer |
否 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID |
2FDE2411-DB8D-4A9A-875B-275798F14A5E |
| MediaInfo |
object |
媒資資訊 |
|
| MediaId |
string |
媒資 ID |
****20b48fb04483915d4f2cd8ac**** |
| MediaBasicInfo |
object |
BasicInfo |
|
| MediaId |
string |
MediaId |
****20b48fb04483915d4f2cd8ac**** |
| InputURL |
string |
被查詢的媒資在相應系統中的地址 |
https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| MediaType |
string |
媒資媒體類型 |
video |
| BusinessType |
string |
媒資業務類型 |
general |
| Source |
string |
來源 |
oss |
| Title |
string |
標題 |
標題 |
| Description |
string |
內容描述 |
描述 |
| Category |
string |
分類 |
分類 |
| MediaTags |
string |
標籤 |
標籤,tag1 |
| 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= |
| Status |
string |
資源狀態 |
Normal |
| CreateTime |
string |
媒資建立時間 |
2020-12-26T04:11:08Z |
| ModifiedTime |
string |
媒資修改時間 |
2020-12-26T04:11:10Z |
| DeletedTime |
string |
媒資刪除時間 |
2020-12-26T04:11:15Z |
| 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"}] |
| CateId |
integer |
分類別識別碼 |
3048 |
| Biz |
string |
媒資所屬業務 |
ICE |
| UploadSource |
string |
媒資上傳來源 |
general |
| CateName |
string |
分類名稱 |
cateName |
| ReferenceId |
string |
自訂 ID,僅支援小寫字母、大寫字母、數字、橫線、底線,長度 6-64 位元。使用者維度唯一。 |
123-1234 |
| FileInfoList |
array<object> |
FileInfo 列表 |
|
|
array<object> |
|||
| FileBasicInfo |
object |
檔案基礎資訊,包含時間長度,大小等 |
|
| FileName |
string |
檔案名稱 |
example.mp4 |
| 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 |
時間長度 |
216.206667 |
| Bitrate |
string |
碼率 |
1132.68 |
| Width |
string |
寬 |
960 |
| Height |
string |
高 |
540 |
| CreateTime |
string |
檔案建立時間 |
2020-12-26T04:11:08Z |
| ModifiedTime |
string |
檔案修改時間 |
2020-12-26T04:11:10Z |
| AudioStreamInfoList |
array<object> |
音頻流資訊,一個媒資可能有多條音頻流 |
|
|
object |
|||
| Index |
string |
音頻流序號 |
1 |
| CodecName |
string |
編碼格式簡述名 |
aac |
| CodecLongName |
string |
編碼格式長述名 |
AAC (Advanced Audio Coding) |
| CodecTimeBase |
string |
編碼時基 |
1/24000 |
| CodecTagString |
string |
編碼格式標記文本 |
mp4a |
| CodecTag |
string |
編碼格式標記 |
0x6134706d |
| Profile |
string |
編碼預置 |
High |
| SampleFmt |
string |
採樣格式 |
fltp |
| SampleRate |
string |
採樣率 |
44100 |
| Channels |
string |
聲道數 |
2 |
| ChannelLayout |
string |
聲道輸出樣式 |
stereo |
| Timebase |
string |
時基 |
1/44100 |
| StartTime |
string |
起始時間 |
0.000000 |
| Duration |
string |
時間長度 |
16.200998 |
| Bitrate |
string |
碼率 |
127.794 |
| Fps |
string |
音訊框架率 |
8 |
| NumFrames |
string |
總幀數 |
10 |
| Lang |
string |
語言 |
und |
| VideoStreamInfoList |
array<object> |
視頻流資訊,一個媒資可能有多條視頻流 |
|
|
object |
|||
| Index |
string |
視頻流序號 |
0 |
| CodecName |
string |
編碼格式簡述名 |
h264 |
| CodecLongName |
string |
編碼格式長述名 |
H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 |
| Profile |
string |
編碼預置 |
High |
| CodecTimeBase |
string |
編碼時基 |
1/48 |
| CodecTagString |
string |
編碼格式標記文本 |
[0][0][0][0] |
| CodecTag |
string |
編碼格式標記 |
0x0000 |
| Width |
string |
寬 |
960 |
| Height |
string |
高 |
540 |
| HasBFrames |
string |
是否有 B 幀 |
2 |
| Sar |
string |
編碼訊號解析度比 |
0:1 |
| Dar |
string |
編碼顯示解析度比 |
0:1 |
| PixFmt |
string |
像素格式 |
yuv420p |
| Level |
string |
編碼等級 |
30 |
| Fps |
string |
視訊框架率 |
24.0 |
| AvgFPS |
string |
平均幀率 |
24.0 |
| Timebase |
string |
時基 |
1/12288 |
| StartTime |
string |
起始時間 |
0.081706 |
| Duration |
string |
時間長度 |
216.206706 |
| Bitrate |
string |
碼率 |
1001.594 |
| NumFrames |
string |
總幀數 |
5184 |
| Lang |
string |
語言 |
und |
| Rotate |
string |
旋轉 |
0 |
| Nb_frames |
string |
總幀數 |
5184 |
| SubtitleStreamInfoList |
array<object> |
字幕流資訊,一個媒資可能有多條字幕流 |
|
|
object |
|||
| Index |
string |
字幕流序號 |
1 |
| CodecName |
string |
編碼格式簡述名 |
srt |
| CodecLongName |
string |
編碼格式長述名 |
SubRip Text |
| CodecTimeBase |
string |
編碼時基 |
29.97 |
| CodecTagString |
string |
編碼格式標記文本 |
unicode |
| CodecTag |
string |
編碼格式標記 |
unicode |
| Timebase |
string |
時基 |
30 |
| StartTime |
string |
起始時間 |
0 |
| Duration |
string |
時間長度 |
1 |
| Lang |
string |
語言 |
und |
| AiRoughData |
object |
AI 分析未經處理資料 |
|
| Result |
string |
AI 分析原始結果 |
https://sample-bucket.cn-shanghai.aliyuncs.com/result.json |
| Status |
string |
AI 分析狀態:
|
Analyzing |
| SaveType |
string |
入庫類型,智能分析完成後是否入搜尋庫。取值:
|
TEXT |
| AiCategory |
string |
AI 分類,取值:
|
生活 |
| AiJobId |
string |
AI 任務 ID |
****483915d4f2cd8ac20b48fb04**** |
| StandardSmartTagJob |
object |
標籤任務 |
|
| AiJobId |
string |
AI 任務 ID |
****483915d4f2cd8ac20b48fb04**** |
| Status |
string |
AI 分析狀態:
|
Analyzing |
| ResultUrl |
string |
標籤結果 URL。 |
http://xx.oss-cn-shanghai.aliyuncs.com/result2.txt |
| Results |
array<object> |
標籤識別結果清單。 |
|
|
object |
標籤識別結果 |
||
| Data |
string |
分析結果的具體資料,以 JSON 字串表示。不同 Type 的資料結構詳見Result 參數說明。 |
{"autoChapters": [...]} |
| Type |
string |
標籤識別類型,取值:
|
NLP |
樣本
正常返回樣本
JSON格式
{
"RequestId": "2FDE2411-DB8D-4A9A-875B-275798F14A5E",
"MediaInfo": {
"MediaId": "****20b48fb04483915d4f2cd8ac****",
"MediaBasicInfo": {
"MediaId": "****20b48fb04483915d4f2cd8ac****",
"InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
"MediaType": "video",
"BusinessType": "general",
"Source": "oss",
"Title": "標題",
"Description": "描述",
"Category": "分類",
"MediaTags": "標籤,tag1",
"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",
"CreateTime": "2020-12-26T04:11:08Z",
"ModifiedTime": "2020-12-26T04:11:10Z",
"DeletedTime": "2020-12-26T04:11:15Z",
"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\"}]",
"CateId": 3048,
"Biz": "ICE",
"UploadSource": "general",
"CateName": "cateName",
"ReferenceId": "123-1234"
},
"FileInfoList": [
{
"FileBasicInfo": {
"FileName": "example.mp4",
"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": "216.206667",
"Bitrate": "1132.68",
"Width": "960",
"Height": "540",
"CreateTime": "2020-12-26T04:11:08Z",
"ModifiedTime": "2020-12-26T04:11:10Z"
},
"AudioStreamInfoList": [
{
"Index": "1",
"CodecName": "aac",
"CodecLongName": "AAC (Advanced Audio Coding)",
"CodecTimeBase": "1/24000",
"CodecTagString": "mp4a",
"CodecTag": "0x6134706d",
"Profile": "High",
"SampleFmt": "fltp",
"SampleRate": "44100",
"Channels": "2",
"ChannelLayout": "stereo",
"Timebase": "1/44100",
"StartTime": "0.000000",
"Duration": "16.200998",
"Bitrate": "127.794",
"Fps": "8",
"NumFrames": "10",
"Lang": "und"
}
],
"VideoStreamInfoList": [
{
"Index": "0",
"CodecName": "h264",
"CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"Profile": "High",
"CodecTimeBase": "1/48",
"CodecTagString": "[0][0][0][0]",
"CodecTag": "0x0000",
"Width": "960",
"Height": "540",
"HasBFrames": "2",
"Sar": "0:1",
"Dar": "0:1",
"PixFmt": "yuv420p",
"Level": "30",
"Fps": "24.0",
"AvgFPS": "24.0",
"Timebase": "1/12288",
"StartTime": "0.081706",
"Duration": "216.206706",
"Bitrate": "1001.594",
"NumFrames": "5184",
"Lang": "und",
"Rotate": "0",
"Nb_frames": "5184"
}
],
"SubtitleStreamInfoList": [
{
"Index": "1",
"CodecName": "srt",
"CodecLongName": "SubRip Text",
"CodecTimeBase": "29.97",
"CodecTagString": "unicode",
"CodecTag": "unicode",
"Timebase": "30",
"StartTime": "0",
"Duration": "1",
"Lang": "und"
}
]
}
],
"AiRoughData": {
"Result": "https://sample-bucket.cn-shanghai.aliyuncs.com/result.json",
"Status": "Analyzing",
"SaveType": "TEXT",
"AiCategory": "生活",
"AiJobId": "****483915d4f2cd8ac20b48fb04****",
"StandardSmartTagJob": {
"AiJobId": "****483915d4f2cd8ac20b48fb04****",
"Status": "Analyzing",
"ResultUrl": "http://xx.oss-cn-shanghai.aliyuncs.com/result2.txt",
"Results": [
{
"Data": "{\"autoChapters\": [...]}",
"Type": "NLP"
}
]
}
}
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。