class AudioSelector
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.AudioSelector |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#AudioSelector |
Java | software.amazon.awscdk.services.medialive.alpha.AudioSelector |
Python | aws_cdk.aws_medialive_alpha.AudioSelector |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป AudioSelector |
An audio selector that identifies which audio to extract from the input.
Example
declare const stack: Stack;
declare const input: medialive.IInput;
declare const bucket: s3.IBucket;
declare const video: medialive.EncodeConfiguration;
new medialive.Channel(stack, 'Channel', {
inputs: [{
input,
audioSelectors: [
medialive.AudioSelector.byLanguage('eng', 'eng', medialive.AudioLanguageSelectionPolicy.STRICT),
],
captionSelectors: [
medialive.CaptionSelector.embedded('embedded'),
],
videoSelector: {
colorSpace: medialive.VideoColorSpace.HDR10,
colorSpaceUsage: medialive.VideoColorSpaceUsage.FORCE,
selectBy: medialive.VideoSelection.byProgramId(1),
},
}],
outputGroups: [
medialive.OutputGroupConfiguration.hls({
name: 'hls',
destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
outputs: [{ encodes: [video], outputName: 'hls_out' }],
}),
],
});
Initializer (protected)
super(name: string)
Parameters
- name
string
Properties
| Name | Type | Description |
|---|---|---|
| name | string | The name of this audio selector. |
name
Type:
string
The name of this audio selector.
Reference it from features that monitor a specific selector, such as an audio-silence {@link FailoverCondition }.
Methods
| Name | Description |
|---|---|
| static by | Select audio by language code. |
| static by | Select one or more audio PIDs from the source. |
| static by | Select one or more audio tracks (1-based) from the source. |
| static default(name) | Select the default audio track (no specific selector settings). |
| static hls | Select an HLS audio rendition by its #EXT-X-MEDIA GROUP-ID and NAME. |
static byLanguage(name, languageCode, languageSelectionPolicy?)
public static byLanguage(name: string, languageCode: string, languageSelectionPolicy?: AudioLanguageSelectionPolicy): AudioSelector
Parameters
- name
stringโ a name for this selector. - languageCode
stringโ the three-letter (ISO 639-2) language code to select. - languageSelectionPolicy
Audioโ how strictly to identify the stream by language on a PMT update.Language Selection Policy
Returns
Select audio by language code.
static byPid(name, pids)
public static byPid(name: string, pids: AudioPidConfig[]): AudioSelector
Parameters
- name
stringโ a name for this selector. - pids
AudioPid Config []โ the PID configurations (each with optional Dolby E decode and pre-mix settings).
Returns
Select one or more audio PIDs from the source.
static byTrack(name, tracks, dolbyEProgramSelection?)
public static byTrack(name: string, tracks: AudioTrackConfig[], dolbyEProgramSelection?: DolbyEProgramSelection): AudioSelector
Parameters
- name
stringโ a name for this selector. - tracks
AudioTrack Config []โ the track configurations (each with optional pre-mix settings). - dolbyEProgramSelection
Dolbyโ which Dolby E program to decode from the selected track(s).EProgram Selection
Returns
Select one or more audio tracks (1-based) from the source.
static default(name)
public static default(name: string): AudioSelector
Parameters
- name
string
Returns
Select the default audio track (no specific selector settings).
static hlsRendition(name, options)
public static hlsRendition(name: string, options: HlsRenditionSelectionOptions): AudioSelector
Parameters
- name
stringโ a name for this selector. - options
Hlsโ the target rendition's group id and name.Rendition Selection Options
Returns
Select an HLS audio rendition by its #EXT-X-MEDIA GROUP-ID and NAME.

.NET
Go
Java
Python
TypeScript (