描述
获取多媒体文件信息。
请求参数
名称 |
类型 |
是否必填 |
描述 |
Project |
string |
是 |
Project |
Action |
String |
是 |
GetMediaMeta |
MediaUri |
string |
是 |
媒体文件 Uri OSS 地址规则为:oss://bucket/object ,其中 bucket 为和当前 Project 在同一区域的 OSS 桶名, object 为文件路径。 |
IMM 参数 |
类型 |
描述 |
NumberStreams |
Integer |
|
NumberPrograms |
Integer |
|
FormatName |
String |
|
FormatLongName |
String |
|
Size |
String |
|
Duration |
String |
|
StartTime |
String |
|
Bitrate |
String |
|
CreationTime |
String |
数据类型 VideoStream
IMM 参数 |
类型 |
描述 |
Index |
Integer |
|
CodecName |
String |
|
CodecLongName |
String |
|
CodecTimeBase |
String |
|
CodecTagString |
String |
|
Profile |
String |
|
Width |
Integer |
|
Height |
Integer |
|
HasBFrames |
Integer |
|
SampleAspectRatio |
String |
|
DisplayAspectRatio |
String |
|
PixelFormat |
String |
|
Level |
Integer |
|
FrameRrate |
String |
|
AverageFrameRate |
String |
|
TimeBase |
String |
|
StartTime |
String |
|
Duration |
String |
|
Bitrate |
String |
|
Frames |
String |
数据类型 AudioStream
IMM 参数 |
类型 |
描述 |
Index |
Integer |
|
CodecName |
String |
|
CodecLongName |
String |
|
CodecTimeBase |
String |
|
CodecTagString |
String |
|
SampleFormat |
String |
|
SampleRate |
String |
|
Channels |
Integer |
|
ChannelLayout |
String |
|
TimeBase |
String |
|
StartTime |
String |
|
Duration |
String |
|
Bitrate |
String |
|
Frames |
String |
|
Language |
String |
数据类型 SubtitleStream
IMM 参数 |
类型 |
描述 |
Index |
Integer |
|
Language |
String |
返回参数
名称 |
类型 |
描述 |
RequestId |
String |
用户发送的每次接口调用请求,无论成功与否,系统都会返回一个唯一识别码 RequestId 给用户 |
MediaUri |
String |
源文件 |
MediaMeta |
MediaMeta |
媒体信息 |
示例
请求示例
POST https://imm.cn-shanghai.aliyuncs.com
?Action=CreateVideoCompressTask
&Project=test
&MediaUri=oss://xxx/test/res.mkv
成功返回示例
{
"MediaUri": "oss://xxx/test/res.mkv",
"RequestId": "CCC06DDD-D0DF-475A-A98B-7649D51D2AB2",
"MediaMeta": {
"MediaStreams": {
"SubtitleStreams": [
{
"Index": 2,
"Language": "eng"
}
],
"AudioStreams": [
{
"SampleRate": "44100",
"Frames": "",
"CodecName": "aac",
"CodecTimeBase": "1/44100",
"CodecTag": "0x0000",
"Channels": 2,
"ChannelLayout": "stereo",
"Index": 1,
"CodecTagString": "[0][0][0][0]",
"SampleFormat": "fltp",
"TimeBase": "1/1000",
"Duration": "",
"CodecLongName": "AAC (Advanced Audio Coding)",
"Language": "eng",
"StartTime": "0.000000",
"Bitrate": ""
}
],
"VideoStreams": [
{
"SampleAspectRatio": "1:1",
"Profile": "High",
"Height": 720,
"Frames": "",
"CodecName": "h264",
"CodecTimeBase": "1/50",
"CodecTag": "0x0000",
"HasBFrames": 2,
"Index": 0,
"CodecTagString": "[0][0][0][0]",
"TimeBase": "1/1000",
"DisplayAspectRatio": "16:9",
"PixelFormat": "yuv420p",
"Duration": "",
"CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"Language": "",
"Level": 31,
"StartTime": "0.000000",
"AverageFrameRate": "25/1",
"Width": 1280,
"FrameRrate": "25/1",
"Bitrate": ""
}
]
},
"MediaFormat": {
"CreationTime": "",
"FormatName": "matroska,webm",
"Duration": "7704.573000",
"NumberStreams": 3,
"FormatLongName": "Matroska / WebM",
"StartTime": "0.000000",
"Bitrate": "1874",
"Size": "1805645"
}
}
}
若在使用中有疑问,请参考 FAQ,或者进入 钉钉用户群 实时交流。
评论