Stream Push/Interruption Event Notification

Last updated: 2020-09-17 15:16:06

    After an LVB feature is enabled, you can configure the registered callback domain name in the push callback template to have the LVB backend call back the push result.
    You need to understand how to receive messages on Tencent Cloud LVB before reading this document. For more information, please see How to Receive Event Notification.

    Stream Push/Interruption Event Parameter Description

    Event type parameters

    Event Type Field Value Description
    LVB push event_type = 1
    LVB stream interruption event_type = 0

    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 Feature Template > Callback Configuration, 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
    app string Push domain name
    appname string Push path
    stream_id string LVB stream name
    channel_id string The value is the same as LVB stream name
    event_time int64 Unix timestamp of event message generation
    sequence string Message serial number, which is used to identify a push event. A push event generates push and interruption messages with the same serial number
    node string LVB access point IP
    user_ip string User push IP
    stream_param string User push URL parameters
    push_duration string Push duration of stream interruption event notification in milliseconds
    errcode int Error code of stream interruption
    errmsg string Error description of stream interruption

    Stream push/interruption error codes

    errcode Error Description Cause
    1 recv rtmp deleteStream The host interrupts the stream
    2 recv rtmp closeStream The host interrupts the stream
    3 recv() return 0 The host disconnects the TCP connection
    4 recv() return error A TCP connection exception occurs for the host
    7 rtmp message large than 1M An exception occurs in the received streaming data
    Others LVB service internal exception If you need help, contact your Tencent Cloud sales rep or submit a ticket

    Sample callback message


    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback