CaptionFontSize

class aws_cdk.aws_medialive_alpha.CaptionFontSize(*args: Any, **kwargs)

Bases: object

(experimental) 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.

Stability:

experimental

ExampleMetadata:

infused

Example:

# Define a caption selector on the input attachment (see Input Attachment Settings below)
caption_selector = medialive.CaptionSelector.embedded("captions")

# WebVTT captions — packaged alongside the video encode in the same output
webvtt = medialive.EncodeConfiguration.caption(
    name="eng_webvtt",
    caption_selector_name=caption_selector.name,
    language_code="eng",
    language_description="English",
    destination=medialive.CaptionDestination.webvtt()
)

# Burned-in captions — rendered into the video, styled via the burn-in options
burn_in = medialive.EncodeConfiguration.caption(
    name="eng_burnin",
    caption_selector_name=caption_selector.name,
    destination=medialive.CaptionDestination.burn_in(
        alignment=medialive.CaptionAlignment.CENTERED,
        font_color=medialive.CaptionFontColor.WHITE,
        outline_color=medialive.CaptionOutlineColor.BLACK,
        font_size=medialive.CaptionFontSize.AUTO
    )
)

Attributes

AUTO = <aws_cdk.aws_medialive_alpha.CaptionFontSize object>

Static Methods

classmethod of(points)

(experimental) An exact font size, in points.

Parameters:

points (Union[int, float]) – the font size in points; must be a positive integer

Stability:

experimental

Return type:

CaptionFontSize