Server Gateway SDK v3.7.200.21 for Linux Java
Public Member Functions | List of all members
io.agora.rtc.VideoEncoderConfig Class Reference

Public Member Functions

 VideoEncoderConfig ()
 VideoEncoderConfig (int codecType, VideoDimensions dimensions, int frameRate, int bitrate, int minBitrate, int orientationMode, int degradationPreference, int mirrorMode)
int getCodecType ()
void setCodecType (int codecType)
VideoDimensions getDimensions ()
void setDimensions (VideoDimensions dimensions)
int getFrameRate ()
void setFrameRate (int frameRate)
int getBitrate ()
void setBitrate (int bitrate)
int getMinBitrate ()
void setMinBitrate (int minBitrate)
int getOrientationMode ()
void setOrientationMode (int orientationMode)
int getDegradationPreference ()
void setDegradationPreference (int degradationPreference)
int getMirrorMode ()
void setMirrorMode (int mirrorMode)

Detailed Description

The VideoEncoderConfig class.

Constructor & Destructor Documentation

◆ VideoEncoderConfig() [1/2]

io.agora.rtc.VideoEncoderConfig.VideoEncoderConfig ( )

◆ VideoEncoderConfig() [2/2]

io.agora.rtc.VideoEncoderConfig.VideoEncoderConfig ( int  codecType,
VideoDimensions  dimensions,
int  frameRate,
int  bitrate,
int  minBitrate,
int  orientationMode,
int  degradationPreference,
int  mirrorMode 


codecTypeThe video encoder code type。
  • 0: None.
  • 1: VP8.
  • 2: H.264.
  • 3: H.265.
  • 5: VP9.
  • 6: Generic.
  • 7: Generic H264.
  • 12: AV1.
  • 20: JPEG.
dimensionsThe video dimension。
frameRateThe frame rate (fps) of the video.
bitrateThe bitrate (Kbps) of the video. Agora uses different video codecs for different profiles to optimize the user experience. For example, the communication profile prioritizes the smoothness while the live-broadcast profile prioritizes the video quality (a higher bitrate). Therefore, We recommend setting this parameter as 0.
  • 0: (Recommended) Standard bitrate mode. In this mode, the bitrates differ between the Live Broadcast and Communication profiles:
    • In the Communication profile, the video bitrate is the same as the base bitrate.
    • In the Live Broadcast profile, the video bitrate is twice the base bitrate.
  • -1: Compatible bitrate mode. The compatible bitrate mode. In this mode, the bitrate stays the same regardless of the profile. If you choose this mode for the Live Broadcast profile, the video frame rate may be lower than the set value.
minBitrateThe minimum encoding bitrate (Kbps).
orientationModeThe video orientation mode.
  • 0: (Default) Adaptive mode.
  • 1: Landscape mode.
  • 2: Portrait mode.
degradationPreferenceThe video degradation preference under limited bandwidth.
  • 0: (Default) Degrade the frame rate and keep resolution to guarantee the video quality.
  • 1: Degrade resolution in order to maintain framerate.
  • 2: Maintain resolution in video quality control process. Under limited bandwidth, degrade video quality first and then degrade frame rate.
  • 3: Degrade framerate in order to maintain resolution.
mirrorModeIf mirrorMode is set to 1, then the video frame would be mirrored before encoding.
  • (Default) 0: The mirror mode determined by the SDK.
  • 1: Enable the mirror mode.
  • 2: Disable the mirror mode.

Member Function Documentation

◆ getBitrate()

int io.agora.rtc.VideoEncoderConfig.getBitrate ( )

◆ getCodecType()

int io.agora.rtc.VideoEncoderConfig.getCodecType ( )

◆ getDegradationPreference()

int io.agora.rtc.VideoEncoderConfig.getDegradationPreference ( )

◆ getDimensions()

VideoDimensions io.agora.rtc.VideoEncoderConfig.getDimensions ( )

◆ getFrameRate()

int io.agora.rtc.VideoEncoderConfig.getFrameRate ( )

◆ getMinBitrate()

int io.agora.rtc.VideoEncoderConfig.getMinBitrate ( )

◆ getMirrorMode()

int io.agora.rtc.VideoEncoderConfig.getMirrorMode ( )

◆ getOrientationMode()

int io.agora.rtc.VideoEncoderConfig.getOrientationMode ( )

◆ setBitrate()

void io.agora.rtc.VideoEncoderConfig.setBitrate ( int  bitrate)

◆ setCodecType()

void io.agora.rtc.VideoEncoderConfig.setCodecType ( int  codecType)

◆ setDegradationPreference()

void io.agora.rtc.VideoEncoderConfig.setDegradationPreference ( int  degradationPreference)

◆ setDimensions()

void io.agora.rtc.VideoEncoderConfig.setDimensions ( VideoDimensions  dimensions)

◆ setFrameRate()

void io.agora.rtc.VideoEncoderConfig.setFrameRate ( int  frameRate)

◆ setMinBitrate()

void io.agora.rtc.VideoEncoderConfig.setMinBitrate ( int  minBitrate)

◆ setMirrorMode()

void io.agora.rtc.VideoEncoderConfig.setMirrorMode ( int  mirrorMode)

◆ setOrientationMode()

void io.agora.rtc.VideoEncoderConfig.setOrientationMode ( int  orientationMode)

The documentation for this class was generated from the following file: