tencent cloud

Feedback

Live Screencapture

Last updated: 2023-07-10 14:54:15

    CSS supports porn detection (based on screenshots). You can configure a screencapture and porn detection template in the console and bind it to a push domain, and CSS will take screenshots of the domain’s streams and perform porn detection on them. The results are saved to Cloud Object Storage (COS). If the push domain is also bound with a callback template, after porn detection is performed, Tencent Cloud will send a request to your server. If your sever passes the authentication, it will receive a JSON packet containing the porn detection callback.
    This document describes how to create, bind, unbind, modify, and delete a screencapture and porn detection template in the console.

    You can create a screencapture and porn detection template in the following ways:

    Must-Knows

    • Porn detection is based on screencapturing. You need to enable screencapturing before you can use the porn detection feature.
    • The screencapture and porn detection features are priced at 0.0176 USD and 0.2294 USD per 1,000 screenshots respectively. For details, see Intelligent Porn Detection.
    • The screenshots and porn detection results are stored in your COS bucket, which will incur COS storage fees. For more information, see COS Pricing.
    • Screencapturing will fail for audio-only streams, in which case no screencapturing costs will be incurred.
    • If you want to store the data in a COS bucket of another account, you need to first grant CSS the permission to write to that COS bucket. For more information, see Authorizing CSS to Store Screenshots in a COS Bucket.
    • If your COS bucket allows public read access and has politically sensitive, pornographic, or other inappropriate content, to avoid the bucket being blocked, please delete the content first.
    • After creating a template, you need to bind it to a push domain. For more information, see Screencapture and Porn Detection Configuration. The configuration takes effect in about 5-10 minutes.
    • In the console, templates are managed at the domain level. For screencapture rules bound to specific streams by an API, you need to call DeleteLiveSnapshotRule to unbind them.
    • Binding, unbinding, or modifying a template affects only new live streams and not ongoing ones. To make the change apply to ongoing live streams, you need to stop them and push them again.

    Prerequisites

    Creating a Template

    1. Log in to the CSS console, and select Feature Configuration > Live Screencapture & Porn Detection on the left sidebar.
    2. Click Create Screencapture and Porn Detection Template. If it is the first time you do so, click Authorize Now to create a service role and grant CSS read and write access to COS so that screenshots can be stored in COS.
    3. Complete the template settings, and click Save.
      Configuration ItemDescription
      Template name The name of the screencapture and porn detection template, which can contain up to 30 Chinese characters, letters, numbers, underscores (_), and hyphens (-).
      Template description The description of the screencapture and porn detection template, which can contain up to 100 Chinese characters, letters, numbers, underscores (_), and hyphens (-).
      Screencapture interval The screencapture interval, which is two seconds by default. Value range: 2-300 (seconds).
      Intelligent porn detection Whether to enable intelligent porn detection. After it is enabled, you need to configure the porn detection callback in order to receive the detection results.
      Storage Account Current Account or Other Account
      AppId This is required only if you select Other Account. You can view the `APPID` of an account on the Account Information page of the console. To save data to a COS bucket of another account, you need to first grant CSS read and write access to that bucket. For details, see Authorizing CSS to Store Screenshots in a COS Bucket.
      Bucket Select a COS bucket to which you have granted CSS read and write access.
      Region The region of the bucket, which cannot be modified.
      Folder Click the box to select a COS folder. The default is {Year}-{Month}-{Day}/.
      Note: The name of a COS folder can contain only letters, digits, placeholders, and symbols -, !, _, ., *.
      File name
      • The format of screenshot filenames. You can customize your own format. The default is {StreamID}-screenshot-{Hour}-{Minute}-{Second}-{Width}x{Height}{Ext}:
        • {AppName}: The push app name.
        • {PushDomain}: The push domain.
        • {StreamID}: The stream ID.
        • {Year}: The screenshot time (year).
        • {Month}: The screenshot time (month).
        • {Day}: The screenshot time (day).
        • {Hour}: The screenshot time (hour).
        • {Minute}: The screenshot time (minute).
        • {Second}: screenshot time (second)
        • {Width}: The width of the screenshot.
        • {Height}: The height of the screenshot.
        • {Ext}: The extension (.jpg).
      • Note: The filename can contain only letters, digits, placeholders, and symbols (-, !, _, ., *).
      • Example: If the filename format is {Year}-{Month}-{Day}- {Hour}-{Ext}, a screenshot captured at 14:00:00 on January 1, 2020 would be named 2020010114.jpg in COS.

    Binding a Domain Name

    1. Log in to the CSS console, and select Feature Configuration > Live Screencapture & Porn Detection on the left sidebar.
    2. Bind a domain name in either of two ways:
      • Bind a domain to an existing template: Click Bind Domain Name in the top left.
      • Bind a domain name after creating a screencapture and porn detection template: After successfully creating a screencapture and porn detection template, click Bind Domain Name in the pop-up window.
    3. Select a screencapture and porn detection template and a push domain and click Confirm.
      Note:

      You can click Add to bind multiple push domains to a template.

    Unbinding a Domain Name

    1. Log in to the CSS console, and select Feature Configuration > Live Screencapture & Porn Detection on the left sidebar.
    2. Select the target screencapture and porn detection template, find the domain you want to unbind, and click Unbind.
    3. In the pop-up window, click Confirm.

    Modifying a Template

    1. Select Feature Configuration > Live Screencapture & Porn Detection on the left sidebar.
    2. Select a screencapture and porn detection template, click Edit on the right, and modify its information.
    3. Click Save.

    Deleting a Template

    Note:

    If a template has been bound to domains, you need to unbind them before you can delete the template.

    1. Select Feature Configuration > Live Screencapture & Porn Detection on the left sidebar.
    2. Select a screencapture and porn detection template and click Delete in the top right.
    3. In the pop-up window, click Confirm.

    More

    You can also bind and unbind domains and screencapture and porn detection templates on the Domain Management page. For details, see Screencapture and Porn Detection Configuration.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support