stream_param
parameters of the push URL. They will be included if a task is created using another method.Event Type | Value |
Live recording (Document) | event_type = 100 |
Parameter | Type | Description |
t | int64 | The time (Unix timestamp) when the 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. |
Parameter | Type | Description |
appid | int | |
app | string | The push domain. |
appname | string | The push path. |
stream_id | string | The stream ID. |
channel_id | string | Same as the stream ID. |
file_id | string | |
record_file_id | string | The recording file ID. |
file_format | string | The file format. Valid values: flv , hls , mp4 , aac . |
task_id | string | The ID of a recording task, which is returned by the CreateRecordTask API and is valid only if the task is created by the API. |
start_time | int64 | The recording start time. |
end_time | int64 | The recording end time. |
start_time_usec | int | The recording start time (microseconds). |
end_time_usec | int | The recording end time (microseconds). |
duration | int64 | The duration of the recording file, in seconds. The difference between start_time and end_time may deviate from the duration value under normal circumstances, especially in cases of weak network connections and push streaming anomalies, where the deviation can be more significant. |
file_size | uint64 | The recording file size, in bytes. |
stream_param | string | The push URL parameters (custom). |
video_url | string | The download URL of the recording file. |
media_start_time | int | The PTS when the stream is first pulled for recording. This is not necessarily the PTS of the first frame of the recording file. |
record_bps | int | The bitrate, in kbps, of the transcoding output recorded. |
callback_ext | The JSON object string. | The JSON object includes multiple fields: video_codec indicates the video codec.resolution indicates the resolution of the pushed stream.session_id indicates the recording task ID.These are all additional fields of a recording callback. We recommend you do not rely your business logic too much on them. |
{"event_type": 100,"appid": 12345678,"app": "yourapp","callback_ext": "{\\"video_codec\\":\\"h264\\",\\"resolution\\":\\"640x480\\"}","appname": "yourappname","stream_id":"stream_test","channel_id":"stream_test","file_id":"1234567890","record_file_id": "1234567890","file_format":"hls","task_id":"UpTbk5RSVhRQ********************0xTSlNTQltlRVRLU1JAWW9EUb","start_time":1642089445,"end_time":1642089598,"start_time_usec": 316441,"end_time_usec": 618577,"duration":154,"file_size":277941079,"stream_param":"stream_param=test","video_url":"http://12345678.vod2.myqcloud.com/xxxx/yyyy/zzzz.m3u8","media_start_time": 135802,"record_bps": 0,"sign":"ca3e25e**********09a9ae7281e300d","t":1545030873}
Was this page helpful?