java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.medialive.alpha.AudioSelector
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:40.918Z") @Stability(Experimental) public abstract class AudioSelector extends software.amazon.jsii.JsiiObject
(experimental) An audio selector that identifies which audio to extract from the input.

Example:

 Stack stack;
 IInput input;
 IBucket bucket;
 EncodeConfiguration video;
 Channel.Builder.create(stack, "Channel")
         .inputs(List.of(InputAttachment.builder()
                 .input(input)
                 .audioSelectors(List.of(AudioSelector.byLanguage("eng", "eng", AudioLanguageSelectionPolicy.STRICT)))
                 .captionSelectors(List.of(CaptionSelector.embedded("embedded")))
                 .videoSelector(VideoSelectorSettings.builder()
                         .colorSpace(VideoColorSpace.HDR10)
                         .colorSpaceUsage(VideoColorSpaceUsage.FORCE)
                         .selectBy(VideoSelection.byProgramId(1))
                         .build())
                 .build()))
         .outputGroups(List.of(OutputGroupConfiguration.hls(HlsOutputGroupProps.builder()
                 .name("hls")
                 .destinations(List.of(OutputDestination.toBucket(bucket, "live/stream")))
                 .outputs(List.of(HlsOutputDefinition.builder().encodes(List.of(video)).outputName("hls_out").build()))
                 .build())))
         .build();
 
  • Constructor Details

    • AudioSelector

      protected AudioSelector(software.amazon.jsii.JsiiObjectRef objRef)
    • AudioSelector

      protected AudioSelector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • AudioSelector

      @Stability(Experimental) protected AudioSelector(@NotNull String name)
      Parameters:
      name - This parameter is required.
  • Method Details

    • byLanguage

      @Stability(Experimental) @NotNull public static AudioSelector byLanguage(@NotNull String name, @NotNull String languageCode, @Nullable AudioLanguageSelectionPolicy languageSelectionPolicy)
      (experimental) Select audio by language code.

      Parameters:
      name - a name for this selector. This parameter is required.
      languageCode - the three-letter (ISO 639-2) language code to select. This parameter is required.
      languageSelectionPolicy - how strictly to identify the stream by language on a PMT update.
    • byLanguage

      @Stability(Experimental) @NotNull public static AudioSelector byLanguage(@NotNull String name, @NotNull String languageCode)
      (experimental) Select audio by language code.

      Parameters:
      name - a name for this selector. This parameter is required.
      languageCode - the three-letter (ISO 639-2) language code to select. This parameter is required.
    • byPid

      @Stability(Experimental) @NotNull public static AudioSelector byPid(@NotNull String name, @NotNull List<? extends AudioPidConfig> pids)
      (experimental) Select one or more audio PIDs from the source.

      Parameters:
      name - a name for this selector. This parameter is required.
      pids - the PID configurations (each with optional Dolby E decode and pre-mix settings). This parameter is required.
    • byTrack

      @Stability(Experimental) @NotNull public static AudioSelector byTrack(@NotNull String name, @NotNull List<? extends AudioTrackConfig> tracks, @Nullable DolbyEProgramSelection dolbyEProgramSelection)
      (experimental) Select one or more audio tracks (1-based) from the source.

      Parameters:
      name - a name for this selector. This parameter is required.
      tracks - the track configurations (each with optional pre-mix settings). This parameter is required.
      dolbyEProgramSelection - which Dolby E program to decode from the selected track(s).
    • byTrack

      @Stability(Experimental) @NotNull public static AudioSelector byTrack(@NotNull String name, @NotNull List<? extends AudioTrackConfig> tracks)
      (experimental) Select one or more audio tracks (1-based) from the source.

      Parameters:
      name - a name for this selector. This parameter is required.
      tracks - the track configurations (each with optional pre-mix settings). This parameter is required.
    • doDefault

      @Stability(Experimental) @NotNull public static AudioSelector doDefault(@NotNull String name)
      (experimental) Select the default audio track (no specific selector settings).

      Parameters:
      name - This parameter is required.
    • hlsRendition

      @Stability(Experimental) @NotNull public static AudioSelector hlsRendition(@NotNull String name, @NotNull HlsRenditionSelectionOptions options)
      (experimental) Select an HLS audio rendition by its #EXT-X-MEDIA GROUP-ID and NAME.

      Parameters:
      name - a name for this selector. This parameter is required.
      options - the target rendition's group id and name. This parameter is required.
    • getName

      @Stability(Experimental) @NotNull public String getName()
      (experimental) The name of this audio selector.

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