]> git.sesse.net Git - ffmpeg/commitdiff
doc/filters: document drawtext draw expression
authorStefano Sabatini <stefasab@gmail.com>
Tue, 1 May 2012 11:26:05 +0000 (13:26 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Thu, 3 May 2012 08:26:42 +0000 (10:26 +0200)
doc/filters.texi

index 11122f91b9085e895decbc3c959d660b10a7bc81..91827042735816f0c6f396b6947ea306e5885334 100644 (file)
@@ -1273,6 +1273,16 @@ Either a string (e.g. "yellow") or in 0xRRGGBB[AA] format
 (e.g. "0xff00ff"), possibly followed by an alpha specifier.
 The default value of @var{boxcolor} is "white".
 
+@item draw
+Set an expression which specifies if the text should be drawn. If the
+expression evaluates to 0, the text is not drawn. This is useful for
+specifying that the text should be drawn only when specific conditions
+are met.
+
+Default value is "1".
+
+See below for the list of accepted constants and functions.
+
 @item fix_bounds
 If true, check and fix text coords to avoid clipping.
 
@@ -1490,6 +1500,12 @@ The glyph baseline is placed at half screen height.
 drawtext=fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_glyph_w)/2:y=h/2-ascent
 @end example
 
+@item
+Show text for 1 second every 3 seconds:
+@example
+drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:draw=lt(mod(t\\,3)\\,1):text='blink'"
+@end example
+
 @item
 Use fontconfig to set the font. Note that the colons need to be escaped.
 @example