Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TranscodingConfig

Sets the CDN live audio/video transcoding settings.

Hierarchy

  • TranscodingConfig

Index

Properties

Optional advancedFeatures

advancedFeatures: LiveStreamAdvancedFeature[]

Advanced features of the RTMP or RTMPS streaming with transcoding. See LiveStreamAdvancedFeature.

since

v3.1.0

audioBitrate

audioBitrate: number

Bitrate of the CDN live audio output stream. The default value is 48 Kbps, and the highest value is 128.

audioChannels

audioChannels: number

Agora's self-defined audio-channel types.

We recommend choosing option 1 or 2.

A special player is required if you choose option 3, 4, or 5:

  • 1: (Default) Mono.
  • 2: Two-channel stereo.
  • 3: Three-channel stereo.
  • 4: Four-channel stereo.
  • 5: Five-channel stereo.

Optional audioCodecProfile

audioCodecProfile: AUDIO_CODEC_PROFILE_TYPE

Self-defined audio codec profile: #AUDIO_CODEC_PROFILE_TYPE.

audioSampleRate

audioSampleRate: number

Self-defined audio-sample rate:

  • AUDIO_SAMPLE_RATE_32000 = 32000 Hz
  • AUDIO_SAMPLE_RATE_44100 = (Default)44100 Hz
  • AUDIO_SAMPLE_RATE_48000 = 48000 Hz

backgroundColor

backgroundColor: number

The background color in RGB hex value. Value only, do not include a #. For example, 0xFFB6C1 (light pink). The default value is 0x000000 (black).

backgroundImage

backgroundImage: RtcImage[]
since

v3.2.0

The background image added to the CDN live publishing stream.

Once a background image is added, the audience of the CDN live publishing stream can see the background image.

height

height: number

Height of the video. The default value is 640.

When pushing video streams to the CDN, the value range of height is [64,1080]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1080, Agora server automatically adjusts it to 1080.

When pushing audio streams to the CDN, set the value of width x height to 0 x 0 (px).

lowLatency

lowLatency: boolean

Latency mode.

  • true: Low latency with unassured quality.
  • false: (Default) High latency with assured quality.

transcodingExtraInfo

transcodingExtraInfo: string

The reserved property.

Extra user-defined information to send SEI for the H.264 or H.265 stream to the CDN streaming client. The maximum length is 4096 bytes.

See SEI-related FAQ for more details.

transcodingUsers

transcodingUsers: TranscodingUser[]

The TranscodingUsers Array.

videoBitrate

videoBitrate: number

Bitrate of the CDN live output video stream. The default value is 400 Kbps.

Set this parameter according to the Video Bitrate Table.

If you set a bitrate beyond the proper range, the SDK automatically adapts it to a value within the range.

videoCodecProfile

videoCodecProfile: number

Self-defined video codec profile.

  • VIDEO_CODEC_PROFILE_BASELINE = 66: Baseline video codec profile. Generally used in video calls on mobile phones.
  • VIDEO_CODEC_PROFILE_MAIN = 77: Main video codec profile. Generally used in mainstream electronics, such as MP4 players, portable video players, PSP, and iPads.
  • VIDEO_CODEC_PROFILE_HIGH = 100: (Default) High video codec profile. Generally used in high-resolution broadcasts or television.

Optional videoCodecType

videoCodecType: VIDEO_CODEC_TYPE_FOR_STREAM

The video codec type of the output video stream. See VIDEO_CODEC_TYPE_FOR_STREAM.

videoFrameRate

videoFrameRate: number

Frame rate (fps) of the CDN live output video stream. The value range is (0, 30]. The default value is 15.

Note: Agora adjusts all values over 30 to 30.

videoGop

videoGop: number

Video GOP in frames. The default value is 30 fps.

watermark

watermark: RtcImage[]

The watermark image added to the CDN live publishing stream.

width

width: number

Width of the video. The default value is 360.

When pushing video streams to the CDN, the value range of width is [64,1920]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1920, Agora server automatically adjusts it to 1920.

When pushing audio streams to the CDN, set the value of width x height to 0 x 0 (px).