FileLocation

class aws_cdk.aws_medialive_alpha.FileLocation

Bases: object

(experimental) A reference to a file MediaLive reads at runtime — for example an input-loss slate image, an avail-blanking image, a burn-in caption font, or a color-correction LUT.

Use the static factory methods to create one from an S3 bucket (which auto-grants the channel role read access) or from a raw URL.

Stability:

experimental

ExampleMetadata:

infused

Example:

# bucket: s3.IBucket
# video: medialive.EncodeConfiguration
# audio: medialive.EncodeConfiguration


medialive.OutputGroupConfiguration.hls(
    name="hls",
    destinations=[medialive.OutputDestination.to_bucket(bucket, "live/stream")],
    outputs=[medialive.HlsOutputDefinition(
        encodes=[video],
        output_name="video",
        hls_settings=medialive.HlsSettings.standard(
            m3u8_settings=medialive.M3u8Settings.of(
                scte35_behavior=medialive.M3u8Scte35Behavior.PASSTHROUGH,
                program_num=1
            )
        )
    ), medialive.HlsOutputDefinition(
        encodes=[audio],
        output_name="audio",
        hls_settings=medialive.HlsSettings.audio_only(
            audio_group_id="program",
            audio_only_image=medialive.FileLocation.from_bucket(bucket, "art/cover.png")
        )
    )
    ]
)
Stability:

experimental

Static Methods

classmethod from_bucket(bucket, key)

(experimental) Reference a file in an S3 bucket.

Automatically grants the channel role read access.

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

  • key (str) – The object key within the bucket (e.g. ‘slates/offline.png’).

Stability:

experimental

Return type:

FileLocation

classmethod url(url, *, password=None, username=None)

(experimental) Reference a file by URL (e.g. an https:// endpoint or an s3ssl:// path).

Parameters:
  • url (str) – The URL MediaLive reads the file from.

  • password (Optional[IStringParameter]) – (experimental) The SSM parameter that holds the password for accessing the upstream system. The channel role is granted read access to the parameter automatically. Default: - no credentials

  • username (Optional[str]) – (experimental) The username for accessing the upstream system. Default: - no credentials

Stability:

experimental

Return type:

FileLocation