]> git.sesse.net Git - ffmpeg/blobdiff - doc/filters.texi
x86/hevc_deblock: remove some unnecessary instructions
[ffmpeg] / doc / filters.texi
index 6bea105d360766689fa3c817df564f1dcf38959c..a7919a3506f092fbea9d0f5f380366b106fc3c01 100644 (file)
@@ -3698,6 +3698,11 @@ the "Color" section in the ffmpeg-utils manual.
 
 The default value of @var{fontcolor} is "black".
 
+@item fontcolor_expr
+String which is expanded the same way as @var{text} to obtain dynamic
+@var{fontcolor} value. By default this option has empty value and is not
+processed. When this option is set, it overrides @var{fontcolor} option.
+
 @item font
 The font family to be used for drawing text. By default Sans.
 
@@ -3911,7 +3916,7 @@ example the text size is not known when evaluating the expression, so
 the constants @var{text_w} and @var{text_h} will have an undefined
 value.
 
-@item eif
+@item expr_int_format, eif
 Evaluate the expression's value and output as formatted integer.
 
 First argument is expression to be evaluated, same as for @var{expr} function.
@@ -4019,6 +4024,17 @@ Print the date of a real-time encoding (see strftime(3)):
 drawtext='fontfile=FreeSans.ttf:text=%@{localtime:%a %b %d %Y@}'
 @end example
 
+@item
+Shwo text fading in and out (appearing/disappearing):
+@example
+#!/bin/sh
+DS=1.0 # display start
+DE=10.0 # display end
+FID=1.5 # fade in duration
+FOD=5 # fade out duration
+ffplay -f lavfi "color,drawtext=text=TEST:fontsize=50:fontfile=FreeSerif.ttf:fontcolor_expr=ff0000%@{eif\\\\: clip(255*(1*between(t\\, $DS + $FID\\, $DE - $FOD) + ((t - $DS)/$FID)*between(t\\, $DS\\, $DS + $FID) + (-(t - $DE)/$FOD)*between(t\\, $DE - $FOD\\, $DE) )\\, 0\\, 255) \\\\: x\\\\: 2 @}"
+@end example
+
 @end itemize
 
 For more information about libfreetype, check: