使用OSS檔案地址查詢媒體。
介面說明
本介面一次最多查詢 10 個媒體檔案。
調用本介面前,請先調用新增媒體介面新增媒體檔案,再調用本介面查詢媒體資訊。
本介面僅支援查詢工作流程處理的檔案資訊。新上傳的媒體檔案,需要工作流程執行完成後,通過本介面擷取的檔案資訊才會完整。非工作流程處理任務要想獲得視頻資料資訊,需要調用 SubmitMediaInfoJob 處理媒體資訊作業之後方可查看。
QPS 限制
本介面的單使用者 QPS 限制為 100 次/秒。超過限制,API 呼叫會被限流,這可能會影響您的業務,請合理調用。更多資訊,請參見 QPS 限制。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
mts:QueryMediaListByURL |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| FileURLs |
string |
是 |
需要查詢的媒體檔案地址,可以登入 MPS 控制台,通過媒體管理 > 媒體列表找到需要查詢的媒體檔案,單擊操作列管理,在擷取轉碼地址頁簽中擷取媒體檔案地址。用半形逗號(,)分隔,一次最多查詢 10 個。
|
http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| IncludePlayList |
boolean |
否 |
返回結果中是否包含播放資訊。
|
true |
| IncludeSnapshotList |
boolean |
否 |
返回結果中是否包含截圖資訊。
|
true |
| IncludeMediaInfo |
boolean |
否 |
返回結果中是否包含媒體資訊。
|
true |
| IncludeSummaryList |
boolean |
否 |
返回結果中是否包含摘要列表。
|
true |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回參數。 |
||
| MediaList |
object |
||
| Media |
array<object> |
媒體列表。 |
|
|
array<object> |
媒體詳細資料。 |
||
| CreationTime |
string |
建立時間。 |
2021-07-14T13:05:00Z |
| CateId |
integer |
類目 ID。 |
123 |
| Height |
string |
查詢到的媒體檔案的高。 |
360 |
| CensorState |
string |
視頻審核狀態。取值:
|
Initiated |
| Tags |
object |
||
| Tag |
array |
標籤資訊。 |
|
|
string |
標籤列表。 |
tag1,tag2 |
|
| PlayList |
object |
||
| Play |
array<object> |
播放清單。 |
|
|
array<object> |
播放檔案詳細資料。 |
||
| Encryption |
string |
加密。取值:
|
1 |
| Height |
string |
高。 |
10 |
| Bitrate |
string |
碼率。 |
25.067 |
| File |
object |
播放檔案。 |
|
| State |
string |
檔案狀態。取值範圍:
|
Normal |
| URL |
string |
播放檔案的輸入 OSS Bucket。 |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4 |
| MediaWorkflowId |
string |
產生播放檔案的工作流程 ID。 |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| Width |
string |
寬。 |
11 |
| Size |
string |
大小。 |
100 |
| Fps |
string |
幀率。 |
25.0 |
| Duration |
string |
時間長度。 |
7.965000 |
| ActivityName |
string |
媒體工作流程活動名稱。 |
test name |
| Format |
string |
編碼格式。支援 mov、mp4、m4a、3gp、3g2、mj2。 |
mov |
| MediaWorkflowName |
string |
產生播放檔案的工作流程。 |
example-mediaworkflow-**** |
| Bitrate |
string |
碼率。 |
593.192 |
| MediaId |
string |
媒體 ID。 |
52d7e98b05e648199612290bb819**** |
| File |
object |
輸入檔案詳細資料。 |
|
| State |
string |
檔案狀態。取值範圍:
|
Normal |
| URL |
string |
輸入檔案的 OSS Bucket。 |
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
| SummaryList |
object |
||
| Summary |
array<object> |
視頻摘要列表。 |
|
|
array<object> |
視頻摘要資料。 |
||
| Type |
string |
摘要類型。取值範圍:
|
Gif |
| MediaWorkflowId |
string |
產生摘要的工作流程 ID。 |
93ab850b4f6f44eab54b6e91d24d**** |
| ActivityName |
string |
媒體工作流程活動名稱。 |
example-activity-**** |
| MediaWorkflowName |
string |
產生摘要的工作流程。 |
example-mediaworkflow-**** |
| File |
object |
原檔案。 |
|
| State |
string |
檔案狀態。取值範圍:
|
Normal |
| URL |
string |
輸入檔案的 OSS Bucket。 |
http://example-bucket-****.o |
| PublishState |
string |
媒體發布狀態,表示是否對外發布媒體。取值範圍:
|
Published |
| MediaInfo |
object |
媒體資訊。 |
|
| Streams |
object |
流資訊。 |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
視頻流列表。 |
|
|
array<object> |
視頻流資料。 |
||
| Sar |
string |
編碼訊號解析度比。 |
1:1 |
| Height |
string |
視頻解析度高。 |
360 |
| CodecTagString |
string |
編碼格式標記文本。 |
avc1 |
| NetworkCost |
object |
網路頻寬消耗。 |
|
| PreloadTime |
string |
預先載入時間。 |
0.01 |
| AvgBitrate |
string |
平均碼率。 |
2659.326 |
| CostBandwidth |
string |
最大消耗頻寬。 |
100 |
| Width |
string |
視頻解析度寬,數字,不能為負數。 |
640 |
| Index |
string |
視頻流序號,標識視頻流在整個媒體流中的位置。 |
5 |
| Timebase |
string |
時基。 |
1/15360 |
| AvgFPS |
string |
平均幀率。 |
15.0 |
| PixFmt |
string |
像素格式。 |
yuv420p |
| Lang |
string |
語言。更多資訊,請參見 FFmpeg 語言定義。 |
und |
| CodecLongName |
string |
編碼格式長述名。 |
H.264/AVC/MPEG-4 AVC/MPEG-4 part 10 |
| NumFrames |
string |
總幀數。 |
12 |
| Rotate |
string |
視頻旋轉角度。 |
90 |
| Bitrate |
string |
碼率。 |
512.701 |
| HasBFrames |
string |
是否有 B 幀。1 表示有,2 表示沒有。 |
2 |
| Profile |
string |
編碼預置。 |
High |
| StartTime |
string |
起始時間。 |
0.046029 |
| Dar |
string |
編碼顯示解析度比。 |
16:9 |
| CodecName |
string |
編碼格式簡述名。支援 H264、mov、aac、avc、mpeg。 |
H264 |
| Duration |
string |
時間長度。 |
79.200000 |
| Fps |
string |
幀率。 |
15.0 |
| CodecTag |
string |
編碼格式標記。 |
0x31637661 |
| CodecTimeBase |
string |
編碼時基。 |
1/30 |
| Level |
string |
編碼等級。 |
31 |
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
音頻流列表。 |
|
|
object |
音頻流資料。 |
||
| Timebase |
string |
時基。 |
1/44100 |
| Index |
string |
音頻流序號,標識音頻流在整個媒體流中的位置。 |
1 |
| SampleFmt |
string |
採樣格式。 |
fltp |
| ChannelLayout |
string |
聲道輸出樣式。 |
stereo |
| Lang |
string |
語言。參考 FFmpeg 語言定義。 |
und |
| Samplerate |
string |
採樣率。 |
44100 |
| CodecLongName |
string |
編碼格式長述名。 |
AAC (Advanced Audio Coding) |
| Channels |
string |
聲道數。 |
2 |
| NumFrames |
string |
總幀數。 |
100 |
| Bitrate |
string |
碼率。 |
76.356 |
| CodecTagString |
string |
編碼格式標記文本。 |
mp4a |
| StartTime |
string |
起始時間。 |
0.000000 |
| CodecName |
string |
編碼格式簡述名。支援 H264、mov、aac、avc、mpeg。 |
aac |
| Duration |
string |
時間長度。 |
79.203265 |
| CodecTag |
string |
編碼格式標記。 |
0x6134706d |
| CodecTimeBase |
string |
編碼時基。 |
1/44100 |
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
字幕流列表。 |
|
|
object |
字幕流資料。 |
||
| Index |
string |
字幕流序號,標識字幕流在整個媒體流中的位置。 |
1 |
| Lang |
string |
語言。參考 FFmpeg 語言定義。 |
und |
| Format |
object |
格式資訊。 |
|
| StartTime |
string |
開始時間。 |
0.000000 |
| NumPrograms |
string |
節目流總數。 |
0 |
| Size |
string |
大小。 |
5872904 |
| NumStreams |
string |
媒體流總數。 |
2 |
| FormatLongName |
string |
編碼格式長述名。 |
QuickTime/MOV |
| Duration |
string |
時間長度。 |
79.204000 |
| Bitrate |
string |
碼率。 |
593.192 |
| FormatName |
string |
容器/封裝格式簡述名,支援 mov,mp4,m4a,3gp,3g2,mj2。 |
mov |
| Description |
string |
描述。 |
This is description **** |
| Size |
string |
檔案大小。 |
5872904 |
| Width |
string |
寬。 |
640 |
| CoverURL |
string |
封面的 OSS Bucket。 |
http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png |
| SnapshotList |
object |
||
| Snapshot |
array<object> |
截圖列表。 |
|
|
array<object> |
截圖檔案詳細資料。 |
||
| Type |
string |
截圖類型。取值範圍:
|
Single |
| MediaWorkflowId |
string |
產生截圖檔案的工作流程 ID。 |
6cc3aa66d1cb4bb2adf14e726c0a**** |
| ActivityName |
string |
產生截圖檔案的工作流程活動名稱。 |
example-activity1-**** |
| Count |
string |
截圖張數。此值只在 Type 為 Sequence 時有意義。 |
3 |
| MediaWorkflowName |
string |
產生截圖檔案的工作流程。 |
example-workflow-**** |
| File |
object |
截圖檔案。 |
|
| State |
string |
檔案狀態。取值範圍:
|
Normal |
| URL |
string |
截圖檔案的 OSS Bucket。 |
http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png |
| RunIdList |
object |
||
| RunId |
array |
媒體工作流程列表。 |
|
|
string |
媒體工作流程 ID 列表。 |
9343bd0e7bb54ae19228529908e5**** |
|
| Duration |
string |
時間長度。 |
79.204000 |
| Fps |
string |
幀率。 |
15.0 |
| Title |
string |
標題。 |
kled.mp4 |
| Format |
string |
編碼格式。支援 mov,mp4,m4a,3gp,3g2,mj2。 |
mov |
| NonExistFileURLs |
object |
||
| FileURL |
array |
不存在的媒體列表資訊。 |
|
|
string |
不存在的媒體 ID,無資料時此參數不返回。 |
null |
|
| RequestId |
string |
請求 ID。 |
1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42 |
樣本
正常返回樣本
JSON格式
{
"MediaList": {
"Media": [
{
"CreationTime": "2021-07-14T13:05:00Z",
"CateId": 123,
"Height": "360",
"CensorState": "Initiated",
"Tags": {
"Tag": [
"tag1,tag2"
]
},
"PlayList": {
"Play": [
{
"Encryption": "1",
"Height": "10",
"Bitrate": "25.067",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4"
},
"MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
"Width": "11",
"Size": "100",
"Fps": "25.0",
"Duration": "7.965000",
"ActivityName": "test name",
"Format": "mov",
"MediaWorkflowName": "example-mediaworkflow-****"
}
]
},
"Bitrate": "593.192",
"MediaId": "52d7e98b05e648199612290bb819****",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
},
"SummaryList": {
"Summary": [
{
"Type": "Gif",
"MediaWorkflowId": "93ab850b4f6f44eab54b6e91d24d****",
"ActivityName": "example-activity-****",
"MediaWorkflowName": "example-mediaworkflow-****",
"File": {
"State": "Normal",
"URL": "http://example-bucket-****.o"
}
}
]
},
"PublishState": "Published",
"MediaInfo": {
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Sar": "1:1",
"Height": "360",
"CodecTagString": "avc1",
"NetworkCost": {
"PreloadTime": "0.01",
"AvgBitrate": "2659.326",
"CostBandwidth": "100"
},
"Width": "640",
"Index": "5",
"Timebase": "1/15360",
"AvgFPS": "15.0",
"PixFmt": "yuv420p",
"Lang": "und",
"CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
"NumFrames": "12",
"Rotate": "90",
"Bitrate": "512.701",
"HasBFrames": "2",
"Profile": "High",
"StartTime": "0.046029",
"Dar": "16:9",
"CodecName": "H264",
"Duration": "79.200000",
"Fps": "15.0",
"CodecTag": "0x31637661",
"CodecTimeBase": "1/30",
"Level": "31"
}
]
},
"AudioStreamList": {
"AudioStream": [
{
"Timebase": "1/44100",
"Index": "1",
"SampleFmt": "fltp",
"ChannelLayout": "stereo",
"Lang": "und",
"Samplerate": "44100",
"CodecLongName": "AAC (Advanced Audio Coding)",
"Channels": "2",
"NumFrames": "100",
"Bitrate": "76.356",
"CodecTagString": "mp4a",
"StartTime": "0.000000",
"CodecName": "aac",
"Duration": "79.203265",
"CodecTag": "0x6134706d",
"CodecTimeBase": "1/44100"
}
]
},
"SubtitleStreamList": {
"SubtitleStream": [
{
"Index": "1",
"Lang": "und"
}
]
}
},
"Format": {
"StartTime": "0.000000",
"NumPrograms": "0",
"Size": "5872904",
"NumStreams": "2",
"FormatLongName": "QuickTime/MOV",
"Duration": "79.204000",
"Bitrate": "593.192",
"FormatName": "mov"
}
},
"Description": "This is description ****",
"Size": "5872904",
"Width": "640",
"CoverURL": "http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png",
"SnapshotList": {
"Snapshot": [
{
"Type": "Single",
"MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
"ActivityName": "example-activity1-****",
"Count": "3",
"MediaWorkflowName": "example-workflow-****",
"File": {
"State": "Normal",
"URL": "http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png"
}
}
]
},
"RunIdList": {
"RunId": [
"9343bd0e7bb54ae19228529908e5****"
]
},
"Duration": "79.204000",
"Fps": "15.0",
"Title": "kled.mp4",
"Format": "mov"
}
]
},
"NonExistFileURLs": {
"FileURL": [
"null"
]
},
"RequestId": "1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。