All Products
Search
Document Center

ApsaraVideo Live:UpdateRtsLiveStreamTranscode

Last Updated:Dec 16, 2025

Updates the configuration of a custom Real-Time Streaming (RTS) transcoding template.

Operation description

This operation supports only the following types of custom transcoding templates: h264, h264-nbhd, h264-origin, and audio.

QPS limit

This operation is limited to 10 queries per second (QPS) per user.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:UpdateRtsLiveStreamTranscode

create

*Domain

acs:cdn:*:{#accountId}:domain/{#DomainName}

None None

Request parameters

Parameter

Type

Required

Description

Example

Domain

string

Yes

example.com

App

string

Yes

The streaming domain. This parameter cannot be changed.

aliyun-test

Template

string

Yes

The name of the application for the stream. This value cannot be changed.

ld

TemplateType

string

Yes

The custom name of the transcoding template. This name is read-only.

h264

Height

integer

No

The type of the custom transcoding template. This parameter cannot be modified.

1280

Width

integer

No

The height of the transcoded video in pixels.

The value must meet the following three conditions:

  • Height ≥ 100: The video height must be 100 pixels or greater.

  • max(Height, Width) ≤ 2560: The greater of the video's height and width cannot exceed 2560.

  • min(Height, Width) ≤ 1440: The lesser of the video's height and width cannot exceed 1440. For example, a 1560 × 1560 square video is not valid.

Note
  • This parameter is required when TemplateType (custom transcoding template type) is set to h264, h264-nbhd, or h264-origin.

  • Original quality templates support resolutions up to 4K to preserve source information.

720

FPS

integer

No

The width of the transcoded video in pixels.

The value must meet the following three conditions:

  • Width ≥ 100: The video width must be 100 pixels or greater.

  • max(Height, Width) ≤ 2560: The greater of the height and width cannot exceed 2560.

  • min(Height, Width) ≤ 1440: The lesser of the height and width cannot exceed 1440. For example, a 1560 × 1560 pixel square video is not valid.

Note
  • This parameter is required when `TemplateType` is set to `h264`, `h264-nbhd`, or `h264-origin`.

  • Original quality templates support resolutions up to 4K to preserve source information.

30

VideoBitrate

integer

No

The video frame rate for transcoding, in frames per second (FPS). Valid values: 1 to 60.

Note

This parameter is required when TemplateType is set to h264, h264-nbhd, or h264-origin.

2000

AudioBitrate

integer

No

The bitrate of the transcoded video, in kbps. Valid values: 1 to 6000.

Note
  • This parameter is required when TemplateType is set to h264, h264-nbhd, or h264-origin.

  • The actual bitrate of the transcoded video will be close to the specified value, but an exact match is not guaranteed, especially for very high or very low values.

128

Gop

string

No

The audio bitrate for transcoding, in kbps. Valid values: 1 to 1000.

Note

This parameter is required when TemplateType is set to audio.

2

DeleteBframes

boolean

No

The Group of Pictures (GOP) is the interval between keyframes. Set the GOP in seconds. The valid range is 1 to 3.

false

Opus

boolean

No

Specifies whether to use B-frames for transcoding. Valid values:

  • true: The transcoded video does not contain B-frames.

  • false: The transcoded video contains B-frames.

Note
  • This parameter is required when TemplateType is set to h264, h264-nbhd, or h264-origin.

  • The default value is false.

true

Profile

integer

No

Specifies whether to use the Opus codec for audio transcoding. This is mainly to ensure compatibility with native WebRTC. Valid values:

  • true: Audio is transcoded into the Opus format.

  • false: Audio is not transcoded into the Opus format.

Note

The default value is false.

2

AudioProfile

string

No

The encoding profile. It defines a specific set of encoding features for the video. A higher value provides better video quality but consumes more resources for encoding and decoding. Valid values:

  • 1: baseline (suitable for mobile devices).

  • 2: main (suitable for standard-resolution devices).

  • 3: high (suitable for high-resolution devices).

aac_low

AudioCodec

string

No

The audio encoding profile. Valid values:

  • aac_low

  • aac_he

  • aac_he_v2

  • aac_ld

aac

AudioRate

integer

No

The audio encoder. Valid values:

  • aac

  • mp3

Note

To use opus encoding, set the Opus parameter to true.

44100

AudioChannelNum

integer

No

The audio sampling rate. Valid values: 22050, 32000, 44100, 48000, and 96000. A value of 44100 is commonly used. Unit: Hz.

Note

If the AudioProfile for audio encoding is aac_ld, the sample rate cannot exceed 44100.

2

Lazy

string

No

The number of audio channels. Valid values:

  • 1: Mono.

  • 2: Stereo.

no

Response elements

Element

Type

Description

Example

object

The request ID.

RequestId

string

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

Examples

Success response

JSON format

{
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameters %s Please check and try again later. Exception parameter exists, please check and try again.
400 ConfigAlreadyExists %s Please check and try again later. Configuration already exists, please check and try again.
400 TemplateLimit %s Please check and try again later. The number of templates reached the upper limit.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.