Text input

Text input properties for Script Engine. Generates a video layer containing text — either a fixed string you type in, or a dynamic value such as the current time, UTC time, frame counter, host name, project name, or text pulled from another component's property. Includes full control over font, size, weight, slant, alignment, margins, and foreground/background colours.

Property Type Access Description
ShowAdvancedOptions bool get/set Show or hide the input's advanced settings in the editor UI. [default=false].
Text string get/set The text shown on the layer. [default="Sample text"]. Only used when TextType is CustomText — for the dynamic presets (time, frame counter, host name, etc.) the value here is ignored and the displayed string is generated automatically. Set from a script to update the on-air text live.
TextType TextType get/set What kind of text to display. [default=CustomText]. CustomText shows the value of Text verbatim. The other presets generate the text automatically: short or long current time, UTC time, frame counter, host name, project name, or — when used with a media file input — the file's name, time code, or remaining time. ObjectProperty displays the live value of a property on another component.
TextAlign SKTextAlign get/set Horizontal alignment of the text within the layer. [default=Left]. Left, Center, or Right. The text is positioned inside the configured Width and Height, respecting LeftMargin when aligned to the left.
LeftMargin int get/set Empty space (in pixels) on the left side of the text. [min=0, max=200, default=0]. Use to nudge the text inward from the left edge of the layer. Most relevant when TextAlign is Left; for centred or right-aligned text it has little visible effect.
ThrottledUpdate TextUpdateThrottle get/set How often the text is redrawn. [default=Every frame]. At the default setting the text is updated on every frame, which is needed for fast-moving content like a frame counter or time code. Pick a slower interval to reduce processing cost when the text changes infrequently (e.g. a static label or a clock that only needs to refresh once per second).
Width int get/set Width of the text layer in pixels. [min=1, max=4096, default=800]. Defines the horizontal size of the area the text is drawn into. Text that runs longer than this width is clipped, so size the layer to fit the longest expected string.
Height int get/set Height of the text layer in pixels. [min=1, max=4096, default=100]. Defines the vertical size of the area the text is drawn into. Should be tall enough to fit the chosen FontSize comfortably — a value roughly 1.5–2× the font size is a safe rule of thumb.
FontSize int get/set Size of the text in pixels. [min=6, max=256, default=50]. Larger values produce taller letters; make sure the layer's Height is big enough to fit the chosen size.
FontFamily Font get/set Which font to use for the text. Picks the typeface from the fonts installed on the system (e.g. Arial, Verdana, Roboto). Only fonts that include the actual font file will render correctly on a different machine — when sharing a project, make sure the chosen font is also available there.
FontWeight SKFontStyleWeight get/set How thick the strokes of the letters are. [default=Normal]. Ranges from Thin and Light through Normal and Medium up to Bold, ExtraBold, and Black. Note that not every font ships with every weight — picking a weight the font doesn't include will fall back to the closest available one.
FontSlantStyle SKFontStyleSlant get/set Whether the text is upright or italic. [default=Upright]. Upright is regular, non-slanted text. Italic slants the letters in the font's designed italic style. Oblique is a synthetic slant the renderer applies when the font has no dedicated italic.
FontWidth SKFontStyleWidth get/set How wide or narrow the letters are drawn. [default=Normal]. Ranges from UltraCondensed and Condensed (narrower letters) through Normal to Expanded and UltraExpanded (wider letters). Like font weight, this only takes effect when the chosen font ships with the requested width — otherwise the closest available width is used.
Red int get/set Text foreground red channel. [min=0, max=255, default=255].
Green int get/set Text foreground green channel. [min=0, max=255, default=255].
Blue int get/set Text foreground blue channel. [min=0, max=255, default=255].
Alpha int get/set Text foreground alpha channel. [min=0, max=255, default=255].
ColorPicker AdvancedColorPicker get/set Combined colour picker for the text foreground. Lets you pick the text colour from a colour wheel / palette in the editor. Internally updates the Red, Green, Blue, and Alpha channel values together. Scripts can read or set those channels directly if they need numeric control.
BgRed int get/set Text background red channel. [min=0, max=255, default=0].
BgGreen int get/set Text background green channel. [min=0, max=255, default=0].
BgBlue int get/set Text background blue channel. [min=0, max=255, default=0].
BgAlpha int get/set Text background alpha channel. [min=0, max=255, default=0].
BgColorPicker AdvancedColorPicker get/set Combined colour picker for the background behind the text. Lets you pick the background colour from a colour wheel / palette in the editor. Internally updates the BgRed, BgGreen, BgBlue, and BgAlpha channel values together. Set the alpha to 0 (the default) for a fully transparent background.
RenderTime string get Time taken to draw the text on the most recent frame, in milliseconds (read-only). Useful as a sanity check while tuning fonts, sizes, or ThrottledUpdate — a steadily high value indicates the text layer is expensive enough that throttling the update rate would help.

Inherits from: AbstractInput, AbstractAudioProcessing, AbstractAudioMetering.

See also: Text input in Inputs — user-facing introduction, screenshots, and section summaries.