CaptionFontStyleProps

class aws_cdk.aws_medialive_alpha.CaptionFontStyleProps(*, alignment=None, background_color=None, background_opacity=None, font=None, font_color=None, font_opacity=None, font_resolution=None, font_size=None, outline_color=None, outline_size=None, shadow_color=None, shadow_opacity=None, shadow_x_offset=None, shadow_y_offset=None, subtitle_rows=None, teletext_grid_control=None, x_position=None, y_position=None)

Bases: object

(experimental) Font and positioning settings for a rendered caption output (burn-in or DVB-Sub).

Parameters:
  • alignment (Optional[CaptionAlignment]) – (experimental) Caption alignment. With explicit x/y positions, the font is justified relative to them. Default: CaptionAlignment.CENTERED

  • background_color (Optional[CaptionBackgroundColor]) – (experimental) The color of the rectangle behind the captions. Default: - service default

  • background_opacity (Union[int, float, None]) – (experimental) The opacity of the background rectangle (0 transparent .. 255 opaque). Default: - service default

  • font (Optional[FileLocation]) – (experimental) 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

  • font_color (Optional[CaptionFontColor]) – (experimental) The color of the burned-in captions. Default: CaptionFontColor.WHITE

  • font_opacity (Union[int, float, None]) – (experimental) The opacity of the burned-in captions (0 transparent .. 255 opaque). Default: 255

  • font_resolution (Union[int, float, None]) – (experimental) The font resolution in DPI. Default: 96

  • font_size (Optional[CaptionFontSize]) – (experimental) Font size — CaptionFontSize.AUTO to scale with the output, or CaptionFontSize.of(points) for an exact size in points. Default: CaptionFontSize.AUTO

  • outline_color (Optional[CaptionOutlineColor]) – (experimental) The font outline color. Default: CaptionOutlineColor.BLACK

  • outline_size (Union[int, float, None]) – (experimental) The font outline size in pixels. Default: 2

  • shadow_color (Optional[CaptionShadowColor]) – (experimental) The color of the shadow cast by the captions. Default: CaptionShadowColor.NONE

  • shadow_opacity (Union[int, float, None]) – (experimental) The opacity of the shadow (0 transparent .. 255 opaque). Default: 0

  • shadow_x_offset (Union[int, float, None]) – (experimental) The horizontal offset of the shadow in pixels (negative shifts left). Default: - service default

  • shadow_y_offset (Union[int, float, None]) – (experimental) The vertical offset of the shadow in pixels (negative shifts up). Default: - service default

  • subtitle_rows (Optional[str]) – (experimental) For Teletext input, the number of lines for the captions bitmap. Default: - service default

  • teletext_grid_control (Optional[CaptionTeletextGridControl]) – (experimental) Whether a fixed grid is used to generate the subtitle bitmap (Teletext input). Default: CaptionTeletextGridControl.FIXED

  • x_position (Union[int, float, None]) – (experimental) The horizontal position of the captions in pixels from the left. Default: - determined by alignment

  • y_position (Union[int, float, None]) – (experimental) The vertical position of the captions in pixels from the top. Default: - positioned towards the bottom

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive_alpha as medialive_alpha

# caption_alignment: medialive_alpha.CaptionAlignment
# caption_background_color: medialive_alpha.CaptionBackgroundColor
# caption_font_color: medialive_alpha.CaptionFontColor
# caption_font_size: medialive_alpha.CaptionFontSize
# caption_outline_color: medialive_alpha.CaptionOutlineColor
# caption_shadow_color: medialive_alpha.CaptionShadowColor
# caption_teletext_grid_control: medialive_alpha.CaptionTeletextGridControl
# file_location: medialive_alpha.FileLocation

caption_font_style_props = medialive_alpha.CaptionFontStyleProps(
    alignment=caption_alignment,
    background_color=caption_background_color,
    background_opacity=123,
    font=file_location,
    font_color=caption_font_color,
    font_opacity=123,
    font_resolution=123,
    font_size=caption_font_size,
    outline_color=caption_outline_color,
    outline_size=123,
    shadow_color=caption_shadow_color,
    shadow_opacity=123,
    shadow_x_offset=123,
    shadow_y_offset=123,
    subtitle_rows="subtitleRows",
    teletext_grid_control=caption_teletext_grid_control,
    x_position=123,
    y_position=123
)

Attributes

alignment

(experimental) Caption alignment.

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

Default:

CaptionAlignment.CENTERED

Stability:

experimental

background_color

(experimental) The color of the rectangle behind the captions.

Default:
  • service default

Stability:

experimental

background_opacity

(experimental) The opacity of the background rectangle (0 transparent .. 255 opaque).

Default:
  • service default

Stability:

experimental

font

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

Stability:

experimental

font_color

(experimental) The color of the burned-in captions.

Default:

CaptionFontColor.WHITE

Stability:

experimental

font_opacity

(experimental) The opacity of the burned-in captions (0 transparent .. 255 opaque).

Default:

255

Stability:

experimental

font_resolution

(experimental) The font resolution in DPI.

Default:

96

Stability:

experimental

font_size

(experimental) Font size — CaptionFontSize.AUTO to scale with the output, or CaptionFontSize.of(points) for an exact size in points.

Default:

CaptionFontSize.AUTO

Stability:

experimental

outline_color

(experimental) The font outline color.

Default:

CaptionOutlineColor.BLACK

Stability:

experimental

outline_size

(experimental) The font outline size in pixels.

Default:

2

Stability:

experimental

shadow_color

(experimental) The color of the shadow cast by the captions.

Default:

CaptionShadowColor.NONE

Stability:

experimental

shadow_opacity

(experimental) The opacity of the shadow (0 transparent .. 255 opaque).

Default:

0

Stability:

experimental

shadow_x_offset

(experimental) The horizontal offset of the shadow in pixels (negative shifts left).

Default:
  • service default

Stability:

experimental

shadow_y_offset

(experimental) The vertical offset of the shadow in pixels (negative shifts up).

Default:
  • service default

Stability:

experimental

subtitle_rows

(experimental) For Teletext input, the number of lines for the captions bitmap.

Default:
  • service default

Stability:

experimental

teletext_grid_control

(experimental) Whether a fixed grid is used to generate the subtitle bitmap (Teletext input).

Default:

CaptionTeletextGridControl.FIXED

Stability:

experimental

x_position

(experimental) The horizontal position of the captions in pixels from the left.

Default:
  • determined by alignment

Stability:

experimental

y_position

(experimental) The vertical position of the captions in pixels from the top.

Default:
  • positioned towards the bottom

Stability:

experimental