io.agora.rtc

## Class VideoEncoderConfig

- java.lang.Object
- - io.agora.rtc.VideoEncoderConfig

-     public class VideoEncoderConfig
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `bitrate` Video encoding target bitrate (Kbps).
    `private int` | `codecType` The video encoder code type: #VIDEO_CODEC_TYPE.
    `private int` | `degradationPreference` The video degradation preference when the bandwidth is a constraint: #DEGRADATION_PREFERENCE.
    `private VideoDimensions` | `dimensions` The video frame dimension used to specify the video quality and measured by the total number of pixels along a frame's width and height: VideoDimensions.
    `private int` | `encodeAlpha` Whether to encode and send the alpha data to the remote when alpha data is present.
    `private int` | `frameRate` Frame rate of the video: int type, but can accept #FRAME_RATE for backward compatibility.
    `private int` | `minBitrate` (For future use) The minimum encoding bitrate (Kbps).
    `private int` | `mirrorMode` If mirror_type is set to VIDEO_MIRROR_MODE_ENABLED, then the video frame would be mirrored before encoding.
    `private int` | `orientationMode` (For future use) The video orientation mode of the video: #ORIENTATION_MODE.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VideoEncoderConfig()`
    `VideoEncoderConfig(int codecType, VideoDimensions dimensions, int frameRate, int bitrate, int minBitrate, int orientationMode, int degradationPreference, int mirrorMode, int encodeAlpha)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBitrate()`
    `int` | `getCodecType()`
    `int` | `getDegradationPreference()`
    `VideoDimensions` | `getDimensions()`
    `int` | `getEncodeAlpha()`
    `int` | `getFrameRate()`
    `int` | `getMinBitrate()`
    `int` | `getMirrorMode()`
    `int` | `getOrientationMode()`
    `void` | `setBitrate(int bitrate)`
    `void` | `setCodecType(int codecType)`
    `void` | `setDegradationPreference(int degradationPreference)`
    `void` | `setDimensions(VideoDimensions dimensions)`
    `void` | `setEncodeAlpha(int encodeAlpha)`
    `void` | `setFrameRate(int frameRate)`
    `void` | `setMinBitrate(int minBitrate)`
    `void` | `setMirrorMode(int mirrorMode)`
    `void` | `setOrientationMode(int orientationMode)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### codecType

          private int codecType

      The video encoder code type: #VIDEO_CODEC_TYPE.

    - #### dimensions

          private VideoDimensions dimensions

      The video frame dimension used to specify the video quality and measured by the total number of pixels along a frame's width and height: VideoDimensions.

    - #### frameRate

          private int frameRate

      Frame rate of the video: int type, but can accept #FRAME_RATE for backward compatibility.

    - #### bitrate

          private int bitrate

      Video encoding target bitrate (Kbps).

    - #### minBitrate

          private int minBitrate

      (For future use) The minimum encoding bitrate (Kbps). The Agora 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 hence sacrifice the smoothness of the video transmission. That said, unless you have special requirements for image quality, Agora does not recommend changing this value. Important: This parameter applies to the Live Broadcast profile only.

    - #### orientationMode

          private int orientationMode

      (For future use) The video orientation mode of the video: #ORIENTATION_MODE.

    - #### degradationPreference

          private int degradationPreference

      The video degradation preference when the bandwidth is a constraint: #DEGRADATION_PREFERENCE. Currently, this member supports `MAINTAIN_QUALITY`(0) only.

    - #### mirrorMode

          private int mirrorMode

      If mirror_type is set to VIDEO_MIRROR_MODE_ENABLED, then the video frame would be mirrored before encoding.

    - #### encodeAlpha

          private int encodeAlpha

      Whether to encode and send the alpha data to the remote when alpha data is present. The default value is false.

  - ### Constructor Detail

    - #### VideoEncoderConfig

          public VideoEncoderConfig()

    - #### VideoEncoderConfig

          public VideoEncoderConfig(int codecType,
                                    VideoDimensions dimensions,
                                    int frameRate,
                                    int bitrate,
                                    int minBitrate,
                                    int orientationMode,
                                    int degradationPreference,
                                    int mirrorMode,
                                    int encodeAlpha)

  - ### Method Detail

    - #### getCodecType

          public int getCodecType()

    - #### setCodecType

          public void setCodecType(int codecType)

    - #### getDimensions

          public VideoDimensions getDimensions()

    - #### setDimensions

          public void setDimensions(VideoDimensions dimensions)

    - #### getFrameRate

          public int getFrameRate()

    - #### setFrameRate

          public void setFrameRate(int frameRate)

    - #### getBitrate

          public int getBitrate()

    - #### setBitrate

          public void setBitrate(int bitrate)

    - #### getMinBitrate

          public int getMinBitrate()

    - #### setMinBitrate

          public void setMinBitrate(int minBitrate)

    - #### getOrientationMode

          public int getOrientationMode()

    - #### setOrientationMode

          public void setOrientationMode(int orientationMode)

    - #### getDegradationPreference

          public int getDegradationPreference()

    - #### setDegradationPreference

          public void setDegradationPreference(int degradationPreference)

    - #### getMirrorMode

          public int getMirrorMode()

    - #### setMirrorMode

          public void setMirrorMode(int mirrorMode)

    - #### getEncodeAlpha

          public int getEncodeAlpha()

    - #### setEncodeAlpha

          public void setEncodeAlpha(int encodeAlpha)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`