]> git.sesse.net Git - ffmpeg/blobdiff - doc/filters.texi
Merge commit '816e5b997028c8215c804b1e58b2388592ed612b'
[ffmpeg] / doc / filters.texi
index 242602c35a47cd281736c231a7511fb81f1ba668..f8da117d561f40b00bb3a6ac48b590ada544a638 100644 (file)
@@ -217,29 +217,45 @@ Follows a BNF description for the filtergraph syntax:
 
 @section Notes on filtergraph escaping
 
-Some filter arguments require the use of special characters, typically
-@code{:} to separate key=value pairs in a named options list. In this
-case the user should perform a first level escaping when specifying
-the filter arguments. For example, consider the following literal
-string to be embedded in the @ref{drawtext} filter arguments:
+Filtergraph description composition entails several levels of
+escaping. See @ref{quoting_and_escaping,,the "Quoting and escaping"
+section in the ffmpeg-utils(1) manual,ffmpeg-utils} for more
+information about the employed escaping procedure.
+
+A first level escaping affects the content of each filter option
+value, which may contain the special character @code{:} used to
+separate values, or one of the escaping characters @code{\'}.
+
+A second level escaping affects the whole filter description, which
+may contain the escaping characters @code{\'} or the special
+characters @code{[],;} used by the filtergraph description.
+
+Finally, when you specify a filtergraph on a shell commandline, you
+need to perform a third level escaping for the shell special
+characters contained within it.
+
+For example, consider the following string to be embedded in
+the @ref{drawtext} filter description @option{text} value:
 @example
 this is a 'string': may contain one, or more, special characters
 @end example
 
-Since @code{:} is special for the filter arguments syntax, it needs to
-be escaped, so you get:
+This string contains the @code{'} special escaping character, and the
+@code{:} special character, so it needs to be escaped in this way:
 @example
 text=this is a \'string\'\: may contain one, or more, special characters
 @end example
 
 A second level of escaping is required when embedding the filter
-arguments in a filtergraph description, in order to escape all the
+description in a filtergraph description, in order to escape all the
 filtergraph special characters. Thus the example above becomes:
 @example
 drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
 @end example
+(note that in addition to the @code{\'} escaping special characters,
+also @code{,} needs to be escaped).
 
-Finally an additional level of escaping may be needed when writing the
+Finally an additional level of escaping is needed when writing the
 filtergraph description in a shell command, which depends on the
 escaping rules of the adopted shell. For example, assuming that
 @code{\} is special and needs to be escaped with another @code{\}, the
@@ -248,26 +264,6 @@ previous string will finally result in:
 -vf "drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters"
 @end example
 
-Sometimes, it might be more convenient to employ quoting in place of
-escaping. For example the string:
-@example
-Caesar: tu quoque, Brute, fili mi
-@end example
-
-Can be quoted in the filter arguments as:
-@example
-text='Caesar: tu quoque, Brute, fili mi'
-@end example
-
-And finally inserted in a filtergraph like:
-@example
-drawtext=text=\'Caesar: tu quoque\, Brute\, fili mi\'
-@end example
-
-See the ``Quoting and escaping'' section in the ffmpeg-utils manual
-for more information about the escaping and quoting rules adopted by
-FFmpeg.
-
 @chapter Timeline editing
 
 Some filters support a generic @option{enable} option. For the filters
@@ -3548,6 +3544,16 @@ option, check the "Color" section in the ffmpeg-utils manual.
 
 The default value of @var{boxcolor} is "white".
 
+@item borderw
+Set the width of the border to be drawn around the text using @var{bordercolor}.
+The default value of @var{borderw} is 0.
+
+@item bordercolor
+Set the color to be used for drawing border around text. For the syntax of this
+option, check the "Color" section in the ffmpeg-utils manual.
+
+The default value of @var{bordercolor} is "black".
+
 @item expansion
 Select how the @var{text} is expanded. Can be either @code{none},
 @code{strftime} (deprecated) or
@@ -3594,7 +3600,7 @@ a combination of the following values:
 @item no_autohint
 @end table
 
-Default value is "render".
+Default value is "default".
 
 For more information consult the documentation for the FT_LOAD_*
 libfreetype flags.
@@ -6901,6 +6907,11 @@ maintains the aspect ratio of the input image, calculated from the
 other specified dimension. If both of them are -1, the input size is
 used
 
+If one of the values is -n with n > 1, the scale filter will also use a value
+that maintains the aspect ratio of the input image, calculated from the other
+specified dimension. After that it will, however, make sure that the calculated
+dimension is divisible by n and adjust the value if necessary.
+
 See below for the list of accepted constants for use in the dimension
 expression.