]> git.sesse.net Git - ffmpeg/commitdiff
doc/filters: add example for drawtext fontsize expr
authorAndrei Rybak <rybak.a.v@gmail.com>
Wed, 2 Sep 2020 22:57:17 +0000 (00:57 +0200)
committerGyan Doshi <ffmpeg@gyani.pro>
Thu, 3 Sep 2020 05:39:27 +0000 (11:09 +0530)
Expressions for option fontsize of video filter drawtext have been
supported since commit 6442e4ab3c.

Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
Revised-by: Gyan Doshi <ffmpeg@gyani.pro>
doc/filters.texi

index fb8757ff8f9054366c0b2b2a574903a273c262db..5dc85ae09fcf175ee1ebd62831f04337a5059e4d 100644 (file)
@@ -10233,6 +10233,12 @@ Use fontconfig to set the font. Note that the colons need to be escaped.
 drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
 @end example
 
+@item
+Draw "Test Text" with font size dependent on height of the video.
+@example
+drawtext="text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)"
+@end example
+
 @item
 Print the date of a real-time encoding (see strftime(3)):
 @example