diff options
author | Andrey Utkin <andrey.krieger.utkin@gmail.com> | 2014-07-04 21:54:53 +0300 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2014-07-17 12:42:56 +0200 |
commit | e9ff5df0b53076636082412f06bdd3b6aaa2b607 (patch) | |
tree | 752ae7232a63f3e5c980c08df332a6b569f3ef41 /doc/filters.texi | |
parent | dec87454deb2f2a314f309cd6c1fa636503a70ae (diff) | |
download | ffmpeg-e9ff5df0b53076636082412f06bdd3b6aaa2b607.tar.gz |
lavfi/drawtext: add fontcolor_expr option
Allow to dynamically evaluate the font color.
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Diffstat (limited to 'doc/filters.texi')
-rw-r--r-- | doc/filters.texi | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index 6bea105d36..54d6549454 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -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. @@ -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\\\\: max(0\\, min(255\\, 255*(1*between(t\\, $DS + $FID\\, $DE - $FOD) + ((t - $DS)/$FID)*between(t\\, $DS\\, $DS + $FID) + (-(t - $DE)/$FOD)*between(t\\, $DE - $FOD\\, $DE) ) )) \\\\: x\\\\: 2 @}" +@end example + @end itemize For more information about libfreetype, check: |