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

Base interface for an encode configuration (video, audio, or caption).

The same EncodeConfiguration instance can be shared across multiple output groups within a channel.
The channel automatically deduplicates encode descriptions by name at synth time.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/encode-configuration.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-medialive-alpha/lib/encode-configuration.ts#L15)

## Example

```ts
// Define a caption selector on the input attachment (see Input Attachment Settings below)
const captionSelector = medialive.CaptionSelector.embedded('captions');

// WebVTT captions — packaged alongside the video encode in the same output
const webvtt = medialive.EncodeConfiguration.caption({
  name: 'eng_webvtt',
  captionSelectorName: captionSelector.name,
  languageCode: 'eng',
  languageDescription: 'English',
  destination: medialive.CaptionDestination.webvtt(),
});

// Burned-in captions — rendered into the video, styled via the burn-in options
const burnIn = medialive.EncodeConfiguration.caption({
  name: 'eng_burnin',
  captionSelectorName: captionSelector.name,
  destination: medialive.CaptionDestination.burnIn({
    alignment: medialive.CaptionAlignment.CENTERED,
    fontColor: medialive.CaptionFontColor.WHITE,
    outlineColor: medialive.CaptionOutlineColor.BLACK,
    fontSize: medialive.CaptionFontSize.AUTO,
  }),
});
```

## Initializer

```ts
new EncodeConfiguration()
```

## Properties

- `name`: string (required) — The unique name for this encode, used to reference it from outputs.

## Methods

- `audio(props: AudioEncodeProps): EncodeConfiguration // chainable` (static) — Create an audio encode configuration.

- `caption(props: CaptionEncodeProps): EncodeConfiguration // chainable` (static) — Create a caption encode configuration.

- `video(props: VideoEncodeProps): EncodeConfiguration // chainable` (static) — Create a video encode configuration.
