Choose a cost-effective content moderation strategy for your live streams and configure a moderation template.
How it works
-
Moderation scenario: Analyzes live video streams for Pornography, Terrorism, Ad Violation, and Undesirable Scene.
-
Frame capture: For high-risk services such as streams from top broadcasters or dating apps, use high-frequency frame capture to minimize exposure to inappropriate content. For lower-risk services such as game or event streaming, use keyframe capture to optimize costs.
High-frequency frame capture and keyframe capture are functionally identical. Choose the strategy that best fits your business needs.
Configuration methods
-
Method 1: Configure a moderation policy by calling an API operation. For more information, see AddLiveSnapshotDetectPornConfig.
-
Method 2: Configure a moderation policy in the console. For more information, see Procedure.
Procedure
Prerequisites
-
Activate ApsaraVideo Live and grant the service the necessary permissions on Object Storage Service (OSS). For more information, see Activate service and purchase resource plans. After activation, images flagged during moderation are saved to your OSS bucket.
-
Prepare an HTTP server to receive callbacks.
-
Log on to the ApsaraVideo Live console.
-
In the left-side navigation pane, choose . This opens the Content Moderation page.
-
From the list of domain names, select the domain to configure and click Add.
-
Configure a moderation template based on your needs.
-
Video moderation
The following table describes the parameters.
Parameter
Description
Application Name
The application name for the video. The AppName must match the Application Name for stream ingest for the setting to take effect. If you want to perform domain-level review, enter an asterisk (*).
Scenario
The moderation scenarios to enable. Available options:
-
Pornography
-
Terrorism
-
Ad Violation
-
Undesirable Scene
Snapshot Interval
The snapshot interval. Unit: seconds. Valid values: 5 to 3600.
Storage Location
The location in OSS where captured frames are stored.
-
-
Audio moderation
The following table describes the parameters.
Parameter
Description
Application Name
The application name for the video, Application Name, must match the Application Name in the live stream ingest URL for the template to take effect. The name is case-sensitive.
Stream Name
The Stream Name must match the Stream Name in the stream ingest URL for the template to take effect. The name is case-sensitive.
-
-
Click OK.
-
Content moderation begins.
-
After stream ingest starts, ApsaraVideo Live immediately performs content moderation based on the configured rules.
-
If a violation is detected, the system sends a callback notification to your server and saves the flagged image to the specified OSS location. The notification uses the following format:
{ "DomainName": "example.aliyundoc.com", "AppName": "ondemand_oss", "StreamName": "gs0911_4", "OssEndpoint": "oss-cn-****.aliyuncs.com", "OssBucket": "mts-bucket-test", "OssObject": "customer/ondemand_oss/gs0911_4/150513102****.jpg", "Result": [ { "BizType": "default", "Result": [ {"Label": "Porn", "Rate":100, "Suggestion": "review", "Scene":"porn", "Extent": {}}, {"Label": "Ad", "Rate":100, "Suggestion": "review", "Scene":"ad", "Extent": {}} ] } ] }Note-
DomainName: The domain name.
-
AppName: The application name.
-
StreamName: The stream name.
-
OssEndpoint: The OSS endpoint.
-
OssBucket: The name of the OSS bucket.
-
OssObject: The name of the object stored in OSS.
-
Result: The moderation results.
-
Label: The label assigned to the detected content.
-
Rate: The confidence level of the result.
-
Suggestion: The recommended action, such as "review".
-
Scene: The moderation scenario that was triggered.
-
Extent: A reserved field for extensions.
-
-
-