文档

BatchGetMediaInfos - 批量获取媒体信息

更新时间:

批量获取媒资信息,支持传入多个mediaId。

调试

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

授权信息

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

请求参数

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

所有待查询的媒资 ID,以逗号分隔。

******b48fb04483915d4f2cd8******,******c48fb37407365d4f2cd8******
AdditionTypestring

批量查询的媒资额外信息,默认只返回 BasicInfo,额外文件信息内容包括:

-FileInfo

-DynamicMetaData

FileInfo,DynamicMetaData

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求 ID

******11-DB8D-4A9A-875B-275798******
MediaInfosobject []

符合要求的媒资集合

MediaIdstring

媒资 ID

******c48fb37407365d4f2cd8******
MediaBasicInfoobject

媒资基础信息

MediaIdstring

MediaId

******c48fb37407365d4f2cd8******
InputURLstring

待注册的媒资在相应系统中的地址

https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4
MediaTypestring

媒资媒体类型

-Image

-Video

-Audio

-Text

video
BusinessTypestring

媒资业务类型

general
Sourcestring

来源

-OSS

-vod

oss
Titlestring

标题

标题
Descriptionstring

内容描述

描述
Categorystring

分类

分类
MediaTagsstring

标签

标签,tag1
CoverURLstring

封面地址

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
UserDatastring

用户数据

userDataTest
Snapshotsstring

截图

[{"bucket":"example-bucket","count":"3","iceJobId":"******f48f0e4154976b2b8c45******","location":"oss-cn-beijing","snapshotRegular":"example.jpg","templateId":"******e6a6440b29eb60bd7c******"}]
Statusstring

资源状态

Normal
TranscodeStatusstring

转码状态

Init
CreateTimestring

媒资创建时间

2020-12-26T04:11:10Z
ModifiedTimestring

媒资修改时间

2020-12-26T04:11:12Z
DeletedTimestring

媒资删除时间

2020-12-26T04:11:10Z
SpriteImagesstring

雪碧图

[{"bucket":"example-bucket","count":"32","iceJobId":"******83ec44d58b2069def2e******","location":"oss-cn-shanghai","snapshotRegular":"example/example-{Count}.jpg","spriteRegular":"example/example-{TileCount}.jpg","templateId":"******e438b14ff39293eaec25******","tileCount":"1"}]
FileInfoListobject []

FileInfos

FileBasicInfoobject

文件基础信息,包含时长,大小等

FileNamestring

文件名

example
FileStatusstring

文件状态

Normal
FileTypestring

文件类型

source_file
FileSizestring

文件大小(字节)

30611502
FileUrlstring

文件 OSS 地址

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
Regionstring

文件存储区域

cn-shanghai
FormatNamestring

封装格式

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

时长

200
Bitratestring

码率

1132.68
Widthstring

1920
Heightstring

1080

示例

正常返回示例

JSON格式

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "MediaInfos": [
    {
      "MediaId": "******c48fb37407365d4f2cd8******",
      "MediaBasicInfo": {
        "MediaId": "******c48fb37407365d4f2cd8******",
        "InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
        "MediaType": "video",
        "BusinessType": "general",
        "Source": "oss",
        "Title": "标题",
        "Description": "描述",
        "Category": "分类",
        "MediaTags": "标签,tag1",
        "CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
        "UserData": "userDataTest",
        "Snapshots": "[{\"bucket\":\"example-bucket\",\"count\":\"3\",\"iceJobId\":\"******f48f0e4154976b2b8c45******\",\"location\":\"oss-cn-beijing\",\"snapshotRegular\":\"example.jpg\",\"templateId\":\"******e6a6440b29eb60bd7c******\"}]",
        "Status": "Normal",
        "TranscodeStatus": "Init",
        "CreateTime": "2020-12-26T04:11:10Z",
        "ModifiedTime": "2020-12-26T04:11:12Z",
        "DeletedTime": "2020-12-26T04:11:10Z",
        "SpriteImages": "[{\"bucket\":\"example-bucket\",\"count\":\"32\",\"iceJobId\":\"******83ec44d58b2069def2e******\",\"location\":\"oss-cn-shanghai\",\"snapshotRegular\":\"example/example-{Count}.jpg\",\"spriteRegular\":\"example/example-{TileCount}.jpg\",\"templateId\":\"******e438b14ff39293eaec25******\",\"tileCount\":\"1\"}]"
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "example",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "30611502",
            "FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
            "Region": "cn-shanghai",
            "FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
            "Duration": "200",
            "Bitrate": "1132.68",
            "Width": "1920",
            "Height": "1080"
          }
        }
      ]
    }
  ]
}

错误码

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

变更历史

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