文档

QueryMediaListByURL - 通过媒体的输入地址进行媒体信息的查询

更新时间:

使用OSS文件地址查询媒体。

接口说明

  • 本接口一次最多查询 10 个媒体文件。
  • 调用本接口前,请先调用新增媒体接口新增媒体文件,再调用本接口查询媒体信息。
  • 本接口仅支持查询工作流处理的文件信息。新上传的媒体文件,需要工作流执行完成后,通过本接口获取的文件信息才会完整。非工作流处理任务要想获得视频数据信息,需要调用 SubmitMediaInfoJob 处理媒体信息作业之后方可查看。

QPS 限制

本接口的单用户 QPS 限制为 100 次/秒。超过限制,API 调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见 QPS 限制

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
FileURLsstring

需要查询的媒体文件地址,可以登录 MPS 控制台,通过媒体管理 > 媒体列表找到需要查询的媒体文件,单击操作管理,在获取转码地址页签中获取媒体文件地址。用半角逗号(,)分隔,一次最多查询 10 个。

  • URL 遵循 RFC 3986(UTF8 编码,并对保留字符进行 URLEncode。更多信息,请参见 URLEncode 说明),不超过 3200 字节。

  • 仅支持 OSS HTTP 地址,不支持 CDN 地址和 HTTPS 地址。

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

返回结果中是否包含播放信息。

  • 取值范围:true(包含)、false(不包含)。

  • 默认值:false

true
IncludeSnapshotListboolean

返回结果中是否包含截图信息。

  • 取值范围:true(包含)、false(不包含)。

  • 默认值:false

true
IncludeMediaInfoboolean

返回结果中是否包含媒体信息。

  • 取值范围:true(包含)、false(不包含)。

  • 默认值:false

    说明 如需获取详细 MediaInfo 信息,请将本参数设置为 true。
true
IncludeSummaryListboolean

返回结果中是否包含摘要列表。

  • 取值范围:true(是)、false(否)。

  • 默认值:false

true

返回参数

名称类型描述示例值
object

返回参数。

MediaListobject []

媒体列表。

CreationTimestring

创建时间。

2021-07-14T13:05:00Z
CateIdlong

类目 ID。

123
Heightstring

查询到的媒体文件的高。

360
CensorStatestring

视频审核状态。取值:

  • Initiated:初始(上传成功审核未完成)。

  • Pass:通过(上传成功审核已通过)。

Initiated
Tagsarray

标签信息。

string

标签列表。

tag1,tag2
PlayListobject []

播放列表。

Encryptionstring

加密。取值:

  • 0:未加密。

  • 1:已加密。

1
Heightstring

高。

10
Bitratestring

码率。

25.067
Fileobject

播放文件。

Statestring

文件状态。取值范围:

  • Normal:正常。
  • Deleted:已删除。
Normal
URLstring

播放文件的输入 OSS Bucket。

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

产生播放文件的工作流 ID。

6cc3aa66d1cb4bb2adf14e726c0a****
Widthstring

宽。

11
Sizestring

大小。

100
Fpsstring

帧率。

25.0
Durationstring

时长。

7.965000
ActivityNamestring

媒体工作流活动名称。

test name
Formatstring

编码格式。支持 mov、mp4、m4a、3gp、3g2、mj2。

mov
MediaWorkflowNamestring

产生播放文件的工作流。

example-mediaworkflow-****
Bitratestring

码率。

593.192
MediaIdstring

媒体 ID。

52d7e98b05e648199612290bb819****
Fileobject

输入文件详细信息。

Statestring

文件状态。取值范围:

  • Normal:正常。
  • Deleted:已删除。
Normal
URLstring

输入文件的 OSS Bucket。

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

视频摘要列表。

Typestring

摘要类型。取值范围:

  • Video:视频类型。

  • Gif:动态图像类型。

Gif
MediaWorkflowIdstring

产生摘要的工作流 ID。

93ab850b4f6f44eab54b6e91d24d****
ActivityNamestring

媒体工作流活动名称。

example-activity-****
MediaWorkflowNamestring

产生摘要的工作流。

example-mediaworkflow-****
Fileobject

原文件。

Statestring

文件状态。取值范围:

  • Normal:正常。
  • Deleted:已删除。
Normal
URLstring

输入文件的 OSS Bucket。

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

媒体发布状态,表示是否对外发布媒体。取值范围:

  • Initiated:初始。
  • UnPublish:未发布,OSS 播放文件权限为 Private。
  • Published:已发布,OSS 播放文件权限为 Default。
  • Deleted:已删除。
Published
MediaInfoobject

媒体信息。

Streamsobject

流信息。

VideoStreamListobject []

视频流列表。

Sarstring

编码信号分辨率比。

1:1
Heightstring

视频分辨率高。

360
CodecTagStringstring

编码格式标记文本。

avc1
NetworkCostobject

网络带宽消耗。

PreloadTimestring

预加载时间。

0.01
AvgBitratestring

平均码率。

2659.326
CostBandwidthstring

最大消耗带宽。

100
Widthstring

视频分辨率宽,数字,不能为负数。

640
Indexstring

视频流序号,标识视频流在整个媒体流中的位置。

5
Timebasestring

时基。

1/15360
AvgFPSstring

平均帧率。

15.0
PixFmtstring

像素格式。

yuv420p
Langstring

语言。更多信息,请参见 FFmpeg 语言定义

und
CodecLongNamestring

编码格式长述名。

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

总帧数。

12
Rotatestring

视频旋转角度。

90
Bitratestring

码率。

512.701
HasBFramesstring

是否有 B 帧。1 表示有,2 表示没有。

2
Profilestring

编码预置。

High
StartTimestring

起始时间。

0.046029
Darstring

编码显示分辨率比。

16:9
CodecNamestring

编码格式简述名。支持 H264、mov、aac、avc、mpeg。

H264
Durationstring

时长。

79.200000
Fpsstring

帧率。

15.0
CodecTagstring

编码格式标记。

0x31637661
CodecTimeBasestring

编码时基。

1/30
Levelstring

编码等级。

31
AudioStreamListobject []

音频流列表。

Timebasestring

时基。

1/44100
Indexstring

音频流序号,标识音频流在整个媒体流中的位置。

1
SampleFmtstring

采样格式。

fltp
ChannelLayoutstring

声道输出样式。

stereo
Langstring

语言。参考 FFmpeg 语言定义

und
Sampleratestring

采样率。

44100
CodecLongNamestring

编码格式长述名。

AAC (Advanced Audio Coding)
Channelsstring

声道数。

2
NumFramesstring

总帧数。

100
Bitratestring

码率。

76.356
CodecTagStringstring

编码格式标记文本。

mp4a
StartTimestring

起始时间。

0.000000
CodecNamestring

编码格式简述名。支持 H264、mov、aac、avc、mpeg。

aac
Durationstring

时长。

79.203265
CodecTagstring

编码格式标记。

0x6134706d
CodecTimeBasestring

编码时基。

1/44100
SubtitleStreamListobject []

字幕流列表。

Indexstring

字幕流序号,标识字幕流在整个媒体流中的位置。

1
Langstring

语言。参考 FFmpeg 语言定义

und
Formatobject

格式信息。

StartTimestring

开始时间。

0.000000
NumProgramsstring

节目流总数。

0
Sizestring

大小。

5872904
NumStreamsstring

媒体流总数。

2
FormatLongNamestring

编码格式长述名。

QuickTime/MOV
Durationstring

时长。

79.204000
Bitratestring

码率。

593.192
FormatNamestring

容器/封装格式简述名,支持 mov,mp4,m4a,3gp,3g2,mj2。

mov
Descriptionstring

描述。

This is description ****
Sizestring

文件大小。

5872904
Widthstring

宽。

640
CoverURLstring

封面的 OSS Bucket。

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

截图列表。

Typestring

截图类型。取值范围:

  • Single:单张。
  • Sequence:序列。
Single
MediaWorkflowIdstring

产生截图文件的工作流 ID。

6cc3aa66d1cb4bb2adf14e726c0a****
ActivityNamestring

产生截图文件的工作流活动名称。

example-activity1-****
Countstring

截图张数。此值只在 TypeSequence 时有意义。

3
MediaWorkflowNamestring

产生截图文件的工作流。

example-workflow-****
Fileobject

截图文件。

Statestring

文件状态。取值范围:

  • Normal:正常。
  • Deleted:已删除。
Normal
URLstring

截图文件的 OSS Bucket。

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

媒体工作流列表。

string

媒体工作流 ID 列表。

9343bd0e7bb54ae19228529908e5****
Durationstring

时长。

79.204000
Fpsstring

帧率。

15.0
Titlestring

标题。

kled.mp4
Formatstring

编码格式。支持 mov,mp4,m4a,3gp,3g2,mj2。

mov
NonExistFileURLsarray

不存在的媒体列表信息。

string

不存在的媒体 ID,无数据时此参数不返回。

null
RequestIdstring

请求 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"
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (1)
文档反馈