Adds a video moderation configuration for live streams in an application under a domain name.
Usage notes
- The automated review feature detects undesirable sensitive content in live streams in an application under a domain name and returns callbacks to notify you of the violations in real time. Then, you can manually review the content and take actions accordingly.
- Only some live centers support the automated review feature. For more information, see Supported regions.
QPS limit
You can call this operation up to 30 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit on an API operation in ApsaraVideo Live.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddLiveSnapshotDetectPornConfig |
The operation that you want to perform. Set the value to AddLiveSnapshotDetectPornConfig. |
DomainName | String | Yes | example.com |
The main streaming domain. |
AppName | String | Yes | testApp |
The name of the application to which the live stream belongs. |
OssEndpoint | String | Yes | cn-oss-****.aliyuncs.com |
The endpoint of the Object Storage Service (OSS) bucket. After the review is complete, you can search for specific violations in the OSS console based on the callback information. You must configure the OSS endpoint in advance. For more information, see Configure content moderation. |
OssBucket | String | Yes | livebucket |
The name of the OSS bucket. After the review is complete, you can search for specific violations in the OSS console based on the callback information. You must create the OSS bucket in advance. For more information, see Configure content moderation. |
OssObject | String | No | record/{AppName}/{StreamName}/{Sequence}.jpg |
The name of the snapshot that stores violations such as pornographic content and politically sensitive content. |
Interval | Integer | No | 10 |
The interval at which snapshots are captured from the live stream. Valid values: 5 to 3600. Unit: seconds. |
Scene.N | String | No | live |
The moderation scenario. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
The ID of the request. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=AddLiveSnapshotDetectPornConfig
&AppName=testApp
&DomainName=example.com
&OssBucket=livebucket
&OssEndpoint=cn-oss-****.aliyuncs.com
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<AddLiveSnapshotDetectPornConfigResponse>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
</AddLiveSnapshotDetectPornConfigResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidOssEndpoint.Malformed | Specified parameter OssEndpoint is not valid. | The error message returned because the OSS endpoint is invalid. Check whether the value of the OssEndpoint parameter is valid. |
400 | InvalidOssBucket.Malformed | Specified parameter OssBucket is not valid. | The error message returned because the OSS bucket is invalid. Check whether the value of the OssBucket parameter is valid. |
400 | InvalidOssBucket.NotFound | The parameter OssBucket does not exist. | The error message returned because the OSS bucket is not found. Check whether the value of the OssBucket parameter is valid. |
400 | ConfigAlreadyExists | Config has already exist. | The error message returned because the configuration already exists. |
For a list of error codes, see Service error codes.