Skip to content
v2.274.0

Experimental

@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

CaptionFontSize Class ​

Font size for burn-in and DVB-Sub captions.

Use {@link CaptionFontSize.AUTO} to scale the font size with the output resolution, or {@link CaptionFontSize.of} to set an exact size in points.

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 ​

Scale the font size automatically to match the output resolution.

Methods ​

of(points: number): CaptionFontSize // chainable@staticmethod def of(points: int | float) -> CaptionFontSizepublic static CaptionFontSize of(Number points)public static CaptionFontSize Of(double points)func Of(Points *float64) CaptionFontSizestatic#
An exact font size, in points.
1 parameter

Parameters

  • pointspointspointspointsPoints — the font size in points;