# CaptionDestination

The output caption format for a caption encode.

Use the static factory methods to select one of
the supported destination types.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/caption-settings.ts`](https://github.com/aws/aws-cdk/blob/v2.273.0-alpha.0/packages/@aws-cdk/aws-medialive-alpha/lib/caption-settings.ts#L425)

## 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 CaptionDestination()
```

## Methods

- `arib(): CaptionDestination // chainable` (static) — ARIB captions.

- `burnIn(props?: BurnInDestinationProps): CaptionDestination // chainable` (static) — Burned-in captions rendered into the video.

- `dvbSub(props?: DvbSubDestinationProps): CaptionDestination // chainable` (static) — DVB-Sub bitmap captions.

- `ebuTtD(props?: EbuTtDDestinationProps): CaptionDestination // chainable` (static) — EBU-TT-D sidecar captions.

- `embedded(): CaptionDestination // chainable` (static) — Embedded (CEA-608/708) captions.

- `embeddedPlusScte20(): CaptionDestination // chainable` (static) — Embedded plus SCTE-20 captions.

- `rtmpCaptionInfo(): CaptionDestination // chainable` (static) — RTMP CaptionInfo captions.

- `scte20PlusEmbedded(): CaptionDestination // chainable` (static) — SCTE-20 plus embedded captions.

- `smpteTt(): CaptionDestination // chainable` (static) — SMPTE-TT sidecar captions.

- `teletext(): CaptionDestination // chainable` (static) — Teletext captions.

- `ttml(props?: TtmlDestinationProps): CaptionDestination // chainable` (static) — TTML sidecar captions.

- `webvtt(props?: WebvttDestinationProps): CaptionDestination // chainable` (static) — WebVTT sidecar captions.
