Revision bd8e7503 doc/filters.texi

View differences:

doc/filters.texi
386 386
fade=in:5:20
387 387
@end example
388 388

  
389
@section drawtext
390

  
391
Draw text string or text from specified file on top of video using the
392
libfreetype library.
393

  
394
To enable compilation of this filter you need to configure FFmpeg with
395
@code{--enable-libfreetype}.
396

  
397
The filter also recognizes strftime() sequences in the provided text
398
and expands them accordingly. Check the documentation of strftime().
399

  
400
The filter accepts parameters as a list of @var{key}=@var{value} pairs,
401
separated by ":".
402

  
403
The description of the accepted parameters follows.
404

  
405
@table @option
406

  
407
@item fontfile
408
The font file to be used for drawing text. Path must be included.
409
This parameter is mandatory.
410

  
411
@item text
412
The text string to be drawn. The text must be a sequence of UTF-8
413
encoded characters.
414
This parameter is mandatory if no file is specified.
415

  
416
@item textfile
417
A text file containing text to be drawn. The text must be a sequence
418
of UTF-8 encoded characters
419

  
420
This parameter is mandatory if no text string is specified.
421

  
422
If both text and textfile are specified, an error is thrown.
423

  
424
@item x, y
425
The offsets where text will be drawn within the video frame.
426
Relative to the top/left border of the output image.
427

  
428
The default value of @var{x} and @var{y} is 0.
429

  
430
@item fontsize
431
The font size to be used for drawing text.
432
The default value of @var{size} is 16.
433

  
434
@item fontcolor
435
The color to be used for drawing fonts.
436
Either a string (e.g. "red") or in 0xRRGGBB[AA] format
437
(e.g. "0xff000033"), possibly followed by an alpha specifier.
438
The default value of @var{fontcolor} is "black".
439

  
440
@item boxcolor
441
The color to be used for drawing box around text.
442
Either a string (e.g. "yellow") or in 0xRRGGBB[AA] format
443
(e.g. "0xff00ff"), possibly followed by an alpha specifier.
444

  
445
The default value of @var{bgcolor} is "white".
446

  
447
@item box
448
Used to draw a box around text using background color.
449
Value should be either 1 (enable) or 0 (disable).
450
The default value of @var{box} is 0.
451

  
452
@item ft_load_flags
453
Flags to be used for loading the fonts.
454

  
455
The flags map the corresponding flags supported by libfreetype, and are
456
a combination of the following values:
457
@table @var
458
@item default
459
@item no_scale
460
@item no_hinting
461
@item render
462
@item no_bitmap
463
@item vertical_layout
464
@item force_autohint
465
@item crop_bitmap
466
@item pedantic
467
@item ignore_global_advance_width
468
@item no_recurse
469
@item ignore_transform
470
@item monochrome
471
@item linear_design
472
@item no_autohint
473
@item end table
474
@end table
475

  
476
Default value is "render".
477

  
478
For more information consult the documentation for the FT_LOAD_*
479
libfreetype flags.
480

  
481
@item tabsize
482
The size in number of spaces to use for rendering the tab.
483
Default value is 4.
484
@end table
485

  
486
For example the command:
487
@example
488
drawtext=fontfile=FreeSerif.ttf: text='Test Text': x=100: y=50: fontsize=24: fontcolor=yellow@@0.2: boxcolor=red@@0.2: box=1"
489
@end example
490

  
491
will draw 'Test Text' with font FreeSerif of size 24 at position
492
(100,50), text color is yellow, and draw a red box around text. Both
493
the text and the box have an opacity of 20%.
494

  
495
Note that the double quotes are not necessary if spaces are not used
496
within the parameter list.
497

  
498
For more information about libfreetype, check:
499
@url{http://www.freetype.org/}
500

  
389 501
@section fifo
390 502

  
391 503
Buffer input images and send them when they are requested.

Also available in: Unified diff