ApsaraVideo Live automatically checks live streams for compliance by analyzing video, audio, and snapshots to detect potential violations. Non-compliant content is stored in Object Storage Service (OSS) for you to query and manage.
Prerequisites
-
The automated review feature is available only in specific live centers. For a list of supported regions, see Regions.
-
Video review and audio review are paid services. Before using these services, review their billing methods and pricing. For more information, see Automated review fees.
-
Snapshots are stored in OSS and incur OSS storage fees. For more information, see Storage fees.
Background
The automated moderation service uses deep learning to detect prohibited content in live stream audio and video, covering pornography, terrorism, politically sensitive content, advertisements, and garbage content. Video moderation analyzes snapshots for violations, while audio moderation identifies prohibited content in the audio stream. All violations are reported via webhooks.
Configure moderation templates
Console
-
Log in to the ApsaraVideo Live console.
-
In the left-side navigation pane, click Feature Management > Content Moderation.
-
Select the streaming domain to configure and click the Video Moderation or Audio Moderation tab.
-
Click Add to configure a moderation template.
-
Video Moderation
The following table describes the parameters of a video moderation template.
Parameter
Description
Application Name
For the template to take effect, the Application Name that you specify must match the Application Name in the ingest URL. The value is case-sensitive. You can also specify a single asterisk (*) to match all application names.
Scenario
The following four scenarios are supported:
-
Pornography
-
Terrorism and politically sensitive content
-
Advertisements
-
Garbage content
Snapshot Interval
Unit: seconds. Valid values: 5 to 3600.
Storage Location
Select a storage location in OSS for the snapshots.
-
-
Audio Moderation
The following table describes the parameters of an audio moderation template.
Parameter
Description
Application Name
For the template to take effect, the Application Name that you specify must match the Application Name in the ingest URL. The value is case-sensitive.
StreamName
For the template to take effect, the StreamName that you specify must match the StreamName in the ingest URL. The value is case-sensitive.
-
-
After configuring the parameters, click OK.
API
-
Video Moderation
API
References
AddLiveSnapshotDetectPornConfig
Configure the live stream moderation service at the domain name and app levels
DeleteLiveSnapshotDetectPornConfig
UpdateLiveSnapshotDetectPornConfig
DescribeLiveSnapshotDetectPornConfig
-
Audio Moderation
API
References
AddLiveAudioAuditConfig
DeleteLiveAudioAuditConfig
UpdateLiveAudioAuditConfig
DescribeLiveAudioAuditConfig
Configure a webhook address
Console
-
On the Video Moderation or Audio Moderation tab, set the Callback URL.
Click the edit icon to the right of Webhook Address.
-
Enter Callback URL.
-
Check the callback information on your webhook server. For callback message formats and examples, see webhook.
-
Find the detected content in OSS.
Find the specified content in the OSS console based on the webhook information.
-
Find the specified content by AppName and StreamName.
-
Find the specified content by ingest date.
-
API
-
Video moderation
API
References
AddLiveDetectNotifyConfig
Add a webhook configuration for live video moderation
For the default format, see Default webhook format for video moderation.
DeleteLiveDetectNotifyConfig
UpdateLiveDetectNotifyConfig
DescribeLiveDetectNotifyConfig
-
Audio moderation
API
References
AddLiveAudioAuditNotifyConfig
Add a webhook configuration for live audio moderation
You can customize the webhook's JSON format. For the default format, see Default webhook format for audio moderation.
DeleteLiveAudioAuditNotifyConfig
UpdateLiveAudioAuditNotifyConfig
DescribeLiveAudioAuditNotifyConfig
Webhook format
Default webhook for video review
A webhook notification is sent only for flagged video content. It contains the moderation results and the storage location of the corresponding snapshot.
{
"DomainName": "example.com",
"AppName": "liveApp****",
"StreamName": "liveStream****",
"OssEndpoint": "oss-cn-hangzhou.aliyuncs.com",
"OssBucket": "liveBucket****",
"OssObject": "liveObject****.jpg",
"Result": [
{
"BizType": "example.com",
"Result": [
{"Label": "Porn", "Rate":11.1, "Suggestion": "review", "Scene":"porn", "Extent": {}},
{"Label": "Ad", "Rate":11.1, "Suggestion": "review", "Scene":"ad", "Extent": {}}
]
}
]
}
Parameters
|
Parameter |
Type |
Description |
|
DomainName |
String |
The streaming domain. |
|
AppName |
String |
The application name. |
|
StreamName |
String |
The stream name. |
|
OssEndpoint |
String |
The OSS endpoint for the stored object. |
|
OssBucket |
String |
The OSS bucket where the object is stored. |
|
OssObject |
String |
The object name. |
|
Result |
JSONArray |
The detection results. For more information, see Result. |
Table 1. Result
|
Parameter |
Type |
Description |
|
BizType |
String |
The business type, used for model selection. Default value: the domain name. |
|
Scene |
String |
The detection scenario.
|
|
Label |
String |
The category of the detected violation. Available categories depend on the detection scenario. For more information, see Label. |
|
Rate |
Float |
The confidence score, on a scale of 0 (lowest) to 100 (highest). Note
This score is for reference only. Base your business logic on the |
|
Extent |
JSONObject |
A reserved field. |
Table 2. Label
|
Parameter |
Type |
Description |
|
porn |
String |
Categories for pornography detection in images:
|
|
terrorism |
String |
Categories for terrorism and politically sensitive content detection in images:
|
|
ad |
String |
Categories for advertisement detection:
|
|
live |
String |
Categories for undesirable live streaming scenes:
|
|
logo |
String |
Categories for logo detection in images:
|
New users use this version by default, while existing users remain on their current version. To switch to this version, submit a ticket. For instructions, see Contact us.
Default webhook for audio review
A webhook notification is sent only for flagged audio content. It includes the transcript of the flagged segment and its preceding one-minute context.
{
"domain": "example.com",
"app": "liveApp****",
"stream": "5d9747eba39b44769852d276f9ff****",
"timestamp": 1572248095,
"result": [
{
"scene": "antispam",
"label": "ad",
"suggestion": "block",
"rate": 99.91,
"details": [
{
"startTime": 1572248023,
"endTime": 1572248040,
"text": "Get 120 days of free accommodation at hotels in Dali, Longchuan, and more. Share the stay with your family and friends. Visit the Yunqi Community International Hotel reception center at 96 Tuanjie Street, Mangshi, next to Yiyi KTV. Call our hotline at 2285699.",
"label": "ad"
},
{
"startTime": 1572248040,
"endTime": 1572248070,
"text": "Enjoy our classic villas at Lianghe Jinta and the second phase of the Binhu Yuan tourist town. Grand opening on November 2nd! Natural spring water, a variety of classic designs, and exceptional value. Special offers on opening day. Visit us at 229 Xianfeng Road, Zhedao Town, Ranhe County. Call 069269557776955777.",
"label": "normal"
},
{
"startTime": 1572248072,
"endTime": 1572248077,
"text": "Happy times are better with you. Relaxing days feel even more effortless.",
"label": "normal"
},
{
"startTime": 1572248078,
"endTime": 1572248086,
"text": "fme043 Take a musical break from your busy life. Warm songs for the cinema you miss.",
"label": "normal"
}
]
}
]
}
|
Parameter |
Type |
Description |
|
domain |
String |
The streaming domain. |
|
app |
String |
The application name. |
|
stream |
String |
The stream name. |
|
timestamp |
Int |
The UNIX timestamp of the webhook, in seconds. |
|
result |
JSONArray |
The detection results. For more information, see Result. |
Table 3. Result
|
Parameter |
Type |
Description |
|
scene |
String |
The detection scenario. |
|
label |
String |
The category of the detected violation. Valid values:
|
|
suggestion |
String |
The suggested action. The
|
|
rate |
Float |
The confidence score, on a scale of 0 (lowest) to 100 (highest). Note
This score is for reference only. Base your business logic on the |
|
details |
JSONArray |
An array of objects, each representing a transcribed sentence from the audio. For the object structure, see Detail. |
Table 4. Detail
|
Parameter |
Type |
Description |
|
startTime |
Int |
The start time of the sentence, as a UNIX timestamp in seconds. |
|
endTime |
Int |
The end time of the sentence, as a UNIX timestamp in seconds. |
|
text |
String |
The transcript of the audio segment. |
|
label |
String |
The category of the detected violation. Valid values:
|
FAQ
Custom sensitive words
No. The automated review service does not support custom sensitive words.
Authenticated third-party streams
No. The automated review service does not support ingesting stream URLs from other platforms.