interface BurnInDestinationProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.BurnInDestinationProps |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#BurnInDestinationProps |
Java | software.amazon.awscdk.services.medialive.alpha.BurnInDestinationProps |
Python | aws_cdk.aws_medialive_alpha.BurnInDestinationProps |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป BurnInDestinationProps |
Implements
Caption
Properties for burn-in captions.
Example
// 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
| Name | Type | Description |
|---|---|---|
| alignment? | Caption | Caption alignment. |
| background | Caption | The color of the rectangle behind the captions. |
| background | number | The opacity of the background rectangle (0 transparent .. 255 opaque). |
| font? | File | 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). |
| font | Caption | The color of the burned-in captions. |
| font | number | The opacity of the burned-in captions (0 transparent .. 255 opaque). |
| font | number | The font resolution in DPI. |
| font | Caption | Font size โ CaptionFontSize.AUTO to scale with the output, or CaptionFontSize.of(points) for an exact size in points. |
| outline | Caption | The font outline color. |
| outline | number | The font outline size in pixels. |
| shadow | Caption | The color of the shadow cast by the captions. |
| shadow | number | The opacity of the shadow (0 transparent .. 255 opaque). |
| shadow | number | The horizontal offset of the shadow in pixels (negative shifts left). |
| shadow | number | The vertical offset of the shadow in pixels (negative shifts up). |
| subtitle | string | For Teletext input, the number of lines for the captions bitmap. |
| teletext | Caption | Whether a fixed grid is used to generate the subtitle bitmap (Teletext input). |
| x | number | The horizontal position of the captions in pixels from the left. |
| y | number | The vertical position of the captions in pixels from the top. |
alignment?
Type:
Caption
(optional, default: CaptionAlignment.CENTERED)
Caption alignment.
With explicit x/y positions, the font is justified relative to them.
backgroundColor?
Type:
Caption
(optional, default: service default)
The color of the rectangle behind the captions.
backgroundOpacity?
Type:
number
(optional, default: service default)
The opacity of the background rectangle (0 transparent .. 255 opaque).
font?
Type:
File
(optional, default: service default font)
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).
fontColor?
Type:
Caption
(optional, default: CaptionFontColor.WHITE)
The color of the burned-in captions.
fontOpacity?
Type:
number
(optional, default: 255)
The opacity of the burned-in captions (0 transparent .. 255 opaque).
fontResolution?
Type:
number
(optional, default: 96)
The font resolution in DPI.
fontSize?
Type:
Caption
(optional, default: CaptionFontSize.AUTO)
Font size โ CaptionFontSize.AUTO to scale with the output, or CaptionFontSize.of(points) for an exact size in points.
outlineColor?
Type:
Caption
(optional, default: CaptionOutlineColor.BLACK)
The font outline color.
outlineSize?
Type:
number
(optional, default: 2)
The font outline size in pixels.
shadowColor?
Type:
Caption
(optional, default: CaptionShadowColor.NONE)
The color of the shadow cast by the captions.
shadowOpacity?
Type:
number
(optional, default: 0)
The opacity of the shadow (0 transparent .. 255 opaque).
shadowXOffset?
Type:
number
(optional, default: service default)
The horizontal offset of the shadow in pixels (negative shifts left).
shadowYOffset?
Type:
number
(optional, default: service default)
The vertical offset of the shadow in pixels (negative shifts up).
subtitleRows?
Type:
string
(optional, default: service default)
For Teletext input, the number of lines for the captions bitmap.
teletextGridControl?
Type:
Caption
(optional, default: CaptionTeletextGridControl.FIXED)
Whether a fixed grid is used to generate the subtitle bitmap (Teletext input).
xPosition?
Type:
number
(optional, default: determined by alignment)
The horizontal position of the captions in pixels from the left.
yPosition?
Type:
number
(optional, default: positioned towards the bottom)
The vertical position of the captions in pixels from the top.

.NET
Go
Java
Python
TypeScript (