Skip to main content

Create or update a transcoding template

Create or update a transcoding template

POST
https://api.sd-rtn.com/v1/projects/{appId}/rtls/abr/config/codecs/{codecId}

Create or update a transcoding template under the specified App ID.

Request

Path parameters

appid stringrequired

The App ID of the project

codecId stringrequired

The ID of the transcoding template. The string length should not exceed 64 bytes. The supported character set is as follows:

  • 26 lowercase English letters a-z
  • 26 uppercase English letters A-Z
  • 10 numbers 0-9
  • Space
  • !, #, $, %, &, (, ), +, -, :, ;, <, =, ., >, ?, @, [, ], ^, _, {, }, |, ,

When you enable the multi-bitrate function on the audience side in a channel named channel and create a transcoding template with the template ID set to codecId, the audience can join a corresponding channel named channel_codecId. In this channel, they can subscribe to the multi-bitrate host stream processed by Cloud Transcoding according to the transcoding template.

Request body

APPLICATION/JSON
BODYrequired
  • enabled booleanrequired

    Whether to enable this transcoding template:

    • true: Enable the template
    • false: Do not enable the template
  • video objectrequired
    Show propertiesHide properties
    • width number

      Maximum value: 1920

      The width of the transcoded output video (px).

    • height number

      Maximum value: 1920

      The height of the transcoded output video (px).

    • fps number

      Maximum value: 60

      The frame rate (fps) of the transcoded output video.

Response

  • If the returned status code is 200, the request was successful. The response body contains the result of the request.

    OK
    • status string

      Status of this request:

      • success: The request was successful.
      • error: The request failed.
  • If the returned status code is not 200, the request failed. The response body includes the detail and reason for failure. Refer to status codes to understand the possible reasons for failure.

    Non-200
    • status string

      Status of this request:

      • success: The request was successful.
      • error: The request failed.
    • message String

      Describes why the request failed.

Authorization

This endpoint requires Basic Auth.

Request example


_4
curl --request post \
_4
--url https://api.sd-rtn.com/v1/projects/:appId/rtls/abr/config/codecs/:codecId \
_4
--header 'Authorization: Basic <credentials>' \
_4
--header 'Content-Type: <string>'

Response example


_3
{
_3
"status": "Status of this request:\n- `success`: Request was successful.\n- `error`: Request failed.\n"
_3
}