com.aliyun.svideosdk.common.struct.common

## Class AliyunVideoParam

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.common.AliyunVideoParam

- All Implemented Interfaces:
    java.io.Serializable

      public class AliyunVideoParam
      extends java.lang.Object
      implements java.io.Serializable

  A class that defines the video parameters when composing video files. Use `AliyunVideoParam.Builder` to create objects of this class.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AliyunVideoParam.AudioChannel`
    `static class` | `AliyunVideoParam.AudioSampleRate`
    `static class` | `AliyunVideoParam.Builder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AliyunVideoParam()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AliyunVideoParam.AudioChannel` | `getAudioChannel()` Gets the channel count of audio
    `AliyunVideoParam.AudioSampleRate` | `getAudioSampleRate()` Gets the sample rate of audio
    `int` | `getBitrate()` Gets the bitrate.
    `int` | `getCrf()` Gets the CRF value.
    `int` | `getFrameRate()` Gets the frame rate.
    `int` | `getGop()` Gets the GOP size.
    `int` | `getOutputHeight()` Gets the video output height.
    `int` | `getOutputWidth()` Gets the video output width.
    `VideoDisplayMode` | `getScaleMode()` Gets the video display mode.
    `float` | `getScaleRate()` Gets the resolution scaling ratio.
    `VideoCodecs` | `getVideoCodec()` Gets the encoding format.
    `VideoQuality` | `getVideoQuality()` Gets the video quality.
    `void` | `setAudioChannel(AliyunVideoParam.AudioChannel channel)` Sets channel of audio
    `void` | `setAudioSampleRate(AliyunVideoParam.AudioSampleRate sampleRate)` Sets the sample rate of audo
    `void` | `setBitrate(int bitrate)` Sets the bitrate.
    `void` | `setCrf(int crf)` Sets the CRF value.
    `void` | `setFrameRate(int frameRate)` Sets the frame rate.
    `void` | `setGop(int gop)` Sets the GOP size.
    `void` | `setOutputHeight(int outputHeight)` Sets the video output height.
    `void` | `setOutputWidth(int outputWidth)` Sets the video output width.
    `void` | `setScaleMode(VideoDisplayMode scaleMode)` Sets the video display mode.
    `void` | `setScaleRate(float rate)` Sets the resolution scaling ratio.
    `void` | `setVideoCodec(VideoCodecs videoCodec)` Sets the encoding format.
    `void` | `setVideoQuality(VideoQuality videoQuality)` Sets the video quality.

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

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

- - ### Constructor Detail

    - #### AliyunVideoParam

          public AliyunVideoParam()

  - ### Method Detail

    - #### getFrameRate

          public int getFrameRate()

      Gets the frame rate.
      Returns:
        The frame rate.

    - #### setFrameRate

          public void setFrameRate(int frameRate)

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

    - #### 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.

    - #### setBitrate

          public void setBitrate(int bitrate)

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

    - #### getBitrate

          public int getBitrate()

      Gets the bitrate.
      Returns:
        The bitrate.

    - #### 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.

    - #### 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 VideoCodecs getVideoCodec()

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

    - #### setVideoCodec

          public void setVideoCodec(VideoCodecs videoCodec)

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

    - #### getVideoQuality

          public VideoQuality getVideoQuality()

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

    - #### setVideoQuality

          public void setVideoQuality(VideoQuality videoQuality)

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

    - #### getScaleMode

          public VideoDisplayMode getScaleMode()

      Gets the video display mode.
      Returns:
        The display mode `VideoDisplayMode`.

    - #### setScaleMode

          public void setScaleMode(VideoDisplayMode scaleMode)

      Sets the video display mode.
      Parameters:
        `scaleMode` - The display mode `VideoDisplayMode`.

    - #### setScaleRate

          public void setScaleRate(float rate)

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

    - #### getScaleRate

          public float getScaleRate()

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

    - #### getAudioSampleRate

          public AliyunVideoParam.AudioSampleRate getAudioSampleRate()

      Gets the sample rate of audio

      Added in v3.34.0

      Returns:
        sample rate

    - #### setAudioSampleRate

          public void setAudioSampleRate(AliyunVideoParam.AudioSampleRate sampleRate)

      Sets the sample rate of audo

      Added in v3.34.0

      Parameters:
        `sample` - The sample rate of audio

    - #### getAudioChannel

          public AliyunVideoParam.AudioChannel getAudioChannel()

      Gets the channel count of audio

      Added in v3.34.0

      Returns:
        channel count

    - #### setAudioChannel

          public void setAudioChannel(AliyunVideoParam.AudioChannel channel)

      Sets channel of audio

      Added in v3.34.0

      Parameters:
        `channel` - The count of channel