AudioSelector

class aws_cdk.aws_medialive_alpha.AudioSelector(name)

Bases: object

(experimental) An audio selector that identifies which audio to extract from the input.

Stability:

experimental

ExampleMetadata:

infused

Example:

# stack: Stack
# input: medialive.IInput
# bucket: s3.IBucket
# video: medialive.EncodeConfiguration


medialive.Channel(stack, "Channel",
    inputs=[medialive.InputAttachment(
        input=input,
        audio_selectors=[
            medialive.AudioSelector.by_language("eng", "eng", medialive.AudioLanguageSelectionPolicy.STRICT)
        ],
        caption_selectors=[
            medialive.CaptionSelector.embedded("embedded")
        ],
        video_selector=medialive.VideoSelectorSettings(
            color_space=medialive.VideoColorSpace.HDR10,
            color_space_usage=medialive.VideoColorSpaceUsage.FORCE,
            select_by=medialive.VideoSelection.by_program_id(1)
        )
    )],
    output_groups=[
        medialive.OutputGroupConfiguration.hls(
            name="hls",
            destinations=[medialive.OutputDestination.to_bucket(bucket, "live/stream")],
            outputs=[medialive.HlsOutputDefinition(encodes=[video], output_name="hls_out")]
        )
    ]
)
Parameters:

name (str)

Stability:

experimental

Attributes

name

(experimental) The name of this audio selector.

Reference it from features that monitor a specific selector, such as an audio-silence {@link FailoverCondition }.

Stability:

experimental

Static Methods

classmethod by_language(name, language_code, language_selection_policy=None)

(experimental) Select audio by language code.

Parameters:
  • name (str) – a name for this selector.

  • language_code (str) – the three-letter (ISO 639-2) language code to select.

  • language_selection_policy (Optional[AudioLanguageSelectionPolicy]) – how strictly to identify the stream by language on a PMT update.

Stability:

experimental

Return type:

AudioSelector

classmethod by_pid(name, pids)

(experimental) Select one or more audio PIDs from the source.

Parameters:
  • name (str) – a name for this selector.

  • pids (Sequence[Union[AudioPidConfig, Dict[str, Any]]]) – the PID configurations (each with optional Dolby E decode and pre-mix settings).

Stability:

experimental

Return type:

AudioSelector

classmethod by_track(name, tracks, dolby_e_program_selection=None)

(experimental) Select one or more audio tracks (1-based) from the source.

Parameters:
  • name (str) – a name for this selector.

  • tracks (Sequence[Union[AudioTrackConfig, Dict[str, Any]]]) – the track configurations (each with optional pre-mix settings).

  • dolby_e_program_selection (Optional[DolbyEProgramSelection]) – which Dolby E program to decode from the selected track(s).

Stability:

experimental

Return type:

AudioSelector

classmethod default(name)

(experimental) Select the default audio track (no specific selector settings).

Parameters:

name (str)

Stability:

experimental

Return type:

AudioSelector

classmethod hls_rendition(name, *, group_id, rendition_name)

(experimental) Select an HLS audio rendition by its #EXT-X-MEDIA GROUP-ID and NAME.

Parameters:
  • name (str) – a name for this selector.

  • group_id (str) – (experimental) The GROUP-ID in the #EXT-X-MEDIA tag of the target HLS audio rendition.

  • rendition_name (str) – (experimental) The NAME in the #EXT-X-MEDIA tag of the target HLS audio rendition.

Stability:

experimental

Return type:

AudioSelector