Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TranscodingConfig

Sets the CDN live audio/video transcoding settings.

Hierarchy

  • TranscodingConfig

Index

Properties

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

audioSampleRate

audioSampleRate: number

Self-defined audio-sample rate:

  • AUDIO_SAMPLE_RATE_32000 = 32000
  • AUDIO_SAMPLE_RATE_44100 = 44100 (default)
  • AUDIO_SAMPLE_RATE_48000 = 48000

backgroundColor

backgroundColor: number

RGB hex value.

Background color of the output video stream for the CDN live broadcast defined as int color = (A & 0xff) << 24 | (R & 0xff) << 16 | (G & 0xff) << 8 | (B & 0xff)

Note: Value only, do not include a #. For example, 0xC0C0C0.

height

height: number

Height of the video. The default value is 640. The minimum value of width × height is 16 × 16.

lowLatency

lowLatency: boolean

Latency mode:

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

transcodingUsers

transcodingUsers: Array<TranscodingUser>

The TranscodingUsers Array.

userCount

userCount: number

The number of users in the live broadcast.

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.

videoFrameRate

videoFrameRate: number

Frame rate of the output video stream set for the CDN live broadcast. The default value is 15 fps.

Note: Agora adjusts all values over 30 to 30.

videoGop

videoGop: number

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

watermark

watermark: object

The watermark image added to the CDN live publishing stream.

Type declaration

  • height: number

    Height of the image on the broadcasting video.

  • url: string

    HTTP/HTTPS URL address of the image on the broadcasting video. The maximum length of this parameter is 1024 bytes.

  • width: number

    Width of the image on the broadcasting video.

  • x: number

    Horizontal position of the image from the upper left of the broadcasting video.

  • y: number

    Vertical position of the image from the upper left of the broadcasting video.

width

width: number

Width of the video. The default value is 360. The minimum value of width × height is 16 × 16.