DetectVideoWatermark
1. API Description
Domain name for API request: mps.intl.tencentcloudapi.com.
This API is used to quickly detect whether a video file contains a watermark.
A maximum of 5 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: DetectVideoWatermark. |
| 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, which supports only URL and COS. |
| UserExtPara | No | String | Extended parameter. This is left empty by default. |
3. Output Parameters
| Parameter Name | Type | Description |
|---|---|---|
| Confidence | Float | Confidence of watermark presence. Value range: [0, 100]. |
| HasWatermark | Boolean | Indicates whether a watermark is present in the video. |
| Description | String | Watermark description. |
| 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 Initiating a Regular Watermark Detection Task
Input Example
POST / HTTP/1.1
Host: mps.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DetectVideoWatermark
<Common request parameters>
{
"InputInfo": {
"Type": "URL",
"UrlInputInfo": {
"Url": "https://ie-mps-1258344699.cos.ap-nanjing.tencentcos.cn/common/ppeterhuang/yjcp_badcase_cut.mp4"
}
}
}
Output Example
{
"Response": {
"Confidence": 98.33333333333333,
"Description": "A Xiaohongshu logo is present at the bottom right. A 'Xiaohongshu' text logo is present at the top left. A profile photo logo is present at the top right. A 'Xilaodeng' text logo is present at the top right.",
"HasWatermark": true,
"RequestId": "d02e3ed3-327f-42fc-9d34-c2e3ed8fba93"
}
}
Example2 Initiating a Regular Watermark Detection Task with Extended Parameters
Input Example
POST / HTTP/1.1
Host: mps.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DetectVideoWatermark
<Common request parameters>
{
"InputInfo": {
"Type": "URL",
"UrlInputInfo": {
"Url": "https://ie-mps-1258344699.cos.ap-nanjing.tencentcos.cn/common/ppeterhuang/yjcp_badcase_cut.mp4"
}
},
"UserExtPara": "{\"key\": \"value\"}"
}
Output Example
{
"Response": {
"Confidence": 99,
"Description": "A Xiaohongshu logo is present at the bottom left. A Xiaohongshu logo is present at the bottom right. A 'Xiaohongshu' logo is present at the top left. A 'Xilaodeng' text and user profile photo are present at the top right.",
"HasWatermark": true,
"RequestId": "f94119bd-ab31-42c5-a445-16f9e8c7d741"
}
}
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.GenerateResource | Resource generation failed. |
| InternalError | Internal error. |
| InternalError.RecognitionError | Recognition error. |
| InvalidParameter.InputInfo | Illegal input. |
| InvalidParameterValue.DurationTooLong | The Duration parameter is too large. |
| ResourceNotFound.DownloadError | Download failed. |
| ResourceNotFound.UserUnregister | The user is not registered. |