Detects threats or non-compliant content in videos. This operation can be used in scenarios such as pornography detection, terrorism and politically sensitive content detection, text and image violation detection, undesirable scene detection, and logo detection.
Operation description
- Before you use this operation, make sure that you understand the billing methods and pricing of Intelligent Media Management.
Important The completion time of asynchronous tasks is not guaranteed.
- The detection results are returned in an asynchronous notification message. The Suggestion field in the asynchronous notification message can have the following values:
pass: The video passed the review. No non-compliant content was detected.
block: The video must be blocked. This value is returned when non-compliant content is detected. The Categories field indicates the category of the non-compliant content. For more information about the categories, see Content Moderation detection results.
review: The video requires manual review. After the manual review is complete, another asynchronous notification message is sent with the result.
- Video snapshot requirements:
Video frame URLs support the HTTP and HTTPS protocols.
Supported video frame formats: PNG, JPG, JPEG, BMP, GIF, and WEBP.
The size of a video frame cannot exceed 10 MB.
The recommended resolution for video frames is at least 256 × 256 pixels. A lower resolution may affect detection accuracy.
The response time for the video detection operation depends on the download time of the video frames. Make sure that the storage service for your video frames is stable and reliable. We recommend that you use Alibaba Cloud Object Storage Service (OSS) or cache frames with Alibaba Cloud CDN.
This is an asynchronous operation. After a task is created, the task information is saved for only 7 days. After this period, the information cannot be retrieved. You can call the GetTask or ListTasks operation to query the task information using the returned
TaskId. You can also set the Notification parameter to receive task information through asynchronous notification messages.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:CreateVideoModerationTask |
create |
*Project
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The name of the project. For more information about how to get the project name, see Create a project. |
immtest |
| UserData |
string |
No |
Custom information that is returned in the asynchronous notification message. Use this information to associate the notification message with your internal system. The maximum length is 2,048 bytes. |
{"ID": "user1","Name": "test-user1","Avatar": "http://example.com?id=user1"} |
| SourceURI |
string |
Yes |
The OSS URI of the video. The OSS URI must follow the format oss://${Bucket}/${Object}. |
oss://test-bucket/test-object |
| Tags |
object |
No |
Custom tags used to search for tasks. |
{"test": "val1"} |
| CredentialConfig | CredentialConfig |
No |
The chained authorization configuration. This parameter is optional. For more information, see Use chained authorization to access resources of other entities. |
|
| Scenes |
array |
No |
The video detection scenarios. |
|
|
string |
No |
The video detection scenario. Valid values:
Note
If you do not specify a detection scenario, the Valid values:
|
porn |
|
| Interval |
integer |
No |
The interval for video snapshots, in seconds. The value can be an integer from 1 to 600. The default value is 1. |
1 |
| MaxFrames |
integer |
No |
The maximum number of frames that can be captured for this detection task. The value can be an integer from 5 to 3,600. The default value is 200. |
200 |
| Notification | Notification |
No |
The notification configuration. For the format of asynchronous notification messages, see the metadata index section in Asynchronous notification message format. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| RequestId |
string |
The ID of the request. |
1B3D5E0A-D8B8-4DA0-8127-ED32C851**** |
| TaskId |
string |
The ID of the task. |
VideoModeration-9442a216-4691-4a48-846d-76daccaf***** |
| EventId |
string |
The ID of the event. |
2E6-1I0FGn0zFnl5AflRfhzClma***** |
Examples
Success response
JSON format
{
"RequestId": "1B3D5E0A-D8B8-4DA0-8127-ED32C851****",
"TaskId": "VideoModeration-9442a216-4691-4a48-846d-76daccaf*****",
"EventId": "2E6-1I0FGn0zFnl5AflRfhzClma*****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.