Membrane.FFmpeg.VideoFilter.TextOverlay (Membrane FFmpeg Video Filter plugin v0.2.0) View Source

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

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 provided

  • text_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
  • fontsize

    any

    Default value: 12
    Size of the displayed font

  • fontcolor

    any

    Default value: "black"
    Choose font color according to the ffmpeg color syntax (https://ffmpeg.org/ffmpeg-utils.html#color-syntax)

  • fontfile

    any

    Default value: nil
    Path to the file with the desired font. If not set, default font fallback from fontconfig is used

  • box?

    boolean

    Default value: false
    Set to true if a box is to be displayed behind the text

  • boxcolor

    any

    Default value: "white"
    If the box? is set to true, display a box in the given color

  • border?

    boolean

    Default value: false
    Set to true to display a gray border around letters

  • horizontal_align

    :left | :right | :center

    Default value: :left
    Horizontal position of the displayed text

  • vertical_align

    :top | :bottom | :center

    Default value: :bottom
    Vertical position of the displayed text

Pads

:input

Availability:always
CapsMembrane.Caps.Video.Raw, restrictions:<br />&nbsp;&nbsp;aligned: true
Demand unit:buffers
Direction:input
Mode:pull
Name:input

:output

Availability:always
CapsMembrane.Caps.Video.Raw, restrictions:<br />&nbsp;&nbsp;aligned: true
Direction:output
Mode:pull
Name:output

Link to this section Summary

Types

t()

Struct containing options for Membrane.FFmpeg.VideoFilter.TextOverlay

Functions

Returns description of options available for this module

Link to this section Types

Specs

t() :: %Membrane.FFmpeg.VideoFilter.TextOverlay{
  border?: boolean(),
  box?: boolean(),
  boxcolor: any(),
  fontcolor: any(),
  fontfile: any(),
  fontsize: 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