public final class H264Video extends Video
Describes all the properties for encoding a video with the H.264 codec.
  • Constructor Details

    • H264Video

      public H264Video()
      Creates an instance of H264Video class.
  • Method Details

    • complexity

      public H264Complexity complexity()
      Get the complexity property: Tells the encoder how to choose its encoding settings. The default value is Balanced.
      Returns:
      the complexity value.
    • withComplexity

      public H264Video withComplexity(H264Complexity complexity)
      Set the complexity property: Tells the encoder how to choose its encoding settings. The default value is Balanced.
      Parameters:
      complexity - the complexity value to set.
      Returns:
      the H264Video object itself.
    • layers

      public List<H264Layer> layers()
      Get the layers property: The collection of output H.264 layers to be produced by the encoder.
      Returns:
      the layers value.
    • withLayers

      public H264Video withLayers(List<H264Layer> layers)
      Set the layers property: The collection of output H.264 layers to be produced by the encoder.
      Parameters:
      layers - the layers value to set.
      Returns:
      the H264Video object itself.
    • rateControlMode

      public H264RateControlMode rateControlMode()
      Get the rateControlMode property: The video rate control mode.
      Returns:
      the rateControlMode value.
    • withRateControlMode

      public H264Video withRateControlMode(H264RateControlMode rateControlMode)
      Set the rateControlMode property: The video rate control mode.
      Parameters:
      rateControlMode - the rateControlMode value to set.
      Returns:
      the H264Video object itself.
    • sceneChangeDetection

      public Boolean sceneChangeDetection()
      Get the sceneChangeDetection property: Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag should be set to true only when the encoder is being configured to produce a single output video.
      Returns:
      the sceneChangeDetection value.
    • withSceneChangeDetection

      public H264Video withSceneChangeDetection(Boolean sceneChangeDetection)
      Set the sceneChangeDetection property: Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag should be set to true only when the encoder is being configured to produce a single output video.
      Parameters:
      sceneChangeDetection - the sceneChangeDetection value to set.
      Returns:
      the H264Video object itself.
    • withKeyFrameInterval

      public H264Video withKeyFrameInterval(Duration keyFrameInterval)
      Set the keyFrameInterval property: The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 format. The default is 2 seconds(PT2S). Note that this setting is ignored if VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
      Overrides:
      withKeyFrameInterval in class Video
      Parameters:
      keyFrameInterval - the keyFrameInterval value to set.
      Returns:
      the Video object itself.
    • withStretchMode

      public H264Video withStretchMode(StretchMode stretchMode)
      Set the stretchMode property: The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize.
      Overrides:
      withStretchMode in class Video
      Parameters:
      stretchMode - the stretchMode value to set.
      Returns:
      the Video object itself.
    • withSyncMode

      public H264Video withSyncMode(VideoSyncMode syncMode)
      Set the syncMode property: The Video Sync Mode.
      Overrides:
      withSyncMode in class Video
      Parameters:
      syncMode - the syncMode value to set.
      Returns:
      the Video object itself.
    • withLabel

      public H264Video withLabel(String label)
      Set the label property: An optional label for the codec. The label can be used to control muxing behavior.
      Overrides:
      withLabel in class Video
      Parameters:
      label - the label value to set.
      Returns:
      the Codec object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class Video
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.