Queries information about a media asset based on the ID of the media asset in Intelligent Media Services (IMS) or the input URL of the media asset.
Operation description
If the MediaId parameter is specified, the MediaId parameter is preferentially used for the query. If the MediaId parameter is left empty, the InputURL parameter must be specified.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ice:GetMediaInfo | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
MediaId | string | No | The ID of the media asset in IMS. If this parameter is left empty, the InputURL parameter must be specified. | ****20b48fb04483915d4f2cd8ac**** |
InputURL | string | No | The input URL of the media asset in another service. The URL must be registered in the IMS content library and bound to the ID of the media asset in IMS.
http(s)://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 or oss://example-bucket/example.mp4. The second format indicates that the region in which the OSS bucket of the media asset resides is the same as the region in which OSS is activated. | http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 |
OutputType | string | No | The type of the URL of the media asset to return in the response. Valid values:
| cdn |
ReturnDetailedInfo | string | No | Specifies whether to return detailed information for specific media asset attributes. Supported attributes: AiRoughData.StandardSmartTagJob, which specifies whether to return detailed tag information if a tagging job has been submitted for the media asset. Valid values for the attribute:
| {"AiRoughData.StandardSmartTagJob": false} |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2FDE2411-DB8D-4A9A-875B-275798F14A5E",
"MediaInfo": {
"MediaId": "****20b48fb04483915d4f2cd8ac****",
"MediaBasicInfo": {
"MediaId": "****20b48fb04483915d4f2cd8ac****",
"InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
"MediaType": "video",
"BusinessType": "general",
"Source": "oss",
"Title": "",
"Description": "",
"Category": "",
"MediaTags": "",
"CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
"UserData": "userDataTest",
"Snapshots": "[\n \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00001.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>\",\n \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00002.jpg?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>\",\n \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00003.jpg?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>\"\n]",
"Status": "Normal",
"CreateTime": "2020-12-26T04:11:08Z",
"ModifiedTime": "2020-12-26T04:11:10Z",
"DeletedTime": "2020-12-26T04:11:15Z",
"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\"}]",
"CateId": 3048,
"Biz": "ICE",
"UploadSource": "general",
"CateName": "cateName",
"ReferenceId": "123-1234"
},
"FileInfoList": [
{
"FileBasicInfo": {
"FileName": "example.mp4",
"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": "216.206667",
"Bitrate": "1132.68",
"Width": "960",
"Height": "540",
"CreateTime": "2020-12-26T04:11:08Z",
"ModifiedTime": "2020-12-26T04:11:10Z"
},
"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"
}
]
}
],
"AiRoughData": {
"Result": "https://sample-bucket.cn-shanghai.aliyuncs.com/result.json",
"Status": "Analyzing",
"SaveType": "TEXT",
"AiCategory": "",
"AiJobId": "****483915d4f2cd8ac20b48fb04****",
"StandardSmartTagJob": {
"AiJobId": "****483915d4f2cd8ac20b48fb04****",
"Status": "Analyzing",
"ResultUrl": "http://xx.oss-cn-shanghai.aliyuncs.com/result2.txt",
"Results": [
{
"Data": "{\"autoChapters\": [...]}",
"Type": "NLP"
}
]
}
}
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-04 | The response structure of the API has changed | View Change Details |
2024-04-24 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2021-11-25 | The response structure of the API has changed | View Change Details |
2021-03-31 | The response structure of the API has changed | View Change Details |