| Top | Home | Up | Prev | Next |
textoverlay
textoverlay
Types and Values
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBaseTextOverlay ╰── GstTextOverlay
Description
This plugin renders text on top of a video stream. This can be either static text or text from buffers received on the text sink pad, e.g. as produced by the subparse element. If the text sink pad is not linked, the text set via the "text" property will be rendered. If the text sink pad is linked, text will be rendered as it is received on that pad, honouring and matching the buffer timestamps of both input streams.
The text can contain newline characters and text wrapping is enabled by default.
Example launch lines
1
gst-launch-1.0 -v videotestsrc ! textoverlay text="Room A" valignment=top halignment=left font-desc="Sans, 72" ! autovideosink
Here is a simple pipeline that displays a static text in the top left corner of the video picture
1
gst-launch-1.0 -v filesrc location=subtitles.srt ! subparse ! txt. videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes ! autovideosink
Here is another pipeline that displays subtitles from an .srt subtitle file, centered at the bottom of the picture and with a rectangular shading around the text in the background:
If you do not have such a subtitle file, create one looking like this in a text editor:
1 2 3 4 5 6 7 8 9 10 11 12 13
1 00:00:03,000 --> 00:00:05,000 Hello? (3-5s) 2 00:00:08,000 --> 00:00:13,000 Yes, this is a subtitle. Don't you like it? (8-13s) 3 00:00:18,826 --> 00:01:02,886 Uh? What are you talking about? I don't understand (18-62s)
Synopsis
Element Information
plugin
pangoauthor
David Schleef <ds@schleef.org>, Zeeshan Ali <zeeshan.ali@nokia.com>class
Filter/Editor/VideoElement Pads
name
text_sinkdirection
sinkpresence
alwaysdetails
text/x-raw, format=(string){ pango-markup, utf8 }name
video_sinkdirection
sinkpresence
alwaysdetails
video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]name
srcdirection
sourcepresence
alwaysdetails
video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]Functions
Types and Values
struct GstTextOverlay
struct GstTextOverlay;
Opaque textoverlay data structure.
See Also
Generated by GTK-Doc V1.28