Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
agora::rtc::VideoEncoderConfiguration Struct Reference

`#include <AgoraBase.h>`

## Public Member Functions
| VideoEncoderConfiguration (const VideoDimensions &d, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror=VIDEO_MIRROR_MODE_DISABLED)
| VideoEncoderConfiguration (int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror=VIDEO_MIRROR_MODE_DISABLED)
| VideoEncoderConfiguration (const VideoEncoderConfiguration &config)
| VideoEncoderConfiguration ()
VideoEncoderConfiguration & | operator= (const VideoEncoderConfiguration &rhs)

## Public Attributes
VIDEO_CODEC_TYPE | codecType
VideoDimensions | dimensions
int | frameRate
int | bitrate
int | minBitrate
ORIENTATION_MODE | orientationMode
DEGRADATION_PREFERENCE | degradationPreference
VIDEO_MIRROR_MODE_TYPE | mirrorMode
AdvanceOptions | advanceOptions

## Constructor & Destructor Documentation

## ◆ VideoEncoderConfiguration() [1/4]

agora::rtc::VideoEncoderConfiguration::VideoEncoderConfiguration | ( | const VideoDimensions & | d,
|  | int | f,
|  | int | b,
|  | ORIENTATION_MODE | m,
|  | VIDEO_MIRROR_MODE_TYPE | mirror = VIDEO_MIRROR_MODE_DISABLED )
| inline

## ◆ VideoEncoderConfiguration() [2/4]

agora::rtc::VideoEncoderConfiguration::VideoEncoderConfiguration | ( | int | width,
|  | int | height,
|  | int | f,
|  | int | b,
|  | ORIENTATION_MODE | m,
|  | VIDEO_MIRROR_MODE_TYPE | mirror = VIDEO_MIRROR_MODE_DISABLED )
| inline

## ◆ VideoEncoderConfiguration() [3/4]

agora::rtc::VideoEncoderConfiguration::VideoEncoderConfiguration | ( | const VideoEncoderConfiguration & | config | ) |
| inline

## ◆ VideoEncoderConfiguration() [4/4]

agora::rtc::VideoEncoderConfiguration::VideoEncoderConfiguration | ( |  | ) |
| inline

## Member Function Documentation

## ◆ operator=()

VideoEncoderConfiguration & agora::rtc::VideoEncoderConfiguration::operator= | ( | const VideoEncoderConfiguration & | rhs | ) |
| inline

## Member Data Documentation

## ◆ codecType

VIDEO_CODEC_TYPE agora::rtc::VideoEncoderConfiguration::codecType

The codec type of the local video stream. See `VIDEO_CODEC_TYPE`.

## ◆ dimensions

VideoDimensions agora::rtc::VideoEncoderConfiguration::dimensions

The dimensions of the encoded video (px). See `VideoDimensions`. This parameter measures the video encoding quality in the format of length × width. The default value is 960 × 540. You can set a custom value.

## ◆ frameRate

int agora::rtc::VideoEncoderConfiguration::frameRate

The frame rate (fps) of the encoding video frame. The default value is 15. See `FRAME_RATE`.

## ◆ bitrate

int agora::rtc::VideoEncoderConfiguration::bitrate

The encoding bitrate (Kbps) of the video. This parameter does not need to be set; keeping the default value `STANDARD_BITRATE` is sufficient. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you have set. For the correspondence between video resolution and frame rate, see `Video profile`.

- STANDARD_BITRATE (0): (Recommended) Standard bitrate mode.
- COMPATIBLE_BITRATE (-1): Adaptive bitrate mode. In general, Agora suggests that you do not use this value.

## ◆ minBitrate

int agora::rtc::VideoEncoderConfiguration::minBitrate

The minimum encoding bitrate (Kbps) of the video. The SDK automatically adjusts the encoding bitrate to adapt to the network conditions. Using a value greater than the default value forces the video encoder to output high-quality images but may cause more packet loss and sacrifice the smoothness of the video transmission. Unless you have special requirements for image quality, Agora does not recommend changing this value.

Note
  This parameter only applies to the interactive streaming profile.

## ◆ orientationMode

ORIENTATION_MODE agora::rtc::VideoEncoderConfiguration::orientationMode

The orientation mode of the encoded video. See `ORIENTATION_MODE`.

## ◆ degradationPreference

DEGRADATION_PREFERENCE agora::rtc::VideoEncoderConfiguration::degradationPreference

Video degradation preference under limited bandwidth. See `DEGRADATION_PREFERENCE`.

Note
  When this parameter is set to MAINTAIN_FRAMERATE (1) or MAINTAIN_BALANCED (2), `orientationMode` needs to be set to ORIENTATION_MODE_ADAPTIVE (0) at the same time, otherwise the setting will not take effect.

## ◆ mirrorMode

VIDEO_MIRROR_MODE_TYPE agora::rtc::VideoEncoderConfiguration::mirrorMode

Sets the mirror mode of the published local video stream. It only affects the video that the remote user sees. See `VIDEO_MIRROR_MODE_TYPE`.

Note
  By default, the video is not mirrored.

## ◆ advanceOptions

AdvanceOptions agora::rtc::VideoEncoderConfiguration::advanceOptions

Advanced options for video encoding. See `AdvanceOptions`.