timeoverlay
This element overlays the buffer time stamps of a video stream on top of itself. You can position the text and configure the font details using its properties.
By default, the time stamp is displayed in the top left corner of the picture, with some padding to the left and to the top.
gst-launch-1.0 -v videotestsrc ! timeoverlay ! autovideosink
Display the time stamps in the top left corner of the video picture.
gst-launch-1.0 -v videotestsrc ! timeoverlay halignment=right valignment=bottom text="Stream time:" shaded-background=true font-desc="Sans, 24" ! autovideosink
Another pipeline that displays the time stamps with some leading text in the bottom right corner of the video picture, with the background of the text being shaded in order to make it more legible on top of a bright video background.
Hierarchy
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseTextOverlay ╰──timeoverlay
Factory details
Authors: – Tim-Philipp Müller
Classification: – Filter/Editor/Video
Rank – none
Plugin – gstpango
Package – GStreamer Base Plug-ins
Pad Templates
src
video/x-raw:
format: { AYUV64, ARGB64, GBRA_12LE, GBRA_12BE, Y412_LE, Y412_BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, A420_10LE, A420_10BE, RGB10A2_LE, BGR10A2_LE, Y410, GBRA, ABGR, VUYA, BGRA, AYUV, ARGB, RGBA, A420, Y444_16LE, Y444_16BE, v216, P016_LE, P016_BE, Y444_12LE, GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, I422_10LE, I422_10BE, NV16_10LE32, Y210, v210, UYVP, I420_10LE, I420_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, Y444, GBR, NV24, xBGR, BGRx, xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, NV12_64Z32, Y41B, IYU1, YVU9, YUV9, RGB16, BGR16, RGB15, BGR15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE32, GRAY8 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw(ANY):
format: { AYUV64, ARGB64, GBRA_12LE, GBRA_12BE, Y412_LE, Y412_BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, A420_10LE, A420_10BE, RGB10A2_LE, BGR10A2_LE, Y410, GBRA, ABGR, VUYA, BGRA, AYUV, ARGB, RGBA, A420, Y444_16LE, Y444_16BE, v216, P016_LE, P016_BE, Y444_12LE, GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, I422_10LE, I422_10BE, NV16_10LE32, Y210, v210, UYVP, I420_10LE, I420_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, Y444, GBR, NV24, xBGR, BGRx, xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, NV12_64Z32, Y41B, IYU1, YVU9, YUV9, RGB16, BGR16, RGB15, BGR15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE32, GRAY8 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video_sink
video/x-raw:
format: { AYUV64, ARGB64, GBRA_12LE, GBRA_12BE, Y412_LE, Y412_BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, A420_10LE, A420_10BE, RGB10A2_LE, BGR10A2_LE, Y410, GBRA, ABGR, VUYA, BGRA, AYUV, ARGB, RGBA, A420, Y444_16LE, Y444_16BE, v216, P016_LE, P016_BE, Y444_12LE, GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, I422_10LE, I422_10BE, NV16_10LE32, Y210, v210, UYVP, I420_10LE, I420_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, Y444, GBR, NV24, xBGR, BGRx, xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, NV12_64Z32, Y41B, IYU1, YVU9, YUV9, RGB16, BGR16, RGB15, BGR15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE32, GRAY8 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw(ANY):
format: { AYUV64, ARGB64, GBRA_12LE, GBRA_12BE, Y412_LE, Y412_BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, A420_10LE, A420_10BE, RGB10A2_LE, BGR10A2_LE, Y410, GBRA, ABGR, VUYA, BGRA, AYUV, ARGB, RGBA, A420, Y444_16LE, Y444_16BE, v216, P016_LE, P016_BE, Y444_12LE, GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, I422_10LE, I422_10BE, NV16_10LE32, Y210, v210, UYVP, I420_10LE, I420_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, Y444, GBR, NV24, xBGR, BGRx, xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, NV12_64Z32, Y41B, IYU1, YVU9, YUV9, RGB16, BGR16, RGB15, BGR15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE32, GRAY8 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
Properties
auto-resize
“auto-resize” gboolean
Automatically adjust font size to screen-size.
Flags : Read / Write
Default value : true
color
“color” guint
Color to use for text (big-endian ARGB).
Flags : Read / Write
Default value : -1
datetime-epoch
“datetime-epoch” GDateTime *
When showing times as dates, the initial date from which time is counted, if not specified prime epoch is used (1900-01-01)
Flags : Read / Write
datetime-format
“datetime-format” gchararray
When showing times as dates, the format to render date and time in
Flags : Read / Write
Default value : %%F %%T
deltax
“deltax” gint
Shift X position to the left or to the right. Unit is pixels.
Flags : Read / Write
Default value : 0
deltay
“deltay” gint
Shift Y position up or down. Unit is pixels.
Flags : Read / Write
Default value : 0
draw-outline
“draw-outline” gboolean
Whether to draw outline
Flags : Read / Write
Default value : true
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” GstBaseTextOverlayHAlign *
Horizontal alignment of the text
Flags : Read / Write
Default value : left (0)
line-alignment
“line-alignment” GstBaseTextOverlayLineAlign *
Alignment of text lines relative to each other.
Flags : Read / Write
Default value : center (1)
outline-color
“outline-color” guint
Color to use for outline the text (big-endian ARGB).
Flags : Read / Write
Default value : -16777216
scale-mode
“scale-mode” GstBaseTextOverlayScaleMode *
Scale text to compensate for and avoid distortion by subsequent video scaling.
Flags : Read / Write
Default value : none (0)
scale-pixel-aspect-ratio
“scale-pixel-aspect-ratio” GstFraction *
Pixel aspect ratio of video scale to compensate for in user scale-mode
Flags : Read / Write
Default value : 1/1
shaded-background
“shaded-background” gboolean
Whether to shade the background under the text area
Flags : Read / Write
Default value : false
shading-value
“shading-value” guint
Shading value to apply if shaded-background is true
Flags : Read / Write
Default value : 80
show-times-as-dates
“show-times-as-dates” gboolean
Whether to display times, counted from datetime-epoch, as dates
Flags : Read / Write
Default value : false
silent
“silent” gboolean
Whether to render the text string
Flags : Read / Write
Default value : false
time-mode
“time-mode” GstTimeOverlayTimeLine *
What time to show
Flags : Read / Write
Default value : buffer-time (0)
valignment
“valignment” GstBaseTextOverlayVAlign *
Vertical alignment of the text
Flags : Read / Write
Default value : top (2)
vertical-render
“vertical-render” gboolean
Vertical Render.
Flags : Read / Write
Default value : false
wait-text
“wait-text” gboolean
Whether to wait for subtitles
Flags : Read / Write
Default value : true
wrap-mode
“wrap-mode” GstBaseTextOverlayWrapMode *
Whether to wrap the text and if so how.
Flags : Read / Write
Default value : wordchar (2)
x-absolute
“x-absolute” gdouble
Horizontal position when using absolute alignment
Flags : Read / Write
Default value : 0.5
xpad
“xpad” gint
Horizontal paddding when using left/right alignment
Flags : Read / Write
Default value : 25
xpos
“xpos” gdouble
Horizontal position when using clamped position alignment
Flags : Read / Write
Default value : 0.5
y-absolute
“y-absolute” gdouble
Vertical position when using absolute alignment
Flags : Read / Write
Default value : 0.5
ypad
“ypad” gint
Vertical padding when using top/bottom alignment
Flags : Read / Write
Default value : 25
ypos
“ypos” gdouble
Vertical position when using clamped position alignment
Flags : Read / Write
Default value : 0.5
Named constants
GstBaseTextOverlayHAlign
Horizontal alignment of the text.
Members
left
(0) – left
center
(1) – center
right
(2) – right
Absolute position clamped to canvas
(4) – position
Absolute position
(5) – absolute
GstBaseTextOverlayLineAlign
Alignment of text lines relative to each other
Members
left
(0) – left
center
(1) – center
right
(2) – right
GstBaseTextOverlayScaleMode
Scale text to compensate for and avoid aspect distortion by subsequent scaling of video
Members
none
(0) – none
par
(1) – par
display
(2) – display
user
(3) – user
GstBaseTextOverlayVAlign
Vertical alignment of the text.
Members
baseline
(0) – baseline
bottom
(1) – bottom
top
(2) – top
Absolute position clamped to canvas
(3) – position
center
(4) – center
Absolute position
(5) – absolute
GstBaseTextOverlayWrapMode
Whether to wrap the text and if so how.
Members
none
(-1) – none
word
(0) – word
char
(1) – char
wordchar
(2) – wordchar
GstTimeOverlayTimeLine
Members
buffer-time
(0) – buffer-time
stream-time
(1) – stream-time
running-time
(2) – running-time
time-code
(3) – time-code
The results of the search are