Lut

class aws_cdk.aws_medialive_alpha.Lut

Bases: object

(experimental) The S3 location of a 3D LUT (look-up table) file used by a color-correction rule.

MediaLive reads the LUT from S3 at runtime, so the file must be in an S3 bucket — the URI must use the s3:// or s3ssl:// protocol. Unlike a FileLocation, a LUT has no credentials.

Use the static factory methods to create one from an S3 bucket (which uses the secure s3ssl:// form and auto-grants the channel role read access) or a raw S3 URL.

Stability:

experimental

ExampleMetadata:

infused

Example:

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


medialive.Channel(stack, "Channel",
    inputs=[medialive.InputAttachment(input=input)],
    color_corrections=[medialive.ColorCorrection(
        input_color_space=medialive.ColorSpace.REC_601,
        output_color_space=medialive.ColorSpace.REC_709,
        lut=medialive.Lut.from_bucket(bucket, "luts/rec601-to-rec709.cube")
    )],
    output_groups=[
        medialive.OutputGroupConfiguration.hls(
            name="hls",
            destinations=[destination],
            outputs=[medialive.HlsOutputDefinition(encodes=[video], output_name="video")]
        )
    ]
)
Stability:

experimental

Static Methods

classmethod from_bucket(bucket, key)

(experimental) Reference a LUT file in an S3 bucket.

Uses the secure s3ssl:// form and automatically grants the channel role read access.

Parameters:
  • bucket (IBucket) – The S3 bucket containing the LUT file.

  • key (str) – The object key within the bucket (e.g. ‘luts/rec709.cube’).

Stability:

experimental

Return type:

Lut

classmethod url(url)

(experimental) Reference a LUT file by S3 URL.

The URL must use the s3:// or s3ssl:// protocol.

Parameters:

url (str) – The s3:// or s3ssl:// URL of the LUT file.

Stability:

experimental

Return type:

Lut