textrender

This plugin renders text received on the text sink pad to a video buffer (retaining the alpha channel), so it can later be overlayed on top of video streams using other elements.

The text can contain newline characters. (FIXME: What about text wrapping? It does not make sense in this context)

Example launch lines

 gst-launch-1.0 -v filesrc location=subtitles.srt ! subparse ! textrender ! videoconvert ! autovideosink

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──textrender

Factory details

Authors: – David Schleef , GStreamer maintainers

Classification:Filter/Editor/Video

Rank – none

Plugin – pango

Package – GStreamer Base Plug-ins

Pad Templates

sink

text/x-raw:
         format: { pango-markup, utf8 }

Presencealways

Directionsink

Object typeGstPad


src

video/x-raw:
         format: { AYUV, ARGB }
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsrc

Object typeGstPad


Properties

font-desc

“font-desc” gchararray

Pango font description of font to be used for rendering. See documentation of pango_font_description_from_string for syntax.

Flags : Read / Write


halignment

“halignment” Text-render-halign *

Horizontal alignment of the text

Flags : Read / Write

Default value : center (1)


line-alignment

“line-alignment” Text-render-line-align *

Alignment of text lines relative to each other.

Flags : Read / Write

Default value : center (1)


valignment

“valignment” Text-render-valign *

Vertical alignment of the text

Flags : Read / Write

Default value : baseline (0)


xpad

“xpad” gint

Horizontal paddding when using left/right alignment

Flags : Read / Write

Default value : 25


ypad

“ypad” gint

Vertical padding when using top/bottom alignment

Flags : Read / Write

Default value : 25


Named constants

Text-render-halign

Horizontal alignment of the text.

Members

left (0) – left
center (1) – center
right (2) – right

Text-render-line-align

Alignment of text lines relative to each other

Members

left (0) – left
center (1) – center
right (2) – right

Text-render-valign

Vertical alignment of the text.

Members

baseline (0) – baseline
bottom (1) – bottom
top (2) – top

The results of the search are