logo
pub struct H264Settings {
Show 41 fields pub adaptive_quantization: Option<String>, pub afd_signaling: Option<String>, pub bitrate: Option<i64>, pub buf_fill_pct: Option<i64>, pub buf_size: Option<i64>, pub color_metadata: Option<String>, pub color_space_settings: Option<H264ColorSpaceSettings>, pub entropy_encoding: Option<String>, pub filter_settings: Option<H264FilterSettings>, pub fixed_afd: Option<String>, pub flicker_aq: Option<String>, pub force_field_pictures: Option<String>, pub framerate_control: Option<String>, pub framerate_denominator: Option<i64>, pub framerate_numerator: Option<i64>, pub gop_b_reference: Option<String>, pub gop_closed_cadence: Option<i64>, pub gop_num_b_frames: Option<i64>, pub gop_size: Option<f64>, pub gop_size_units: Option<String>, pub level: Option<String>, pub look_ahead_rate_control: Option<String>, pub max_bitrate: Option<i64>, pub min_i_interval: Option<i64>, pub num_ref_frames: Option<i64>, pub par_control: Option<String>, pub par_denominator: Option<i64>, pub par_numerator: Option<i64>, pub profile: Option<String>, pub quality_level: Option<String>, pub qvbr_quality_level: Option<i64>, pub rate_control_mode: Option<String>, pub scan_type: Option<String>, pub scene_change_detect: Option<String>, pub slices: Option<i64>, pub softness: Option<i64>, pub spatial_aq: Option<String>, pub subgop_length: Option<String>, pub syntax: Option<String>, pub temporal_aq: Option<String>, pub timecode_insertion: Option<String>,
}
Expand description

H264 Settings

Fields

adaptive_quantization: Option<String>

Enables or disables adaptive quantization, 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: flicker, spatial, and temporal. Set the field in one of these ways: Set to Auto. Recommended. For each type of AQ, MediaLive will determine if AQ is needed, and if so, the appropriate strength. Set a strength (a value other than Auto or Disable). This strength will apply to any of the AQ fields that you choose to enable. Set to Disabled to disable all types of adaptive quantization.

afd_signaling: Option<String>

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.

bitrate: Option<i64>

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_fill_pct: Option<i64>

Percentage of the buffer that should initially be filled (HRD buffer model).

buf_size: Option<i64>

Size of buffer (HRD buffer model) in bits.

color_metadata: Option<String>

Includes colorspace metadata in the output.

color_space_settings: Option<H264ColorSpaceSettings>

Color Space settings

entropy_encoding: Option<String>

Entropy encoding mode. Use cabac (must be in Main or High profile) or cavlc.

filter_settings: Option<H264FilterSettings>

Optional filters that you can apply to an encode.

fixed_afd: Option<String>

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: Option<String>

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: If you have set the Adaptive quantization field to Auto, MediaLive ignores any value in this field. MediaLive will determine if flicker AQ is appropriate and will apply the appropriate strength. If you have set the Adaptive quantization field to a strength, you can set this field to Enabled or Disabled. Enabled: MediaLive will apply flicker AQ using the specified strength. Disabled: MediaLive won't apply flicker AQ. If you have set the Adaptive quantization to Disabled, MediaLive ignores any value in this field and doesn't apply flicker AQ.

force_field_pictures: Option<String>

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.

framerate_control: Option<String>

This field indicates how the output video frame rate is specified. If "specified" is selected then the output video frame rate is determined by framerateNumerator and framerateDenominator, else if "initializeFromSource" is selected then the output video frame rate will be set equal to the input video frame rate of the first input.

framerate_denominator: Option<i64>

Framerate denominator.

framerate_numerator: Option<i64>

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

gop_b_reference: Option<String>

Documentation update needed

gop_closed_cadence: Option<i64>

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: Option<i64>

Number of B-frames between reference frames.

gop_size: Option<f64>

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: Option<String>

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: Option<String>

H.264 Level.

look_ahead_rate_control: Option<String>

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

max_bitrate: Option<i64>

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.

min_i_interval: Option<i64>

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

num_ref_frames: Option<i64>

Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.

par_control: Option<String>

This field indicates how the output pixel aspect ratio is specified. If "specified" is selected then the output video pixel aspect ratio is determined by parNumerator and parDenominator, else if "initializeFromSource" is selected then the output pixsel aspect ratio will be set equal to the input video pixel aspect ratio of the first input.

par_denominator: Option<i64>

Pixel Aspect Ratio denominator.

par_numerator: Option<i64>

Pixel Aspect Ratio numerator.

profile: Option<String>

H.264 Profile.

quality_level: Option<String>

Leave as STANDARDQUALITY or choose a different value (which might result in additional costs to run the channel). - ENHANCEDQUALITY: 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 ENHANCEDQUALITY. - STANDARDQUALITY: Valid for any Rate control mode.

qvbr_quality_level: Option<i64>

Controls the target quality for the video encode. Applies only when the rate control mode is QVBR. You can set a target quality or you can let MediaLive determine the best quality. To set a target quality, enter values in the QVBR quality level field and the Max bitrate field. Enter values 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 To let MediaLive decide, leave the QVBR quality level field empty, and in Max bitrate enter the maximum rate you want in the video. For more information, see the section called "Video - rate control mode" in the MediaLive user guide

rate_control_mode: Option<String>

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.

VBR: Quality and bitrate vary, depending on the video complexity. Recommended instead of QVBR if you want to maintain a specific average bitrate over the duration of the channel.

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: Option<String>

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

scene_change_detect: Option<String>

Scene change detection.

  • On: inserts I-frames when scene change is detected.
  • Off: does not force an I-frame when scene change is detected.
slices: Option<i64>

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.

softness: Option<i64>

Softness. Selects quantizer matrix, larger values reduce high-frequency content in the encoded image. If not set to zero, must be greater than 15.

spatial_aq: Option<String>

Spatial AQ makes adjustments within each frame based on spatial variation of content complexity. The value to enter in this field depends on the value in the Adaptive quantization field: If you have set the Adaptive quantization field to Auto, MediaLive ignores any value in this field. MediaLive will determine if spatial AQ is appropriate and will apply the appropriate strength. If you have set the Adaptive quantization field to a strength, you can set this field to Enabled or Disabled. Enabled: MediaLive will apply spatial AQ using the specified strength. Disabled: MediaLive won't apply spatial AQ. If you have set the Adaptive quantization to Disabled, MediaLive ignores any value in this field and doesn't apply spatial AQ.

subgop_length: Option<String>

If set to fixed, use gopNumBFrames B-frames per sub-GOP. If set to dynamic, optimize the number of B-frames used for each sub-GOP to improve visual quality.

syntax: Option<String>

Produces a bitstream compliant with SMPTE RP-2027.

temporal_aq: Option<String>

Temporal makes adjustments within each frame based on temporal variation of content complexity. The value to enter in this field depends on the value in the Adaptive quantization field: If you have set the Adaptive quantization field to Auto, MediaLive ignores any value in this field. MediaLive will determine if temporal AQ is appropriate and will apply the appropriate strength. If you have set the Adaptive quantization field to a strength, you can set this field to Enabled or Disabled. Enabled: MediaLive will apply temporal AQ using the specified strength. Disabled: MediaLive won't apply temporal AQ. If you have set the Adaptive quantization to Disabled, MediaLive ignores any value in this field and doesn't apply temporal AQ.

timecode_insertion: Option<String>

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more