VideoSelection

class aws_cdk.aws_medialive_alpha.VideoSelection

Bases: object

(experimental) 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.

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")]
        )
    ]
)
Stability:

experimental

Static Methods

classmethod by_pid(pid)

(experimental) Extract the video with this PID.

Parameters:

pid (Union[int, float])

Stability:

experimental

Return type:

VideoSelection

classmethod by_program_id(program_id)

(experimental) 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.

Parameters:

program_id (Union[int, float])

Stability:

experimental

Return type:

VideoSelection