BatchGetMediaInfos

Updated at:

Retrieves the information of one or more media assets.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:BatchGetMediaInfos

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

MediaIds

string

No

The IDs of the media assets to query, separated by commas.

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

AdditionType

string

No

The additional information about the media assets to query. By default, only BasicInfo is returned. Additional file information includes:

  • FileInfo

  • DynamicMetaData

FileInfo,DynamicMetaData

AuthTimeout

integer

No

The authentication expiration time, in seconds.

  • Minimum value: 1.

  • Maximum value: 86400.

  • Default value: 3600.

30

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

******11-DB8D-4A9A-875B-275798******

MediaInfos

array<object>

The collection of matching media assets.

array<object>

The collection of matching media assets.

MediaId

string

The ID of the media asset.

******c48fb37407365d4f2cd8******

MediaBasicInfo

object

The basic information of the media asset.

MediaId

string

The ID of the media asset.

******c48fb37407365d4f2cd8******

InputURL

string

The URL of the media asset to be registered in the corresponding system.

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

MediaType

string

The media type of the media asset. Valid values:

  • Image

  • Video

  • Audio

  • Text

video

BusinessType

string

The business type of the media asset.

general

Source

string

The source. Valid values:

  • OSS

  • vod

oss

Title

string

The title.

title

Description

string

The description.

description

Category

string

The category.

category1

MediaTags

string

The tags.

tag1, tag2

CoverURL

string

The cover URL.

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

UserData

string

The user data.

userDataTest

Snapshots

string

The snapshots.

[ "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00001.png?Expires=&OSSAccessKeyId=&Signature=&security-token=", "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00002.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=", "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00003.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=" ]

Status

string

The resource status.

Normal

TranscodeStatus

string

The transcoding status.

Init

CreateTime

string

The creation time of the media asset. The time follows the ISO 8601 standard and is displayed in UTC (ending with Z).

2020-12-26T04:11:10Z

ModifiedTime

string

The modification time of the media asset. The time follows the ISO 8601 standard and is displayed in UTC (ending with Z).

2020-12-26T04:11:12Z

DeletedTime

string

The deletion time of the media asset. The time follows the ISO 8601 standard and is displayed in UTC (ending with Z).

2020-12-26T04:11:10Z

SpriteImages

string

The sprite images.

[{"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"}]

Biz

string

The business to which the media asset belongs.

ICE

FileInfoList

array<object>

The list of basic file information.

array<object>

The basic file information.

FileBasicInfo

object

The basic file information, including the duration and size.

FileName

string

The file name.

example

FileStatus

string

The file status.

Normal

FileType

string

The file type.

source_file

FileSize

string

The file size in bytes.

30611502

FileUrl

string

The OSS URL of the file.

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

Region

string

The storage region of the file.

cn-shanghai

FormatName

string

The container format.

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

Duration

string

The duration.

200

Bitrate

string

The bitrate.

1132.68

Width

string

The width.

1920

Height

string

The height.

1080

AudioStreamInfoList

array<object>

The audio stream information. A media asset may contain multiple audio streams.

object

Index

string

The index of the audio stream.

1

CodecName

string

The short name of the codec.

aac

CodecLongName

string

The long name of the codec.

AAC (Advanced Audio Coding)

CodecTimeBase

string

The time base of the codec.

1/24000

CodecTagString

string

The codec tag string.

mp4a

CodecTag

string

The codec tag.

0x6134706d

Profile

string

The encoding profile.

High

SampleFmt

string

The sample format.

fltp

SampleRate

string

The sample rate.

44100

Channels

string

The number of channels.

2

ChannelLayout

string

The channel layout.

stereo

Timebase

string

The timebase.

1/44100

StartTime

string

The start time. Unit: seconds.

0.000000

Duration

string

The duration.

16.200998

Bitrate

string

The bitrate.

127.794

Fps

string

The audio frame rate.

8

NumFrames

string

The total number of frames.

10

Lang

string

The language.

und

VideoStreamInfoList

array<object>

The video stream information. A media asset may have multiple video streams.

object

Index

string

The video stream index.

0

CodecName

string

The short name of the codec.

h264

CodecLongName

string

The long name of the codec.

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

Profile

string

The encoding profile.

High

CodecTimeBase

string

The time base of the codec.

1/48

CodecTagString

string

The codec tag string.

[0][0][0][0]

CodecTag

string

The codec tag.

0x0000

Width

string

The width.

960

Height

string

The height.

540

HasBFrames

string

Indicates whether the video stream contains B-frames.

2

Sar

string

The sample aspect ratio.

0:1

Dar

string

The display aspect ratio.

0:1

PixFmt

string

The pixel format.

yuv420p

Level

string

The encoding level.

30

Fps

string

The video frame rate.

24.0

AvgFPS

string

The average frame rate.

24.0

Timebase

string

The timebase.

1/12288

StartTime

string

The start time. Unit: seconds.

0.081706

Duration

string

The duration.

216.206706

Bitrate

string

The bitrate.

1001.594

NumFrames

string

The total number of frames.

5184

Lang

string

The language.

und

Rotate

string

The rotation.

0

Nb_frames

string

The total number of frames.

5184

SubtitleStreamInfoList

array<object>

The subtitle stream information. A media asset may have multiple subtitle streams.

object

Index

string

The index of the audio stream.

1

CodecName

string

The short name of the codec.

srt

CodecLongName

string

The long name of the codec.

SubRip Text

CodecTimeBase

string

The time base of the codec.

29.97

CodecTagString

string

The codec tag string.

unicode

CodecTag

string

The codec tag.

unicode

Timebase

string

The timebase.

30

StartTime

string

The start time. Unit: seconds.

0

Duration

string

The duration.

1

Lang

string

The language.

und

MediaDynamicInfo

object

The media asset type.

DynamicMetaData

object

The type. Valid values:

  • ai: AI data processed from original AI results.

  • user-defined: User-defined metadata.

  • system: System-provided metadata.

Data

string

The media asset type.

system

IgnoredList

array

The list of media asset information that failed to be retrieved.

string

The media asset information.

****20b48fb04483915d4f2cd8ac****

Examples

Success response

JSON format

{
  "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": "title",
        "Description": "description",
        "Category": "category1",
        "MediaTags": "tag1, tag2",
        "CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=",
        "UserData": "userDataTest",
        "Snapshots": "[\n    \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00001.png?Expires=&OSSAccessKeyId=&Signature=&security-token=\",\n    \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00002.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=\",\n    \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00003.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=\"\n]",
        "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\"}]",
        "Biz": "ICE"
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "example",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "30611502",
            "FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=&OSSAccessKeyId=&Signature=&security-token=",
            "Region": "cn-shanghai",
            "FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
            "Duration": "200",
            "Bitrate": "1132.68",
            "Width": "1920",
            "Height": "1080"
          },
          "AudioStreamInfoList": [
            {
              "Index": "1",
              "CodecName": "aac",
              "CodecLongName": "AAC (Advanced Audio Coding)",
              "CodecTimeBase": "1/24000",
              "CodecTagString": "mp4a",
              "CodecTag": "0x6134706d",
              "Profile": "High",
              "SampleFmt": "fltp",
              "SampleRate": "44100",
              "Channels": "2",
              "ChannelLayout": "stereo",
              "Timebase": "1/44100",
              "StartTime": "0.000000",
              "Duration": "16.200998",
              "Bitrate": "127.794",
              "Fps": "8",
              "NumFrames": "10",
              "Lang": "und"
            }
          ],
          "VideoStreamInfoList": [
            {
              "Index": "0",
              "CodecName": "h264",
              "CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
              "Profile": "High",
              "CodecTimeBase": "1/48",
              "CodecTagString": "[0][0][0][0]",
              "CodecTag": "0x0000",
              "Width": "960",
              "Height": "540",
              "HasBFrames": "2",
              "Sar": "0:1",
              "Dar": "0:1",
              "PixFmt": "yuv420p",
              "Level": "30",
              "Fps": "24.0",
              "AvgFPS": "24.0",
              "Timebase": "1/12288",
              "StartTime": "0.081706",
              "Duration": "216.206706",
              "Bitrate": "1001.594",
              "NumFrames": "5184",
              "Lang": "und",
              "Rotate": "0",
              "Nb_frames": "5184"
            }
          ],
          "SubtitleStreamInfoList": [
            {
              "Index": "1",
              "CodecName": "srt",
              "CodecLongName": "SubRip Text",
              "CodecTimeBase": "29.97",
              "CodecTagString": "unicode",
              "CodecTag": "unicode",
              "Timebase": "30",
              "StartTime": "0",
              "Duration": "1",
              "Lang": "und"
            }
          ]
        }
      ],
      "MediaDynamicInfo": {
        "DynamicMetaData": {
          "Data": "system"
        }
      }
    }
  ],
  "IgnoredList": [
    "****20b48fb04483915d4f2cd8ac****"
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.