Skip to main content

Text_overlay

NameTypeDescription
xinteger
string
The x location to start the imprint. Can use expressions such as w-20 (w: width of the video).
default: 25
yinteger
string
The y location to start the imprint. Can use expressions such as h-20 (h: height of the video).
default: 25
opacitynumber
Opacity of the text overlay. 0 = fully transparent, 1 = fully opaque.
default: 1
textstringThe text string to be drawn.
text_fileobjectDefines the location of the text file to be used.
fontstringThe font descriptor (compliant with fontconfig). Examples: 'Sans', 'URW Bookman L:style=Demi Bold Italic'.
font_fileobjectDefines the location of the font file to be used.
font_colorstring
The color to be used for drawing fonts. Example: black: opaque black, green@0.8: green with 0.8 alpha.
default: black
font_sizeinteger
string
The font size in points. Can use expressions such as h/10 (w: width of the video, h: height of the video). A font size of 16 is the default.
default: 16
tab_sizeinteger
The size of the tab in number of spaces. The \t character is replaced with spaces.
minimum: 1
default: 4
shadow_colorstring
The color to be used for drawing a shadow behind the drawn text. Example: black: opaque black, green@0.8: green with 0.8 alpha.
default: black
shadow_xinteger
The x offset for the text shadow position with respect to the position of the text. It can be either positive or negative value.
shadow_yinteger
The y offset for the text shadow position with respect to the position of the text. It can be either positive or negative value.
border_colorstring
The color to be used for drawing border around text. Example: black: opaque black, green@0.8: green with 0.8 alpha.
border_sizeinteger
The width of the border to be drawn around the text.
background_colorstring
The color to be used for drawing box around text. Example: black: opaque black, green@0.8: green with 0.8 alpha.
background_sizeinteger
The width of the box to be drawn around the background.
fix_boundsboolean
Correct text coords to avoid clipping.
start_secnumber
Start point (in seconds) of the overlay.
duration_secnumber
Duration (in seconds) of the overlay.
fadein_duration_secnumber
Fade-in time (in seconds) of the overlay.
fadeout_duration_secnumber
Fade-out time (in seconds) of the overlay.

Example text_overlay

{
"uid": "transcode_task",
"kind": "transcode",
"payload": {
"location": {
},
"targets": [
{
"file_pattern": "{source_basename}_text_overlay.mp4",
"container": {
"kind": "mp4"
},
"video": {
"codec": "h264",
"filters": [
{
"kind": "text_overlay",
"payload": {
"x": 100,
"y": 100,
"opacity": 1,
"text": "YOUR TEXT HERE",
"font": "Times New Roman",
"font_color": "red",
"font_size": "h/5",
"duration_sec": 5,
"shadow_color": "blue",
"shadow_x": 0,
"shadow_y": 30
}
}
]
}
}
]
}
}