Live stream moderation

更新时间:
复制 MD 格式

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

  1. Log in to the ApsaraVideo Live console.

  2. In the left-side navigation pane, click Feature Management > Content Moderation.

  3. Select the streaming domain to configure and click the Video Moderation or Audio Moderation tab.

  4. 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.

  5. After configuring the parameters, click OK.

API

Configure a webhook address

Console

  1. On the Video Moderation or Audio Moderation tab, set the Callback URL.

    Click the edit icon to the right of Webhook Address.

  2. Enter Callback URL.

  3. Check the callback information on your webhook server. For callback message formats and examples, see webhook.

  4. 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

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.

  • porn: Pornography detection.

  • terrorism: Terrorism and politically sensitive content detection.

  • ad: Advertisement detection.

  • live: Undesirable live streaming scene detection.

  • logo: Logo detection.

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 Label value to determine violations.

Extent

JSONObject

A reserved field.

Table 2. Label

Parameter

Type

Description

porn

String

Categories for pornography detection in images:

  • normal: Normal.

  • sexy: Sexy.

  • porn: Pornographic.

terrorism

String

Categories for terrorism and politically sensitive content detection in images:

  • normal: Normal.

  • bloody: Bloody or gory.

  • explosion: Explosions or smoke.

  • outfit: Special attire.

  • logo: Special logos.

  • weapon: Weapons.

  • politics: Politically sensitive content.

  • violence: Fighting.

  • crowd: Crowd gathering.

  • parade: Parade or protest.

  • carcrash: Car crash scenes.

  • flag: Flags.

  • location: Landmarks.

  • others: Others.

ad

String

Categories for advertisement detection:

  • normal: Normal.

  • ad: Other advertisements.

  • npx: Spam advertisements.

  • qrcode: QR codes.

  • programCode: Mini program codes.

live

String

Categories for undesirable live streaming scenes:

  • normal: Normal.

  • meaningless: Meaningless content, such as a black or white screen.

  • PIP: Picture-in-picture (PIP).

  • smoking: Smoking.

  • drivelive: In-car streaming.

logo

String

Categories for logo detection in images:

  • normal: Normal.

  • TV: Contains regulated TV station logos.

  • trademark: Contains trademarks.

Note

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:

  • normal: Normal text.

  • spam: Spam.

  • ad: Advertisement.

  • politics: Politically sensitive content.

  • terrorism: Terrorist content.

  • abuse: Abusive language.

  • porn: Pornographic content.

  • flood: Text flooding.

  • contraband: Prohibited content.

  • meaningless: Meaningless text.

  • customized: Custom-defined violations, such as a match for a custom keyword.

suggestion

String

The suggested action. The suggestion parameter provides one of the following values:

  • pass: The content is normal. No further action is required.

  • review: The content may be non-compliant. Manual review is recommended.

  • block: The content is non-compliant. Blocking it or restricting its access is recommended.

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 label value to determine violations.

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:

  • normal: Normal text.

  • spam: Spam.

  • ad: Advertisement.

  • politics: Politically sensitive content.

  • terrorism: Terrorist content.

  • abuse: Abusive language.

  • porn: Pornographic content.

  • flood: Text flooding.

  • contraband: Prohibited content.

  • meaningless: Meaningless text.

  • customized: Custom-defined violations, such as a match for a custom keyword.

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.