DescribeMediaMetaData
1. API Description
Domain name for API request: mps.intl.tencentcloudapi.com.
This API is used to obtain media meta information, including video image width, height, encoding format, duration, and frame rate.
A maximum of 20 requests can be initiated per second for this API.
2. Input Parameters
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: DescribeMediaMetaData. |
| Version | Yes | String | Common Params. The value used for this API: 2019-06-12. |
| Region | No | String | Common Params. This parameter is not required for this API. |
| InputInfo | Yes | MediaInputInfo | Input information of the file that needs to get meta information. |
| Mode | No | String | When set to slow, expand the API timeout duration Enumeration values:
|
3. Output Parameters
| Parameter Name | Type | Description |
|---|---|---|
| MetaData | MediaMetaData | Media metadata. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
4. Example
Example1 Obtaining Video Information
Input Example
https://mps.intl.tencentcloudapi.com/?Action=DescribeMediaMetaData
&InputInfo.Type=COS
&InputInfo.CosInputInfo.Bucket=TopRankVideo-125xxx88
&InputInfo.CosInputInfo.Region=ap-chongqing
&InputInfo.CosInputInfo.Object=/movie/201907/WildAnimal.mov
&<Common request parameters>Output Example
{
"Response": {
"MetaData": {
"AudioDuration": 380.9465637207031,
"AudioStreamSet": [
{
"Bitrate": 95999,
"Codec": "aac",
"Codecs": "mp4a.40.2",
"Loudness": 0,
"Channel": 2,
"SamplingRate": 44100
}
],
"Bitrate": 409657,
"Container": "mov,mp4,m4a,3gp,3g2,mj2",
"Duration": 380.9465637207031,
"Height": 360,
"Rotate": 0,
"Size": 19626862,
"VideoDuration": 380.8804931640625,
"VideoStreamSet": [
{
"Bitrate": 313658,
"Codec": "h264",
"Codecs": "avc1.ffe100",
"ColorPrimaries": "",
"ColorSpace": "",
"ColorTransfer": "",
"HdrType": "",
"Fps": 29,
"Height": 360,
"Width": 480
}
],
"Width": 480
},
"RequestId": "12ae8d8e-dce3-4151-9d4b-5594145287e1"
}
}5. Developer Resources
SDK
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for Node.js
- Tencent Cloud SDK 3.0 for .NET
- Tencent Cloud SDK 3.0 for C++
Command Line Interface
6. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.InvalidMpsUser | Operation failed: illegal mps user. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue.SrcFile |