class VideoSelection
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.VideoSelection |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#VideoSelection |
Java | software.amazon.awscdk.services.medialive.alpha.VideoSelection |
Python | aws_cdk.aws_medialive_alpha.VideoSelection |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป VideoSelection |
Selects the specific video to extract from the input โ by PID or by program.
Create with the static factory methods; exactly one selection applies, enforced by the type.
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
new VideoSelection()
Methods
| Name | Description |
|---|---|
| static by | Extract the video with this PID. |
| static by | Extract the video from this program within a multi-program transport stream. |
static byPid(pid)
public static byPid(pid: number): VideoSelection
Parameters
- pid
number
Returns
Extract the video with this PID.
static byProgramId(programId)
public static byProgramId(programId: number): VideoSelection
Parameters
- programId
number
Returns
Extract the video from this program within a multi-program transport stream.
If the program doesn't exist, MediaLive selects the first program in the stream.

.NET
Go
Java
Python
TypeScript (