Retrieves the metadata of a media file, including media format information and media stream information.
Operation description
Before you use this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM) and its pricing.
Before you call this operation, make sure that a project is available in the current region. For more information, see Project management.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:DetectMediaMeta |
none |
*Project
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
No |
The project name. For information about how to obtain the project name, see Create a project. |
test-project |
| SourceURI |
string |
No |
The Object Storage Service (OSS) URI of the media file. The OSS URI follows the format oss://${Bucket}/${Object}, where |
oss://examplebucket/sampleobject.mp4 |
| CredentialConfig | CredentialConfig |
No |
Leave this parameter empty unless you have special requirements. The chain authorization configuration. This parameter is optional. For more information, see Use chain authorization to access resources of other entities. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
2213B1A9-EB3D-4666-84E0-24980BC***** |
| Language |
string |
The language used in the video. The value follows the ISO 639-2 standard. |
eng |
| Title |
string |
The title of the media file. |
test |
| VideoStreams |
array |
The array of video streams. |
|
| VideoStream |
The video stream information. |
||
| AudioStreams |
array |
The array of audio streams. |
|
| AudioStream |
The audio stream information. |
||
| Subtitles |
array |
The array of subtitle streams. |
|
| SubtitleStream |
The subtitle stream information. |
||
| StreamCount |
integer |
The number of media streams. |
2 |
| ProgramCount |
integer |
The number of programs. |
2 |
| FormatName |
string |
The format name. |
mov,mp4,m4a,3gp,3g2,mj2 |
| FormatLongName |
string |
The full name of the format. |
QuickTime / MOV |
| Size |
integer |
The size of the media file, in bytes. |
25115517 |
| StartTime |
number |
The start playback time of the media, in seconds. |
0.000000 |
| Bitrate |
integer |
The bitrate of the media file, in bit/s. |
13164131 |
| Artist |
string |
The artist. |
unable |
| AlbumArtist |
string |
The album artist. |
unable |
| Composer |
string |
The composer. |
unable |
| Performer |
string |
The performer. |
unable |
| Album |
string |
The album. |
unable |
| Duration |
number |
The total duration of the video, in seconds. |
15.263000 |
| ProduceTime |
string |
The time when the video was recorded. The value follows the RFC 3339 Nano standard. |
2022-04-24T02:39:57Z |
| LatLong |
string |
The central geographic coordinate point, which is a latitude and longitude value. The format is latitude,longitude, with latitude first and longitude second. The latitude range is [-90,+90] and the longitude range is [-180,+180]. Example: 35.8,-45.91. |
+120.029003,+30.283095 |
| VideoWidth |
integer |
The width of the video frame in the media file, in pixels. |
1080 |
| VideoHeight |
integer |
The height of the video frame in the media file, in pixels. |
1920 |
| Addresses |
array |
The geolocation detection results of the video. This parameter has a value only when the video contains geolocation information. |
|
| Address |
The detailed location information. |
Examples
Success response
JSON format
{
"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": "文一西路"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.