全部產品
Search
文件中心

:DetectMediaMeta - 擷取媒體檔案元資訊

更新時間:Feb 26, 2026

擷取媒體檔案元資訊,包括媒體格式資訊和媒體流資訊。

介面說明

  • 請確保在使用該介面前,已充分瞭解Intelligent Media Management產品的收費方式和價格

  • 調用該介面前,請確保當前 Region 已經存在可用的專案(Project),詳見專案管理

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

imm:DetectMediaMeta

none

*Project

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

請求參數

名稱

類型

必填

描述

樣本值

ProjectName

string

專案名稱,擷取方式請參見建立專案

test-project

SourceURI

string

媒體檔案的 OSS 地址。

OSS 地址規則為 oss://${Bucket}/${Object},其中${Bucket}為和當前專案處於同一地區(Region)的 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

媒體的起始播放時間。

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": "文一西路"
    }
  ]
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情