Retrieves information for multiple media assets in a single request by providing their mediaId values.
Try it now
Test
RAM authorization
|
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 |
A comma-separated list of media asset IDs to query. |
******b48fb04483915d4f2cd8******,******c48fb37407365d4f2cd8****** |
| AdditionType |
string |
No |
The types of additional media asset information to return. If this parameter is not specified, only basic information is returned. Valid values are: -FileInfo -DynamicMetaData |
FileInfo,DynamicMetaData |
| AuthTimeout |
integer |
No |
The authentication timeout, in seconds.
|
30 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
******11-DB8D-4A9A-875B-275798****** |
| MediaInfos |
array<object> |
A list of media assets. |
|
|
array<object> |
The details of a media asset. |
||
| MediaId |
string |
The media ID. |
******c48fb37407365d4f2cd8****** |
| MediaBasicInfo |
object |
The basic information about the media asset. |
|
| MediaId |
string |
The media ID. |
******c48fb37407365d4f2cd8****** |
| InputURL |
string |
The URL of the media asset in its source system. |
https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| MediaType |
string |
The media type. Valid values:
|
video |
| BusinessType |
string |
The business type of the media asset. |
general |
| Source |
string |
The source. Valid values:
|
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= |
| 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 status of the media asset. |
Normal |
| TranscodeStatus |
string |
The transcoding status. |
Init |
| CreateTime |
string |
The time the media asset was created. |
2020-12-26T04:11:10Z |
| ModifiedTime |
string |
The time the media asset was last modified. |
2020-12-26T04:11:12Z |
| DeletedTime |
string |
The time the media asset was deleted. |
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 associated with the media asset. |
ICE |
| FileInfoList |
array<object> |
A list of basic file information. |
|
|
array<object> |
The basic information about the file. |
||
| FileBasicInfo |
object |
The basic information about the file, such as the duration and file 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= |
| Region |
string |
The region where the file is stored. |
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 streams. |
|
|
object |
The details of an audio stream. |
||
| Index |
string |
The index of the stream. |
|
| CodecName |
string |
The short name of the codec. |
|
| CodecLongName |
string |
The full name of the codec. |
|
| CodecTimeBase |
string |
The time base of the codec. |
|
| CodecTagString |
string |
The codec tag string. |
|
| CodecTag |
string |
The codec tag. |
|
| Profile |
string |
The profile. |
|
| SampleFmt |
string |
The sample format. |
|
| SampleRate |
string |
The sample rate. |
|
| Channels |
string |
The number of audio channels. |
|
| ChannelLayout |
string |
The channel layout. |
|
| Timebase |
string |
The time base. |
|
| StartTime |
string |
The start time. |
|
| Duration |
string |
The duration. |
|
| Bitrate |
string |
The bitrate. |
|
| Fps |
string |
The frame rate. |
|
| NumFrames |
string |
The total number of frames. |
|
| Lang |
string |
The language. |
|
| VideoStreamInfoList |
array<object> |
The video streams. |
|
|
object |
The details of a video stream. |
||
| Index |
string |
The index of the stream. |
|
| CodecName |
string |
The short name of the codec. |
|
| CodecLongName |
string |
The full name of the codec. |
|
| Profile |
string |
The profile. |
|
| CodecTimeBase |
string |
The time base of the codec. |
|
| CodecTagString |
string |
The codec tag string. |
|
| CodecTag |
string |
The codec tag. |
|
| Width |
string |
The width of the video. |
|
| Height |
string |
The height of the video. |
|
| HasBFrames |
string |
Indicates whether B-frames exist. |
|
| Sar |
string |
The sample aspect ratio (SAR). |
|
| Dar |
string |
The display aspect ratio (DAR). |
|
| PixFmt |
string |
The pixel format. |
|
| Level |
string |
The level. |
|
| Fps |
string |
The frame rate. |
|
| AvgFPS |
string |
The average frame rate. |
|
| Timebase |
string |
The time base. |
|
| StartTime |
string |
The start time. |
|
| Duration |
string |
The duration. |
|
| Bitrate |
string |
The bitrate. |
|
| NumFrames |
string |
The total number of frames. |
|
| Lang |
string |
The language. |
|
| Rotate |
string |
The rotation angle. |
|
| Nb_frames |
string |
This parameter is an alias for |
|
| SubtitleStreamInfoList |
array<object> |
The subtitle streams. |
|
|
object |
The details of a subtitle stream. |
||
| Index |
string |
The index of the stream. |
|
| CodecName |
string |
The short name of the codec. |
|
| CodecLongName |
string |
The full name of the codec. |
|
| CodecTimeBase |
string |
The time base of the codec. |
|
| CodecTagString |
string |
The codec tag string. |
|
| CodecTag |
string |
The codec tag. |
|
| Timebase |
string |
The time base. |
|
| StartTime |
string |
The start time. |
|
| Duration |
string |
The duration. |
|
| Lang |
string |
The language. |
|
| MediaDynamicInfo |
object |
The dynamic information about the media asset. |
|
| DynamicMetaData |
object |
The type of dynamic metadata. Valid values:
|
|
| Data |
string |
The content of the dynamic metadata. |
system |
| IgnoredList |
array |
A list of media IDs for which information could not be retrieved. |
|
|
string |
The ID of a media asset for which information could not be retrieved. |
****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": "",
"CodecName": "",
"CodecLongName": "",
"CodecTimeBase": "",
"CodecTagString": "",
"CodecTag": "",
"Profile": "",
"SampleFmt": "",
"SampleRate": "",
"Channels": "",
"ChannelLayout": "",
"Timebase": "",
"StartTime": "",
"Duration": "",
"Bitrate": "",
"Fps": "",
"NumFrames": "",
"Lang": ""
}
],
"VideoStreamInfoList": [
{
"Index": "",
"CodecName": "",
"CodecLongName": "",
"Profile": "",
"CodecTimeBase": "",
"CodecTagString": "",
"CodecTag": "",
"Width": "",
"Height": "",
"HasBFrames": "",
"Sar": "",
"Dar": "",
"PixFmt": "",
"Level": "",
"Fps": "",
"AvgFPS": "",
"Timebase": "",
"StartTime": "",
"Duration": "",
"Bitrate": "",
"NumFrames": "",
"Lang": "",
"Rotate": "",
"Nb_frames": ""
}
],
"SubtitleStreamInfoList": [
{
"Index": "",
"CodecName": "",
"CodecLongName": "",
"CodecTimeBase": "",
"CodecTagString": "",
"CodecTag": "",
"Timebase": "",
"StartTime": "",
"Duration": "",
"Lang": ""
}
]
}
],
"MediaDynamicInfo": {
"DynamicMetaData": {
"Data": "system"
}
}
}
],
"IgnoredList": [
"****20b48fb04483915d4f2cd8ac****"
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.