All Products
Search
Document Center

Intelligent Media Management:DetectMediaMeta

Last Updated:Dec 11, 2024

Queries media metadata, including the media format and stream information.

Operation description

  • Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).****
  • Make sure that the specified project exists in the current region. For more information, see Project management.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
imm:DetectMediaMetanone
*Project
acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectNamestringNo

The name of the project.

test-project
SourceURIstringNo

The URI of the media object in Object Storage Service (OSS).

Specify the OSS URI in the oss://${Bucket}/${Object} format, where ${Bucket} is the name of the bucket in the same region as the current project and ${Object} is the path of the object with the extension included.

oss://examplebucket/sampleobject.mp4
CredentialConfigCredentialConfigNo

If you have no special requirements, leave this parameter empty.

The configurations of authorization chains. For more information, see Use authorization chains to access resources of other entities.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

2213B1A9-EB3D-4666-84E0-24980BC*****
Languagestring

The language of the content. For more information, see the ISO 639-2 Alpha-3 codes for the representation of names of languages.

eng
Titlestring

The title of the media object.

test
VideoStreamsarray

The video streams.

VideoStreamsVideoStream

The information about the video stream.

AudioStreamsarray

The audio streams.

AudioStreamsAudioStream

The information about the audio stream.

Subtitlesarray

The subtitle streams.

SubtitlesSubtitleStream

The information about the subtitle stream.

StreamCountlong

The number of media streams.

2
ProgramCountlong

The number of programs.

2
FormatNamestring

The abbreviated format name.

mov,mp4,m4a,3gp,3g2,mj2
FormatLongNamestring

The full format name.

QuickTime / MOV
Sizelong

The size of the media object. Unit: bytes.

25115517
StartTimedouble

The initial playback time.

0.000000
Bitratelong

The bitrate. Unit: bit/s.

13164131
Artiststring

The artist.

unable
AlbumArtiststring

The album artist.

unable
Composerstring

The composer.

unable
Performerstring

The performer.

unable
Albumstring

The album.

unable
Durationdouble

The total duration of the video. Unit: seconds.

15.263000
ProduceTimestring

The time of recording. For more information about the time formats, see the RFC3339 Nano standard.

2022-04-24T02:39:57Z
LatLongstring

The coordinate pair of the central point. The coordinate pair consists of latitude and longitude values. This parameter value must be in the "latitude,longitude" format. Valid values of the latitude: [-90,+90]. Valid values of the longitude: [-180,+180].

+120.029003,+30.283095
VideoWidthlong

The video width in pixels.

1080
VideoHeightlong

The video height in pixels.

1920
Addressesarray

The addresses.

This parameter is returned only when address information is detected.

AddressesAddress

The address.

Examples

Sample success responses

JSONformat

{
  "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": "",
      "Country": "",
      "Province": "",
      "City": "",
      "District": "",
      "Township": ""
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history