Browse Source

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@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
tags/n3.1
Mulvya Lou Logan 10 years ago
parent
commit
b7a776aa7b
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      doc/filters.texi

+ 6
- 0
doc/filters.texi View File

@@ -6556,6 +6556,12 @@ Show the text at the center of the video frame:
drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2"
@end example

@item
Show the text at a random position, switching to a new position every 30 seconds:
@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)"
@end example

@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


Loading…
Cancel
Save