Experimental
@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
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
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,
}),
});
python
# Define a caption selector on the input attachment (see Input Attachment Settings below)
caption_selector = medialive.CaptionSelector.embedded("captions")
# WebVTT captions
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
)
)
java
// Define a caption selector on the input attachment (see Input Attachment Settings below)
CaptionSelector captionSelector = CaptionSelector.embedded("captions");
// WebVTT captions
EncodeConfiguration webvtt = EncodeConfiguration.caption(CaptionEncodeProps.builder()
.name("eng_webvtt")
.captionSelectorName(captionSelector.getName())
.languageCode("eng")
.languageDescription("English")
.destination(CaptionDestination.webvtt())
.build());
// Burned-in captions — rendered into the video, styled via the burn-in options
EncodeConfiguration burnIn = EncodeConfiguration.caption(CaptionEncodeProps.builder()
.name("eng_burnin")
.captionSelectorName(captionSelector.getName())
.destination(CaptionDestination.burnIn(BurnInDestinationProps.builder()
.alignment(CaptionAlignment.CENTERED)
.fontColor(CaptionFontColor.WHITE)
.outlineColor(CaptionOutlineColor.BLACK)
.fontSize(CaptionFontSize.AUTO)
.build()))
.build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
// Define a caption selector on the input attachment (see Input Attachment Settings below)
var captionSelector = CaptionSelector.Embedded("captions");
// WebVTT captions
var webvtt = EncodeConfiguration.Caption(new CaptionEncodeProps {
Name = "eng_webvtt",
CaptionSelectorName = captionSelector.Name,
LanguageCode = "eng",
LanguageDescription = "English",
Destination = CaptionDestination.Webvtt()
});
// Burned-in captions — rendered into the video, styled via the burn-in options
var burnIn = EncodeConfiguration.Caption(new CaptionEncodeProps {
Name = "eng_burnin",
CaptionSelectorName = captionSelector.Name,
Destination = CaptionDestination.BurnIn(new BurnInDestinationProps {
Alignment = CaptionAlignment.CENTERED,
FontColor = CaptionFontColor.WHITE,
OutlineColor = CaptionOutlineColor.BLACK,
FontSize = CaptionFontSize.AUTO
})
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
// Define a caption selector on the input attachment (see Input Attachment Settings below)
captionSelector := medialive.CaptionSelector_Embedded(jsii.String("captions"))
// WebVTT captions
webvtt := medialive.EncodeConfiguration_Caption(&CaptionEncodeProps{
Name: jsii.String("eng_webvtt"),
CaptionSelectorName: captionSelector.Name,
LanguageCode: jsii.String("eng"),
LanguageDescription: jsii.String("English"),
Destination: medialive.CaptionDestination_Webvtt(),
})
// Burned-in captions — rendered into the video, styled via the burn-in options
burnIn := medialive.EncodeConfiguration_Caption(&CaptionEncodeProps{
Name: jsii.String("eng_burnin"),
CaptionSelectorName: captionSelector.*Name,
Destination: medialive.CaptionDestination_BurnIn(&BurnInDestinationProps{
Alignment: medialive.CaptionAlignment_CENTERED(),
FontColor: medialive.CaptionFontColor_WHITE(),
OutlineColor: medialive.CaptionOutlineColor_BLACK(),
FontSize: medialive.CaptionFontSize_AUTO(),
}),
})
Properties
alignmentoptionalCaptionAlignmentalignmentoptionalCaptionAlignmentalignmentoptionalCaptionAlignmentAlignmentoptionalCaptionAlignmentAlignmentoptionalCaptionAlignment= CaptionAlignment.CENTERED#Caption alignment.
With explicit x/y positions, the font is justified relative to them.
backgroundColoroptionalCaptionBackgroundColorbackground_coloroptionalCaptionBackgroundColorbackgroundColoroptionalCaptionBackgroundColorBackgroundColoroptionalCaptionBackgroundColorBackgroundColoroptionalCaptionBackgroundColor#The color of the rectangle behind the captions.
Default: service default
backgroundOpacityoptionalnumberbackground_opacityoptionalint | floatbackgroundOpacityoptionalNumberBackgroundOpacityoptionaldoubleBackgroundOpacityoptional*float64#The opacity of the background rectangle (0 transparent .. 255 opaque).
Default: service default
fontoptionalFileLocationfontoptionalFileLocationfontoptionalFileLocationFontoptionalFileLocationFontoptionalFileLocation#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
fontColoroptionalCaptionFontColorfont_coloroptionalCaptionFontColorfontColoroptionalCaptionFontColorFontColoroptionalCaptionFontColorFontColoroptionalCaptionFontColor= CaptionFontColor.WHITE#The color of the burned-in captions.
fontOpacityoptionalnumberfont_opacityoptionalint | floatfontOpacityoptionalNumberFontOpacityoptionaldoubleFontOpacityoptional*float64= 255#The opacity of the burned-in captions (0 transparent .. 255 opaque).
fontResolutionoptionalnumberfont_resolutionoptionalint | floatfontResolutionoptionalNumberFontResolutionoptionaldoubleFontResolutionoptional*float64= 96#The font resolution in DPI.
fontSizeoptionalCaptionFontSizefont_sizeoptionalCaptionFontSizefontSizeoptionalCaptionFontSizeFontSizeoptionalCaptionFontSizeFontSizeoptionalCaptionFontSize= CaptionFontSize.AUTO#Font size — `CaptionFontSize.AUTO` to scale with the output, or `CaptionFontSize.of(points)` for an exact size in points.
outlineColoroptionalCaptionOutlineColoroutline_coloroptionalCaptionOutlineColoroutlineColoroptionalCaptionOutlineColorOutlineColoroptionalCaptionOutlineColorOutlineColoroptionalCaptionOutlineColor= CaptionOutlineColor.BLACK#The font outline color.
outlineSizeoptionalnumberoutline_sizeoptionalint | floatoutlineSizeoptionalNumberOutlineSizeoptionaldoubleOutlineSizeoptional*float64= 2#The font outline size in pixels.
shadowColoroptionalCaptionShadowColorshadow_coloroptionalCaptionShadowColorshadowColoroptionalCaptionShadowColorShadowColoroptionalCaptionShadowColorShadowColoroptionalCaptionShadowColor= CaptionShadowColor.NONE#The color of the shadow cast by the captions.
shadowOpacityoptionalnumbershadow_opacityoptionalint | floatshadowOpacityoptionalNumberShadowOpacityoptionaldoubleShadowOpacityoptional*float64= 0#The opacity of the shadow (0 transparent .. 255 opaque).
shadowXOffsetoptionalnumbershadow_x_offsetoptionalint | floatshadowXOffsetoptionalNumberShadowXOffsetoptionaldoubleShadowXOffsetoptional*float64#The horizontal offset of the shadow in pixels (negative shifts left).
Default: service default
shadowYOffsetoptionalnumbershadow_y_offsetoptionalint | floatshadowYOffsetoptionalNumberShadowYOffsetoptionaldoubleShadowYOffsetoptional*float64#The vertical offset of the shadow in pixels (negative shifts up).
Default: service default
subtitleRowsoptionalstringsubtitle_rowsoptionalstrsubtitleRowsoptionalStringSubtitleRowsoptionalstringSubtitleRowsoptional*string#For Teletext input, the number of lines for the captions bitmap.
Default: service default
teletextGridControloptionalCaptionTeletextGridControlteletext_grid_controloptionalCaptionTeletextGridControlteletextGridControloptionalCaptionTeletextGridControlTeletextGridControloptionalCaptionTeletextGridControlTeletextGridControloptionalCaptionTeletextGridControl= CaptionTeletextGridControl.FIXED#Whether a fixed grid is used to generate the subtitle bitmap (Teletext input).
xPositionoptionalnumberx_positionoptionalint | floatxPositionoptionalNumberXPositionoptionaldoubleXPositionoptional*float64#The horizontal position of the captions in pixels from the left.
Default: determined by alignment
yPositionoptionalnumbery_positionoptionalint | floatyPositionoptionalNumberYPositionoptionaldoubleYPositionoptional*float64#The vertical position of the captions in pixels from the top.
Default: positioned towards the bottom