Custom recording configuration
Set custom recording configuration
Sets the custom recording configuration for all live streams under the specified entry point.
HTTP request
Path parameter
Parameter | Type | Description |
---|---|---|
appid | String | Required. The App ID corresponding to the entry point. |
entry_point | String | Required. The entry point name. |
region | String | Required. The configured region when adding the domain. |
Request body
The request body is in the JSON Object type, and contains the following fields:
Field | Type | Description |
---|---|---|
mp4Config | JSON Object | Optional. For the configuration of the MP4 recording files, see mp4Config. |
hlsConfig | JSON Object | Optional. For the configuration of the HLS recording files, see HlsConfig. |
storageConfig | JSON Object | Optional (required when setting recording options for the first time). For the storage configuration of the recording files, see StorageConfig. |
HTTP response
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 code for possible reasons.
Example
Request line
Request body
Response line
Get custom recording configuration
Gets the custom recording configuration for the specified entry point.
HTTP request
Path parameter
Parameter | Type | Description |
---|---|---|
appid | String | Required. The App ID corresponding to the entry point. |
entry_point | String | Required. The entry point name. |
region | String | Required. The configured region when adding the domain. |
HTTP response
If the returned HTTP status code is 200, the request is successful, and the response body contains the following fields:
Field | Type | Description |
---|---|---|
mp4Config | JSON Object | For the configuration of the MP4 recording files, see mp4Config. |
hlsConfig | JSON Object | For the configuration of the HLS recording files, see HlsConfig. |
storageConfig | JSON Object | For the storage configuration of the recording files, see StorageConfig. |
If the returned HTTP status code is not 200, the request fails. You can refer to the HTTP status code for possible reasons.
Example
Request line
Response line
Request body
Parameter type
mp4Config
The configuration of the MP4 recording files, including the following fields:
enabled
: Bool type, optional. Whether to enable recording in the MP4 format.
HlsConfig
The configuration of the HLS recording files, including the following fields:
enabled
: Bool type, optional. Whether to enable recording in the HLS format.
StorageConfig
The storage configuration of the recording files, including the following fields:
-
vendor
: Number. The third-party cloud storage vendor.-
0
: Qiniu Cloud -
1
: Amazon S3 -
6
: Google Cloud -
7
: Huawei Cloud
-
-
region
: Number. The region information specified for the third-party cloud storage. The recording service only supports regions in the following lists:In order to improve the success rate and real-time performance when uploading recording files, if you set theregion
of the cloud recording service in theacquire
method, make sure that the region of the third-party cloud storage corresponds to the same geographical region. For example, if the region of the cloud recording service is set toNA
(North America), the third-party cloud storage needs to be set to a location within North America.
When the third-party cloud storage is Qiniu Cloud (vendor
= 0):
0
: East China1
: North China2
: South China3
: North America4
: Southeast Asia
When the third-party cloud storage is Amazon S3 (vendor
= 1):
0
:US_EAST_11
:US_EAST_22
:US_WEST_13
:US_WEST_24
:EU_WEST_15
:EU_WEST_26
:EU_WEST_37
:EU_CENTRAL_18
:AP_SOUTHEAST_19
:AP_SOUTHEAST_210
:AP_NORTHEAST_111
:AP_NORTHEAST_212
:SA_EAST_113
:CA_CENTRAL_114
:AP_SOUTH_115
:CN_NORTH_116
:CN_NORTHWEST_118
:AF_SOUTH_119
:AP_EAST_120
:AP_NORTHEAST_321
:EU_NORTH_122
:ME_SOUTH_124
:AP_SOUTHEAST_325
:EU_SOUTH_126
:AWS_REGION_NUM
When the third-party cloud storage is Alibaba Cloud (vendor
= 2):
0
: CN_Hangzhou1
: CN_Shanghai2
: CN_Qingdao3
: CN_Beijing4
: CN_Zhangjiakou5
: CN_Huhehaote6
: CN_Shenzhen7
: CN_Hongkong8
: US_West_19
: US_East_110
: AP_Southeast_111
: AP_Southeast_212
: AP_Southeast_313
: AP_Southeast_514
: AP_Northeast_115
: AP_South_116
: EU_Central_117
: EU_West_118
: EU_East_119
:AP_Southeast_620
:CN_Heyuan21
:CN_Guangzhou22
:CN_Chengdu
For details, see Alibaba Cloud Documentation.
When the third-party cloud storage is Tencent Cloud (vendor
= 3):
0
:AP_Beijing_11
:AP_Beijing2
:AP_Shanghai3
:AP_Guangzhou4
:AP_Chengdu5
:AP_Chongqing6
:AP_Shenzhen_FSI7
:AP_Shanghai_FSI8
:AP_Beijing_FSI9
:AP_Hongkong10
:AP_Singapore11
:AP_Mumbai12
:AP_Seoul13
:AP_Bangkok14
:AP_Tokyo15
:NA_Siliconvalley16
:NA_Ashburn17
:NA_Toronto18
:EU_Frankfurt19
:EU_Moscow
When the third-party cloud storage is Kingsoft Cloud (vendor
= 4):
0
:CN_Hangzhou1
:CN_Shanghai2
:CN_Qingdao3
:CN_Beijing4
:CN_Guangzhou5
:CN_Hongkong6
:JR_Beijing7
:JR_Shanghai8
:NA_Russia_19
:NA_Singapore_1
When the third-party cloud storage is Microsoft Azure (vendor
= 5):
The region
parameter has no effect, whether or not it is set.
When the third-party cloud storage is Google Cloud (vendor
= 6):
The region
parameter has no effect, whether or not it is set.
When the third-party cloud storage is Huawei Cloud (vendor
= 7):
0
:CN_North_11
:CN_North_42
:CN_East_23
:CN_East_34
:CN_South_15
:CN_Southwest_26
:AP_Southeast_17
:AP_Southeast_28
:AP_Southeast_39
:AF_South_110
:SA_Argentina_111
:SA_Peru_112
:NA_Mexico_113
:SA_Brazil_114
:LA_South_215
:SA_Chile_1
When the third-party cloud storage is Baidu AI Cloud (vendor
= 8):
0
:Beijing1
:Baoding2
:Suzhou3
:Guangzhou4
:Hongkong5
:Singapore6
:Wuhan7
:Shanghai
-
bucket
: String. The bucket name of the third-party cloud storage. -
accessKey
: String. The access key of the third-party cloud storage. Agora suggests that you use a write-only access key. -
secretKey
: String. The secret key of the third-party cloud storage.
HTTP status code
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 parameter value 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. |