Class H264Layer
java.lang.Object
com.azure.resourcemanager.mediaservices.models.Layer
com.azure.resourcemanager.mediaservices.models.VideoLayer
com.azure.resourcemanager.mediaservices.models.H264Layer
Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264
video codec.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the bufferWindow property: The VBV buffer window length.crf()
Get the crf property: The value of CRF to be used when encoding this layer.Get the entropyMode property: The entropy mode to be used for this layer.level()
Get the level property: We currently support Level up to 6.2.profile()
Get the profile property: We currently support Baseline, Main, High, High422, High444.Get the referenceFrames property: The number of reference frames to be used when encoding this layer.void
validate()
Validates the instance.withAdaptiveBFrame
(Boolean adaptiveBFrame) Set the adaptiveBFrame property: Whether or not adaptive B-frames are to be used when encoding this layer.withBFrames
(Integer bFrames) Set the bFrames property: The number of B-frames to be used when encoding this layer.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.withBufferWindow
(Duration bufferWindow) Set the bufferWindow property: The VBV buffer window length.Set the crf property: The value of CRF to be used when encoding this layer.withEntropyMode
(EntropyMode entropyMode) Set the entropyMode property: The entropy mode to be used for this layer.withFrameRate
(String frameRate) Set the frameRate property: The frame rate (in frames per second) at which to encode this layer.withHeight
(String height) Set the height property: The height of the output video for this layer.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.Set the level property: We currently support Level up to 6.2.withMaxBitrate
(Integer maxBitrate) Set the maxBitrate property: The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill.withProfile
(H264VideoProfile profile) Set the profile property: We currently support Baseline, Main, High, High422, High444.withReferenceFrames
(Integer referenceFrames) Set the referenceFrames property: The number of reference frames to be used when encoding this layer.withSlices
(Integer slices) Set the slices property: The number of slices to be used when encoding this layer.Set the width property: The width of the output video for this layer.Methods inherited from class com.azure.resourcemanager.mediaservices.models.VideoLayer
adaptiveBFrame, bFrames, bitrate, frameRate, maxBitrate, slices
-
Constructor Details
-
H264Layer
public H264Layer()Creates an instance of H264Layer class.
-
-
Method Details
-
profile
Get the profile property: We currently support Baseline, Main, High, High422, High444. Default is Auto.- Returns:
- the profile value.
-
withProfile
Set the profile property: We currently support Baseline, Main, High, High422, High444. Default is Auto.- Parameters:
profile
- the profile value to set.- Returns:
- the H264Layer object itself.
-
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.264 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.
-
withLevel
Set the level property: We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 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 H264Layer object itself.
-
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.
-
withBufferWindow
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 H264Layer object itself.
-
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 23.- Returns:
- the crf value.
-
withCrf
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 23.- Parameters:
crf
- the crf value to set.- Returns:
- the H264Layer object itself.
-
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.
-
withReferenceFrames
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 H264Layer object itself.
-
entropyMode
Get the entropyMode property: The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.- Returns:
- the entropyMode value.
-
withEntropyMode
Set the entropyMode property: The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.- Parameters:
entropyMode
- the entropyMode value to set.- Returns:
- the H264Layer object itself.
-
withBitrate
Set the bitrate property: The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field.- Overrides:
withBitrate
in classVideoLayer
- Parameters:
bitrate
- the bitrate value to set.- Returns:
- the VideoLayer object itself.
-
withMaxBitrate
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:
withMaxBitrate
in classVideoLayer
- Parameters:
maxBitrate
- the maxBitrate value to set.- Returns:
- the VideoLayer object itself.
-
withBFrames
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:
withBFrames
in classVideoLayer
- Parameters:
bFrames
- the bFrames value to set.- Returns:
- the VideoLayer object itself.
-
withFrameRate
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:
withFrameRate
in classVideoLayer
- Parameters:
frameRate
- the frameRate value to set.- Returns:
- the VideoLayer object itself.
-
withSlices
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:
withSlices
in classVideoLayer
- Parameters:
slices
- the slices value to set.- Returns:
- the VideoLayer object itself.
-
withAdaptiveBFrame
Set the adaptiveBFrame property: 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:
withAdaptiveBFrame
in classVideoLayer
- Parameters:
adaptiveBFrame
- the adaptiveBFrame value to set.- Returns:
- the VideoLayer object itself.
-
withWidth
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:
withWidth
in classVideoLayer
- Parameters:
width
- the width value to set.- Returns:
- the Layer object itself.
-
withHeight
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:
withHeight
in classVideoLayer
- Parameters:
height
- the height value to set.- Returns:
- the Layer object itself.
-
withLabel
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:
withLabel
in classVideoLayer
- Parameters:
label
- the label value to set.- Returns:
- the Layer object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classVideoLayer
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-