CaptionDestination
- class aws_cdk.aws_medialive_alpha.CaptionDestination
Bases:
object(experimental) The output caption format for a caption encode.
Use the static factory methods to select one of the supported destination types.
- 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 ) )
- Stability:
experimental
Static Methods
- classmethod arib()
(experimental) ARIB captions.
- Stability:
experimental
- Return type:
- classmethod burn_in(*, 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)
(experimental) Burned-in captions rendered into the video.
- Parameters:
alignment (
Optional[CaptionAlignment]) – (experimental) Caption alignment. With explicit x/y positions, the font is justified relative to them. Default: CaptionAlignment.CENTEREDbackground_color (
Optional[CaptionBackgroundColor]) – (experimental) The color of the rectangle behind the captions. Default: - service defaultbackground_opacity (
Union[int,float,None]) – (experimental) The opacity of the background rectangle (0 transparent .. 255 opaque). Default: - service defaultfont (
Optional[FileLocation]) – (experimental) An external font file (.ttf or .tte) used for burn-in. Provide aFileLocationreferencing an S3 bucket (FileLocation.fromBucket, which auto-grants read access) or a URL (FileLocation.url). Default: - service default fontfont_color (
Optional[CaptionFontColor]) – (experimental) The color of the burned-in captions. Default: CaptionFontColor.WHITEfont_opacity (
Union[int,float,None]) – (experimental) The opacity of the burned-in captions (0 transparent .. 255 opaque). Default: 255font_resolution (
Union[int,float,None]) – (experimental) The font resolution in DPI. Default: 96font_size (
Optional[CaptionFontSize]) – (experimental) Font size —CaptionFontSize.AUTOto scale with the output, orCaptionFontSize.of(points)for an exact size in points. Default: CaptionFontSize.AUTOoutline_color (
Optional[CaptionOutlineColor]) – (experimental) The font outline color. Default: CaptionOutlineColor.BLACKoutline_size (
Union[int,float,None]) – (experimental) The font outline size in pixels. Default: 2shadow_color (
Optional[CaptionShadowColor]) – (experimental) The color of the shadow cast by the captions. Default: CaptionShadowColor.NONEshadow_opacity (
Union[int,float,None]) – (experimental) The opacity of the shadow (0 transparent .. 255 opaque). Default: 0shadow_x_offset (
Union[int,float,None]) – (experimental) The horizontal offset of the shadow in pixels (negative shifts left). Default: - service defaultshadow_y_offset (
Union[int,float,None]) – (experimental) The vertical offset of the shadow in pixels (negative shifts up). Default: - service defaultsubtitle_rows (
Optional[str]) – (experimental) For Teletext input, the number of lines for the captions bitmap. Default: - service defaultteletext_grid_control (
Optional[CaptionTeletextGridControl]) – (experimental) Whether a fixed grid is used to generate the subtitle bitmap (Teletext input). Default: CaptionTeletextGridControl.FIXEDx_position (
Union[int,float,None]) – (experimental) The horizontal position of the captions in pixels from the left. Default: - determined byalignmenty_position (
Union[int,float,None]) – (experimental) The vertical position of the captions in pixels from the top. Default: - positioned towards the bottom
- Stability:
experimental
- Return type:
- classmethod dvb_sub(*, 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)
(experimental) DVB-Sub bitmap captions.
- Parameters:
alignment (
Optional[CaptionAlignment]) – (experimental) Caption alignment. With explicit x/y positions, the font is justified relative to them. Default: CaptionAlignment.CENTEREDbackground_color (
Optional[CaptionBackgroundColor]) – (experimental) The color of the rectangle behind the captions. Default: - service defaultbackground_opacity (
Union[int,float,None]) – (experimental) The opacity of the background rectangle (0 transparent .. 255 opaque). Default: - service defaultfont (
Optional[FileLocation]) – (experimental) An external font file (.ttf or .tte) used for burn-in. Provide aFileLocationreferencing an S3 bucket (FileLocation.fromBucket, which auto-grants read access) or a URL (FileLocation.url). Default: - service default fontfont_color (
Optional[CaptionFontColor]) – (experimental) The color of the burned-in captions. Default: CaptionFontColor.WHITEfont_opacity (
Union[int,float,None]) – (experimental) The opacity of the burned-in captions (0 transparent .. 255 opaque). Default: 255font_resolution (
Union[int,float,None]) – (experimental) The font resolution in DPI. Default: 96font_size (
Optional[CaptionFontSize]) – (experimental) Font size —CaptionFontSize.AUTOto scale with the output, orCaptionFontSize.of(points)for an exact size in points. Default: CaptionFontSize.AUTOoutline_color (
Optional[CaptionOutlineColor]) – (experimental) The font outline color. Default: CaptionOutlineColor.BLACKoutline_size (
Union[int,float,None]) – (experimental) The font outline size in pixels. Default: 2shadow_color (
Optional[CaptionShadowColor]) – (experimental) The color of the shadow cast by the captions. Default: CaptionShadowColor.NONEshadow_opacity (
Union[int,float,None]) – (experimental) The opacity of the shadow (0 transparent .. 255 opaque). Default: 0shadow_x_offset (
Union[int,float,None]) – (experimental) The horizontal offset of the shadow in pixels (negative shifts left). Default: - service defaultshadow_y_offset (
Union[int,float,None]) – (experimental) The vertical offset of the shadow in pixels (negative shifts up). Default: - service defaultsubtitle_rows (
Optional[str]) – (experimental) For Teletext input, the number of lines for the captions bitmap. Default: - service defaultteletext_grid_control (
Optional[CaptionTeletextGridControl]) – (experimental) Whether a fixed grid is used to generate the subtitle bitmap (Teletext input). Default: CaptionTeletextGridControl.FIXEDx_position (
Union[int,float,None]) – (experimental) The horizontal position of the captions in pixels from the left. Default: - determined byalignmenty_position (
Union[int,float,None]) – (experimental) The vertical position of the captions in pixels from the top. Default: - positioned towards the bottom
- Stability:
experimental
- Return type:
- classmethod ebu_tt_d(*, copyright_holder=None, default_font_size=None, default_line_height=None, fill_line_gap=None, font_family=None, style_control=None)
(experimental) EBU-TT-D sidecar captions.
- Parameters:
copyright_holder (
Optional[str]) – (experimental) The copyright holder included in the TTML copyright metadata tag. Default: - no copyright holderdefault_font_size (
Union[int,float,None]) – (experimental) The default font size. Default: - service defaultdefault_line_height (
Union[int,float,None]) – (experimental) The default line height. Default: - service defaultfill_line_gap (
Optional[EbuTtDFillLineGap]) – (experimental) How to handle the gap between multi-line captions. Default: - service defaultfont_family (
Optional[str]) – (experimental) A comma-separated list of font families to include (valid only whenstyleControlis INCLUDE). Default: - ‘monospaced’style_control (
Optional[EbuTtDStyleControl]) – (experimental) Whether source style information is included in the EBU-TT-D font data. Default: - service default
- Stability:
experimental
- Return type:
- classmethod embedded()
(experimental) Embedded (CEA-608/708) captions.
- Stability:
experimental
- Return type:
- classmethod embedded_plus_scte20()
(experimental) Embedded plus SCTE-20 captions.
- Stability:
experimental
- Return type:
- classmethod rtmp_caption_info()
(experimental) RTMP CaptionInfo captions.
- Stability:
experimental
- Return type:
- classmethod scte20_plus_embedded()
(experimental) SCTE-20 plus embedded captions.
- Stability:
experimental
- Return type:
- classmethod smpte_tt()
(experimental) SMPTE-TT sidecar captions.
- Stability:
experimental
- Return type:
- classmethod teletext()
(experimental) Teletext captions.
- Stability:
experimental
- Return type:
- classmethod ttml(*, style_control=None)
(experimental) TTML sidecar captions.
- Parameters:
style_control (
Optional[TtmlStyleControl]) – (experimental) Whether to pass through style and position from a TTML-like source. Default: TtmlStyleControl.PASSTHROUGH- Stability:
experimental
- Return type:
- classmethod webvtt(*, style_control=None)
(experimental) WebVTT sidecar captions.
- Parameters:
style_control (
Optional[WebvttStyleControl]) – (experimental) Whether to pass through source color and position to the WebVTT output. PASSTHROUGH is only valid for EMBEDDED or TELETEXT sources. Default: WebvttStyleControl.NO_STYLE_DATA- Stability:
experimental
- Return type: