Creates a custom transcoding template for the specified entry point.
POST https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/transcode/custom?id={name}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
name |
String | Required. The name of the custom transcoding template. This name must be different from the name of any preset transcoding templates; otherwise, an error occurs. |
The request body is in the JSON Object type, and contains the following fields:
Field | Type | Description |
---|---|---|
width |
Integer | Required. The width (pixels) of the video. The value range is [0, 1920], where 0 means to adapt using the original aspect ratio. |
height |
Integer | Required. The height (pixels) of the video. The value range is [0,1920], where 0 means to adapt using the original aspect ratio. |
videoCodec |
String | Optional. The video encoding format. Only H.264 is supported. If videoBitrate and profile are specified, this field is required. |
videoBitrate |
Integer | Optional. The video bitrate (bit/s). The value range is [200, 6000]. |
profile |
String | Optional. The encoding profile. Each profile represents a set of encoding parameters. Generally speaking, a higher profile means better video quality and requires more resources for encoding and decoding. Possible values include the following:base : The base profile, which is suitable for mobile devices.main : The standard profile, which is suitable for standard-resolution devices.high : The high profile, which is suitable for high-resolution devices. |
audioCodec |
String | Optional. The audio encoding format. Only AAC is supported. If audioBitrate and audioSampleRate are specified, this field is required. |
audioBitrate |
Integer | Optional. The audio bitrate (bit/s). The value range is [100,500]. |
audioSampleRate |
Integer | Optional. The audio sampling rate (Hz). Possible values include: 96000, 88200, 64000, 48000, 44100, 32000, and 16000. |
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/settings/transcode/custom?id={name} HTTP/1.1
Request body
{
"width": 0,
"height": 360,
"videoCodec": "h264",
"videoBitrate": 1200,
"profile": "base",
"audioCodec": "aac",
"audioBitrate": 320,
"audioSampleRate": 44100
}
Response line
HTTP/1.1 200 OK
Updates the custom transcoding template for the specified entry point.
PATCH https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/transcode/custom/{name}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
name |
String | Required. The name of the custom transcoding template. |
The request body is in the JSON Object type, and contains the following fields:
Field | Type | Description |
---|---|---|
width |
Integer | Optional. The width (pixels) of the video. The value range is [0, 1920], where 0 means to adapt using the original aspect ratio. If height is specified, this field is required. |
height |
Integer | Optional. The height (pixels) of the video. The value range is [0,1920], where 0 means to adapt using the original aspect ratio. If width is specified, this field is required. |
videoCodec |
String | Optional. The video encoding format. Only H.264 is supported. If videoBitrate and profile are specified, this field is required. |
videoBitrate |
Integer | Optional. The video bitrate (bit/s). The value range is [200, 6000]. |
profile |
String | Optional. The encoding profile. Each profile represents a set of encoding parameters. Generally speaking, a higher profile means better video quality and requires more resources for encoding and decoding. Possible values include the following:base : The base profile, which is suitable for mobile devices.main : The standard profile, which is suitable for standard-resolution devices.high : The high profile, which is suitable for high-resolution devices. |
audioCodec |
String | Optional. The audio encoding format. Only AAC is supported. If audioBitrate and audioSampleRate are specified, this field is required. |
audioBitrate |
Integer | Optional. The audio bitrate (bit/s). The value range is [100,500]. |
audioSampleRate |
Integer | Optional. The audio sampling rate (Hz). Possible values include: 96000, 88200, 64000, 48000, 44100, 32000, and 16000. |
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
PATCH https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/transcode/custom/{name} HTTP/1.1
Request body
{
"width": 0,
"height": 360,
"videoCodec": "h264",
"videoBitrate": 1200,
"profile": "base",
"audioCodec": "aac",
"audioBitrate": 320,
"audioSampleRate": 44100
}
Response line
HTTP/1.1 200 OK
Deletes the custom transcoding template for the specified entry point.
DELETE https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/transcode/custom/{name}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
name |
String | Required. The name of the custom 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 codes for possible reasons.
Request line
DELETE https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/transcode/custom/{name} HTTP/1.1
Response line
HTTP/1.1 200 OK
Lists the custom transcoding templates for the specified entry point.
GET https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/transcode/custom
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
name |
String | Required. The name of the custom transcoding template. |
If the returned HTTP status code is 200, the request is successful. The response body contains the following fields:
transcodeList
: JSON Array. The list of custom transcoding templates for the entry point. Each custom transcoding template corresponds to a JSON Object and contains the following fields:Field | Type | Description |
---|---|---|
name |
String | Required. The transcoding template name. |
width |
Integer | Required. The width of the video. |
height |
Integer | Required. The height of the video. |
videoCodec |
String | Optional. The video encoding format. Only H.264 is supported. |
videoBitrate |
Integer | Optional. The video bitrate (bit/s). |
profile |
String | Optional. The encoding profile.base : The base profile, which is suitable for mobile devices.main : The standard profile, which is suitable for standard-resolution devices.high : The high profile, which is suitable for high-resolution devices. |
audioCodec |
String | Optional. The audio encoding format. Only AAC is supported. |
audioBitrate |
Integer | Optional. The audio bitrate (bit/s). |
audioSampleRate |
Integer | Optional. The audio sampling rate (Hz). |
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/settings/transcode/custom HTTP/1.1
Request body
{
"transcodeList": [
{
"name": "{your_transcode_name}",
"width": 0,
"height": 360,
"videoCodec": "h264",
"videoBitrate": 1200,
"profile": "base",
"audioCodec": "aac",
"audioBitrate": 320,
"audioSampleRate": 44100
}
]
}
Response line
HTTP/1.1 200 OK
5767b890-c15c-11ec-8e95-1b7dfd4b7cb0