Agora C++ API Reference for All Platforms
Public Member Functions | Public Attributes | List of all members
agora::rtc::LiveTranscoding Struct Reference

Public Member Functions

 LiveTranscoding ()
 

Public Attributes

int width
 
int height
 
int videoBitrate
 
int videoFramerate
 
bool lowLatency
 
int videoGop
 
VIDEO_CODEC_PROFILE_TYPE videoCodecProfile
 
unsigned int backgroundColor
 
unsigned int userCount
 
TranscodingUsertranscodingUsers
 
const char * transcodingExtraInfo
 
const char * metadata
 
RtcImagewatermark
 
RtcImagebackgroundImage
 
AUDIO_SAMPLE_RATE_TYPE audioSampleRate
 
int audioBitrate
 
int audioChannels
 
AUDIO_CODEC_PROFILE_TYPE audioCodecProfile
 

Detailed Description

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

Constructor & Destructor Documentation

◆ LiveTranscoding()

agora::rtc::LiveTranscoding::LiveTranscoding ( )
inline

Member Data Documentation

◆ width

int agora::rtc::LiveTranscoding::width

Width of the video. The default value is 360.

  • If you push video streams to the CDN, set the value of width × height to at least 64 × 64 (px), or the SDK will adjust it to 64 × 64 (px).
  • If you push audio streams to the CDN, set the value of width × height to 0 × 0 (px).

◆ height

int agora::rtc::LiveTranscoding::height

Height of the video. The default value is 640.

  • If you push video streams to the CDN, set the value of width × height to at least 64 × 64 (px), or the SDK will adjust it to 64 × 64 (px).
  • If you push audio streams to the CDN, set the value of width × height to 0 × 0 (px).

◆ videoBitrate

int agora::rtc::LiveTranscoding::videoBitrate

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.

◆ videoFramerate

int agora::rtc::LiveTranscoding::videoFramerate

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

Note
Agora adjusts all values over 30 to 30.

◆ lowLatency

bool agora::rtc::LiveTranscoding::lowLatency

DEPRECATED Latency mode:

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

◆ videoGop

int agora::rtc::LiveTranscoding::videoGop

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

◆ videoCodecProfile

VIDEO_CODEC_PROFILE_TYPE agora::rtc::LiveTranscoding::videoCodecProfile

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.

◆ backgroundColor

unsigned int agora::rtc::LiveTranscoding::backgroundColor

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

◆ userCount

unsigned int agora::rtc::LiveTranscoding::userCount

The number of users in the live broadcast.

◆ transcodingUsers

TranscodingUser* agora::rtc::LiveTranscoding::transcodingUsers

◆ transcodingExtraInfo

const char* agora::rtc::LiveTranscoding::transcodingExtraInfo

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.

◆ metadata

const char* agora::rtc::LiveTranscoding::metadata

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

◆ watermark

RtcImage* agora::rtc::LiveTranscoding::watermark

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.

◆ backgroundImage

RtcImage* agora::rtc::LiveTranscoding::backgroundImage

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.

◆ audioSampleRate

AUDIO_SAMPLE_RATE_TYPE agora::rtc::LiveTranscoding::audioSampleRate

Self-defined audio-sample rate: AUDIO_SAMPLE_RATE_TYPE.

◆ audioBitrate

int agora::rtc::LiveTranscoding::audioBitrate

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

◆ audioChannels

int agora::rtc::LiveTranscoding::audioChannels

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

◆ audioCodecProfile

AUDIO_CODEC_PROFILE_TYPE agora::rtc::LiveTranscoding::audioCodecProfile

Self-defined audio codec profile: AUDIO_CODEC_PROFILE_TYPE.