All Products
Search
Document Center

Intelligent Media Management:DetectMediaMeta

Last Updated:Jul 08, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

imm:DetectMediaMeta

none

*Project

acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}

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 ${Bucket} is the name of an OSS bucket in the same region as the current project, and ${Object} is the full path of the file including the file name extension.

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.