Skip to content
v2.273.0

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 ​

alignmentCaptionAlignmentalignmentCaptionAlignmentalignmentCaptionAlignmentAlignmentCaptionAlignmentAlignmentCaptionAlignment= CaptionAlignment.CENTERED#
Caption alignment.

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

backgroundColorCaptionBackgroundColorbackground_colorCaptionBackgroundColorbackgroundColorCaptionBackgroundColorBackgroundColorCaptionBackgroundColorBackgroundColorCaptionBackgroundColor= service default#
The color of the rectangle behind the captions.
backgroundOpacitynumberbackground_opacityint | floatbackgroundOpacityNumberBackgroundOpacitydoubleBackgroundOpacity*float64= service default#
The opacity of the background rectangle (0 transparent .. 255 opaque).
fontFileLocationfontFileLocationfontFileLocationFontFileLocationFontFileLocation= service default font#
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`).
fontColorCaptionFontColorfont_colorCaptionFontColorfontColorCaptionFontColorFontColorCaptionFontColorFontColorCaptionFontColor= CaptionFontColor.WHITE#
The color of the burned-in captions.
fontOpacitynumberfont_opacityint | floatfontOpacityNumberFontOpacitydoubleFontOpacity*float64= 255#
The opacity of the burned-in captions (0 transparent .. 255 opaque).
fontResolutionnumberfont_resolutionint | floatfontResolutionNumberFontResolutiondoubleFontResolution*float64= 96#
The font resolution in DPI.
fontSizeCaptionFontSizefont_sizeCaptionFontSizefontSizeCaptionFontSizeFontSizeCaptionFontSizeFontSizeCaptionFontSize= CaptionFontSize.AUTO#
Font size — `CaptionFontSize.AUTO` to scale with the output, or `CaptionFontSize.of(points)` for an exact size in points.
outlineColorCaptionOutlineColoroutline_colorCaptionOutlineColoroutlineColorCaptionOutlineColorOutlineColorCaptionOutlineColorOutlineColorCaptionOutlineColor= CaptionOutlineColor.BLACK#
The font outline color.
outlineSizenumberoutline_sizeint | floatoutlineSizeNumberOutlineSizedoubleOutlineSize*float64= 2#
The font outline size in pixels.
shadowColorCaptionShadowColorshadow_colorCaptionShadowColorshadowColorCaptionShadowColorShadowColorCaptionShadowColorShadowColorCaptionShadowColor= CaptionShadowColor.NONE#
The color of the shadow cast by the captions.
shadowOpacitynumbershadow_opacityint | floatshadowOpacityNumberShadowOpacitydoubleShadowOpacity*float64= 0#
The opacity of the shadow (0 transparent .. 255 opaque).
shadowXOffsetnumbershadow_x_offsetint | floatshadowXOffsetNumberShadowXOffsetdoubleShadowXOffset*float64= service default#
The horizontal offset of the shadow in pixels (negative shifts left).
shadowYOffsetnumbershadow_y_offsetint | floatshadowYOffsetNumberShadowYOffsetdoubleShadowYOffset*float64= service default#
The vertical offset of the shadow in pixels (negative shifts up).
subtitleRowsstringsubtitle_rowsstrsubtitleRowsStringSubtitleRowsstringSubtitleRows*string= service default#
For Teletext input, the number of lines for the captions bitmap.
teletextGridControlCaptionTeletextGridControlteletext_grid_controlCaptionTeletextGridControlteletextGridControlCaptionTeletextGridControlTeletextGridControlCaptionTeletextGridControlTeletextGridControlCaptionTeletextGridControl= CaptionTeletextGridControl.FIXED#
Whether a fixed grid is used to generate the subtitle bitmap (Teletext input).
xPositionnumberx_positionint | floatxPositionNumberXPositiondoubleXPosition*float64= determined by `alignment`#
The horizontal position of the captions in pixels from the left.
yPositionnumbery_positionint | floatyPositionNumberYPositiondoubleYPosition*float64= positioned towards the bottom#
The vertical position of the captions in pixels from the top.