全部產品
Search
文件中心

ApsaraVideo Media Processing:QueryMediaListByURL

更新時間:Oct 21, 2026

使用OSS檔案地址查詢媒體。

介面說明

  • 本介面一次最多查詢 10 個媒體檔案。

  • 呼叫本介面前,請先呼叫新增媒體介面新增媒體檔案,再呼叫本介面查詢媒體資訊。

  • 本介面僅支援查詢工作流處理的檔案資訊。新上傳的媒體檔案,需要工作流執行完成後,透過本介面取得的檔案資訊才會完整。非工作流處理任務要想獲得影片資料資訊,需要呼叫 SubmitMediaInfoJob 處理媒體資訊作業之後方可檢視。

QPS 限制

本介面的單一使用者 QPS 限制為 100 次/秒。超過限制,API 呼叫會被限流,這可能會影響您的業務,請合理呼叫。更多資訊,請參閱 QPS 限制。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

mts:QueryMediaListByURL

get

*全部資源。

*

無 無

請求參數

名稱

類型

必填

描述

樣本值

FileURLs

string

是

需要查詢的媒體檔案位址,可以登入 MPS 控制台,透過媒體管理 > 媒體清單找到需要查詢的媒體檔案,點擊操作列管理,在取得轉碼位址頁籤中取得媒體檔案位址。用半形逗號(,)分隔,一次最多查詢 10 個。

  • URL 遵循 RFC 3986(UTF8 編碼,並對保留字元進行 URLEncode。更多資訊,請參閱 URLEncode 說明),不超過 3200 位元組。

  • 僅支援 OSS HTTP 位址,不支援 CDN 位址和 HTTPS 位址。

http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4

IncludePlayList

boolean

否

返回結果中是否包含播放資訊。

  • 取值範圍:true(包含)、false(不包含)。

  • 預設值:false。

true

IncludeSnapshotList

boolean

否

返回結果中是否包含截圖資訊。

  • 取值範圍:true(包含)、false(不包含)。

  • 預設值:false。

true

IncludeMediaInfo

boolean

否

返回結果中是否包含媒體資訊。

  • 取值範圍:true(包含)、false(不包含)。

  • 預設值:false。

    說明

    如需取得詳細 MediaInfo 資訊,請將本參數設定為 true。

true

IncludeSummaryList

boolean

否

返回結果中是否包含摘要清單。

  • 取值範圍:true(是)、false(否)。

  • 預設值:false。

true

返回參數

名稱

類型

描述

樣本值

object

返回參數。

MediaList

object

Media

array<object>

媒體列表。

array<object>

媒體詳細資訊。

CreationTime

string

建立時間,採用 ISO 8601 格式的 UTC 時間,格式為 YYYY-MM-DDTHH:mm:ssZ。

2021-07-14T13:05:00Z

CateId

integer

類目 ID。

123

Height

string

查詢到的媒體檔案的高。

360

CensorState

string

影片審核狀態。取值:

  • Initiated:初始(上傳成功審核未完成)。

  • Pass:通過(上傳成功審核已通過)。

Initiated

Tags

object

Tag

array

標籤資訊。

string

標籤列表。

tag1,tag2

PlayList

object

Play

array<object>

播放列表。

array<object>

播放檔案詳細資訊。

Encryption

string

加密。取值:

  • 0:未加密。

  • 1:已加密。

1

Height

string

高。

10

Bitrate

string

位元率。

25.067

File

object

播放檔案。

State

string

檔案狀態。取值範圍:

  • Normal:正常。

  • Deleted:已刪除。

Normal

URL

string

播放檔案的輸入 OSS Bucket。

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4

MediaWorkflowId

string

產生播放檔案的工作流 ID。

6cc3aa66d1cb4bb2adf14e726c0a****

Width

string

寬。

11

Size

string

大小。

100

Fps

string

幀率。

25.0

Duration

string

時長。

7.965000

ActivityName

string

媒體工作流活動名稱。

test name

Format

string

編碼格式。支援 mov、mp4、m4a、3gp、3g2、mj2。

mov

MediaWorkflowName

string

產生播放檔案的工作流。

example-mediaworkflow-****

Bitrate

string

位元率。

593.192

MediaId

string

媒體 ID。

52d7e98b05e648199612290bb819****

File

object

輸入檔案詳細資訊。

State

string

檔案狀態。取值範圍:

  • Normal:正常。

  • Deleted:已刪除。

Normal

URL

string

輸入檔案的 OSS Bucket。

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4

SummaryList

object

Summary

array<object>

影片摘要列表。

array<object>

影片摘要資料。

Type

string

摘要類型。取值範圍:

  • Video:影片類型。

  • Gif:動態影像類型。

Gif

MediaWorkflowId

string

產生摘要的工作流 ID。

93ab850b4f6f44eab54b6e91d24d****

ActivityName

string

媒體工作流活動名稱。

example-activity-****

MediaWorkflowName

string

產生摘要的工作流。

example-mediaworkflow-****

File

object

原檔案。

State

string

檔案狀態。取值範圍:

  • Normal:正常。

  • Deleted:已刪除。

Normal

URL

string

輸入檔案的 OSS Bucket。

http://example-bucket-****.o

PublishState

string

媒體發佈狀態,表示是否對外發佈媒體。取值範圍:

  • Initiated:初始。

  • UnPublish:未發佈,OSS 播放檔案權限為 Private。

  • Published:已發佈,OSS 播放檔案權限為 Default。

  • Deleted:已刪除。

Published

MediaInfo

object

媒體資訊。

Streams

object

串流資訊。

VideoStreamList

object

VideoStream

array<object>

影片串流列表。

array<object>

影片串流資料。

Sar

string

編碼訊號解析度比。

1:1

Height

string

影片解析度高。

360

CodecTagString

string

編碼格式標記文字。

avc1

NetworkCost

object

網路頻寬消耗。

PreloadTime

string

預先載入時間。

0.01

AvgBitrate

string

平均位元率。

2659.326

CostBandwidth

string

最大消耗頻寬。

100

Width

string

影片解析度寬,數字,不能為負數。

640

Index

string

影片串流序號,標識影片串流在整個媒體串流中的位置。

5

Timebase

string

時基。

1/15360

AvgFPS

string

平均幀率。

15.0

PixFmt

string

像素格式。

yuv420p

Lang

string

語言。更多資訊,請參見 FFmpeg 語言定義。

und

CodecLongName

string

編碼格式長述名。

H.264/AVC/MPEG-4 AVC/MPEG-4 part 10

NumFrames

string

總幀數。

12

Rotate

string

影片旋轉角度。

90

Bitrate

string

位元率。

512.701

HasBFrames

string

是否有 B 幀。1 表示有,2 表示沒有。

2

Profile

string

編碼預置。

High

StartTime

string

起始時間,單位為秒(s)。

0.046029

Dar

string

編碼顯示解析度比。

16:9

CodecName

string

編碼格式簡述名。支援 H264、mov、aac、avc、mpeg。

H264

Duration

string

時長。

79.200000

Fps

string

幀率。

15.0

CodecTag

string

編碼格式標記。

0x31637661

CodecTimeBase

string

編碼時基。

1/30

Level

string

編碼等級。

31

AudioStreamList

object

AudioStream

array<object>

音訊串流列表。

object

音訊串流資料。

Timebase

string

時基。

1/44100

Index

string

音訊串流序號,標識音訊串流在整個媒體串流中的位置。

1

SampleFmt

string

取樣格式。

fltp

ChannelLayout

string

聲道輸出樣式。

stereo

Lang

string

語言。參考 FFmpeg 語言定義。

und

Samplerate

string

取樣率。

44100

CodecLongName

string

編碼格式長述名。

AAC (Advanced Audio Coding)

Channels

string

聲道數。

2

NumFrames

string

總幀數。

100

Bitrate

string

位元率。

76.356

CodecTagString

string

編碼格式標記文字。

mp4a

StartTime

string

起始時間,單位為秒(s)。

0.000000

CodecName

string

編碼格式簡述名。支援 H264、mov、aac、avc、mpeg。

aac

Duration

string

時長。

79.203265

CodecTag

string

編碼格式標記。

0x6134706d

CodecTimeBase

string

編碼時基。

1/44100

SubtitleStreamList

object

SubtitleStream

array<object>

字幕串流清單。

object

字幕串流資料。

Index

string

字幕串流序號,標識字幕串流在整個媒體串流中的位置。

1

Lang

string

語言。參考 FFmpeg 語言定義。

und

Format

object

格式資訊。

StartTime

string

起始時間,單位為秒(s)。

0.000000

NumPrograms

string

節目串流總數。

0

Size

string

大小。

5872904

NumStreams

string

媒體串流總數。

2

FormatLongName

string

編碼格式長述名。

QuickTime/MOV

Duration

string

時長。

79.204000

Bitrate

string

位元率。

593.192

FormatName

string

容器/封裝格式簡述名,支援 mov,mp4,m4a,3gp,3g2,mj2。

mov

Description

string

描述。

This is description ****

Size

string

檔案大小。

5872904

Width

string

寬。

640

CoverURL

string

封面的 OSS Bucket。

http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png

SnapshotList

object

Snapshot

array<object>

截圖清單。

array<object>

截圖檔案詳細資訊。

Type

string

截圖類型。取值範圍:

  • Single:單張。

  • Sequence:序列。

Single

MediaWorkflowId

string

產生截圖檔案的工作流 ID。

6cc3aa66d1cb4bb2adf14e726c0a****

ActivityName

string

產生截圖檔案的工作流活動名稱。

example-activity1-****

Count

string

截圖張數。此值只在 Type 為 Sequence 時有意義。

3

MediaWorkflowName

string

產生截圖檔案的工作流。

example-workflow-****

File

object

截圖檔案。

State

string

檔案狀態。取值範圍:

  • Normal:正常。

  • Deleted:已刪除。

Normal

URL

string

截圖檔案的 OSS Bucket。

http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png

RunIdList

object

RunId

array

媒體工作流清單。

string

媒體工作流 ID 清單。

9343bd0e7bb54ae19228529908e5****

Duration

string

時長。

79.204000

Fps

string

幀率。

15.0

Title

string

標題。

kled.mp4

Format

string

編碼格式。支援 mov,mp4,m4a,3gp,3g2,mj2。

mov

NonExistFileURLs

object

FileURL

array

不存在的媒體清單資訊。

string

不存在的媒體 ID,無資料時此參數不返回。

null

RequestId

string

請求 ID。

1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42

樣本

正常返回樣本

JSON格式

{
  "MediaList": {
    "Media": [
      {
        "CreationTime": "2021-07-14T13:05:00Z",
        "CateId": 123,
        "Height": "360",
        "CensorState": "Initiated",
        "Tags": {
          "Tag": [
            "tag1,tag2"
          ]
        },
        "PlayList": {
          "Play": [
            {
              "Encryption": "1",
              "Height": "10",
              "Bitrate": "25.067",
              "File": {
                "State": "Normal",
                "URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4"
              },
              "MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
              "Width": "11",
              "Size": "100",
              "Fps": "25.0",
              "Duration": "7.965000",
              "ActivityName": "test name",
              "Format": "mov",
              "MediaWorkflowName": "example-mediaworkflow-****"
            }
          ]
        },
        "Bitrate": "593.192",
        "MediaId": "52d7e98b05e648199612290bb819****",
        "File": {
          "State": "Normal",
          "URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
        },
        "SummaryList": {
          "Summary": [
            {
              "Type": "Gif",
              "MediaWorkflowId": "93ab850b4f6f44eab54b6e91d24d****",
              "ActivityName": "example-activity-****",
              "MediaWorkflowName": "example-mediaworkflow-****",
              "File": {
                "State": "Normal",
                "URL": "http://example-bucket-****.o"
              }
            }
          ]
        },
        "PublishState": "Published",
        "MediaInfo": {
          "Streams": {
            "VideoStreamList": {
              "VideoStream": [
                {
                  "Sar": "1:1",
                  "Height": "360",
                  "CodecTagString": "avc1",
                  "NetworkCost": {
                    "PreloadTime": "0.01",
                    "AvgBitrate": "2659.326",
                    "CostBandwidth": "100"
                  },
                  "Width": "640",
                  "Index": "5",
                  "Timebase": "1/15360",
                  "AvgFPS": "15.0",
                  "PixFmt": "yuv420p",
                  "Lang": "und",
                  "CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
                  "NumFrames": "12",
                  "Rotate": "90",
                  "Bitrate": "512.701",
                  "HasBFrames": "2",
                  "Profile": "High",
                  "StartTime": "0.046029",
                  "Dar": "16:9",
                  "CodecName": "H264",
                  "Duration": "79.200000",
                  "Fps": "15.0",
                  "CodecTag": "0x31637661",
                  "CodecTimeBase": "1/30",
                  "Level": "31"
                }
              ]
            },
            "AudioStreamList": {
              "AudioStream": [
                {
                  "Timebase": "1/44100",
                  "Index": "1",
                  "SampleFmt": "fltp",
                  "ChannelLayout": "stereo",
                  "Lang": "und",
                  "Samplerate": "44100",
                  "CodecLongName": "AAC (Advanced Audio Coding)",
                  "Channels": "2",
                  "NumFrames": "100",
                  "Bitrate": "76.356",
                  "CodecTagString": "mp4a",
                  "StartTime": "0.000000",
                  "CodecName": "aac",
                  "Duration": "79.203265",
                  "CodecTag": "0x6134706d",
                  "CodecTimeBase": "1/44100"
                }
              ]
            },
            "SubtitleStreamList": {
              "SubtitleStream": [
                {
                  "Index": "1",
                  "Lang": "und"
                }
              ]
            }
          },
          "Format": {
            "StartTime": "0.000000",
            "NumPrograms": "0",
            "Size": "5872904",
            "NumStreams": "2",
            "FormatLongName": "QuickTime/MOV",
            "Duration": "79.204000",
            "Bitrate": "593.192",
            "FormatName": "mov"
          }
        },
        "Description": "This is description ****",
        "Size": "5872904",
        "Width": "640",
        "CoverURL": "http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png",
        "SnapshotList": {
          "Snapshot": [
            {
              "Type": "Single",
              "MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
              "ActivityName": "example-activity1-****",
              "Count": "3",
              "MediaWorkflowName": "example-workflow-****",
              "File": {
                "State": "Normal",
                "URL": "http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png"
              }
            }
          ]
        },
        "RunIdList": {
          "RunId": [
            "9343bd0e7bb54ae19228529908e5****"
          ]
        },
        "Duration": "79.204000",
        "Fps": "15.0",
        "Title": "kled.mp4",
        "Format": "mov"
      }
    ]
  },
  "NonExistFileURLs": {
    "FileURL": [
      "null"
    ]
  },
  "RequestId": "1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42"
}

錯誤碼

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

變更歷史

更多資訊,參考變更詳情。