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.

BurnInDestinationProps Struct ​

Properties for burn-in captions.

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,
  }),
});

Properties ​

alignmentoptionalCaptionAlignmentalignmentoptionalCaptionAlignmentalignmentoptionalCaptionAlignmentAlignmentoptionalCaptionAlignmentAlignmentoptionalCaptionAlignment= CaptionAlignment.CENTERED#
Caption alignment.

With explicit x/y positions, the font is justified relative to them.

backgroundColoroptionalCaptionBackgroundColorbackground_coloroptionalCaptionBackgroundColorbackgroundColoroptionalCaptionBackgroundColorBackgroundColoroptionalCaptionBackgroundColorBackgroundColoroptionalCaptionBackgroundColor#
The color of the rectangle behind the captions.

Default: service default

backgroundOpacityoptionalnumberbackground_opacityoptionalint | floatbackgroundOpacityoptionalNumberBackgroundOpacityoptionaldoubleBackgroundOpacityoptional*float64#
The opacity of the background rectangle (0 transparent .. 255 opaque).

Default: service default

fontoptionalFileLocationfontoptionalFileLocationfontoptionalFileLocationFontoptionalFileLocationFontoptionalFileLocation#
An external font file (.ttf or .tte) used for burn-in. Provide a `FileLocation` referencing an S3 bucket (`FileLocation.fromBucket`, which auto-grants read access) or a URL (`FileLocation.url`).

Default: service default font

fontColoroptionalCaptionFontColorfont_coloroptionalCaptionFontColorfontColoroptionalCaptionFontColorFontColoroptionalCaptionFontColorFontColoroptionalCaptionFontColor= CaptionFontColor.WHITE#
The color of the burned-in captions.
fontOpacityoptionalnumberfont_opacityoptionalint | floatfontOpacityoptionalNumberFontOpacityoptionaldoubleFontOpacityoptional*float64= 255#
The opacity of the burned-in captions (0 transparent .. 255 opaque).
fontResolutionoptionalnumberfont_resolutionoptionalint | floatfontResolutionoptionalNumberFontResolutionoptionaldoubleFontResolutionoptional*float64= 96#
The font resolution in DPI.
fontSizeoptionalCaptionFontSizefont_sizeoptionalCaptionFontSizefontSizeoptionalCaptionFontSizeFontSizeoptionalCaptionFontSizeFontSizeoptionalCaptionFontSize= CaptionFontSize.AUTO#
Font size — `CaptionFontSize.AUTO` to scale with the output, or `CaptionFontSize.of(points)` for an exact size in points.
outlineColoroptionalCaptionOutlineColoroutline_coloroptionalCaptionOutlineColoroutlineColoroptionalCaptionOutlineColorOutlineColoroptionalCaptionOutlineColorOutlineColoroptionalCaptionOutlineColor= CaptionOutlineColor.BLACK#
The font outline color.
outlineSizeoptionalnumberoutline_sizeoptionalint | floatoutlineSizeoptionalNumberOutlineSizeoptionaldoubleOutlineSizeoptional*float64= 2#
The font outline size in pixels.
shadowColoroptionalCaptionShadowColorshadow_coloroptionalCaptionShadowColorshadowColoroptionalCaptionShadowColorShadowColoroptionalCaptionShadowColorShadowColoroptionalCaptionShadowColor= CaptionShadowColor.NONE#
The color of the shadow cast by the captions.
shadowOpacityoptionalnumbershadow_opacityoptionalint | floatshadowOpacityoptionalNumberShadowOpacityoptionaldoubleShadowOpacityoptional*float64= 0#
The opacity of the shadow (0 transparent .. 255 opaque).
shadowXOffsetoptionalnumbershadow_x_offsetoptionalint | floatshadowXOffsetoptionalNumberShadowXOffsetoptionaldoubleShadowXOffsetoptional*float64#
The horizontal offset of the shadow in pixels (negative shifts left).

Default: service default

shadowYOffsetoptionalnumbershadow_y_offsetoptionalint | floatshadowYOffsetoptionalNumberShadowYOffsetoptionaldoubleShadowYOffsetoptional*float64#
The vertical offset of the shadow in pixels (negative shifts up).

Default: service default

subtitleRowsoptionalstringsubtitle_rowsoptionalstrsubtitleRowsoptionalStringSubtitleRowsoptionalstringSubtitleRowsoptional*string#
For Teletext input, the number of lines for the captions bitmap.

Default: service default

teletextGridControloptionalCaptionTeletextGridControlteletext_grid_controloptionalCaptionTeletextGridControlteletextGridControloptionalCaptionTeletextGridControlTeletextGridControloptionalCaptionTeletextGridControlTeletextGridControloptionalCaptionTeletextGridControl= CaptionTeletextGridControl.FIXED#
Whether a fixed grid is used to generate the subtitle bitmap (Teletext input).
xPositionoptionalnumberx_positionoptionalint | floatxPositionoptionalNumberXPositionoptionaldoubleXPositionoptional*float64#
The horizontal position of the captions in pixels from the left.

Default: determined by alignment

yPositionoptionalnumbery_positionoptionalint | floatyPositionoptionalNumberYPositionoptionaldoubleYPositionoptional*float64#
The vertical position of the captions in pixels from the top.

Default: positioned towards the bottom