mirror of https://git.ffmpeg.org/ffmpeg.git
doc/filters/drawtext: simplify example, use clip() eval function
This commit is contained in:
parent
e9ff5df0b5
commit
3babbf3bf4
|
@ -4032,7 +4032,7 @@ 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 @}"
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue