Skip to content

H265Settings

Source code in docs_src/capo_medialive/types/h265_settings.py
class H265Settings(TypedDict, closed=True):
    adaptive_quantization: NotRequired[
        "capo_medialive.types.h265_adaptive_quantization.H265AdaptiveQuantization"
    ]
    """Enables or disables adaptive quantization (AQ), which is a technique MediaLive can apply to video on a frame-by-frame basis to produce more compression without losing quality. There are three types of adaptive quantization: spatial, temporal, and flicker. Flicker is the only type that you can customize. We recommend that you set the field to Auto. For more information about all the options, see the topic about video adaptive quantization in the MediaLive user guide."""
    afd_signaling: NotRequired["capo_medialive.types.afd_signaling.AfdSignaling"]
    """Indicates that AFD values will be written into the output stream. If afdSignaling is "auto", the system will try to preserve the input AFD value (in cases where multiple AFD values are valid). If set to "fixed", the AFD value will be the value configured in the fixedAfd parameter."""
    alternative_transfer_function: NotRequired[
        "capo_medialive.types.h265_alternative_transfer_function.H265AlternativeTransferFunction"
    ]
    """Whether or not EML should insert an Alternative Transfer Function SEI message to support backwards compatibility with non-HDR decoders and displays."""
    bitrate: NotRequired[
        "capo_medialive.types.__integer_min100000_max40000000.__integerMin100000Max40000000"
    ]
    """Average bitrate in bits/second. Required when the rate control mode is VBR or CBR. Not used for QVBR. In an MS Smooth output group, each output must have a unique value when its bitrate is rounded down to the nearest multiple of 1000."""
    buf_size: NotRequired[
        "capo_medialive.types.__integer_min100000_max80000000.__integerMin100000Max80000000"
    ]
    """Size of buffer (HRD buffer model) in bits."""
    color_metadata: NotRequired[
        "capo_medialive.types.h265_color_metadata.H265ColorMetadata"
    ]
    """Includes colorspace metadata in the output."""
    color_space_settings: NotRequired[
        "capo_medialive.types.h265_color_space_settings.H265ColorSpaceSettings"
    ]
    """Specify the type of color space to apply or choose to pass through. The default is to pass through the color space that is in the source."""
    filter_settings: NotRequired[
        "capo_medialive.types.h265_filter_settings.H265FilterSettings"
    ]
    """Optional. Both filters reduce bandwidth by removing imperceptible details. You can enable one of the filters. We recommend that you try both filters and observe the results to decide which one to use. The Temporal Filter reduces bandwidth by removing imperceptible details in the content. It combines perceptual filtering and motion compensated temporal filtering (MCTF). It operates independently of the compression level. The Bandwidth Reduction filter is a perceptual filter located within the encoding loop. It adapts to the current compression level to filter imperceptible signals. This filter works only when the resolution is 1080p or lower."""
    fixed_afd: NotRequired["capo_medialive.types.fixed_afd.FixedAfd"]
    """Four bit AFD value to write on all frames of video in the output stream. Only valid when afdSignaling is set to 'Fixed'."""
    flicker_aq: NotRequired["capo_medialive.types.h265_flicker_aq.H265FlickerAq"]
    """Flicker AQ makes adjustments within each frame to reduce flicker or 'pop' on I-frames. The value to enter in this field depends on the value in the Adaptive quantization field. For more information, see the topic about video adaptive quantization in the MediaLive user guide."""
    framerate_denominator: NotRequired[
        "capo_medialive.types.__integer_min1_max3003.__integerMin1Max3003"
    ]
    """Framerate denominator."""
    framerate_numerator: NotRequired[
        "capo_medialive.types.__integer_min1.__integerMin1"
    ]
    """Framerate numerator - framerate is a fraction, e.g. 24000 / 1001 = 23.976 fps."""
    gop_closed_cadence: NotRequired["capo_medialive.types.__integer_min0.__integerMin0"]
    """Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting."""
    gop_size: NotRequired["capo_medialive.types.__double.__double"]
    """GOP size (keyframe interval) in units of either frames or seconds per gopSizeUnits. If gopSizeUnits is frames, gopSize must be an integer and must be greater than or equal to 1. If gopSizeUnits is seconds, gopSize must be greater than 0, but need not be an integer."""
    gop_size_units: NotRequired[
        "capo_medialive.types.h265_gop_size_units.H265GopSizeUnits"
    ]
    """Indicates if the gopSize is specified in frames or seconds. If seconds the system will convert the gopSize into a frame count at run time."""
    level: NotRequired["capo_medialive.types.h265_level.H265Level"]
    """H.265 Level."""
    look_ahead_rate_control: NotRequired[
        "capo_medialive.types.h265_look_ahead_rate_control.H265LookAheadRateControl"
    ]
    """Amount of lookahead. A value of low can decrease latency and memory usage, while high can produce better quality for certain content."""
    max_bitrate: NotRequired[
        "capo_medialive.types.__integer_min100000_max40000000.__integerMin100000Max40000000"
    ]
    """For QVBR: See the tooltip for Quality level"""
    min_i_interval: NotRequired[
        "capo_medialive.types.__integer_min0_max30.__integerMin0Max30"
    ]
    """Only meaningful if sceneChangeDetect is set to enabled. Defaults to 5 if multiplex rate control is used. 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 and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1"""
    par_denominator: NotRequired["capo_medialive.types.__integer_min1.__integerMin1"]
    """Pixel Aspect Ratio denominator."""
    par_numerator: NotRequired["capo_medialive.types.__integer_min1.__integerMin1"]
    """Pixel Aspect Ratio numerator."""
    profile: NotRequired["capo_medialive.types.h265_profile.H265Profile"]
    """H.265 Profile."""
    qvbr_quality_level: NotRequired[
        "capo_medialive.types.__integer_min1_max10.__integerMin1Max10"
    ]
    """Controls the target quality for the video encode. 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"""
    rate_control_mode: NotRequired[
        "capo_medialive.types.h265_rate_control_mode.H265RateControlMode"
    ]
    """Rate control mode. QVBR: Quality will match the specified quality level except when it is constrained by the maximum bitrate. Recommended if you or your viewers pay for bandwidth. CBR: Quality varies, depending on the video complexity. Recommended only if you distribute your assets to devices that cannot handle variable bitrates. Multiplex: This rate control mode is only supported (and is required) when the video is being delivered to a MediaLive Multiplex in which case the rate control configuration is controlled by the properties within the Multiplex Program."""
    scan_type: NotRequired["capo_medialive.types.h265_scan_type.H265ScanType"]
    """Sets the scan type of the output to progressive or top-field-first interlaced."""
    scene_change_detect: NotRequired[
        "capo_medialive.types.h265_scene_change_detect.H265SceneChangeDetect"
    ]
    """Scene change detection."""
    slices: NotRequired["capo_medialive.types.__integer_min1_max16.__integerMin1Max16"]
    """Number of slices per picture. 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; when no value is specified the encoder will choose the number of slices based on encode resolution."""
    tier: NotRequired["capo_medialive.types.h265_tier.H265Tier"]
    """H.265 Tier."""
    timecode_insertion: NotRequired[
        "capo_medialive.types.h265_timecode_insertion_behavior.H265TimecodeInsertionBehavior"
    ]
    """Determines how timecodes should be inserted into the video elementary stream. - 'disabled': Do not include timecodes - 'picTimingSei': Pass through picture timing SEI messages from the source specified in Timecode Config"""
    timecode_burnin_settings: NotRequired[
        "capo_medialive.types.timecode_burnin_settings.TimecodeBurninSettings"
    ]
    """Timecode burn-in settings"""
    mv_over_picture_boundaries: NotRequired[
        "capo_medialive.types.h265_mv_over_picture_boundaries.H265MvOverPictureBoundaries"
    ]
    """If you are setting up the picture as a tile, you must set this to "disabled". In all other configurations, you typically enter "enabled"."""
    mv_temporal_predictor: NotRequired[
        "capo_medialive.types.h265_mv_temporal_predictor.H265MvTemporalPredictor"
    ]
    """If you are setting up the picture as a tile, you must set this to "disabled". In other configurations, you typically enter "enabled"."""
    tile_height: NotRequired[
        "capo_medialive.types.__integer_min64_max2160.__integerMin64Max2160"
    ]
    """Set this field to set up the picture as a tile. You must also set tileWidth. The tile height must result in 22 or fewer rows in the frame. The tile width must result in 20 or fewer columns in the frame. And finally, the product of the column count and row count must be 64 of less. If the tile width and height are specified, MediaLive will override the video codec slices field with a value that MediaLive calculates"""
    tile_padding: NotRequired["capo_medialive.types.h265_tile_padding.H265TilePadding"]
    """Set to "padded" to force MediaLive to add padding to the frame, to obtain a frame that is a whole multiple of the tile size. If you are setting up the picture as a tile, you must enter "padded". In all other configurations, you typically enter "none"."""
    tile_width: NotRequired[
        "capo_medialive.types.__integer_min256_max3840.__integerMin256Max3840"
    ]
    """Set this field to set up the picture as a tile. See tileHeight for more information."""
    treeblock_size: NotRequired[
        "capo_medialive.types.h265_treeblock_size.H265TreeblockSize"
    ]
    """Select the tree block size used for encoding. If you enter "auto", the encoder will pick the best size. If you are setting up the picture as a tile, you must set this to 32x32. In all other configurations, you typically enter "auto"."""
    min_qp: NotRequired["capo_medialive.types.__integer_min1_max51.__integerMin1Max51"]
    """Sets the minimum QP. If you aren't familiar with quantization adjustment, leave the field empty. MediaLive will apply an appropriate value."""
    deblocking: NotRequired["capo_medialive.types.h265_deblocking.H265Deblocking"]
    """Enable or disable the deblocking filter for this codec. The filter reduces blocking artifacts at block boundaries, which improves overall video quality. If the filter is disabled, visible block edges might appear in the output, especially at lower bitrates."""
    gop_b_reference: NotRequired[
        "capo_medialive.types.h265_gop_b_reference.H265GopBReference"
    ]
    """Allows the encoder to use a B-Frame as a reference frame as well. ENABLED: B-frames will also serve as reference frames. DISABLED: B-frames won't be reference frames. Must be DISABLED if resolution is greater than 1080p or when using tiled hevc encoding."""
    gop_num_b_frames: NotRequired[
        "capo_medialive.types.__integer_min0_max3.__integerMin0Max3"
    ]
    """Sets the number of B-frames between reference frames. Set to 2 if resolution is greater than 1080p or when using tiled hevc encoding."""
    min_bitrate: NotRequired[
        "capo_medialive.types.__integer_min0_max40000000.__integerMin0Max40000000"
    ]
    """Used for QVBR rate control mode only. Optional. Enter a minimum bitrate if you want to keep the output bitrate about a threshold, in order to prevent the downstream system from de-allocating network bandwidth for this output."""
    subgop_length: NotRequired[
        "capo_medialive.types.h265_sub_gop_length.H265SubGopLength"
    ]
    """Sets the number of B-frames in each sub-GOP. FIXED: Use the value in Num B-frames. DYNAMIC: Optimizes the number of B-frames in each sub-GOP to improve visual quality. Must be FIXED if resolution is greater than 1080p or when using tiled hevc encoding."""

adaptive_quantization instance-attribute

adaptive_quantization: NotRequired[H265AdaptiveQuantization]

Enables or disables adaptive quantization (AQ), which is a technique MediaLive can apply to video on a frame-by-frame basis to produce more compression without losing quality. There are three types of adaptive quantization: spatial, temporal, and flicker. Flicker is the only type that you can customize. We recommend that you set the field to Auto. For more information about all the options, see the topic about video adaptive quantization in the MediaLive user guide.

afd_signaling instance-attribute

afd_signaling: NotRequired[AfdSignaling]

Indicates that AFD values will be written into the output stream. If afdSignaling is "auto", the system will try to preserve the input AFD value (in cases where multiple AFD values are valid). If set to "fixed", the AFD value will be the value configured in the fixedAfd parameter.

alternative_transfer_function instance-attribute

alternative_transfer_function: NotRequired[H265AlternativeTransferFunction]

Whether or not EML should insert an Alternative Transfer Function SEI message to support backwards compatibility with non-HDR decoders and displays.

bitrate instance-attribute

bitrate: NotRequired[__integerMin100000Max40000000]

Average bitrate in bits/second. Required when the rate control mode is VBR or CBR. Not used for QVBR. In an MS Smooth output group, each output must have a unique value when its bitrate is rounded down to the nearest multiple of 1000.

buf_size instance-attribute

buf_size: NotRequired[__integerMin100000Max80000000]

Size of buffer (HRD buffer model) in bits.

color_metadata instance-attribute

color_metadata: NotRequired[H265ColorMetadata]

Includes colorspace metadata in the output.

color_space_settings instance-attribute

color_space_settings: NotRequired[H265ColorSpaceSettings]

Specify the type of color space to apply or choose to pass through. The default is to pass through the color space that is in the source.

deblocking instance-attribute

deblocking: NotRequired[H265Deblocking]

Enable or disable the deblocking filter for this codec. The filter reduces blocking artifacts at block boundaries, which improves overall video quality. If the filter is disabled, visible block edges might appear in the output, especially at lower bitrates.

filter_settings instance-attribute

filter_settings: NotRequired[H265FilterSettings]

Optional. Both filters reduce bandwidth by removing imperceptible details. You can enable one of the filters. We recommend that you try both filters and observe the results to decide which one to use. The Temporal Filter reduces bandwidth by removing imperceptible details in the content. It combines perceptual filtering and motion compensated temporal filtering (MCTF). It operates independently of the compression level. The Bandwidth Reduction filter is a perceptual filter located within the encoding loop. It adapts to the current compression level to filter imperceptible signals. This filter works only when the resolution is 1080p or lower.

fixed_afd instance-attribute

fixed_afd: NotRequired[FixedAfd]

Four bit AFD value to write on all frames of video in the output stream. Only valid when afdSignaling is set to 'Fixed'.

flicker_aq instance-attribute

flicker_aq: NotRequired[H265FlickerAq]

Flicker AQ makes adjustments within each frame to reduce flicker or 'pop' on I-frames. The value to enter in this field depends on the value in the Adaptive quantization field. For more information, see the topic about video adaptive quantization in the MediaLive user guide.

framerate_denominator instance-attribute

framerate_denominator: NotRequired[__integerMin1Max3003]

Framerate denominator.

framerate_numerator instance-attribute

framerate_numerator: NotRequired[__integerMin1]

Framerate numerator - framerate is a fraction, e.g. 24000 / 1001 = 23.976 fps.

gop_b_reference instance-attribute

gop_b_reference: NotRequired[H265GopBReference]

Allows the encoder to use a B-Frame as a reference frame as well. ENABLED: B-frames will also serve as reference frames. DISABLED: B-frames won't be reference frames. Must be DISABLED if resolution is greater than 1080p or when using tiled hevc encoding.

gop_closed_cadence instance-attribute

gop_closed_cadence: NotRequired[__integerMin0]

Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.

gop_num_b_frames instance-attribute

gop_num_b_frames: NotRequired[__integerMin0Max3]

Sets the number of B-frames between reference frames. Set to 2 if resolution is greater than 1080p or when using tiled hevc encoding.

gop_size instance-attribute

gop_size: NotRequired[__double]

GOP size (keyframe interval) in units of either frames or seconds per gopSizeUnits. If gopSizeUnits is frames, gopSize must be an integer and must be greater than or equal to 1. If gopSizeUnits is seconds, gopSize must be greater than 0, but need not be an integer.

gop_size_units instance-attribute

gop_size_units: NotRequired[H265GopSizeUnits]

Indicates if the gopSize is specified in frames or seconds. If seconds the system will convert the gopSize into a frame count at run time.

level instance-attribute

level: NotRequired[H265Level]

H.265 Level.

look_ahead_rate_control instance-attribute

look_ahead_rate_control: NotRequired[H265LookAheadRateControl]

Amount of lookahead. A value of low can decrease latency and memory usage, while high can produce better quality for certain content.

max_bitrate instance-attribute

max_bitrate: NotRequired[__integerMin100000Max40000000]

For QVBR: See the tooltip for Quality level

min_bitrate instance-attribute

min_bitrate: NotRequired[__integerMin0Max40000000]

Used for QVBR rate control mode only. Optional. Enter a minimum bitrate if you want to keep the output bitrate about a threshold, in order to prevent the downstream system from de-allocating network bandwidth for this output.

min_i_interval instance-attribute

min_i_interval: NotRequired[__integerMin0Max30]

Only meaningful if sceneChangeDetect is set to enabled. Defaults to 5 if multiplex rate control is used. 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 and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1

min_qp instance-attribute

min_qp: NotRequired[__integerMin1Max51]

Sets the minimum QP. If you aren't familiar with quantization adjustment, leave the field empty. MediaLive will apply an appropriate value.

mv_over_picture_boundaries instance-attribute

mv_over_picture_boundaries: NotRequired[H265MvOverPictureBoundaries]

If you are setting up the picture as a tile, you must set this to "disabled". In all other configurations, you typically enter "enabled".

mv_temporal_predictor instance-attribute

mv_temporal_predictor: NotRequired[H265MvTemporalPredictor]

If you are setting up the picture as a tile, you must set this to "disabled". In other configurations, you typically enter "enabled".

par_denominator instance-attribute

par_denominator: NotRequired[__integerMin1]

Pixel Aspect Ratio denominator.

par_numerator instance-attribute

par_numerator: NotRequired[__integerMin1]

Pixel Aspect Ratio numerator.

profile instance-attribute

profile: NotRequired[H265Profile]

H.265 Profile.

qvbr_quality_level instance-attribute

qvbr_quality_level: NotRequired[__integerMin1Max10]

Controls the target quality for the video encode. 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

rate_control_mode instance-attribute

rate_control_mode: NotRequired[H265RateControlMode]

Rate control mode. QVBR: Quality will match the specified quality level except when it is constrained by the maximum bitrate. Recommended if you or your viewers pay for bandwidth. CBR: Quality varies, depending on the video complexity. Recommended only if you distribute your assets to devices that cannot handle variable bitrates. Multiplex: This rate control mode is only supported (and is required) when the video is being delivered to a MediaLive Multiplex in which case the rate control configuration is controlled by the properties within the Multiplex Program.

scan_type instance-attribute

scan_type: NotRequired[H265ScanType]

Sets the scan type of the output to progressive or top-field-first interlaced.

scene_change_detect instance-attribute

scene_change_detect: NotRequired[H265SceneChangeDetect]

Scene change detection.

slices instance-attribute

slices: NotRequired[__integerMin1Max16]

Number of slices per picture. 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; when no value is specified the encoder will choose the number of slices based on encode resolution.

subgop_length instance-attribute

subgop_length: NotRequired[H265SubGopLength]

Sets the number of B-frames in each sub-GOP. FIXED: Use the value in Num B-frames. DYNAMIC: Optimizes the number of B-frames in each sub-GOP to improve visual quality. Must be FIXED if resolution is greater than 1080p or when using tiled hevc encoding.

tier instance-attribute

tier: NotRequired[H265Tier]

H.265 Tier.

tile_height instance-attribute

tile_height: NotRequired[__integerMin64Max2160]

Set this field to set up the picture as a tile. You must also set tileWidth. The tile height must result in 22 or fewer rows in the frame. The tile width must result in 20 or fewer columns in the frame. And finally, the product of the column count and row count must be 64 of less. If the tile width and height are specified, MediaLive will override the video codec slices field with a value that MediaLive calculates

tile_padding instance-attribute

tile_padding: NotRequired[H265TilePadding]

Set to "padded" to force MediaLive to add padding to the frame, to obtain a frame that is a whole multiple of the tile size. If you are setting up the picture as a tile, you must enter "padded". In all other configurations, you typically enter "none".

tile_width instance-attribute

tile_width: NotRequired[__integerMin256Max3840]

Set this field to set up the picture as a tile. See tileHeight for more information.

timecode_burnin_settings instance-attribute

timecode_burnin_settings: NotRequired[TimecodeBurninSettings]

Timecode burn-in settings

timecode_insertion instance-attribute

timecode_insertion: NotRequired[H265TimecodeInsertionBehavior]

Determines how timecodes should be inserted into the video elementary stream. - 'disabled': Do not include timecodes - 'picTimingSei': Pass through picture timing SEI messages from the source specified in Timecode Config

treeblock_size instance-attribute

treeblock_size: NotRequired[H265TreeblockSize]

Select the tree block size used for encoding. If you enter "auto", the encoder will pick the best size. If you are setting up the picture as a tile, you must set this to 32x32. In all other configurations, you typically enter "auto".