[FFmpeg-devel] [PATCH 2/2] drawtext: add fontcolor_expr
Andrey Utkin
andrey.krieger.utkin at gmail.com
Fri Jul 4 20:53:46 CEST 2014
2014-07-04 16:23 GMT+03:00 Stefano Sabatini <stefasab at gmail.com>:
> On date Friday 2014-07-04 12:16:17 +0300, Andrey Utkin encoded:
>> +ffplay -f lavfi -i "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 @}"
>> + at end example
>
> probably it would be simpler to use fontcolor_expr=red@{e:...}. Also
> see my clip patch, it will simplify this a bit further.
My opinion is that examples demonstrating _difficult_ cases are even
more appreciated. Also hex specification of color is more flexible, so
i used that in my application. Another example with "red@{e:...}"
could also be added, but i think it's not necessary.
clip() function is good, it can replace this max() & min() usage.
Sending updated patch with eliminated stray newline.
--
Andrey Utkin
More information about the ffmpeg-devel
mailing list