tencent cloud


Stream Pushing Notification

Last updated: 2022-05-12 12:35:53

    The stream pushing callback informs you whether stream pushing is successful or interrupted. You need to configure a server address for the callback in a callback template and bind the template with your push domain name. After push starts via a URL generated under the domain, the Tencent Cloud backend will send the callback to the server you set.

    This document describes the parameters in a stream pushing callback notification sent to you by CSS.


    This guide assumes that you understand how to configure callbacks and receive callback notifications from CSS. For details, see How to Receive Event Notification.

    Stream Pushing Event Parameters

    Event type

    Event Type Value
    Successful push event_type = 1
    Push interrupted event_type = 0

    Common callback parameters

    t int64 Expiration time, which is the Unix timestamp when the event notification signature expires.
    • The default validity period of a callback notification from Tencent Cloud is 10 minutes. If the time specified by the `t` value in a notification has elapsed, then this notification is considered invalid. This prevents 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.

    You can set the callback key in Event Center > Live Stream Callback, which is used for authentication. We recommend you set this field to ensure data security.

    Callback parameters

    Parameter Type Description
    appid int User APPID
    app string Push domain name
    appname string Push path
    stream_id string Live stream name
    channel_id string Same as the live stream name
    event_time int64 UNIX timestamp when the event message is generated
    sequence string Message sequence number, which identifies a push. The notifications for a push, whether they are for successful push or stream interruption, have the same sequence number.
    node string IP of the live stream access point
    user_ip string User push IP
    stream_param string User push URL parameters
    push_duration string Push duration of the interrupted stream in milliseconds
    errcode int Stream pushing error code
    errmsg string Stream pushing error message
    set_id int Whether the push is from inside the Chinese mainland. 1-6: yes; 7-200: no.
    width int Video width. The value of this parameter may be 0 if the video header information is missing at the beginning of a push.
    height int Video height. The value of this parameter may be 0 if the video header information is missing at the beginning of a push.

    Causes of stream interruption

    For a list of the causes of stream interruption, see Stream Interruption Records.

    Sample callback

    "width": 0,
    "height": 0,
    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