Live recording feature records live stream images in real time according to the recording template bound to the push domain name, and then stores the recording files in VOD. The recording callback is used to push the information of recording files, including the start time and end time of recording, as well as recording file ID, size and download URL. You need to configure the server address for receiving recording callback messages in the callback template, and bind the template to the push domain name. When a recording event is triggered by a live stream, the Tencent Cloud CSS backend will call back the recording file information to the configured receiving server.
This document describes the fields in callback message notifications sent by Tencent Cloud CSS after a recording callback event is triggered.
Event Type | Parameter Value |
---|---|
Live recording | event_type = 100 |
Parameter | Type | Description |
---|---|---|
t | int64 | Expiration time, which is the Unix timestamp when the event notification signature expires.
|
sign | string | Event notification security signature sign = MD5(key + t). Note: Tencent Cloud concatenates the encryption key and `t`, calculates the `sign` value through MD5, and places it in the notification message. When 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. |
Note: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.
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 | The value is the same as LVB stream name |
file_id | string | VOD file ID, which uniquely identifies a VOD file on the VOD platform |
file_format | string | File format. Valid values: flv , hls , mp4 , aac |
task_id | string | ID of a recording task, which is valid only if the task is created using the CreateRecordTask API |
start_time | int64 | Time when data starts to be written into the file. Its value cannot be equated with the start time of the recorded content. Start time of the recorded content = end_time − duration |
end_time | int64 | Time when data stops to be written into the file |
duration | int64 | Duration of a recording file, in seconds |
file_size | uint64 | Recording file size in pixels |
stream_param | string | User push URL parameters (custom) |
video_url | string | Download URL of the recording file |
{
"event_type":100,
"appid":12345678,
"app":yourapp,
"appname":yourappname,
"stream_id":"stream_test",
"channel_id":"stream_test",
"file_id":"1234567890",
"file_format":"hls",
"task_id":"UpTbk5RSVhRQ********************0xTSlNTQltlRVRLU1JAWW9EUb",
"start_time":1545047010,
"end_time":1545049971,
"duration":2962,
"file_size":277941079,
"stream_param":"stream_param=test",
"video_url":"http://12345678.vod2.myqcloud.com/xxxx/yyyy/zzzz.m3u8",
"sign":"ca3e25e**********09a9ae7281e300d",
"t":1545030873
}
Was this page helpful?