com.aliyun.svideosdk.multirecorder.config

## Class AliyunVideoRecorderConfig.Builder

- java.lang.Object
- - com.aliyun.svideosdk.multirecorder.config.AliyunVideoRecorderConfig.Builder

- Enclosing class:
    AliyunVideoRecorderConfig

      public static class AliyunVideoRecorderConfig.Builder
      extends java.lang.Object

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AliyunVideoRecorderConfig` | `build()`
    `AliyunVideoRecorderConfig.Builder` | `crf(int crf)` Sets the CRF value.
    `AliyunVideoRecorderConfig.Builder` | `encoderFps(int encoderFps)` Sets the encoding frame rate.
    `AliyunVideoRecorderConfig.Builder` | `fps(int fps)` Sets the capture frame rate.
    `AliyunVideoRecorderConfig.Builder` | `gop(int gop)` Sets the GOP size in frames, that is, the number of frames between two I-frames.
    `AliyunVideoRecorderConfig.Builder` | `outputPath(java.lang.String outputPath)` Sets the output path
    `AliyunVideoRecorderConfig.Builder` | `videoBitrate(int videoBitrate)` Sets the video bitrate.
    `AliyunVideoRecorderConfig.Builder` | `videoCodecs(VideoCodecs videoCodecs)` Sets the encoder type.
    `AliyunVideoRecorderConfig.Builder` | `videoHeight(int videoHeight)` Sets the height of the video, must >0
    `AliyunVideoRecorderConfig.Builder` | `videoQuality(VideoQuality videoQuality)` Sets the video quality.
    `AliyunVideoRecorderConfig.Builder` | `videoWidth(int videoWidth)`

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

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

- - ### Method Detail

    - #### videoWidth

          public AliyunVideoRecorderConfig.Builder videoWidth(int videoWidth)

    - #### videoHeight

          public AliyunVideoRecorderConfig.Builder videoHeight(int videoHeight)

      Sets the height of the video, must >0
      Parameters:
        `videoHeight` - The height of the video
      Throws:
        `throw` - IllegalArgumentException if videoHeight is not greater than 0

    - #### outputPath

          public AliyunVideoRecorderConfig.Builder outputPath(java.lang.String outputPath)

      Sets the output path
      Parameters:
        `outputPath` -
      Throws:
        `throw` - IllegalArgumentException if outputPath is empty

    - #### fps

          public AliyunVideoRecorderConfig.Builder fps(int fps)

      Sets the capture frame rate. The value must be within the range of to . Otherwise, the default value, 30 fps, is used. The actual video frame rate may not be the same as the capture frame rate because different cameras have different processing capabilities.
      Parameters:
        `fps` - The capture frame rate.

    - #### videoCodecs

          public AliyunVideoRecorderConfig.Builder videoCodecs(VideoCodecs videoCodecs)

      Sets the encoder type.
      Parameters:
        `videoCodecs` - The encoder type.
      See Also:
        `VideoCodecs`

    - #### crf

          public AliyunVideoRecorderConfig.Builder crf(int crf)

      Sets the CRF value. Default value:
      Parameters:
        `crf` - The value must be within the range of to ]. If an invalid value is specified, the nearest threshold value is used.

    - #### encoderFps

          public AliyunVideoRecorderConfig.Builder encoderFps(int encoderFps)

      Sets the encoding frame rate. The value must be within the range of to . Otherwise, the default value, 30 fps, is used. The actual video frame rate may not be the same as the encoding frame rate because the actual frame rate is also affected by the capture frame rate and the camera's processing capabilities.
      Parameters:
        `encoderFps` - The encoding frame rate.

    - #### videoQuality

          public AliyunVideoRecorderConfig.Builder videoQuality(VideoQuality videoQuality)

      Sets the video quality. This setting affects the video bitrate.
      Parameters:
        `videoQuality` - The quality of the video.
      See Also:
        `VideoQuality`

    - #### gop

          public AliyunVideoRecorderConfig.Builder gop(int gop)

      Sets the GOP size in frames, that is, the number of frames between two I-frames. In hardware encoders, the GOP is measured in seconds, that is, the time interval between two I-frames. The actual GOP is calculated by dividing the GOP size in frames by the frame rate and rounding the result down to the nearest integer. For example, if the frame rate is set to 25 FPS and this method sets the GOP size to 125 frames. The acutal GOP is 5 seconds, that is, one I-frame per 5 seconds. If the GOP size in frames is smaller than the frame rate value, the actual GOP is 1.
      Parameters:
        `gop` - Valid values: [0, 9,000] When this parameter is set to 0, full I-frames may be possible depending on the device type.

    - #### videoBitrate

          public AliyunVideoRecorderConfig.Builder videoBitrate(int videoBitrate)

      Sets the video bitrate. Valid values: [200, 20,000]. Unit: kbit/s. If the bitrate exceeds the recommended maximum value, the bitrate specified in the input parameter may not take effect in some hardware encoders. For example, for a resolution of 1280 x 720 pixels, a bitrate of 4 Mbit/s should be enough. If the bitrate is set to 10 Mbit/s, the actual bitrate may still be 4 Mbit/s depending on the encoder.
      Parameters:
        `videoBitrate` -

    - #### build

          public AliyunVideoRecorderConfig build()