View Source Membrane.FFmpeg.VideoFilter.TextOverlay (Membrane FFmpeg Video Filter plugin v0.6.1)
Element adding text overlay to raw video frames - using 'drawtext' video filter from FFmpeg Library. (https://ffmpeg.org/ffmpeg-filters.html#drawtext-1). Element allows for specifying most commonly used 'drawtext' settings (such as fontsize, fontcolor) through element options.
The element expects each frame to be received in a separate buffer. Additionally, the element has to receive proper caps with picture format and dimensions.
element-options
Element options
Passed via struct Membrane.FFmpeg.VideoFilter.TextOverlay.t/0
text
any
Default value:
nil
Text to be displayed on video. Either text or text_intervals must be providedtext_intervals
[{{Time.t(), Time.t() | :infinity}, String.t()}]
Default value:
[]
List of time intervals when each given text should appear. Intervals should not overlap.Either text or text_intervals must be provided
font_size
any
Default value:
12
Size of the displayed fontfont_color
any
Default value:
"black"
Choose font color according to the ffmpeg color syntax (https://ffmpeg.org/ffmpeg-utils.html#color-syntax)font_file
any
Default value:
nil
Path to the file with the desired font. If not set, default font fallback from fontconfig is usedbox?
boolean
Default value:
false
Set to true if a box is to be displayed behind the textbox_color
any
Default value:
"white"
If the box? is set to true, display a box in the given colorborder_width
any
Default value:
0
Set the width of the border around the textborder_color
any
Default value:
"black"
Set the color of the border, if existshorizontal_align
:left | :right | :center
Default value:
:left
Horizontal position of the displayed textvertical_align
:top | :bottom | :center
Default value:
:bottom
Vertical position of the displayed text
pads
Pads
input
:input
Availability | :always |
Caps | Membrane.RawVideo , restrictions:aligned: true |
Demand mode | :auto |
Demand unit | :buffers |
Direction | :input |
Mode | :pull |
Name | :input |
output
:output
Availability | :always |
Caps | Membrane.RawVideo , restrictions:aligned: true |
Demand mode | :auto |
Demand unit | :buffers |
Direction | :output |
Mode | :pull |
Name | :output |
Link to this section Summary
Types
Struct containing options for Membrane.FFmpeg.VideoFilter.TextOverlay
Functions
Returns pads descriptions for Membrane.FFmpeg.VideoFilter.TextOverlay
Returns description of options available for this module
Link to this section Types
Specs
t() :: %Membrane.FFmpeg.VideoFilter.TextOverlay{ border_color: any(), border_width: any(), box?: boolean(), box_color: any(), font_color: any(), font_file: any(), font_size: any(), horizontal_align: :left | :right | :center, text: any(), text_intervals: [{{Time.t(), Time.t() | :infinity}, String.t()}], vertical_align: :top | :bottom | :center }
Struct containing options for Membrane.FFmpeg.VideoFilter.TextOverlay
Link to this section Functions
Specs
membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]
Returns pads descriptions for Membrane.FFmpeg.VideoFilter.TextOverlay
Specs
options() :: keyword()
Returns description of options available for this module