ApsaraVideo Live provides the automated review feature to review the compliance of live streams. The feature performs video moderation and audio moderation, and works with the feature used to disable stream ingest to implement content moderation for live streams. This topic describes the background information, capabilities, and billing rules of the automated review feature, how to use this feature, and how to disable stream ingest.

ApsaraVideo Live reviews live streams and returns the review results to operational staff by using the automated review feature. The operational staff manage the live streams and can disable stream ingest for the live streams if needed.

Limits

Only some live centers support content moderation. For more information, see Supported regions.

Automated review

  • Background information

    Live streams that are ingested by streamers may contain undesirable content. ApsaraVideo Live provides the automated review feature to automatically and intelligently review video and audio streams. The feature significantly reduces content violations such as pornography, violence, terrorism, and politics and reduces the cost of manual review.

  • Overview

    Based on large amounts of tagged data and deep learning algorithms, the automated review feature accurately detects undesirable content in live streams from multiple dimensions such as voice and vision. The automated review feature provides multiple functional modules, including pornography detection, terrorism detection, ad violation detection, meaningless content detection, and audio moderation.

    • Video moderation: reviews captured frames to check whether live streams contain undesirable content, and returns the review results in callbacks if such content is detected. Then, you can process the live streams that contain undesirable content.
    • Audio moderation: recognizes the audio in live streams to check whether the audio contains undesirable content, and returns the review results in callbacks if such content is detected. Then, you can process the live streams that contain undesirable content.

    The following table describes the capabilities of the automated review feature.

    Capability Scene Description Category of the moderation results
    Pornography detection porn Detects pornographic content in live streams. normal, sexy, and porn
    Terrorism detection terrorism Detects terrorism content in live streams. normal, bloody, explosion, outfit, logo, weapon, politics, violence, crowd, parade, carcrash, flag, location, and others
    Ad violation detection ad Detects ad violations in live streams. normal, ad, npx, qrcode, and programCode
    Undesirable scene detection live Detects undesirable scenes in live streams, such as black screen, black edge, dark image, picture-in-picture (PIP), smoking, and fighting. normal, meaningless, PIP, smoking, and drivelive
    Logo detection logo Detects controlled logos and trademarks in live streams. normal, TV, and trademark
    Audio moderation antispam Detects undesirable content in audio, such as spam, ad, politics, violence, abuse, pornographic content, junk content, prohibited content, and meaningless content. normal, spam, ad, politics, terrorism, abuse, porn, flood, contraband, meaningless, and customized
  • Usage
    • Prerequisites
      1. ApsaraVideo Live is activated and a valid domain name for ApsaraVideo Live is configured.
      2. An HTTP service is configured to receive the callbacks about undesirable content that is detected in video or audio streams.
    • Procedure
      1. Add automated review configurations.
      2. Configure a callback URL.
      3. Ingest a stream. The stream is automatically reviewed.
        Note Automated review takes effect only for streams that are ingested after the automated review configurations are added.
    • Use the ApsaraVideo Live console

      Video moderation: You can configure video moderation templates and a callback URL. For more information, see Configure content moderation.

      Audio moderation: You cannot configure audio moderation in the ApsaraVideo Live console.

    • Call an API operation
      Video moderation
      Operation Description References
      AddLiveSnapshotDetectPornConfig Adds a video moderation configuration. AddLiveSnapshotDetectPornConfig
      DeleteLiveSnapshotDetectPornConfig Deletes a video moderation configuration. DeleteLiveSnapshotDetectPornConfig
      UpdateLiveSnapshotDetectPornConfig Modifies a video moderation configuration. UpdateLiveSnapshotDetectPornConfig
      DescribeLiveSnapshotDetectPornConfig Queries video moderation configurations. DescribeLiveSnapshotDetectPornConfig
      AddLiveDetectNotifyConfig Configures callbacks for video moderation results.

      For more information about the default format of the callbacks, see Default format of video moderation callbacks.

      AddLiveDetectNotifyConfig
      DeleteLiveDetectNotifyConfig Deletes the configuration of callbacks for video moderation results. DeleteLiveDetectNotifyConfig
      UpdateLiveDetectNotifyConfig Modifies the configuration of callbacks for video moderation results. UpdateLiveDetectNotifyConfig
      DescribeLiveAudioAuditNotifyConfig Queries the configuration of callbacks for video moderation results. DescribeLiveDetectNotifyConfig
      Audio moderation
      Operation Description References
      AddLiveAudioAuditConfig Add an audio moderation configuration. AddLiveAudioAuditConfig
      DeleteLiveAudioAuditConfig Deletes an audio moderation configuration. DeleteLiveAudioAuditConfig
      UpdateLiveAudioAuditConfig Modifies an audio moderation configuration. UpdateLiveAudioAuditConfig
      DescribeLiveSnapshotDetectPornConfig Queries audio moderation configurations. DescribeLiveAudioAuditConfig
      AddLiveAudioAuditNotifyConfig Configures callbacks for audio moderation results. You can customize the callbacks in the JSON format based on your business requirements.

      For more information about the default format of the callbacks, see Default format of audio moderation callbacks.

      AddLiveAudioAuditNotifyConfig
      DeleteLiveAudioAuditNotifyConfig Deletes the configuration of callbacks for audio moderation results. DeleteLiveAudioAuditNotifyConfig
      UpdateLiveAudioAuditNotifyConfig Modifies the configuration of callbacks for audio moderation results. UpdateLiveAudioAuditNotifyConfig
      DescribeLiveAudioAuditNotifyConfig Queries the configuration of callbacks for audio moderation results. DescribeLiveAudioAuditNotifyConfig
  • Billing rules: The automated review feature performs video moderation and audio moderation. Video moderation is billed based on the number of video images that are scanned. Audio moderation is billed based on the total length of audio that is reviewed. For more information, see Billing of automated review.

Disable a live stream

ApsaraVideo Live provides a variety of features to help you manage live streams, including disabling a live stream. You may want to disable a live stream in the following scenarios:
  • An ingest URL is leaked.
  • An ingest URL is used for malicious purposes.
  • An ingest URL no longer meets business requirements.

Usage instructions

  • In the ApsaraVideo Live console, you can view a disabled ingest endpoint, configure a disabled ingest endpoint, and resume a live stream. You can manage live streams on the Stream Management > Ingested Streams page in the ApsaraVideo Live console. For more information, see Manage streams.
  • API
    Operation Description Reference
    ForbidLiveStream Disables a push stream.

    You can call this operation to interrupt a push stream without adding the ingest URL to the blacklist and resume the stream at a predetermined point in time.

    Note You can disable up to 10,000 live streams. If the limit is exceeded, this operation fails. You can call this operation up to 20 times per second.
    ForbidLiveStream
    ResumeLiveStream Resumes a live stream.
    Note You can call this operation up to 30 times per second.
    ResumeLiveStream

Default format of video moderation callbacks

ApsaraVideo Live sends a callback message only when illegal video content is detected. The callback message contains the review information and storage information of the illegal video content.

{
 "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, "Suggestion": "review", "Scene":"porn", "Extent": {}},
             {"Label": "Ad", "Rate":11, "Suggestion": "review", "Scene":"ad", "Extent": {}}
         ]
     }
 ]
}
                    
Callback parameters
Parameter Type Description
DomainName String The streaming domain.
AppName String The name of the application.
StreamName String The name of the stream.
OssEndpoint String The endpoint of the Object Storage Service (OSS) bucket.
OssBucket String The name of the OSS bucket.
OssObject String The name of the object that contains the video moderation results.
Result JSONArray The video moderation results. For more information, see Attributes of the result parameter.
Table 1. Result
Attribute Type Description
BizType String The business type. You can specify a model. The default value is the domain name.
Scene String The moderation scenario. Valid values:
  • porn: pornographic content
  • terrorism: terrorist or politically sensitive content
  • ad: ad violation
  • live: undesirable scene
  • logo: logo image
Label String The category of the moderation results. Valid values vary based on the specified moderation scenario.
  • If the Scene attribute is set to porn, the valid values are:
    • normal
    • sexy
    • porn
  • If the Scene attribute is set to terrorism, the valid values are:
    • normal
    • bloody
    • explosion
    • outfit
    • logo
    • weapon
    • politics
    • violence
    • crowd
    • parade
    • carcrash
    • flag
    • location
    • others
  • If the Scene attribute is set to ad, the valid values are:
    • normal: normal content
    • ad: ad violation
    • npx: illegal ad
    • qrcode: QR code
    • programCode: mini program code
  • If the Scene attribute is set to live, the valid values are:
    • normal: normal content
    • meaningless: no content in the image, such as black or white screen
    • PIP: picture-in-picture
    • smoking: smoking
    • drivelive: live streaming in a running vehicle
  • If the Scene attribute is set to logo, the valid values are:
    • normal: normal content
    • TV: controlled logo
    • trademark: trademark
Rate Float The score of the confidence level. Valid values: 0 to 100. A greater value indicates a higher confidence level.
Note This score is only for reference. We strongly recommend that you not use this score in your business. We recommend that you determine whether there is illegal content based on the value of the Label attribute.
Extent JSONObject The reserved attribute.
Note By default, this version is used for new users. Existing users can submit a ticket. For more information, see Contact us. to apply for using this version.

Default format of audio moderation callbacks

ApsaraVideo Live sends a callback message only when illegal audio content is detected. The callback message contains the detected text of the illegal audio content and the context in the last minute.

{
    "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": "You can share the privilege of 120-day free stay in hotels in Dali and Longchuan with your friends and relatives. Welcome to Yunqi International Hotel. The hotel is located next to Dengchao KTV, No. 96, Tuanjie Street, Mang City. The hotel phone number is 2285699.",
                    "label": "ad"
                },
                {
                    "startTime": 1572248040,
                    "endTime": 1572248070,
                    "text": "Classic villas near warm springs such as Lianghe Jinta Spring and Spring Tourist Town in Binjiangyuan are available for sale on November 2. We offer various layouts, classic designs, and attractive prices. Buy a villa and then you can enjoy spring at home. Welcome to visit the villas. The address is No. 229, Xianfeng Road, Zhedao Town, Ranhe County. Call our hotline at 069269557776955777.",
                    "label": "normal"
                },
                {
                    "startTime": 1572248072,
                    "endTime": 1572248077,
                    "text": "Happy time with you is great.",
                    "label": "normal"
                },
                {
                    "startTime": 1572248078,
                    "endTime": 1572248086,
                    "text": "fme043 Snatch a little leisure from a busy life. With songs, I feel relaxed. With films, I miss you.",
                    "label": "normal"
                }
            ]
        }
    ]
}
Parameter Type Description
domain String The streaming domain.
app String The name of the application.
stream String The name of the stream.
timestamp Int The timestamp of the callback. Unit: seconds.
result JSONArray The audio moderation results. For more information, see Attributes of the result parameter.
Table 2. Attributes of the result parameter
Attribute Type Description
scene String The moderation scenario.
label String The category of the moderation results. Valid values:
  • normal: normal content
  • spam: junk content
  • ad: ad violation
  • politics: politically sensitive content
  • terrorism: terrorist content
  • abuse: abusive content
  • porn: pornographic content
  • flood: excessive junk content
  • contraband: prohibited content
  • meaningless: meaningless content
  • customized: custom content, such as a custom term
suggestion String The recommended subsequent operation for you to perform. Valid values:
  • pass: The moderated audio does not require further actions.
  • review: The moderated audio contains suspected violations and requires human review.
  • block: The moderated audio contains violations. We recommend that you delete or block the audio.
rate Float The score of the confidence level. Valid values: 0 to 100. A greater value indicates a higher confidence level.
Note This score is only for reference. We strongly recommend that you not use this score in your business. We recommend that you determine whether there is illegal content based on the value of the label attribute.
details JSONArray The details about the text in the moderated audio. The value is a JSON array that contains one or more elements. Each element corresponds to a text entry. For more information about the structure of each element, see Attributes of the details parameter.
Table 3. Attributes of the details parameter
Attribute Type Description
startTime Int The start time of the text entry. Unit: seconds.
endTime Int The end time of the text entry. Unit: seconds.
text String The content of the text entry that is converted from the audio.
label String The category of the moderation results. Valid values:
  • normal: normal content
  • spam: junk content
  • ad: ad violation
  • politics: politically sensitive content
  • terrorism: terrorist content
  • abuse: abusive content
  • porn: pornographic content
  • flood: excessive junk content
  • contraband: prohibited content
  • meaningless: meaningless content
  • customized: custom content, such as a custom term