tencent cloud

Feedback

Recording Status Event Notification

Last updated: 2024-07-24 10:32:13
    The live recording feature records live streams in real time according to the recording template bound to the push domain name, and then stores the recording files in VOD. A recording status callback notifies you of the status of a recording task, including whether it started or ended successfully, when it is paused and resumed successfully, and if any recording errors occur. To receive recording callbacks, you need to configure a callback template, specify a server address for the callback, and bind the template to your push domain name. When a recording event occurs, the CSS backend will send the recording file information to the specified server.
    This document describes the fields in a callback notification sent by CSS after a recording status event occurs.

    Notes

    This document assumes you already know how to configure and receive callbacks.
    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
    Live Recording
    event_type = 332

    Common callback parameters

    Field Name
    Type
    Description
    t
    int64
    Expiration Time: UNIX timestamp when the event notification signature expires.
    The default validity period of a callback notification from Tencent Cloud is 10 minutes. After the time specified by the t value elapses, a notification will be considered invalid. This can prevent network replay attacks.
    The value of t is a decimal Unix timestamp, which is the number of seconds that have elapsed since 00:00:00 (UTC/GMT time), January 1, 1970.
    sign
    string
    The security signature, sign = MD5(key + t). Tencent Cloud splices the encryption key and t, generates an MD5 hash of the spliced string, and embeds it in callback notifications. Your backend server performs the same calculation when it receives a callback, and if the signature matches, it indicates that the notification is from Tencent Cloud.
    Note:
    You can set the callback key in Feature Configuration > Live Stream Callback, which is used for authentication. We recommend you set this field to ensure data security.
    
    
    

    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
    ile_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
    record_event
    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