H265Layer Class

public final class H265Layer
extends H265VideoLayer

Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video codec.

Constructor Summary

Constructor Description
H265Layer()

Creates an instance of H265Layer class.

Method Summary

Modifier and Type Method and Description
Duration bufferWindow()

Get the bufferWindow property: The VBV buffer window length.

Float crf()

Get the crf property: The value of CRF to be used when encoding this layer.

String level()

Get the level property: We currently support Level up to 6.2.

H265VideoProfile profile()

Get the profile property: We currently support Main.

Integer referenceFrames()

Get the referenceFrames property: The number of reference frames to be used when encoding this layer.

void validate()

Validates the instance.

H265Layer withAdaptiveBFrame(Boolean adaptiveBFrame)

Set the adaptiveBFrame property: Specifies whether or not adaptive B-frames are to be used when encoding this layer.

H265Layer withBFrames(Integer bFrames)

Set the bFrames property: The number of B-frames to be used when encoding this layer.

H265Layer withBitrate(int bitrate)

Set the bitrate property: The average bitrate in bits per second at which to encode the input video when generating this layer.

H265Layer withBufferWindow(Duration bufferWindow)

Set the bufferWindow property: The VBV buffer window length.

H265Layer withCrf(Float crf)

Set the crf property: The value of CRF to be used when encoding this layer.

H265Layer withFrameRate(String frameRate)

Set the frameRate property: The frame rate (in frames per second) at which to encode this layer.

H265Layer withHeight(String height)

Set the height property: The height of the output video for this layer.

H265Layer withLabel(String label)

Set the label property: The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file.

H265Layer withLevel(String level)

Set the level property: We currently support Level up to 6.2.

H265Layer withMaxBitrate(Integer maxBitrate)

Set the maxBitrate property: The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill.

H265Layer withProfile(H265VideoProfile profile)

Set the profile property: We currently support Main.

H265Layer withReferenceFrames(Integer referenceFrames)

Set the referenceFrames property: The number of reference frames to be used when encoding this layer.

H265Layer withSlices(Integer slices)

Set the slices property: The number of slices to be used when encoding this layer.

H265Layer withWidth(String width)

Set the width property: The width of the output video for this layer.

Methods inherited from H265VideoLayer

Methods inherited from Layer

Methods inherited from java.lang.Object

Constructor Details

H265Layer

public H265Layer()

Creates an instance of H265Layer class.

Method Details

bufferWindow

public Duration bufferWindow()

Get the bufferWindow property: The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S).

Returns:

the bufferWindow value.

crf

public Float crf()

Get the crf property: The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default value is 28.

Returns:

the crf value.

level

public String level()

Get the level property: We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer.

Returns:

the level value.

profile

public H265VideoProfile profile()

Get the profile property: We currently support Main. Default is Auto.

Returns:

the profile value.

referenceFrames

public Integer referenceFrames()

Get the referenceFrames property: The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting.

Returns:

the referenceFrames value.

validate

public void validate()

Validates the instance.

Overrides:

H265Layer.validate()

withAdaptiveBFrame

public H265Layer withAdaptiveBFrame(Boolean adaptiveBFrame)

Set the adaptiveBFrame property: Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use.

Overrides:

H265Layer.withAdaptiveBFrame(Boolean adaptiveBFrame)

Parameters:

adaptiveBFrame

withBFrames

public H265Layer withBFrames(Integer bFrames)

Set the bFrames property: The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level.

Overrides:

H265Layer.withBFrames(Integer bFrames)

Parameters:

bFrames

withBitrate

public H265Layer withBitrate(int bitrate)

Set the bitrate property: The average bitrate in bits per second at which to encode the input video when generating this layer. For example: a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a required field.

Overrides:

H265Layer.withBitrate(int bitrate)

Parameters:

bitrate

withBufferWindow

public H265Layer withBufferWindow(Duration bufferWindow)

Set the bufferWindow property: The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S).

Parameters:

bufferWindow - the bufferWindow value to set.

Returns:

the H265Layer object itself.

withCrf

public H265Layer withCrf(Float crf)

Set the crf property: The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default value is 28.

Parameters:

crf - the crf value to set.

Returns:

the H265Layer object itself.

withFrameRate

public H265Layer withFrameRate(String frameRate)

Set the frameRate property: The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video.

Overrides:

H265Layer.withFrameRate(String frameRate)

Parameters:

frameRate

withHeight

public H265Layer withHeight(String height)

Set the height property: The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input.

Overrides:

H265Layer.withHeight(String height)

Parameters:

height

withLabel

public H265Layer withLabel(String label)

Set the label property: The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file.

Overrides:

H265Layer.withLabel(String label)

Parameters:

label

withLevel

public H265Layer withLevel(String level)

Set the level property: We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer.

Parameters:

level - the level value to set.

Returns:

the H265Layer object itself.

withMaxBitrate

public H265Layer withMaxBitrate(Integer maxBitrate)

Set the maxBitrate property: The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate.

Overrides:

H265Layer.withMaxBitrate(Integer maxBitrate)

Parameters:

maxBitrate

withProfile

public H265Layer withProfile(H265VideoProfile profile)

Set the profile property: We currently support Main. Default is Auto.

Parameters:

profile - the profile value to set.

Returns:

the H265Layer object itself.

withReferenceFrames

public H265Layer withReferenceFrames(Integer referenceFrames)

Set the referenceFrames property: The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting.

Parameters:

referenceFrames - the referenceFrames value to set.

Returns:

the H265Layer object itself.

withSlices

public H265Layer withSlices(Integer slices)

Set the slices property: The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame.

Overrides:

H265Layer.withSlices(Integer slices)

Parameters:

slices

withWidth

public H265Layer withWidth(String width)

Set the width property: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input.

Overrides:

H265Layer.withWidth(String width)

Parameters:

width

Applies to