Class CfnChannel.H264SettingsProperty.Builder
java.lang.Object
software.amazon.awscdk.services.medialive.CfnChannel.H264SettingsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnChannel.H264SettingsProperty>
- Enclosing interface:
CfnChannel.H264SettingsProperty
@Stability(Stable)
public static final class CfnChannel.H264SettingsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnChannel.H264SettingsProperty>
A builder for
CfnChannel.H264SettingsProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadaptiveQuantization
(String adaptiveQuantization) Sets the value ofCfnChannel.H264SettingsProperty.getAdaptiveQuantization()
afdSignaling
(String afdSignaling) Sets the value ofCfnChannel.H264SettingsProperty.getAfdSignaling()
Sets the value ofCfnChannel.H264SettingsProperty.getBitrate()
bufFillPct
(Number bufFillPct) Sets the value ofCfnChannel.H264SettingsProperty.getBufFillPct()
Sets the value ofCfnChannel.H264SettingsProperty.getBufSize()
build()
Builds the configured instance.colorMetadata
(String colorMetadata) Sets the value ofCfnChannel.H264SettingsProperty.getColorMetadata()
colorSpaceSettings
(IResolvable colorSpaceSettings) Sets the value ofCfnChannel.H264SettingsProperty.getColorSpaceSettings()
colorSpaceSettings
(CfnChannel.H264ColorSpaceSettingsProperty colorSpaceSettings) Sets the value ofCfnChannel.H264SettingsProperty.getColorSpaceSettings()
entropyEncoding
(String entropyEncoding) Sets the value ofCfnChannel.H264SettingsProperty.getEntropyEncoding()
filterSettings
(IResolvable filterSettings) Sets the value ofCfnChannel.H264SettingsProperty.getFilterSettings()
filterSettings
(CfnChannel.H264FilterSettingsProperty filterSettings) Sets the value ofCfnChannel.H264SettingsProperty.getFilterSettings()
Sets the value ofCfnChannel.H264SettingsProperty.getFixedAfd()
Sets the value ofCfnChannel.H264SettingsProperty.getFlickerAq()
forceFieldPictures
(String forceFieldPictures) Sets the value ofCfnChannel.H264SettingsProperty.getForceFieldPictures()
framerateControl
(String framerateControl) Sets the value ofCfnChannel.H264SettingsProperty.getFramerateControl()
framerateDenominator
(Number framerateDenominator) Sets the value ofCfnChannel.H264SettingsProperty.getFramerateDenominator()
framerateNumerator
(Number framerateNumerator) Sets the value ofCfnChannel.H264SettingsProperty.getFramerateNumerator()
gopBReference
(String gopBReference) Sets the value ofCfnChannel.H264SettingsProperty.getGopBReference()
gopClosedCadence
(Number gopClosedCadence) Sets the value ofCfnChannel.H264SettingsProperty.getGopClosedCadence()
gopNumBFrames
(Number gopNumBFrames) Sets the value ofCfnChannel.H264SettingsProperty.getGopNumBFrames()
Sets the value ofCfnChannel.H264SettingsProperty.getGopSize()
gopSizeUnits
(String gopSizeUnits) Sets the value ofCfnChannel.H264SettingsProperty.getGopSizeUnits()
Sets the value ofCfnChannel.H264SettingsProperty.getLevel()
lookAheadRateControl
(String lookAheadRateControl) Sets the value ofCfnChannel.H264SettingsProperty.getLookAheadRateControl()
maxBitrate
(Number maxBitrate) Sets the value ofCfnChannel.H264SettingsProperty.getMaxBitrate()
minIInterval
(Number minIInterval) Sets the value ofCfnChannel.H264SettingsProperty.getMinIInterval()
Sets the value ofCfnChannel.H264SettingsProperty.getMinQp()
numRefFrames
(Number numRefFrames) Sets the value ofCfnChannel.H264SettingsProperty.getNumRefFrames()
parControl
(String parControl) Sets the value ofCfnChannel.H264SettingsProperty.getParControl()
parDenominator
(Number parDenominator) Sets the value ofCfnChannel.H264SettingsProperty.getParDenominator()
parNumerator
(Number parNumerator) Sets the value ofCfnChannel.H264SettingsProperty.getParNumerator()
Sets the value ofCfnChannel.H264SettingsProperty.getProfile()
qualityLevel
(String qualityLevel) Sets the value ofCfnChannel.H264SettingsProperty.getQualityLevel()
qvbrQualityLevel
(Number qvbrQualityLevel) Sets the value ofCfnChannel.H264SettingsProperty.getQvbrQualityLevel()
rateControlMode
(String rateControlMode) Sets the value ofCfnChannel.H264SettingsProperty.getRateControlMode()
Sets the value ofCfnChannel.H264SettingsProperty.getScanType()
sceneChangeDetect
(String sceneChangeDetect) Sets the value ofCfnChannel.H264SettingsProperty.getSceneChangeDetect()
Sets the value ofCfnChannel.H264SettingsProperty.getSlices()
Sets the value ofCfnChannel.H264SettingsProperty.getSoftness()
Sets the value ofCfnChannel.H264SettingsProperty.getSpatialAq()
subgopLength
(String subgopLength) Sets the value ofCfnChannel.H264SettingsProperty.getSubgopLength()
Sets the value ofCfnChannel.H264SettingsProperty.getSyntax()
temporalAq
(String temporalAq) Sets the value ofCfnChannel.H264SettingsProperty.getTemporalAq()
timecodeBurninSettings
(IResolvable timecodeBurninSettings) Sets the value ofCfnChannel.H264SettingsProperty.getTimecodeBurninSettings()
timecodeBurninSettings
(CfnChannel.TimecodeBurninSettingsProperty timecodeBurninSettings) Sets the value ofCfnChannel.H264SettingsProperty.getTimecodeBurninSettings()
timecodeInsertion
(String timecodeInsertion) Sets the value ofCfnChannel.H264SettingsProperty.getTimecodeInsertion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
adaptiveQuantization
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder adaptiveQuantization(String adaptiveQuantization) Sets the value ofCfnChannel.H264SettingsProperty.getAdaptiveQuantization()
- Parameters:
adaptiveQuantization
- The adaptive quantization. This allows intra-frame quantizers to vary to improve visual quality.- Returns:
this
-
afdSignaling
Sets the value ofCfnChannel.H264SettingsProperty.getAfdSignaling()
- Parameters:
afdSignaling
- Indicates that AFD values will be written into the output stream. If afdSignaling is auto, the system tries to preserve the input AFD value (in cases where multiple AFD values are valid). If set to fixed, the AFD value is the value configured in the fixedAfd parameter.- Returns:
this
-
bitrate
Sets the value ofCfnChannel.H264SettingsProperty.getBitrate()
- Parameters:
bitrate
- The average bitrate in bits/second. This is required when the rate control mode is VBR or CBR. It isn't used for QVBR. In a Microsoft Smooth output group, each output must have a unique value when its bitrate is rounded down to the nearest multiple of 1000.- Returns:
this
-
bufFillPct
Sets the value ofCfnChannel.H264SettingsProperty.getBufFillPct()
- Parameters:
bufFillPct
- The percentage of the buffer that should initially be filled (HRD buffer model).- Returns:
this
-
bufSize
Sets the value ofCfnChannel.H264SettingsProperty.getBufSize()
- Parameters:
bufSize
- The size of the buffer (HRD buffer model) in bits/second.- Returns:
this
-
colorMetadata
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder colorMetadata(String colorMetadata) Sets the value ofCfnChannel.H264SettingsProperty.getColorMetadata()
- Parameters:
colorMetadata
- Includes color space metadata in the output.- Returns:
this
-
colorSpaceSettings
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder colorSpaceSettings(IResolvable colorSpaceSettings) Sets the value ofCfnChannel.H264SettingsProperty.getColorSpaceSettings()
- Parameters:
colorSpaceSettings
- Settings to configure the color space handling for the video.- Returns:
this
-
colorSpaceSettings
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder colorSpaceSettings(CfnChannel.H264ColorSpaceSettingsProperty colorSpaceSettings) Sets the value ofCfnChannel.H264SettingsProperty.getColorSpaceSettings()
- Parameters:
colorSpaceSettings
- Settings to configure the color space handling for the video.- Returns:
this
-
entropyEncoding
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder entropyEncoding(String entropyEncoding) Sets the value ofCfnChannel.H264SettingsProperty.getEntropyEncoding()
- Parameters:
entropyEncoding
- The entropy encoding mode. Use cabac (must be in Main or High profile) or cavlc.- Returns:
this
-
filterSettings
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder filterSettings(IResolvable filterSettings) Sets the value ofCfnChannel.H264SettingsProperty.getFilterSettings()
- Parameters:
filterSettings
- Optional filters that you can apply to an encode.- Returns:
this
-
filterSettings
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder filterSettings(CfnChannel.H264FilterSettingsProperty filterSettings) Sets the value ofCfnChannel.H264SettingsProperty.getFilterSettings()
- Parameters:
filterSettings
- Optional filters that you can apply to an encode.- Returns:
this
-
fixedAfd
Sets the value ofCfnChannel.H264SettingsProperty.getFixedAfd()
- Parameters:
fixedAfd
- A four-bit AFD value to write on all frames of video in the output stream. Valid only when afdSignaling is set to Fixed.- Returns:
this
-
flickerAq
Sets the value ofCfnChannel.H264SettingsProperty.getFlickerAq()
- Parameters:
flickerAq
- If set to enabled, adjusts the quantization within each frame to reduce flicker or pop on I-frames.- Returns:
this
-
forceFieldPictures
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder forceFieldPictures(String forceFieldPictures) Sets the value ofCfnChannel.H264SettingsProperty.getForceFieldPictures()
- Parameters:
forceFieldPictures
- This setting applies only when scan type is "interlaced." It controls whether coding is performed on a field basis or on a frame basis. (When the video is progressive, the coding is always performed on a frame basis.) enabled: Force MediaLive to code on a field basis, so that odd and even sets of fields are coded separately. disabled: Code the two sets of fields separately (on a field basis) or together (on a frame basis using PAFF), depending on what is most appropriate for the content.- Returns:
this
-
framerateControl
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder framerateControl(String framerateControl) Sets the value ofCfnChannel.H264SettingsProperty.getFramerateControl()
- Parameters:
framerateControl
- Indicates how the output video frame rate is specified. If you select "specified," the output video frame rate is determined by framerateNumerator and framerateDenominator. If you select "initializeFromSource," the output video frame rate is set equal to the input video frame rate of the first input.- Returns:
this
-
framerateDenominator
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder framerateDenominator(Number framerateDenominator) Sets the value ofCfnChannel.H264SettingsProperty.getFramerateDenominator()
- Parameters:
framerateDenominator
- The frame rate denominator.- Returns:
this
-
framerateNumerator
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder framerateNumerator(Number framerateNumerator) Sets the value ofCfnChannel.H264SettingsProperty.getFramerateNumerator()
- Parameters:
framerateNumerator
- The frame rate numerator. The frame rate is a fraction, for example, 24000/1001 = 23.976 fps.- Returns:
this
-
gopBReference
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder gopBReference(String gopBReference) Sets the value ofCfnChannel.H264SettingsProperty.getGopBReference()
- Parameters:
gopBReference
- If enabled, uses reference B frames for GOP structures that have B frames > 1.- Returns:
this
-
gopClosedCadence
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder gopClosedCadence(Number gopClosedCadence) Sets the value ofCfnChannel.H264SettingsProperty.getGopClosedCadence()
- Parameters:
gopClosedCadence
- The frequency of closed GOPs. In streaming applications, we recommend that you set this to 1 so that a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.- Returns:
this
-
gopNumBFrames
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder gopNumBFrames(Number gopNumBFrames) Sets the value ofCfnChannel.H264SettingsProperty.getGopNumBFrames()
- Parameters:
gopNumBFrames
- The number of B-frames between reference frames.- Returns:
this
-
gopSize
Sets the value ofCfnChannel.H264SettingsProperty.getGopSize()
- Parameters:
gopSize
- The GOP size (keyframe interval) in units of either frames or seconds per gopSizeUnits. The value must be greater than zero.- Returns:
this
-
gopSizeUnits
Sets the value ofCfnChannel.H264SettingsProperty.getGopSizeUnits()
- Parameters:
gopSizeUnits
- Indicates if the gopSize is specified in frames or seconds. If seconds, the system converts the gopSize into a frame count at runtime.- Returns:
this
-
level
Sets the value ofCfnChannel.H264SettingsProperty.getLevel()
- Parameters:
level
- The H.264 level.- Returns:
this
-
lookAheadRateControl
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder lookAheadRateControl(String lookAheadRateControl) Sets the value ofCfnChannel.H264SettingsProperty.getLookAheadRateControl()
- Parameters:
lookAheadRateControl
- The amount of lookahead. A value of low can decrease latency and memory usage, while high can produce better quality for certain content.- Returns:
this
-
maxBitrate
Sets the value ofCfnChannel.H264SettingsProperty.getMaxBitrate()
- Parameters:
maxBitrate
- For QVBR: See the tooltip for Quality level. For VBR: Set the maximum bitrate in order to accommodate expected spikes in the complexity of the video.- Returns:
this
-
minIInterval
Sets the value ofCfnChannel.H264SettingsProperty.getMinIInterval()
- Parameters:
minIInterval
- Meaningful only if sceneChangeDetect is set to enabled. This setting enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting the I-interval. The normal cadence resumes for the next GOP. Note that the maximum GOP stretch = GOP size + Min-I-interval - 1.- Returns:
this
-
minQp
Sets the value ofCfnChannel.H264SettingsProperty.getMinQp()
- Parameters:
minQp
- the value to be set.- Returns:
this
-
numRefFrames
Sets the value ofCfnChannel.H264SettingsProperty.getNumRefFrames()
- Parameters:
numRefFrames
- The number of reference frames to use. The encoder might use more than requested if you use B-frames or interlaced encoding.- Returns:
this
-
parControl
Sets the value ofCfnChannel.H264SettingsProperty.getParControl()
- Parameters:
parControl
- Indicates how the output pixel aspect ratio is specified. If "specified" is selected, the output video pixel aspect ratio is determined by parNumerator and parDenominator. If "initializeFromSource" is selected, the output pixels aspect ratio will be set equal to the input video pixel aspect ratio of the first input.- Returns:
this
-
parDenominator
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder parDenominator(Number parDenominator) Sets the value ofCfnChannel.H264SettingsProperty.getParDenominator()
- Parameters:
parDenominator
- The Pixel Aspect Ratio denominator.- Returns:
this
-
parNumerator
Sets the value ofCfnChannel.H264SettingsProperty.getParNumerator()
- Parameters:
parNumerator
- The Pixel Aspect Ratio numerator.- Returns:
this
-
profile
Sets the value ofCfnChannel.H264SettingsProperty.getProfile()
- Parameters:
profile
- An H.264 profile.- Returns:
this
-
qualityLevel
Sets the value ofCfnChannel.H264SettingsProperty.getQualityLevel()
- Parameters:
qualityLevel
- Leave as STANDARD_QUALITY or choose a different value (which might result in additional costs to run the channel).- ENHANCED_QUALITY: Produces a slightly better video quality without an increase in the bitrate. Has an effect only when the Rate control mode is QVBR or CBR. If this channel is in a MediaLive multiplex, the value must be ENHANCED_QUALITY.
- STANDARD_QUALITY: Valid for any Rate control mode.
- Returns:
this
-
qvbrQualityLevel
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder qvbrQualityLevel(Number qvbrQualityLevel) Sets the value ofCfnChannel.H264SettingsProperty.getQvbrQualityLevel()
- Parameters:
qvbrQualityLevel
- Controls the target quality for the video encode. This applies only when the rate control mode is QVBR. Set values for the QVBR quality level field and Max bitrate field that suit your most important viewing devices. Recommended values are: - Primary screen: Quality level: 8 to 10. Max bitrate: 4M - PC or tablet: Quality level: 7. Max bitrate: 1.5M to 3M - Smartphone: Quality level: 6. Max bitrate: 1M to 1.5M.- Returns:
this
-
rateControlMode
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder rateControlMode(String rateControlMode) Sets the value ofCfnChannel.H264SettingsProperty.getRateControlMode()
- Parameters:
rateControlMode
- The rate control mode. QVBR: The quality will match the specified quality level except when it is constrained by the maximum bitrate. We recommend this if you or your viewers pay for bandwidth. VBR: The quality and bitrate vary, depending on the video complexity. We recommend this instead of QVBR if you want to maintain a specific average bitrate over the duration of the channel. CBR: The quality varies, depending on the video complexity. We recommend this only if you distribute your assets to devices that can't handle variable bitrates.- Returns:
this
-
scanType
Sets the value ofCfnChannel.H264SettingsProperty.getScanType()
- Parameters:
scanType
- Sets the scan type of the output to progressive or top-field-first interlaced.- Returns:
this
-
sceneChangeDetect
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder sceneChangeDetect(String sceneChangeDetect) Sets the value ofCfnChannel.H264SettingsProperty.getSceneChangeDetect()
- Parameters:
sceneChangeDetect
- The scene change detection. On: inserts I-frames when the scene change is detected. Off: does not force an I-frame when the scene change is detected.- Returns:
this
-
slices
Sets the value ofCfnChannel.H264SettingsProperty.getSlices()
- Parameters:
slices
- The number of slices per picture. The number must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures. This field is optional. If you don't specify a value, MediaLive chooses the number of slices based on the encode resolution.- Returns:
this
-
softness
Sets the value ofCfnChannel.H264SettingsProperty.getSoftness()
- Parameters:
softness
- Softness. Selects a quantizer matrix. Larger values reduce high-frequency content in the encoded image.- Returns:
this
-
spatialAq
Sets the value ofCfnChannel.H264SettingsProperty.getSpatialAq()
- Parameters:
spatialAq
- If set to enabled, adjusts quantization within each frame based on the spatial variation of content complexity.- Returns:
this
-
subgopLength
Sets the value ofCfnChannel.H264SettingsProperty.getSubgopLength()
- Parameters:
subgopLength
- If set to fixed, uses gopNumBFrames B-frames per sub-GOP. If set to dynamic, optimizes the number of B-frames used for each sub-GOP to improve visual quality.- Returns:
this
-
syntax
Sets the value ofCfnChannel.H264SettingsProperty.getSyntax()
- Parameters:
syntax
- Produces a bitstream that is compliant with SMPTE RP-2027.- Returns:
this
-
temporalAq
Sets the value ofCfnChannel.H264SettingsProperty.getTemporalAq()
- Parameters:
temporalAq
- If set to enabled, adjusts quantization within each frame based on the temporal variation of content complexity.- Returns:
this
-
timecodeBurninSettings
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder timecodeBurninSettings(IResolvable timecodeBurninSettings) Sets the value ofCfnChannel.H264SettingsProperty.getTimecodeBurninSettings()
- Parameters:
timecodeBurninSettings
- the value to be set.- Returns:
this
-
timecodeBurninSettings
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder timecodeBurninSettings(CfnChannel.TimecodeBurninSettingsProperty timecodeBurninSettings) Sets the value ofCfnChannel.H264SettingsProperty.getTimecodeBurninSettings()
- Parameters:
timecodeBurninSettings
- the value to be set.- Returns:
this
-
timecodeInsertion
@Stability(Stable) public CfnChannel.H264SettingsProperty.Builder timecodeInsertion(String timecodeInsertion) Sets the value ofCfnChannel.H264SettingsProperty.getTimecodeInsertion()
- Parameters:
timecodeInsertion
- Determines how timecodes should be inserted into the video elementary stream. disabled: don't include timecodes. picTimingSei: pass through picture timing SEI messages from the source specified in Timecode Config.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnChannel.H264SettingsProperty>
- Returns:
- a new instance of
CfnChannel.H264SettingsProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-