Interface LiveStreamingTranscodingConfig

The configurations for CDN live stream transcoding. To be used when you call setLiveTranscoding.

Hierarchy

  • LiveStreamingTranscodingConfig

Index

Properties

Optional audioBitrate

audioBitrate: number

The audio bitrate (Kbps) of the CDN live stream.

A positive integer. The default value is 48, and the highest value is 128.

Optional audioChannels

audioChannels: 1 | 2 | 3 | 4 | 5

The number of audio channels for the CDN live stream.

Agora recommends choosing 1 (mono), or 2 (stereo) audio channels. Special players are required if you choose 3, 4, or 5.

  • 1: (Default) Mono
  • 2: Stereo
  • 3: Three audio channels
  • 4: Four audio channels
  • 5: Five audio channels

Optional audioSampleRate

audioSampleRate: 32000 | 44100 | 48000

The audio sampling rate:

  • 32000: 32 kHz
  • 44100: 44.1 kHz
  • 48000: (Default) 48 kHz

Optional backgroundColor

backgroundColor: number

The background color in RGB hex.

Value only. Do not include a preceding #. The default value is 0x000000.

Optional backgroundImage

Background image for the CDN live stream.

Optional height

height: number

The height of the video in pixels.

A positive integer, the default value is 360.

  • When pushing video streams to the CDN, ensure that height is at least 64; otherwise, the Agora server adjusts the value to 64.
  • When pushing audio streams to the CDN, set width and height as 0.

Optional images

deprecated

Watermark images for the CDN live stream.

Optional transcodingUsers

transcodingUsers: LiveStreamingTranscodingUser[]

Manages the user layout configuration in the CDN live streaming.

Agora supports a maximum of 17 transcoding users in a CDN streaming channel.

Optional userConfigExtraInfo

userConfigExtraInfo: string

Optional videoBitrate

videoBitrate: number

The bitrate (Kbps) of the output video stream.

The default value is 400.

Optional videoCodecProfile

videoCodecProfile: 66 | 77 | 100

The video codec profile type.

Set it as 66, 77, or 100 (default). If you set this parameter to any other value, the Agora server adjusts it to the default value 100.

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

Optional videoFrameRate

videoFrameRate: number

The video frame rate (fps) of the CDN live stream.

The default value is 15. The Agora server adjusts any value over 30 to 30.

Optional videoGop

videoGop: number

The video GOP in frames.

The default value is 30.

Optional watermark

Watermark image for the CDN live stream.

Optional width

width: number

The width of the video in pixels.

A positive integer, the default value is 640.

  • When pushing video streams to the CDN, ensure that width is at least 64; otherwise, the Agora server adjusts the value to 64.
  • When pushing audio streams to the CDN, set width and height as 0.