[FFmpeg-cvslog] doc/filters: add drawtext example

Mulvya git at videolan.org
Thu Apr 7 19:44:50 CEST 2016

ffmpeg | branch: master | Mulvya <mulvya at gmail.com> | Sun Apr  3 14:45:01 2016 +0530| [b7a776aa7bb6efe8a757ab899fb5046bee1120f0] | committer: Lou Logan

doc/filters: add drawtext example

Show example which draws text at a random position, and switches positions every 30 seconds

Signed-off-by: Mulvya <mulvya at gmail.com>
Signed-off-by: Lou Logan <lou at lrcd.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7a776aa7bb6efe8a757ab899fb5046bee1120f0

 doc/filters.texi |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/filters.texi b/doc/filters.texi
index 0b2a9b6..82be06d 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -6557,6 +6557,12 @@ drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y
 @end example
+Show the text at a random position, switching to a new position every 30 seconds:
+ at example
+drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=if(eq(mod(t\,30)\,0)\,rand(0\,(w-text_w))\,x):y=if(eq(mod(t\,30)\,0)\,rand(0\,(h-text_h))\,y)"
+ at end example
+ at item
 Show a text line sliding from right to left in the last row of the video
 frame. The file @file{LONG_LINE} is assumed to contain a single line
 with no newlines.

More information about the ffmpeg-cvslog mailing list