获取媒体文件元信息,包括媒体格式信息和媒体流信息。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
imm:DetectMediaMeta |
none |
*Project
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ProjectName |
string |
否 |
项目名称,获取方式请参见创建项目。 |
test-project |
| SourceURI |
string |
否 |
媒体文件的 OSS 地址。 OSS 地址规则为 oss://${Bucket}/${Object},其中 |
oss://examplebucket/sampleobject.mp4 |
| CredentialConfig | CredentialConfig |
否 |
如无特殊需求,请保持留空即可。 链式授权配置,非必填。更多信息,请参见使用链式授权访问其他实体资源。 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
2213B1A9-EB3D-4666-84E0-24980BC***** |
| Language |
string |
视频中使用的语言,参考标准为 ISO 639-2。 |
eng |
| Title |
string |
媒体文件标题。 |
test |
| VideoStreams |
array |
视频流数组。 |
|
| VideoStream |
视频流信息。 |
||
| AudioStreams |
array |
音频流数组。 |
|
| AudioStream |
音频流信息。 |
||
| Subtitles |
array |
字幕流数组。 |
|
| SubtitleStream |
字幕流信息。 |
||
| StreamCount |
integer |
媒体流数量。 |
2 |
| ProgramCount |
integer |
节目数量。 |
2 |
| FormatName |
string |
格式名称。 |
mov,mp4,m4a,3gp,3g2,mj2 |
| FormatLongName |
string |
格式名称的全称。 |
QuickTime / MOV |
| Size |
integer |
媒体文件大小,单位为字节。 |
25115517 |
| StartTime |
number |
媒体的起始播放时间,单位为秒(s)。 |
0.000000 |
| Bitrate |
integer |
媒体文件的码率,单位为比特每秒(bit/s)。 |
13164131 |
| Artist |
string |
艺术家。 |
unable |
| AlbumArtist |
string |
演唱者。 |
unable |
| Composer |
string |
作曲家。 |
unable |
| Performer |
string |
演奏者。 |
unable |
| Album |
string |
专辑。 |
unable |
| Duration |
number |
视频的总时长,单位为秒(s)。 |
15.263000 |
| ProduceTime |
string |
视频拍摄时间,参考标准为 RFC3339Nano。 |
2022-04-24T02:39:57Z |
| LatLong |
string |
中心地理坐标点,是一个经纬度值。 格式为纬度,经度,纬度在前,经度在后,且纬度范围为[-90,+90],经度范围为[-180,+180]。例如 35.8,-45.91。 |
+120.029003,+30.283095 |
| VideoWidth |
integer |
媒体文件中视频画面的宽度,单位为像素(px)。 |
1080 |
| VideoHeight |
integer |
媒体文件中视频画面的高度,单位为像素(px)。 |
1920 |
| Addresses |
array |
视频地理位置检测结果。 只有视频中包含地理位置信息时,此参数才有值。 |
|
| Address |
位置详细信息。 |
示例
正常返回示例
JSON格式
{
"RequestId": "2213B1A9-EB3D-4666-84E0-24980BC*****",
"Language": "eng",
"Title": "test",
"VideoStreams": [
{
"Index": 0,
"Language": "en",
"CodecName": "h264",
"CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"Profile": "High",
"CodecTimeBase": "1373627/83160000",
"CodecTagString": "avc1",
"CodecTag": "0x31637661",
"Width": 1280,
"Height": 720,
"HasBFrames": 2,
"SampleAspectRatio": "1:1",
"DisplayAspectRatio": "16:9",
"PixelFormat": "yuv420p",
"Level": 40,
"FrameRate": "25/1",
"AverageFrameRate": "25/1",
"TimeBase": "1/12800",
"StartTime": 0,
"Duration": 22.88,
"Bitrate": 5407765,
"FrameCount": 572,
"Rotate": "90",
"BitDepth": 8,
"ColorSpace": "bt709",
"ColorRange": "tv",
"ColorTransfer": "bt709",
"ColorPrimaries": "bt709"
}
],
"AudioStreams": [
{
"Index": 1,
"Language": "en",
"CodecName": "aac",
"CodecLongName": "AAC (Advanced Audio Coding)",
"CodecTimeBase": "1/44100",
"CodecTagString": "mp4a",
"CodecTag": "0x6134706d",
"TimeBase": "1/48000",
"StartTime": 0.0235,
"Duration": 3.690667,
"Bitrate": 320087,
"FrameCount": 173,
"Lyric": "test",
"SampleFormat": "fltp",
"SampleRate": 48000,
"Channels": 2,
"ChannelLayout": "stereo"
}
],
"Subtitles": [
{
"Index": 2,
"Language": "en",
"CodecName": "mov_text",
"CodecLongName": "MOV text",
"CodecTagString": "tx3g",
"CodecTag": "0x67337874",
"StartTime": 0,
"Duration": 71.378,
"Bitrate": 74,
"Content": "欢迎",
"Width": 600,
"Height": 30
}
],
"StreamCount": 2,
"ProgramCount": 2,
"FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
"FormatLongName": "QuickTime / MOV",
"Size": 25115517,
"StartTime": 0,
"Bitrate": 13164131,
"Artist": "unable",
"AlbumArtist": "unable",
"Composer": "unable",
"Performer": "unable",
"Album": "unable",
"Duration": 15.263,
"ProduceTime": "2022-04-24T02:39:57Z",
"LatLong": "+120.029003,+30.283095",
"VideoWidth": 1080,
"VideoHeight": 1920,
"Addresses": [
{
"Language": "zh-Hans",
"AddressLine": "中国浙江省杭州市余杭区文一西路969号",
"Country": "中国",
"Province": "浙江省",
"City": "杭州市",
"District": "余杭区",
"Township": "文一西路"
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。