提交媒體資訊作業。調用本介面之後ApsaraVideo for Media Processing會對輸入檔案進行媒體資訊分析,返回輸入檔案的媒體資訊。
介面說明
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
mts:SubmitMediaInfoJob |
create |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Input |
string |
是 |
作業輸入。詳細說明請參見 Input 詳情。 說明
|
{"Bucket":"example-bucket","Location":"example-location","Object":"example%2Fexample.flv"} |
| UserData |
string |
否 |
使用者自訂資料。可以使用中英文、數字、中劃線(-)等,不能以特殊符號開頭,最大長度 1024 個位元組。 |
testid-001 |
| PipelineId |
string |
否 |
管道 ID。詳細資料請參見基本概念。 |
88c6ca184c0e432bbf5b665e2a15**** |
| Async |
boolean |
否 |
是否發起非同步作業。取值:
|
true |
| Config |
string |
否 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回參數。 |
||
| MediaInfoJob |
object |
媒體資訊作業詳細資料。 |
|
| CreationTime |
string |
作業添加時間。 |
2014-01-10T12:00:00Z |
| State |
string |
作業狀態。
|
Analyzing |
| JobId |
string |
元資訊分析作業 ID。 |
23ca1d184c0e4341e5b665e2a12**** |
| UserData |
string |
使用者自訂資料。 |
testid-001 |
| Code |
string |
元資訊分析失敗時錯誤碼。 |
InvalidParameter.JsonObjectFormatInvalid |
| Message |
string |
元資訊分析失敗時錯誤資訊。 |
The parameter ”*” does not conform to the JSON Object specification |
| PipelineId |
string |
管道 ID。 |
88c6ca184c0e432bbf5b665e2a15**** |
| Async |
boolean |
是否非同步。 |
true |
| Input |
object |
作業輸入資訊。 |
|
| Object |
string |
輸入檔案的 OSS Object。 |
example.flv |
| Location |
string |
輸入檔案 OSS 的服務地區。 |
example-location |
| Bucket |
string |
輸入檔案的 OSS Bucket。 |
example-bucket |
| MNSMessageResult |
object |
MNS 通知使用者作業完成的結果。 |
|
| MessageId |
string |
成功時訊息 ID。如果執行失敗則不返回此參數。 |
16f01ad6175e4230ac42bb5182cd**** |
| ErrorMessage |
string |
失敗時錯誤資訊。如果執行成功則不返回此參數。 |
InvalidParameter.JsonObjectFormatInvalid |
| ErrorCode |
string |
失敗時錯誤碼。如果執行成功則不返回此參數。 |
The parameter \"Input\" does not conform to the JSON Object specification |
| Properties |
object |
媒體檔案屬性。 |
|
| Width |
string |
視頻寬度,單位為 px。 |
1920 |
| Height |
string |
視頻高度,單位為 px。 |
1080 |
| Duration |
string |
總時間長度,單位為秒(s)。 |
17.226000 |
| Fps |
string |
幀率。 |
25 |
| Bitrate |
string |
碼率。單位為 Kbps。 |
1630.045 |
| FileFormat |
string |
檔案格式。 |
QuickTime/MOV |
| Streams |
object |
流資訊。 |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
視頻流列表。列表元素至多 4 個。 |
|
|
array<object> |
返回參數。 |
||
| Sar |
string |
編碼訊號解析度比。 |
1:1 |
| Height |
string |
視頻高度,單位為 px。 |
1080 |
| CodecTagString |
string |
編碼格式標記文本。 |
avc1 |
| NetworkCost |
object |
網路頻寬消耗。 |
|
| PreloadTime |
string |
預先載入時間。 |
8 |
| AvgBitrate |
string |
平均碼率,單位為 Kbps。 |
300.34 |
| CostBandwidth |
string |
最大消耗頻寬。 |
10 |
| Width |
string |
視頻寬度,單位為 px。 |
1920 |
| Index |
string |
視頻流序號。標識視頻流在整個媒體流中的位置。某些播放平台可以指定起播的視頻流序號,某些預設從 1 號起播。 |
1 |
| Timebase |
string |
時基。 |
1/24000 |
| AvgFPS |
string |
平均幀率。 |
23.976025 |
| PixFmt |
string |
像素格式。 |
yuv420p |
| Lang |
string |
語言。 |
eng |
| CodecLongName |
string |
編碼格式長述名。 |
H.264/AVC/MPEG-4 AVC/MPEG-4 part 10 |
| NumFrames |
string |
總幀數。 |
100 |
| Rotate |
string |
視頻旋轉角度。 |
90 |
| Bitrate |
string |
碼率,單位 Kbps。 |
1496.46 |
| HasBFrames |
string |
是否有 B 幀。0 表示無,1 表示有。 |
0 |
| Profile |
string |
編碼預置。 |
High |
| StartTime |
string |
起始時間。 |
0.042000 |
| Dar |
string |
編碼顯示解析度比。Dar=視頻寬度/視頻高度,可以作為判斷視頻橫豎屏的依據。 |
16:9 |
| CodecName |
string |
編碼格式簡述名。可選值:
|
h264 |
| Duration |
string |
時間長度,單位為秒(s)。 |
17.225542 |
| Fps |
string |
幀率。 |
25 |
| CodecTag |
string |
編碼格式標記。 |
0x31637661 |
| CodecTimeBase |
string |
編碼時基。 |
1001/48000 |
| Level |
string |
編碼等級。 |
41 |
| ColorRange |
string |
色彩範圍。 |
700 |
| ColorTransfer |
string |
色彩通道。 |
R255 G83 B170 |
| ColorPrimaries |
string |
色原。 |
700 |
| DurationInaccurate |
string |
||
| DolbyVision |
object |
||
| Profile |
string |
||
| Level |
string |
||
| AudioStreamList |
object |
||
| AudioStream |
array<object> |
音頻流列表。列表元素至多 4 個。 |
|
|
object |
返回參數。 |
||
| Timebase |
string |
時基。 |
1/44100 |
| Index |
string |
音頻流序號。標識音頻流在整個媒體流中的位置。 |
1 |
| SampleFmt |
string |
採樣格式。 |
fltp |
| ChannelLayout |
string |
聲道輸出樣式。 |
stereo |
| Lang |
string |
語言。 |
eng |
| Samplerate |
string |
採樣率,單位 Hz。 |
44100 |
| CodecLongName |
string |
編碼格式長述名。 |
AAC (Advanced Audio Coding) |
| Channels |
string |
聲道數。 |
2 |
| NumFrames |
string |
總幀數。 |
123 |
| Bitrate |
string |
碼率,單位為 Kbps。 |
128.806 |
| CodecTagString |
string |
編碼格式標記文本。 |
mp4a |
| StartTime |
string |
起始時間。 |
0.000000 |
| CodecName |
string |
編碼格式簡述名。預設值:acc。可取值:
|
aac |
| Duration |
string |
時間長度,單位為秒(s)。 |
17.159546 |
| CodecTag |
string |
編碼格式標記。 |
0x6134706d |
| CodecTimeBase |
string |
編碼時基。 |
1/44100 |
| DurationInaccurate |
string |
||
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
字幕流列表。列表元素至多 4 個。 |
|
|
object |
返回參數。 |
||
| Timebase |
string |
時基。 |
1/1000 |
| Index |
string |
字幕流序號。標識字幕流在整個媒體流中的位置。 |
3 |
| StartTime |
string |
起始時間。 |
0.000000 |
| CodecName |
string |
編碼格式簡述名。可選值:
|
ass |
| Lang |
string |
語言。 |
eng |
| CodecLongName |
string |
編碼格式長述名。 |
ASS (Advanced SSA) subtitle |
| Duration |
string |
時間長度,單位為秒(s)。 |
1370.116000 |
| CodecTag |
string |
編碼格式標記。 |
0x0000 |
| CodecTimeBase |
string |
編碼時基。 |
0/1 |
| CodecTagString |
string |
編碼格式標記文本。 |
[0][0][0][0] |
| Format |
object |
格式資訊。 |
|
| StartTime |
string |
起始時間。 |
0.000000 |
| NumPrograms |
string |
節目流總數。 |
0 |
| Size |
string |
檔案大小,單位為位元組(byte)。 |
3509895 |
| NumStreams |
string |
媒體流總數。 |
2 |
| FormatLongName |
string |
容器、封裝格式長述名。 |
QuickTime/MOV |
| Duration |
string |
總時間長度,單位為秒(s)。 |
17.226000 |
| Bitrate |
string |
總碼率,單位為 Kbps。 |
1630.045 |
| FormatName |
string |
容器、封裝格式簡述名。更多參數資訊請參見參數詳情。 |
mov |
| Tags |
object |
||
| FileSize |
string |
檔案大小,單位為位元組(byte)。 |
3509895 |
| MD5 |
string |
||
| RequestId |
string |
請求 ID。 |
62D9BE16-B7D5-550C-A482-7A0F60E09877 |
樣本
正常返回樣本
JSON格式
{
"MediaInfoJob": {
"CreationTime": "2014-01-10T12:00:00Z",
"State": "Analyzing",
"JobId": "23ca1d184c0e4341e5b665e2a12****",
"UserData": "testid-001",
"Code": "InvalidParameter.JsonObjectFormatInvalid",
"Message": "The parameter ”*” does not conform to the JSON Object specification",
"PipelineId": "88c6ca184c0e432bbf5b665e2a15****",
"Async": true,
"Input": {
"Object": "example.flv",
"Location": "example-location",
"Bucket": "example-bucket"
},
"MNSMessageResult": {
"MessageId": "16f01ad6175e4230ac42bb5182cd****",
"ErrorMessage": "InvalidParameter.JsonObjectFormatInvalid",
"ErrorCode": "The parameter \\\"Input\\\" does not conform to the JSON Object specification"
},
"Properties": {
"Width": "1920",
"Height": "1080",
"Duration": "17.226000",
"Fps": "25",
"Bitrate": "1630.045",
"FileFormat": "QuickTime/MOV",
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Sar": "1:1",
"Height": "1080",
"CodecTagString": "avc1",
"NetworkCost": {
"PreloadTime": "8",
"AvgBitrate": "300.34",
"CostBandwidth": "10"
},
"Width": "1920",
"Index": "1",
"Timebase": "1/24000",
"AvgFPS": "23.976025",
"PixFmt": "yuv420p",
"Lang": "eng",
"CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
"NumFrames": "100",
"Rotate": "90",
"Bitrate": "1496.46",
"HasBFrames": "0",
"Profile": "High",
"StartTime": "0.042000",
"Dar": "16:9",
"CodecName": "h264",
"Duration": "17.225542",
"Fps": "25",
"CodecTag": "0x31637661",
"CodecTimeBase": "1001/48000",
"Level": "41",
"ColorRange": "700",
"ColorTransfer": "R255 G83 B170",
"ColorPrimaries": "700",
"DurationInaccurate": "",
"DolbyVision": {
"Profile": "",
"Level": ""
}
}
]
},
"AudioStreamList": {
"AudioStream": [
{
"Timebase": "1/44100",
"Index": "1",
"SampleFmt": "fltp",
"ChannelLayout": "stereo",
"Lang": "eng",
"Samplerate": "44100",
"CodecLongName": "AAC (Advanced Audio Coding)",
"Channels": "2",
"NumFrames": "123",
"Bitrate": "128.806",
"CodecTagString": "mp4a",
"StartTime": "0.000000",
"CodecName": "aac",
"Duration": "17.159546",
"CodecTag": "0x6134706d",
"CodecTimeBase": "1/44100",
"DurationInaccurate": ""
}
]
},
"SubtitleStreamList": {
"SubtitleStream": [
{
"Timebase": "1/1000",
"Index": "3",
"StartTime": "0.000000",
"CodecName": "ass",
"Lang": "eng",
"CodecLongName": "ASS (Advanced SSA) subtitle",
"Duration": "1370.116000",
"CodecTag": "0x0000",
"CodecTimeBase": "0/1",
"CodecTagString": "[0][0][0][0]"
}
]
}
},
"Format": {
"StartTime": "0.000000",
"NumPrograms": "0",
"Size": "3509895",
"NumStreams": "2",
"FormatLongName": "QuickTime/MOV",
"Duration": "17.226000",
"Bitrate": "1630.045",
"FormatName": "mov",
"Tags": {
"test": "test",
"test2": 1
}
},
"FileSize": "3509895",
"MD5": ""
}
},
"RequestId": "62D9BE16-B7D5-550C-A482-7A0F60E09877"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。