Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LiveTranscoding

A struct for managing CDN live audio/video transcoding settings.

Hierarchy

  • LiveTranscoding

Index

Constructors

constructor

  • Parameters

    • Default value width: number = 360
    • Default value height: number = 640
    • Default value videoBitrate: number = 400
    • Default value videoFramerate: number = 15
    • Default value lowLatency: boolean = false
    • Default value videoGop: number = 30
    • Default value videoCodecProfile: VIDEO_CODEC_PROFILE_TYPE = VIDEO_CODEC_PROFILE_TYPE.VIDEO_CODEC_PROFILE_HIGH
    • Default value backgroundColor: number = 0
    • Default value userCount: number = 0
    • transcodingUsers: TranscodingUser[]
    • transcodingExtraInfo: string
    • metadata: string
    • watermark: RtcImage
    • backgroundImage: RtcImage
    • Default value audioSampleRate: AUDIO_SAMPLE_RATE_TYPE = AUDIO_SAMPLE_RATE_TYPE.AUDIO_SAMPLE_RATE_48000
    • Default value audioBitrate: number = 48
    • Default value audioChannels: 1 | 2 | 3 | 4 | 5 = 1
    • Default value audioCodecProfile: AUDIO_CODEC_PROFILE_TYPE = AUDIO_CODEC_PROFILE_TYPE.AUDIO_CODEC_PROFILE_LC_AAC
    • advancedFeatures: LiveStreamAdvancedFeature
    • Default value advancedFeatureCount: number = 0

    Returns LiveTranscoding

Properties

advancedFeatureCount

advancedFeatureCount: number

The number of enabled advanced features. The default value is 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: 1 | 2 | 3 | 4 | 5

The numbder 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 option 3, 4, or 5:

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

audioCodecProfile

audioCodecProfile: AUDIO_CODEC_PROFILE_TYPE

Self-defined audio codec profile: AUDIO_CODEC_PROFILE_TYPE.

audioSampleRate

audioSampleRate: AUDIO_SAMPLE_RATE_TYPE

Self-defined audio-sample rate: AUDIO_SAMPLE_RATE_TYPE.

backgroundColor

backgroundColor: number

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

backgroundImage

backgroundImage: RtcImage

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. See RtcImage.

height

height: number

The height of the video in pixels. The default value is 640.

  • 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.

lowLatency

lowLatency: boolean
deprecated

Latency mode:

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

metadata

metadata: string
deprecated

The metadata sent to the CDN live client defined by the RTMP or HTTP-FLV metadata.

transcodingExtraInfo

transcodingExtraInfo: string

Reserved property. Extra user-defined information to send SEI for the H.264/H.265 video stream to the CDN live client. Maximum length: 4096 Bytes.

For more information on SEI frame, see SEI-related questions.

transcodingUsers

transcodingUsers: TranscodingUser[]

TranscodingUser

userCount

userCount: number

The number of users in the live interactive streaming. The default value is 0.

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: VIDEO_CODEC_PROFILE_TYPE

Self-defined video codec profile: VIDEO_CODEC_PROFILE_TYPE.

note

If you set this parameter to other values, Agora adjusts it to the default value of 100.

videoFramerate

videoFramerate: number

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

note

The Agora server adjusts any value 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. Ensure that the format of the image is PNG. Once a watermark image is added, the audience of the CDN live publishing stream can see the watermark image. See RtcImage.

width

width: number

The width of the video in pixels. The default value is 360.

  • 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.

Generated using TypeDoc