EncodeConfiguration

class aws_cdk.aws_medialive_alpha.EncodeConfiguration

Bases: object

(experimental) Base interface for an encode configuration (video, audio, or caption).

The same EncodeConfiguration instance can be shared across multiple output groups within a channel. The channel automatically deduplicates encode descriptions by name at synth time.

Stability:

experimental

ExampleMetadata:

infused

Example:

# Define a caption selector on the input attachment (see Input Attachment Settings below)
caption_selector = medialive.CaptionSelector.embedded("captions")

# WebVTT captions — packaged alongside the video encode in the same output
webvtt = medialive.EncodeConfiguration.caption(
    name="eng_webvtt",
    caption_selector_name=caption_selector.name,
    language_code="eng",
    language_description="English",
    destination=medialive.CaptionDestination.webvtt()
)

# Burned-in captions — rendered into the video, styled via the burn-in options
burn_in = medialive.EncodeConfiguration.caption(
    name="eng_burnin",
    caption_selector_name=caption_selector.name,
    destination=medialive.CaptionDestination.burn_in(
        alignment=medialive.CaptionAlignment.CENTERED,
        font_color=medialive.CaptionFontColor.WHITE,
        outline_color=medialive.CaptionOutlineColor.BLACK,
        font_size=medialive.CaptionFontSize.AUTO
    )
)
Stability:

experimental

Attributes

name

(experimental) The unique name for this encode, used to reference it from outputs.

Stability:

experimental

Static Methods

classmethod audio(*, codec, name, audio_dash_roles=None, audio_normalization=None, audio_selector_name=None, audio_type=None, audio_type_control=None, audio_watermark_settings=None, dvb_dash_accessibility=None, language_code=None, language_code_control=None, remix_settings=None, stream_name=None)

(experimental) Create an audio encode configuration.

Parameters:
  • codec (AudioCodecSettings) – (experimental) The codec for the audio encode. Choose the codec explicitly (e.g. AudioCodecSettings.aac(...))

  • name (str) – (experimental) A unique name for this audio encode.

  • audio_dash_roles (Optional[Sequence[AudioDashRole]]) – (experimental) The DASH roles to assign to this audio output. Applies only when the output is configured for DVB DASH accessibility signaling. Default: - no DASH roles

  • audio_normalization (Union[AudioNormalizationSettings, Dict[str, Any], None]) – (experimental) Audio normalization settings for loudness correction. Default: - no normalization

  • audio_selector_name (Optional[str]) – (experimental) The name of the audio selector in the input to use as the source. Must match the name of an AudioSelector on the input attachment. When omitted, MediaLive uses the input’s default audio. Default: - the input’s default audio

  • audio_type (Optional[AudioType]) – (experimental) The audio type when audioTypeControl is USE_CONFIGURED. The values are defined in ISO-IEC 13818-1. Default: - follow input

  • audio_type_control (Optional[AudioTypeControl]) – (experimental) How the audio type is signaled in the output. Default: - USE_CONFIGURED when audioType is set, otherwise FOLLOW_INPUT

  • audio_watermark_settings (Union[AudioWatermarkSettings, Dict[str, Any], None]) – (experimental) Audio watermarking settings (e.g. Nielsen watermarks). Default: - no watermarking

  • dvb_dash_accessibility (Optional[DvbDashAccessibility]) – (experimental) DVB DASH accessibility signaling for this audio output. Default: - no DVB DASH accessibility signaling

  • language_code (Optional[str]) – (experimental) The ISO 639-2 language code for the audio output track (e.g. ‘eng’, ‘spa’). Default: - follow input

  • language_code_control (Optional[AudioLanguageCodeControl]) – (experimental) How the audio language code is signaled in the output. When FOLLOW_INPUT, a configured languageCode is used only as a fallback when the input has none. Default: - USE_CONFIGURED when languageCode is set, otherwise FOLLOW_INPUT

  • remix_settings (Union[RemixSettings, Dict[str, Any], None]) – (experimental) Audio remix settings for channel remapping. Default: - no remixing

  • stream_name (Optional[str]) – (experimental) The display name for the audio track (e.g. ‘English’, ‘Director Commentary’). Used for HLS and MS Smooth outputs. Default: - no stream name

Stability:

experimental

Return type:

EncodeConfiguration

classmethod caption(*, caption_selector_name, destination, name, accessibility=None, caption_dash_roles=None, dvb_dash_accessibility=None, language_code=None, language_description=None)

(experimental) Create a caption encode configuration.

Parameters:
  • caption_selector_name (str) – (experimental) The name of the caption selector in the input to use as the source.

  • destination (CaptionDestination) – (experimental) The output caption format. Use the CaptionDestination factory methods (e.g. CaptionDestination.burnIn(), .webvtt(), .embedded()).

  • name (str) – (experimental) A unique name for this caption encode.

  • accessibility (Optional[CaptionAccessibility]) – (experimental) Whether this caption track implements accessibility features. Default: - The captions do not implement accessibility features

  • caption_dash_roles (Optional[Sequence[CaptionDashRole]]) – (experimental) The DASH roles to assign to this captions output. Applies only when the output is configured for DVB DASH accessibility signaling. Default: - no DASH roles

  • dvb_dash_accessibility (Optional[DvbDashAccessibility]) – (experimental) DVB DASH accessibility signaling for this captions output. Default: - no DVB DASH accessibility signaling

  • language_code (Optional[str]) – (experimental) The ISO 639-2 language code for the captions (e.g. ‘eng’, ‘spa’). Default: - no language code

  • language_description (Optional[str]) – (experimental) Human-readable description of the captions (e.g. ‘English’, ‘Spanish’). Default: - no language description

Stability:

experimental

Return type:

EncodeConfiguration

classmethod video(*, codec, height, name, width, respond_to_afd=None, scaling_behavior=None, sharpness=None)

(experimental) Create a video encode configuration.

Parameters:
  • codec (VideoCodecSettings) – (experimental) The codec for the video encode. Choose the codec explicitly (e.g. VideoCodecSettings.h264(...))

  • height (Union[int, float]) – (experimental) The height of the output video in pixels. Must be an even number.

  • name (str) – (experimental) A unique name for this video encode.

  • width (Union[int, float]) – (experimental) The width of the output video in pixels. Must be an even number.

  • respond_to_afd (Optional[RespondToAfd]) – (experimental) How to respond to AFD values in the input stream. Default: RespondToAfd.NONE

  • scaling_behavior (Optional[ScalingBehavior]) – (experimental) The video scaling behavior. Default: ScalingBehavior.DEFAULT

  • sharpness (Union[int, float, None]) – (experimental) The anti-alias filter strength (0-100). 0 is softest, 100 is sharpest. Default: 50

Stability:

experimental

Return type:

EncodeConfiguration