tencent cloud


Screencapturing Event Notification

Last updated: 2022-05-05 15:06:35

    Live screencapture takes real-time screenshots from a live stream at the specified interval and stores them in COS. A screencapture callback returns information about stored screenshots, including the screenshot generation time, image size, file path, and download link. To receive screencapture callbacks, you need to configure your server address in a callback template and bind the template with your push domain. When a live screencapture event occurs, the CSS backend will send the screenshot information to the server configured.

    This document describes the fields in a live screencapture callback message.


    • This document assumes you already know how to configure and receive callbacks.
    • The information returned by a screencapture callback can be used for porn detection, live video thumbnail generation, and other scenarios.

    Screencapture Event Parameters

    Event type

    Event Type Value
    Live screencapture event_type = 200

    Common callback parameters

    t int64 Expiration time, which is the Unix timestamp when the event notification signature expires.
    • The default validity period of a message notification from Tencent Cloud is 10 minutes. If the time specified by the `t` value in a message notification has elapsed, then this notification is considered invalid, thereby preventing network replay attacks.
    • The value of `t` is a decimal Unix timestamp, that is, the number of seconds that have elapsed since 00:00:00 (UTC/GMT time), January 1, 1970.
    sign string Security signature. sign = MD5(key + t).
    Tencent Cloud splices the encryption key and `t`, generates the MD5 hash of the spliced string, and embeds it in callback messages. Your backend server can perform the same calculation when it receives a callback message. If the signature matches, it indicates the message is from Tencent Cloud.

    A key is used for authentication. You can set it in Event Center > Live Stream Callback. We recommend you set it to ensure data security.

    Callback message parameters

    Parameter Type Description
    app string Push domain name
    appname string Push path
    stream_param string Push URL parameters
    stream_id string Live stream name
    channel_id string Same as the stream name
    create_time int64 Unix timestamp when a screenshot is generated
    file_size int Screenshot file size in bytes
    width int Screenshot width in pixels
    height int Screenshot height in pixels
    pic_url string Screenshot file path (/path/name.jpg)
    pic_full_url string Screenshot download URL

    Sample callback message














    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