Skip to main content

Standard transcoding

Set a standard transcoding template

Sets a standard transcoding template for the specified entry point.

HTTP request


_1
PATCH https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/transcode/standard/{name}

Path parameter

ParameterTypeDescription
appidStringRequired. The App ID corresponding to the entry point.
entry_pointStringRequired. The entry point name.
nameStringRequired. The transcoding template. See the table below.

Standard transcoding templates

nameTranscoding templateResolutionBitrate (kbps) for videoEncoding format
ldLow definitionHeight 240, Width fit-content400H.264
sd1Standard definition 1Height 360, Width fit-content640H.264
sd2Standard definition 2Height 480, Width fit-content800H.264
sd3Standard definition 3Height 540, Width fit-content1,200H.264
hdHigh definitionHeight 720, Width fit-content1,500H.264
fhdFull high definitionHeight 1080, Width fit-content2,100H.264

Request body

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.

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


_1
PATCH https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/transcode/standard/sd1 HTTP/1.1

Request body


_3
{
_3
"enabled": true
_3
}

Response line


_1
HTTP/1.1 200 OK

List standard transcoding templates

Lists the standard transcoding templates used by the specified entry point.

HTTP request


_1
GET https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/transcode/standard

Path parameter

ParameterTypeDescription
appidStringRequired. The App ID corresponding to the entry point.
entry_pointStringRequired. The entry point name.

HTTP response

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:

FieldTypeDescription
nameStringThe transcoding template name.
enabledBoolWhether 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.

Example

Request line


_1
GET https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/transcode/standard HTTP/1.1

Response line


_1
HTTP/1.1 200 OK

Request body


_16
{
_16
"transcodeList": [
_16
{
_16
"enabled": true,
_16
"name": "sd1"
_16
},
_16
{
_16
"enabled": true,
_16
"name": "sd2"
_16
},
_16
{
_16
"enabled": true,
_16
"name": "sd3"
_16
}
_16
]
_16
}

HTTP status code

Status codeDescription
200The request succeeds.
400The parameter is invalid, for example the appid or the entry_point is empty, or the region parameter value is invalid.
401Unauthorized (the customer ID and the customer secret do not match).
404The 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.
500An internal error occurs in the server, so the server is not able to complete the request.
504An internal error occurs in the server. The gateway or the proxy server did not receive a timely request from the remote server.

Page Content