Skip to content
v2.275.0

Experimental

@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

Lut Class ​

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.

Example ​

ts
declare const stack: Stack;
declare const bucket: s3.IBucket;
declare const input: medialive.IInput;
declare const video: medialive.EncodeConfiguration;
declare const destination: medialive.OutputDestination;

new medialive.Channel(stack, 'Channel', {
  inputs: [{ input }],
  colorCorrections: [{
    inputColorSpace: medialive.ColorSpace.REC_601,
    outputColorSpace: medialive.ColorSpace.REC_709,
    lut: medialive.Lut.fromBucket(bucket, 'luts/rec601-to-rec709.cube'),
  }],
  outputGroups: [
    medialive.OutputGroupConfiguration.hls({
      name: 'hls',
      destinations: [destination],
      outputs: [{ encodes: [video], outputName: 'video' }],
    }),
  ],
});

Initializer ​

ts
new Lut()
python
Lut()
java
new Lut()
csharp
new Lut()
go
NewLut()

Methods ​

fromBucket(bucket: IBucket, key: string): Lut // chainable@staticmethod def from_bucket(bucket: IBucket, key: str) -> Lutpublic static Lut fromBucket(IBucket bucket, String key)public static Lut FromBucket(IBucket bucket, string key)func FromBucket(Bucket IBucket, Key *string) Lutstatic#
Reference a LUT file in an S3 bucket.

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

2 parameters

Parameters

  • bucketbucketbucketbucketBucket — The S3 bucket containing the LUT file.
  • keykeykeykeyKey — The object key within the bucket (e.g. 'luts/rec709.cube').
url(url: string): Lut // chainable@staticmethod def url(url: str) -> Lutpublic static Lut url(String url)public static Lut Url(string url)func Url(Url *string) Lutstatic#
Reference a LUT file by S3 URL.

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

1 parameter

Parameters

  • urlurlurlurlUrl — The s3:// or s3ssl:// URL of the LUT file.