![]() |
![]() |
![]() |
GStreamer Base Plugins 0.11 Plugins Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBaseTextOverlay +----GstTextOverlay
"deltax" gint : Read / Write "deltay" gint : Read / Write "font-desc" gchar* : Write "halign" gchar* : Write "shaded-background" gboolean : Read / Write "text" gchar* : Read / Write "valign" gchar* : Write "wrap-mode" GstTextOverlayWrapMode : Read / Write "xpad" gint : Read / Write "ypad" gint : Read / Write "halignment" GstTextOverlayHAlign : Read / Write "valignment" GstTextOverlayVAlign : Read / Write "line-alignment" GstTextOverlayLineAlign : Read / Write "silent" gboolean : Read / Write "wait-text" gboolean : Read / Write "auto-resize" gboolean : Read / Write "vertical-render" gboolean : Read / Write "color" guint : Read / Write "xpos" gdouble : Read / Write "ypos" gdouble : Read / Write
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.
gst-launch -v videotestsrc ! textoverlay text="Room A" valign=top halign=left ! xvimagesink
gst-launch -v filesrc location=subtitles.srt ! subparse ! txt. videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes ! xvimagesink
If you do not have such a subtitle file, create one looking like this in a text editor:
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)
plugin |
pango |
author |
David Schleef <ds@schleef.org>, Zeeshan Ali <zeeshan.ali@nokia.com> |
class |
Filter/Editor/Video |
name |
text_sink |
direction |
sink |
presence |
always |
details |
text/x-pango-markup |
text/plain |
name |
video_sink |
direction |
sink |
presence |
always |
details |
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] |
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-yuv, format=(fourcc){ AYUV, I420, UYVY, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] |
name |
src |
direction |
source |
presence |
always |
details |
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] |
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw-yuv, format=(fourcc){ AYUV, I420, UYVY, NV12, NV21 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] |
"deltax"
property"deltax" gint : Read / Write
Shift X position to the left or to the right. Unit is pixels.
Default value: 0
"deltay"
property"deltay" gint : Read / Write
Shift Y position up or down. Unit is pixels.
Default value: 0
"font-desc"
property"font-desc" gchar* : Write
Pango font description of font to be used for rendering. See documentation of pango_font_description_from_string for syntax.
Default value: ""
"halign"
property"halign" gchar* : Write
Horizontal alignment of the text (deprecated; use halignment).
Default value: "center"
"shaded-background"
property"shaded-background" gboolean : Read / Write
Whether to shade the background under the text area.
Default value: FALSE
"valign"
property"valign" gchar* : Write
Vertical alignment of the text (deprecated; use valignment).
Default value: "baseline"
"wrap-mode"
property"wrap-mode" GstTextOverlayWrapMode : Read / Write
Whether to wrap the text and if so how.
Default value: wordchar
"xpad"
property"xpad" gint : Read / Write
Horizontal paddding when using left/right alignment.
Allowed values: >= 0
Default value: 25
"ypad"
property"ypad" gint : Read / Write
Vertical padding when using top/bottom alignment.
Allowed values: >= 0
Default value: 25
"halignment"
property"halignment" GstTextOverlayHAlign : Read / Write
Horizontal alignment of the text.
Default value: center
"valignment"
property"valignment" GstTextOverlayVAlign : Read / Write
Vertical alignment of the text.
Default value: baseline
"line-alignment"
property "line-alignment" GstTextOverlayLineAlign : Read / Write
Alignment of text lines relative to each other.
Default value: center
"silent"
property"silent" gboolean : Read / Write
Whether to render the text string.
Default value: FALSE
"wait-text"
property"wait-text" gboolean : Read / Write
Whether to wait for subtitles.
Default value: TRUE
"auto-resize"
property"auto-resize" gboolean : Read / Write
Automatically adjust font size to screen-size.
Default value: TRUE
"vertical-render"
property"vertical-render" gboolean : Read / Write
Vertical Render.
Default value: FALSE
"color"
property"color" guint : Read / Write
Color to use for text (big-endian ARGB).
Default value: 4294967295
"xpos"
property"xpos" gdouble : Read / Write
Horizontal position when using position alignment.
Allowed values: [0,1]
Default value: 0.5
"ypos"
property"ypos" gdouble : Read / Write
Vertical position when using position alignment.
Allowed values: [0,1]
Default value: 0.5