AudioCodecSettings
- class aws_cdk.aws_medialive_alpha.AudioCodecSettings
Bases:
object(experimental) Audio codec settings.
Use the static factory methods to create.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# stack: Stack # input: medialive.IInput # bucket: s3.IBucket video = medialive.EncodeConfiguration.video( name="video_720p", codec=medialive.VideoCodecSettings.h264( rate_control=medialive.H264RateControl.cbr(bitrate=Bitrate.mbps(3)), framerate=medialive.Framerate.FPS_30 ), width=1280, height=720 ) audio = medialive.EncodeConfiguration.audio( name="audio_aac", codec=medialive.AudioCodecSettings.aac(bitrate=Bitrate.kbps(192)) ) medialive.Channel(stack, "Channel", inputs=[medialive.InputAttachment(input=input)], output_groups=[ medialive.OutputGroupConfiguration.hls( name="hls", destinations=[medialive.OutputDestination.to_bucket(bucket, "live/stream")], outputs=[medialive.HlsOutputDefinition(encodes=[video, audio], output_name="hls_out")] ) ] )
- Stability:
experimental
Static Methods
- classmethod aac(*, bitrate=None, coding_mode=None, input_type=None, profile=None, rate_control_mode=None, raw_format=None, sample_rate=None, spec=None, vbr_quality=None)
(experimental) Create AAC codec settings.
- Parameters:
bitrate (
Optional[Bitrate]) – (experimental) The average bitrate. Default: Bitrate.kbps(192)coding_mode (
Optional[AacCodingMode]) – (experimental) The coding mode (mono, stereo, 5.1). Default: AacCodingMode.CODING_MODE_2_0input_type (
Optional[AacInputType]) – (experimental) Set to broadcasterMixedAd when the input contains pre-mixed main audio + AD (narration) as a stereo pair. Default: AacInputType.NORMALprofile (
Optional[AacProfile]) – (experimental) The AAC profile. Default: AacProfile.LCrate_control_mode (
Optional[AacRateControlMode]) – (experimental) The rate control mode. Default: AacRateControlMode.CBRraw_format (
Optional[AacRawFormat]) – (experimental) Sets the LATM/LOAS AAC output for raw containers. Default: AacRawFormat.NONEsample_rate (
Optional[AudioSampleRate]) – (experimental) The sample rate. Default: AudioSampleRate.HZ_48000spec (
Optional[AacSpec]) – (experimental) The AAC specification (MPEG-4 or MPEG-2) used to encode the audio. Set toAacSpec.MPEG2to emit MPEG-2 AAC instead of MPEG-4 AAC for raw or MPEG-2 Transport Stream containers. Default: AacSpec.MPEG4vbr_quality (
Optional[AacVbrQuality]) – (experimental) The VBR quality level. Used only if rateControlMode is VBR. Default: - service default
- Stability:
experimental
- Return type:
- classmethod ac3(*, attenuation_control=None, bitrate=None, bitstream_mode=None, coding_mode=None, dial_norm=None, drc_profile=None, lfe_filter=None, metadata_control=None)
(experimental) Create AC3 codec settings.
- Parameters:
attenuation_control (
Optional[Ac3AttenuationControl]) – (experimental) Applies a 3 dB attenuation to the surround channels. Used only for the 3/2 coding mode. Default: - service defaultbitrate (
Optional[Bitrate]) – (experimental) The average bitrate. Default: - service defaultbitstream_mode (
Optional[Ac3BitstreamMode]) – (experimental) Specifies the bitstream mode (bsmod) for the emitted AC-3 stream. Default: Ac3BitstreamMode.COMPLETE_MAINcoding_mode (
Optional[Ac3CodingMode]) – (experimental) The Dolby Digital coding mode. Default: Ac3CodingMode.CODING_MODE_2_0dial_norm (
Union[int,float,None]) – (experimental) The dialogue normalization level (1–31). Default: - service defaultdrc_profile (
Optional[Ac3DrcProfile]) – (experimental) If set to filmStandard, adds dynamic range compression signaling to the output bitstream. Default: - service defaultlfe_filter (
Optional[Ac3LfeFilter]) – (experimental) When set to enabled, applies a 120Hz lowpass filter to the LFE channel prior to encoding. Valid only in codingMode32Lfe mode. Default: Ac3LfeFilter.DISABLEDmetadata_control (
Optional[Ac3MetadataControl]) – (experimental) When set to followInput, encoder metadata is sourced from the DD, DD+, or DolbyE decoder that supplies this audio data. Default: - service default
- Stability:
experimental
- Return type:
- classmethod eac3(*, attenuation_control=None, bitrate=None, bitstream_mode=None, coding_mode=None, dc_filter=None, dial_norm=None, drc_line=None, drc_rf=None, lfe_control=None, lfe_filter=None, lo_ro_center_mix_level=None, lo_ro_surround_mix_level=None, lt_rt_center_mix_level=None, lt_rt_surround_mix_level=None, metadata_control=None, passthrough_control=None, phase_control=None, stereo_downmix=None, surround_ex_mode=None, surround_mode=None)
(experimental) Create EAC3 (Dolby Digital Plus) codec settings.
- Parameters:
attenuation_control (
Optional[Eac3AttenuationControl]) – (experimental) When set to attenuate3Db, applies a 3 dB attenuation to the surround channels. Used only for the 3/2 coding mode. Default: Eac3AttenuationControl.NONEbitrate (
Optional[Bitrate]) – (experimental) The average bitrate. Default: - service defaultbitstream_mode (
Optional[Eac3BitstreamMode]) – (experimental) Specifies the bitstream mode (bsmod) for the emitted E-AC-3 stream. Default: Eac3BitstreamMode.COMPLETE_MAINcoding_mode (
Optional[Eac3CodingMode]) – (experimental) The Dolby Digital Plus coding mode. Default: Eac3CodingMode.CODING_MODE_3_2dc_filter (
Optional[Eac3DcFilter]) – (experimental) When set to enabled, activates a DC highpass filter for all input channels. Default: - service defaultdial_norm (
Union[int,float,None]) – (experimental) The dialogue normalization level (1–31). Default: - service defaultdrc_line (
Optional[Eac3DrcLine]) – (experimental) Sets the Dolby dynamic range compression profile. Default: - service defaultdrc_rf (
Optional[Eac3DrcRf]) – (experimental) Sets the profile for heavy Dolby dynamic range compression, ensuring that the instantaneous signal peaks do not exceed specified levels. Default: - service defaultlfe_control (
Optional[Eac3LfeControl]) – (experimental) When encoding 3/2 audio, setting to lfe enables the LFE channel. Default: - service defaultlfe_filter (
Optional[Eac3LfeFilter]) – (experimental) When set to enabled, applies a 120Hz lowpass filter to the LFE channel prior to encoding. Valid only with a codingMode32 coding mode. Default: - service defaultlo_ro_center_mix_level (
Union[int,float,None]) – (experimental) The Left only/Right only center mix level. Used only for the 3/2 coding mode. Default: - service defaultlo_ro_surround_mix_level (
Union[int,float,None]) – (experimental) The Left only/Right only surround mix level. Used only for a 3/2 coding mode. Default: - service defaultlt_rt_center_mix_level (
Union[int,float,None]) – (experimental) The Left total/Right total center mix level. Used only for a 3/2 coding mode. Default: - service defaultlt_rt_surround_mix_level (
Union[int,float,None]) – (experimental) The Left total/Right total surround mix level. Used only for the 3/2 coding mode. Default: - service defaultmetadata_control (
Optional[Eac3MetadataControl]) – (experimental) When set to followInput, encoder metadata is sourced from the DD, DD+, or DolbyE decoder that supplies this audio data. Default: - service defaultpassthrough_control (
Optional[Eac3PassthroughControl]) – (experimental) When set to whenPossible, input DD+ audio will be passed through if it is present on the input. Default: - service defaultphase_control (
Optional[Eac3PhaseControl]) – (experimental) When set to shift90Degrees, applies a 90-degree phase shift to the surround channels. Used only for a 3/2 coding mode. Default: - service defaultstereo_downmix (
Optional[Eac3StereoDownmix]) – (experimental) A stereo downmix preference. Used only for the 3/2 coding mode. Default: - service defaultsurround_ex_mode (
Optional[Eac3SurroundExMode]) – (experimental) When encoding 3/2 audio, sets whether an extra center back surround channel is matrix encoded into the left and right surround channels. Default: - service defaultsurround_mode (
Optional[Eac3SurroundMode]) – (experimental) When encoding 2/0 audio, sets whether Dolby Surround is matrix-encoded into the two channels. Default: - service default
- Stability:
experimental
- Return type:
- classmethod eac3_atmos(*, bitrate=None, coding_mode=None, dial_norm=None, drc_line=None, drc_rf=None, height_trim=None, surround_trim=None)
(experimental) Create EAC3 Atmos (Dolby Digital Plus with Atmos) codec settings.
- Parameters:
bitrate (
Optional[Bitrate]) – (experimental) The average bitrate. Default: - service defaultcoding_mode (
Optional[Eac3AtmosCodingMode]) – (experimental) The coding mode (e.g. CODING_MODE_5_1_4, CODING_MODE_7_1_4, CODING_MODE_9_1_6). Default: Eac3AtmosCodingMode.CODING_MODE_5_1_4dial_norm (
Union[int,float,None]) – (experimental) The dialogue normalization level (1–31). Default: - service defaultdrc_line (
Optional[Eac3AtmosDrcLine]) – (experimental) Sets the Dolby dynamic range compression line mode profile. Default: - service defaultdrc_rf (
Optional[Eac3AtmosDrcRf]) – (experimental) Sets the Dolby dynamic range compression RF mode profile. Default: - service defaultheight_trim (
Union[int,float,None]) – (experimental) Height channel trim level. Default: - service defaultsurround_trim (
Union[int,float,None]) – (experimental) Surround channel trim level. Default: - service default
- Stability:
experimental
- Return type:
- classmethod mp2(*, bitrate=None, coding_mode=None, sample_rate=None)
(experimental) Create MP2 codec settings.
- Parameters:
bitrate (
Optional[Bitrate]) – (experimental) The average bitrate. Default: - service defaultcoding_mode (
Optional[Mp2CodingMode]) – (experimental) The MPEG2 Audio coding mode. Default: Mp2CodingMode.CODING_MODE_2_0sample_rate (
Optional[AudioSampleRate]) – (experimental) The sample rate. Default: AudioSampleRate.HZ_48000
- Stability:
experimental
- Return type:
- classmethod passthrough()
(experimental) Create passthrough audio settings (no transcoding).
- Stability:
experimental
- Return type:
- classmethod wav(*, bit_depth=None, coding_mode=None, sample_rate=None)
(experimental) Create WAV codec settings.
- Parameters:
bit_depth (
Optional[AudioBitDepth]) – (experimental) The bit depth of the WAV output. Default: AudioBitDepth.DEPTH_16coding_mode (
Optional[WavCodingMode]) – (experimental) The audio coding mode for the WAV audio. Default: WavCodingMode.CODING_MODE_2_0sample_rate (
Optional[AudioSampleRate]) – (experimental) The sample rate. Default: AudioSampleRate.HZ_48000
- Stability:
experimental
- Return type: