com.aliyun.svideosdk.common.struct.project

## Class Config

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.project.Config

-     public class Config
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Config()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAudioChannel()` Gets the channel count of audio
    `int` | `getAudioSampleRate()` Gets the sample rate of audio
    `int` | `getBackgroundColor()` Gets the background color.
    `int` | `getBitrate()` Gets the bitrate.
    `int` | `getCrf()` Gets the CRF value.
    `int` | `getDisplayMode()` Gets the video display mode.
    `int` | `getFps()` Gets the frame rate.
    `int` | `getGop()` Gets the GOP size.
    `int` | `getOutputHeight()` Gets the video output height.
    `int` | `getOutputWidth()` Gets the video output width.
    `float` | `getScale()` Gets the resolution scaling ratio.
    `int` | `getVideoCodec()` Gets the encoding format.
    `int` | `getVideoQuality()` Gets the video quality.
    `int` | `getVolume()` Gets the video volume.
    `boolean` | `isMute()` is mute
    `void` | `setAudioChannel(int channel)` Sets channel of audo
    `void` | `setAudioSampleRate(int sampleRate)` Sets the sample rate of audo
    `void` | `setBackgroundColor(int backgroundColor)` Sets the background color.
    `void` | `setBitrate(int bitrate)` Sets the bitrate.
    `void` | `setCrf(int crf)` Sets the CRF value.
    `void` | `setDisplayMode(int displayMode)` Sets the video display mode.
    `void` | `setFps(int fps)` Sets the frame rate.
    `void` | `setGop(int gop)` Sets the GOP size.
    `void` | `setMute(boolean mute)` Mutes or unmutes playback.
    `void` | `setOutputHeight(int outputHeight)` Sets the video output height.
    `void` | `setOutputWidth(int outputWidth)` Sets the video output width.
    `void` | `setScale(float scale)` Sets the resolution scaling ratio.
    `void` | `setVideoCodec(int videoCodec)` Sets the encoding format.
    `void` | `setVideoQuality(int videoQuality)` Sets the video quality.
    `void` | `setVolume(int volume)` Sets the video volume.

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

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

- - ### Constructor Detail

    - #### Config

          public Config()

  - ### Method Detail

    - #### getGop

          public int getGop()

      Gets the GOP size.
      Returns:
        The GOP size.

    - #### setGop

          public void setGop(int gop)

      Sets the GOP size.
      Parameters:
        `gop` - This setting may not work properly in hardware encoders. To avoid this issue, use software encoders.

    - #### getVideoQuality

          public int getVideoQuality()

      Gets the video quality.
      Returns:
        The video quality `VideoQuality`.

    - #### setVideoQuality

          public void setVideoQuality(int videoQuality)

      Sets the video quality.
      Parameters:
        `videoQuality` - The video quality `VideoQuality`.

    - #### getBitrate

          public int getBitrate()

      Gets the bitrate.
      Returns:
        The bitrate.

    - #### setBitrate

          public void setBitrate(int bitrate)

      Sets the bitrate.
      Parameters:
        `bitrate` - The bitrate.

    - #### getFps

          public int getFps()

      Gets the frame rate.
      Returns:
        fps

    - #### setFps

          public void setFps(int fps)

      Sets the frame rate.
      Parameters:
        `fps` - The frame rate. Valid values: [1, 120]

    - #### getCrf

          public int getCrf()

      Gets the CRF value.
      Returns:
        The CRF value.

    - #### setCrf

          public void setCrf(int crf)

      Sets the CRF value.
      Parameters:
        `crf` - The quality setting of ffmpeg video. The lower the CRF value, the higher the video quality and the larger the file size. Default value: 23

    - #### getVideoCodec

          public int getVideoCodec()

      Gets the encoding format.
      Returns:
        The encoding format `VideoCodecs`.

    - #### setVideoCodec

          public void setVideoCodec(int videoCodec)

      Sets the encoding format.
      Parameters:
        `videoCodec` - The encoding format `VideoCodecs`.

    - #### getScale

          public float getScale()

      Gets the resolution scaling ratio.
      Returns:
        The ratio of the output resolution to the resolution during editing.

    - #### setScale

          public void setScale(float scale)

      Sets the resolution scaling ratio.
      Parameters:
        `scale` - The ratio of the output resolution to the resolution during editing. Valid values: [0, 1]

    - #### getOutputWidth

          public int getOutputWidth()

      Gets the video output width.
      Returns:
        The output width.

    - #### setOutputWidth

          public void setOutputWidth(int outputWidth)

      Sets the video output width.
      Parameters:
        `outputWidth` - The output width.

    - #### getOutputHeight

          public int getOutputHeight()

      Gets the video output height.
      Returns:
        The output height.

    - #### setOutputHeight

          public void setOutputHeight(int outputHeight)

      Sets the video output height.
      Parameters:
        `outputHeight` - The output height.

    - #### isMute

          public boolean isMute()

      is mute
      Returns:
        is mute

    - #### setMute

          public void setMute(boolean mute)

      Mutes or unmutes playback.
      Parameters:
        `mute` - is mute

    - #### getVolume

          public int getVolume()

      Gets the video volume.
      Returns:
        volume

    - #### setVolume

          public void setVolume(int volume)

      Sets the video volume.
      Parameters:
        `volume` - volume

    - #### getBackgroundColor

          public int getBackgroundColor()

      Gets the background color.
      Returns:
        background color

    - #### setBackgroundColor

          public void setBackgroundColor(int backgroundColor)

      Sets the background color. This method only takes effect when DisplayMode is set to `VideoDisplayMode.FILL`.
      Parameters:
        `backgroundColor` - The background color in ARGB format. An 8-bit integer type.
      See Also:
        `VideoDisplayMode`

    - #### getDisplayMode

          public int getDisplayMode()

      Gets the video display mode.
      Returns:
        video display mode.
      See Also:
        `VideoDisplayMode`

    - #### setDisplayMode

          public void setDisplayMode(int displayMode)

      Sets the video display mode.
      Parameters:
        `displayMode` - video display mode.
      See Also:
        `VideoDisplayMode`

    - #### getAudioSampleRate

          public int getAudioSampleRate()

      Gets the sample rate of audio
      Returns:
        sample rate

    - #### setAudioSampleRate

          public void setAudioSampleRate(int sampleRate)

      Sets the sample rate of audo
      Parameters:
        `sample` - The sample rate of audio

    - #### getAudioChannel

          public int getAudioChannel()

      Gets the channel count of audio
      Returns:
        channel count

    - #### setAudioChannel

          public void setAudioChannel(int channel)

      Sets channel of audo
      Parameters:
        `channel` - The count of channel