Recording Event Notification

Last updated: 2021-04-27 14:34:03

    After live recording is enabled, you can configure the registered callback domain name in the live recording callback template to have the CSS backend call back the recording result.


    • You need to understand how to configure the callback feature and receive callback messages on Tencent Cloud CSS before reading this document. For more information, please see How to Receive Event Notification.
    • The recorded video files are stored in the VOD Console by default. We recommend you activate the VOD service in advance and purchase appropriate resource packages so as to avoid service suspension due to account arrears.

    Recording Event Parameter Description

    Event type parameters

    Event Type Field Value Description
    CSS recording event_type = 100

    Common callback parameters

    Field NameTypeDescription
    t int64 Expiration time, which is the Unix timestamp when the event notification signature expires.
    • The default expiration time of a message notification from Tencent Cloud is 10 minutes. If the time specified by the `t` value in a message notification has elapsed, it can be determined that this notification is invalid, thereby preventing network replay attacks.
    • The format of `t` is a decimal Unix timestamp, i.e., the number of seconds that has elapsed since January 01, 1970 00:00 (UTC/GMT time).
    sign string Security signature of event notification (sign = MD5(key + t)).
    Note: Tencent Cloud splices the encryption `key` and `t`, calculates the `sign` value through MD5, and places it in the notification message. After your backend server receives the notification message, it can confirm whether the `sign` is correct based on the same algorithm and then determine whether the message is indeed from the Tencent Cloud backend.


    <span id="key"></span>key is the callback key in Event Center > Live Stream Callback, which is mainly used for authentication. In order to protect the security of your data, we recommend you enter it.

    Callback message parameters

    Field Name Type Description
    appid int User APPID
    stream_id string Live stream name
    channel_id string The value is the same as live stream name
    file_id string VOD file ID, which can uniquely locate a VOD video file on the VOD platform
    file_format string flv, hls, mp4, aac
    start_time int64 Start timestamp of recording file
    end_time int64 End timestamp of recording file
    duration int64 Duration of recording file in seconds
    file_size uint64 Recording file size in bytes
    stream_param string User push URL parameters (custom)
    video_url string Recording file download URL

    Sample callback message