> **Experimental**
>
> `@aws-cdk/aws-medialive-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# FileLocation

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](/cdk/api/stability.html)
- Source: [`lib/file-location.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-medialive-alpha/lib/file-location.ts#L32)

## Example

```ts
declare const bucket: s3.IBucket;
declare const video: medialive.EncodeConfiguration;
declare const audio: medialive.EncodeConfiguration;

medialive.OutputGroupConfiguration.hls({
  name: 'hls',
  destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
  outputs: [
    {
      encodes: [video],
      outputName: 'video',
      hlsSettings: medialive.HlsSettings.standard({
        m3u8Settings: medialive.M3u8Settings.of({
          scte35Behavior: medialive.M3u8Scte35Behavior.PASSTHROUGH,
          programNum: 1,
        }),
      }),
    },
    {
      encodes: [audio],
      outputName: 'audio',
      hlsSettings: medialive.HlsSettings.audioOnly({
        audioGroupId: 'program',
        audioOnlyImage: medialive.FileLocation.fromBucket(bucket, 'art/cover.png'),
      }),
    },
  ],
});
```

## Initializer

```ts
new FileLocation()
```

## Methods

- `fromBucket(bucket: IBucket, key: string): FileLocation // chainable` (static) — Reference a file in an S3 bucket.

  Automatically grants the channel role read access.

  **Parameters**

  - `bucket` — The S3 bucket containing the file.
  - `key` — The object key within the bucket (e.g. 'slates/offline.png').

- `url(url: string, options?: FileLocationOptions): FileLocation // chainable` (static) — Reference a file by URL (e.g. an `https://` endpoint or an `s3ssl://` path).

  **Parameters**

  - `url` — The URL MediaLive reads the file from.
  - `options` — Optional credentials.
