Sets a standard transcoding template for the specified entry point.
PATCH https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/transcode/standard/{name}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID corresponding to the entry point. |
entry_point |
String | Required. The entry point name. |
name |
String | Required. The transcoding template. See the table below. |
Standard transcoding templates
name |
Transcoding template | Resolution | Bitrate (kbps) for video | Encoding format |
---|---|---|---|---|
ld |
Low definition | Height 240, Width fit-content | 400 | H.264 |
sd1 |
Standard definition 1 | Height 360, Width fit-content | 640 | H.264 |
sd2 |
Standard definition 2 | Height 480, Width fit-content | 800 | H.264 |
sd3 |
Standard definition 3 | Height 540, Width fit-content | 1,200 | H.264 |
hd |
High definition | Height 720, Width fit-content | 1,500 | H.264 |
fhd |
Full high definition | Height 1080, Width fit-content | 2,100 | H.264 |
The request body is in the JSON Object type, and contains the following fields:
enabled
: Bool type, required. Whether to enable the transcoding template.true
: Enable the transcoding template.false
: Disable the transcoding template.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.
Request line
PATCH https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/transcode/standard/sd1 HTTP/1.1
Request body
{
"enabled": true
}
Response line
HTTP/1.1 200 OK
Lists the standard transcoding templates used by the specified entry point.
GET https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/transcode/standard
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID corresponding to the entry point. |
entry_point |
String | Required. The entry point name. |
If the returned HTTP status code is 200, the request is successful, and the response body contains the following fields:
transcodeList
: JSON Array type, the transcoding template list. One stream corresponds to a JSON Object, and contains the following fields:
Field | Type | Description |
---|---|---|
name |
String | The transcoding template name. |
enabled |
Bool | Whether the transcoding template is enabled. |
If the returned HTTP status code is not 200, the request fails. You can refer to the HTTP status code for possible reasons.
Request line
GET https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/transcode/standard HTTP/1.1
Response line
HTTP/1.1 200 OK
Request body
{
"transcodeList": [
{
"enabled": true,
"name": "sd1"
},
{
"enabled": true,
"name": "sd2"
},
{
"enabled": true,
"name": "sd3"
}
]
}
Status code | Description |
---|---|
200 | The request succeeds. |
400 | The parameter is invalid, for example the appid or the name is empty. |
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. |