tencent cloud

Feedback

Recording Status Event Notification

Last updated: 2024-01-17 17:52:58
    Live recording is to record live stream images in real time according to the recording template that has been bound to the push domain name, subsequently generating the corresponding recording files and storing them in Video on Demand. The recording status callback serves to deliver recording status data, which include successful recording startup, failed recording startup, recording pause, successful recording continuation, recording anomalies, and ended recording. To receive callbacks for recording events, you should configure a server address of callback message for the recording events in the callback template and associate it with your push domain name. Once a recording event in the live stream is triggered, the backend of Tencent's Cloud Streaming Services will dispatch the recording event data back to your designated receiving server.
    This document mainly describes the callback notification fields sent to users by Tencent's Cloud Streaming Services upon a recording status callback event is triggered.

    Notes

    Before reading this document, you should know about how Tencent's Cloud Streaming Services configures callback functions and how you can receive these callback messages. For more information, please refer to How to Receive Event Notifications.
    In the relay recording callback, the stream ID refers to the Task ID of the relay task.

    Description of recording status callback parameters

    Event type

    Event Type
    Explanation of Field Value
    LVB recording
    event_type = 332

    Common callback parameters

    Field Name
    Type
    Description
    t
    int64
    Expiration Time: UNIX timestamp when the event notification signature expires.
    By default, the expiration time for notifications from Tencent Cloud is 10 minutes. If the time specified by the t value in a notification has expired, it can be concluded that the notification is invalid and thus can prevent network replay attacks.
    The format of t is a decimal UNIX timestamp, which is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT).
    sign
    string
    The security signature of sign = MD5 (key + t) of an event notification. Explanation: Tencent Cloud concatenates the encrypted key and t strings, calculates the sign value through MD5, and puts it in the notification. Upon receiving the notification, your backend server can verify whether sign is correct using the same algorithm, and thus certify if the message is truly from Tencent Cloud backend.
    Note:
    key is the callback key in Feature Configuration > Live Stream Callback, mainly used for authentication. To protect your data security, it is recommended that you fill out the related information.
    
    
    

    Recording status callback message parameters

    Field Name
    Type
    Description
    appid
    int
    User APPID
    appname
    string
    Push path
    domain
    string
    Push domain name
    event_time
    int
    Event time
    event_type
    int
    Event type
    record_detail
    string
    file_format: file format
    1:FLV
    2:HLS
    3:MP4
    4:AAC
    5:MP3
    record_bps:Bitrate
    start_model:Task initiation method
    1:Initiation via recording template rules
    5:Initiation via API call
    record_content: Recording content
    1: Original stream
    2: Watermarked stream
    3: Transcoding stream
    source_type: Recording stream type
    1: Live recording
    2: Relay recording
    codec_temp_id: Transcoding template ID
    recordevent
    string
    record_start_succeeded : Successful recording startup
    record_start_failed: Failed recording startup
    record_paused : Recording pause
    record_resumed : Successful recording continuation
    record_error : Recording anomalies
    record_ended : Ended recording
    seq
    string
    Message sequence number
    session_id
    string
    Recording task ID
    stream_id
    string
    Live stream name

    Sample callback message

    {
    "appid":123456789,
    "appname": "live",
    "domain":"****.livepush.myqcloud.com",
    "event_time":1700207929,
    "event_type":332,
    "record_detail":"{\\\\"file_format\\\\":2,\\\\"record_bps\\\\":0,\\\\"start_model\\\\":1,\\\\"record_content\\\\":1,\\\\"source_type\\\\":2,\\\\"codec_temp_id\\\\":0}",
    "record_event":"record_ended",
    "seq": "3266441426274648065",
    "session_id":"2918085116267032069",
    "stream_id":"2991615887188599295"
    }
    
    
    
    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