查询媒体信息作业。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
mts:QueryMediaInfoJobList |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| MediaInfoJobIds |
string |
是 |
媒体信息作业 ID。
说明
如果不传入此参数,则会返回 InvalidParameter(参数无效)错误码。 |
23ca1d184c0e4341e5b665e2a12**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| NonExistMediaInfoJobIds |
object |
||
| String |
array |
不存在的媒体信息作业。 |
|
|
string |
不存在的媒体信息作业 ID 列表,无数据时不返回该参数。 |
11ce1d184c0e4341e5b665e2a12**** |
|
| RequestId |
string |
请求 ID。 |
46A04AA5-B119-41BB-B750-7C5327AC3E7A |
| MediaInfoJobList |
object |
||
| MediaInfoJob |
array<object> |
媒体信息作业列表。 |
|
|
array<object> |
|||
| CreationTime |
string |
作业添加时间。 |
2014-01-10T12:00:00Z |
| State |
string |
作业状态。
|
Success |
| 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.mp4 |
| Location |
string |
OSS 的服务区域。 |
oss-cn-hangzhou |
| Bucket |
string |
输入文件的 OSS Bucket。 |
example-bucket |
| MNSMessageResult |
object |
MNS 通知用户作业完成的消息结果。 |
|
| MessageId |
string |
成功时消息 ID。如果失败则不返回此参数。 |
123 |
| ErrorMessage |
string |
失败时错误信息。如果成功则不返回此参数。 |
The parameter \"Input\" does not conform to the JSON Object specification |
| ErrorCode |
string |
失败时错误码。如果成功则不返回此参数。 |
InvalidParameter.JsonObjectFormatInvalid |
| Properties |
object |
媒体详细属性。更多信息请参见数据类型 AliyunProperties。 |
|
| Width |
string |
视频像素宽。 |
1280 |
| Height |
string |
视频像素长。 |
720 |
| Duration |
string |
时长。 |
17.226000 |
| Fps |
string |
帧率。 |
25 |
| Bitrate |
string |
码率。 |
1630.045 |
| FileFormat |
string |
文件格式。 |
QuickTime/MOV |
| Streams |
object |
流信息。 |
|
| VideoStreamList |
object |
||
| VideoStream |
array<object> |
视频流信息列表。 |
|
|
array<object> |
|||
| Sar |
string |
编码信号分辨率比。 |
1:1 |
| Height |
string |
视频分辨率长。 |
1080 |
| CodecTagString |
string |
编码格式标记文本。 |
[0][0][0][0] |
| NetworkCost |
object |
网络带宽消耗。 |
|
| PreloadTime |
string |
预加载时间。 |
8 |
| AvgBitrate |
string |
平均码率。 |
300.34 |
| CostBandwidth |
string |
最大消耗带宽。 |
10 |
| Width |
string |
视频分辨率宽。 |
1920 |
| Index |
string |
视频流序号,标识视频流在整个媒体流中的位置。 |
1 |
| Timebase |
string |
时基。 |
1/1000 |
| 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 |
视频旋转角度。 |
180 |
| Bitrate |
string |
码率。 |
30541090 |
| HasBFrames |
string |
是否有 B 帧。0 表示无,1 表示有。 |
0 |
| Profile |
string |
编码预置。 |
High |
| StartTime |
string |
起始时间。 |
0.042000 |
| Dar |
string |
编码显示分辨率比。 |
16:9 |
| CodecName |
string |
编码格式简述名。可选值:
|
h264 |
| Duration |
string |
时长。 |
100 |
| Fps |
string |
帧率。 |
25 |
| CodecTag |
string |
编码格式标记。 |
0x0000 |
| 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> |
音频流信息列表。 |
|
|
object |
|||
| Timebase |
string |
时基。 |
1/1000 |
| Index |
string |
音频流序号,标识音频流在整个媒体流中的位置。 |
1 |
| SampleFmt |
string |
采样格式。 |
fltp |
| ChannelLayout |
string |
声道数。 |
5.1(side) |
| Lang |
string |
语言。更多信息请参见 FFmpeg 语言定义。 |
eng |
| Samplerate |
string |
采样率。 |
48000 |
| CodecLongName |
string |
编码格式长述名。 |
DCA (DTS Coherent Acoustics) |
| Channels |
string |
声道输出样式。 |
2 |
| NumFrames |
string |
总帧数。 |
123 |
| Bitrate |
string |
码率。 |
1536000 |
| CodecTagString |
string |
编码格式标记文本。 |
[0][0][0][0] |
| StartTime |
string |
起始时间。 |
0.042000 |
| CodecName |
string |
编码格式简述名。可取值:
|
acc |
| Duration |
string |
时长。 |
123 |
| CodecTag |
string |
编码格式标记。 |
0x0000 |
| CodecTimeBase |
string |
编码时基。 |
1/48000 |
| DurationInaccurate |
string |
||
| SubtitleStreamList |
object |
||
| SubtitleStream |
array<object> |
字幕流信息列表。 |
|
|
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.042000 |
| NumPrograms |
string |
节目流总数。 |
2 |
| Size |
string |
文件大小。 |
3509895 |
| NumStreams |
string |
媒体流总数。 |
1 |
| FormatLongName |
string |
容器、封装格式长述名。 |
QuickTime/MOV |
| Duration |
string |
总时长。 |
17.226000 |
| Bitrate |
string |
总码率。 |
1630.045 |
| FormatName |
string |
容器、封装格式简述名。 |
mov |
| Tags |
object |
||
| FileSize |
string |
文件大小。 |
3509895 |
| FileMd5 |
string |
回调消息格式定义
当媒体信息任务执行状态改变时,mps 会发送消息到用户指定的 queue 中(如何指定回调 queue 详见 mps 的更新管道接口)。消息体是一个 JSON 字符串,包含字段如下:
{
"Type": "MediaInfo",
"State": "Success",
"JobId": "bb558c1cc25b45309aab5be44d19****",
"UserData": "{\"key\":\"value\"}",
"RequestId": "B52658D4-07AB-43CD-82B0-210958A6****"
}
| 名称 | 类型 | 描述 |
| Type | String | 固定字符串“MediaInfo”,表示媒体信息任务。 |
| JobId | String | 任务唯一 ID。 |
| State | String | 任务当前状态,与 QueryMediaInfoJobList 中的 State 一致。 |
| UserData | String | 用户在 SubmitMediaInfoJob 中传入的 UserData。 |
示例
正常返回示例
JSON格式
{
"NonExistMediaInfoJobIds": {
"String": [
"11ce1d184c0e4341e5b665e2a12****"
]
},
"RequestId": "46A04AA5-B119-41BB-B750-7C5327AC3E7A",
"MediaInfoJobList": {
"MediaInfoJob": [
{
"CreationTime": "2014-01-10T12:00:00Z",
"State": "Success",
"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.mp4",
"Location": "oss-cn-hangzhou",
"Bucket": "example-bucket"
},
"MNSMessageResult": {
"MessageId": "123",
"ErrorMessage": "The parameter \\\"Input\\\" does not conform to the JSON Object specification",
"ErrorCode": "InvalidParameter.JsonObjectFormatInvalid"
},
"Properties": {
"Width": "1280",
"Height": "720",
"Duration": "17.226000",
"Fps": "25",
"Bitrate": "1630.045",
"FileFormat": "QuickTime/MOV",
"Streams": {
"VideoStreamList": {
"VideoStream": [
{
"Sar": "1:1",
"Height": "1080",
"CodecTagString": "[0][0][0][0]",
"NetworkCost": {
"PreloadTime": "8",
"AvgBitrate": "300.34",
"CostBandwidth": "10"
},
"Width": "1920",
"Index": "1",
"Timebase": "1/1000",
"AvgFPS": "23.976025",
"PixFmt": "yuv420p",
"Lang": "eng",
"CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
"NumFrames": "100",
"Rotate": "180",
"Bitrate": "30541090",
"HasBFrames": "0",
"Profile": "High",
"StartTime": "0.042000",
"Dar": "16:9",
"CodecName": "h264",
"Duration": "100",
"Fps": "25",
"CodecTag": "0x0000",
"CodecTimeBase": "1001/48000",
"Level": "41",
"ColorRange": "700",
"ColorTransfer": "R255 G83 B170",
"ColorPrimaries": "700",
"DurationInaccurate": "",
"DolbyVision": {
"Profile": "",
"Level": ""
}
}
]
},
"AudioStreamList": {
"AudioStream": [
{
"Timebase": "1/1000",
"Index": "1",
"SampleFmt": "fltp",
"ChannelLayout": "5.1(side)",
"Lang": "eng",
"Samplerate": "48000",
"CodecLongName": "DCA (DTS Coherent Acoustics)",
"Channels": "2",
"NumFrames": "123",
"Bitrate": "1536000",
"CodecTagString": "[0][0][0][0]",
"StartTime": "0.042000",
"CodecName": "acc",
"Duration": "123",
"CodecTag": "0x0000",
"CodecTimeBase": "1/48000",
"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.042000",
"NumPrograms": "2",
"Size": "3509895",
"NumStreams": "1",
"FormatLongName": "QuickTime/MOV",
"Duration": "17.226000",
"Bitrate": "1630.045",
"FormatName": "mov",
"Tags": {
"test": "test",
"test2": 1
}
},
"FileSize": "3509895",
"FileMd5": ""
}
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。