Standard recording supports creating clips and snapshots out of a video recording file, as well as querying the existing recording files for a live stream.
Cuts out a specific part of a video recording of a live stream and generates an M3U8 file.
POST https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/admin/record/standard/regions/{region}/cutting/{stream_name}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
region |
String | Required. The area corresponding to the video recording. |
stream_name |
String | Required. The stream name. |
The request body is in the JSON Object type and contains the following fields:
Field | Type | Description |
---|---|---|
startTime |
String | Required. The starting time of the clip on the video recording's timeline, in the RFC3339 format, for example, 2019-01-07T12:00:00+08:00. |
endTime |
String | Optional. The ending time of the clip on the video recording's timeline, in the RFC3339 format, for example, 2019-01-07T12:30:00+08:00. This value cannot exceed the current time. If empty, this field is set as the time when the latest recording file was created. |
fileName |
String | Required. The name of the generated M3U8 file. This field must be unique. |
If the returned HTTP status code is 200, the request is successful.
If the returned HTTP status code is not 200, the request fails. You can refer to the HTTP status codes for possible reasons.
Request line
POST https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/admin/record/standard/regions/{region}/cutting/{stream_name} HTTP/1.1
Request body
{
"startTime": "2019-01-07T12:00:00+08:00",
"endTime": "2019-01-07T12:30:00+08:00",
"fileName": "test.m3u8"
}
Response line
HTTP/1.1 200 OK
Takes a snapshot from a video recording of a live stream and generates a JPEG file.
POST https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/admin/record/standard/regions/{region}/snapshot/{stream_name}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
region |
String | Required. The area corresponding to the video recording. |
stream_name |
String | Required. The stream name. |
The request body is in the JSON Object type and contains the following fields:
Field | Type | Description |
---|---|---|
time |
String | Optional. The time on the video recording's timeline when the snapshot is taken, in the RFC3339 format, for example, 2019-01-07T12:00:00+08:00. This value cannot exceed the current time. If empty, this field is set as the time when the latest recording file was created. |
fileName |
String | Required. The name of the generated JPEG file. This field must be unique. |
If the returned HTTP status code is 200, the request is successful.
If the returned HTTP status code is not 200, the request fails. You can refer to the HTTP status codes for possible reasons.
Request line
POST https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/admin/record/standard/regions/{region}/snapshot/{stream_name} HTTP/1.1
Request body
{
"time": "2019-01-07T12:30:00+08:00",
"fileName": "test.jpg"
}
Response line
HTTP/1.1 200 OK
Lists the recording files for the specified live stream within a time range.
GET https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/admin/record/standard/regions/{region}/preview_list?start_time={start_time}&end_time={end_time}&stream_name={stream_name}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
region |
String | Required. The area corresponding to the video recording. |
Parameter | Type | Description |
---|---|---|
start_time |
String | Required. The starting point of the time range to query recording files, in the RFC3339 format. For example, 2019-01-07T12:00:00Z . |
end_time |
String | Required. The end point of the time range to query recording files, in the RFC3339 format. For example, 2019-01-07T12:00:00Z . |
stream_name |
String | Required. The stream name. |
If the returned HTTP status code is 200, the request is successful. The response body contains the following fields:
list
:JSON Array. The list of recording files, in ascending order of the time when the recording starts. Each recording attempt corresponds to a JSON Object and contains the following fields:
startTime
:String. The start time of the recording in the RFC3339 format, for example "2019-01-07T12:00:00Z"
.endTime
:String. The end time of the recording in the RFC3339 format, for example"2019-01-07T12:00:00Z"
.fileName
:String. The path to the recording file.position
:Integer. The time offset (in seconds) from startTime
to the playback position.If the returned HTTP status code is not 200, the request fails. You can refer to the HTTP status codes for possible reasons.
Request line
GET https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/admin/record/standard/regions/{region}/preview_list?start_time={start_time}&end_time={end_time}&stream_name={stream_name} HTTP/1.1
Response line
HTTP/1.1 200 OK
Request body
{
"list": [
{
"fileName": "record/{entry_point}/{stream_name}/{m3u8_file_name}",
"startTime": "2021-08-25T10:44:40+08:00",
"endTime": "2021-08-25T11:01:49+08:00",
"position": 3
},
{
"fileName": "record/{entry_point}/{stream_name}/{m3u8_file_name}",
"startTime": "2021-08-25T12:19:23+08:00",
"endTime": "2021-08-25T14:42:58+08:00",
"position": 2
}
]
}
Status code | Description |
---|---|
200 | The request succeeds. |
400 | The parameter is invalid, for example the appid or the entry_point is empty, or the region is invalid. |
401 | Unauthorized (the Customer ID and the Customer Secret do not match). |
404 | The server cannot find the resource according to the request, which means the requested entry point does not exist or the requested URI path is invalid. |
500 | An internal error occurs in the server, so the server is not able to complete the request. |
504 | An internal error occurs in the server. The gateway or the proxy server did not receive a timely request from the remote server. |