@end example
@item
-Make @file{ffplay} speech the specified text, using @code{flite} and
+Input text to ffmpeg:
+@example
+ffmpeg -f lavfi -i flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
+@end example
+
+@item
+Make @file{ffplay} speak the specified text, using @code{flite} and
the @code{lavfi} device:
@example
-ffplay -f lavfi flite='No more be grieved for which that thou hast done.'
+ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.'
@end example
@end itemize
To enable compilation of this filter you need to configure FFmpeg with
@code{--enable-libass}.
-This filter accepts the syntax: @var{ass_filename}[:@var{options}],
-where @var{ass_filename} is the filename of the ASS file to read, and
-@var{options} is an optional sequence of @var{key}=@var{value} pairs,
-separated by ":".
-
-A description of the accepted options follows.
+This filter accepts the following named options, expressed as a
+sequence of @var{key}=@var{value} pairs, separated by ":".
@table @option
+@item filename, f
+Set the filename of the ASS file to read. It must be specified.
+
@item original_size
-Specifies the size of the original video, the video for which the ASS file
+Specify the size of the original video, the video for which the ASS file
was composed. Due to a misdesign in ASS aspect ratio arithmetic, this is
necessary to correctly scale the fonts if the aspect ratio has been changed.
@end table
+If the first key is not specified, it is assumed that the first value
+specifies the @option{filename}.
+
For example, to render the file @file{sub.ass} on top of the input
video, use the command:
@example
ass=sub.ass
@end example
+which is equivalent to:
+@example
+ass=filename=sub.ass
+@end example
+
@section bbox
Compute the bounding box for the non-black pixels in the input frame
@item
Show text for 1 second every 3 seconds:
@example
-drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:draw=lt(mod(t\\,3)\\,1):text='blink'"
+drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:draw=lt(mod(t\,3)\,1):text='blink'"
@end example
@item
Use fontconfig to set the font. Note that the colons need to be escaped.
@example
-drawtext='fontfile=Linux Libertine O-40\\:style=Semibold:text=FFmpeg'
+drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
@end example
@end itemize
@item fps
Desired output framerate.
+@item round
+Rounding method. The default is @code{near}.
+
@end table
@section framestep
The @var{lut} filter requires either YUV or RGB pixel formats in
input, and accepts the options:
@table @option
-@item c0
-first pixel component
-@item c1
-second pixel component
-@item c2
-third pixel component
-@item c3
-fourth pixel component, corresponds to the alpha component
+@item @var{c0} (first pixel component)
+@item @var{c1} (second pixel component)
+@item @var{c2} (third pixel component)
+@item @var{c3} (fourth pixel component, corresponds to the alpha component)
@end table
The exact component associated to each option depends on the format in
The @var{lutrgb} filter requires RGB pixel formats in input, and
accepts the options:
@table @option
-@item r
-red component
-@item g
-green component
-@item b
-blue component
-@item a
-alpha component
+@item @var{r} (red component)
+@item @var{g} (green component)
+@item @var{b} (blue component)
+@item @var{a} (alpha component)
@end table
The @var{lutyuv} filter requires YUV pixel formats in input, and
accepts the options:
@table @option
-@item y
-Y/luminance component
-@item u
-U/Cb component
-@item v
-V/Cr component
-@item a
-alpha component
+@item @var{y} (Y/luminance component)
+@item @var{u} (U/Cb component)
+@item @var{v} (V/Cr component)
+@item @var{a} (alpha component)
@end table
The expressions can contain the following constants and functions:
# add a transparent color layer on top of the main video,
# WxH specifies the size of the main input to the overlay filter
-color=red@.3:WxH [over]; [in][over] overlay [out]
+color=red@@.3:WxH [over]; [in][over] overlay [out]
# play an original video and a filtered version (here with the deshake filter)
# side by side
@end table
-@section Examples
+@subsection Examples
@itemize
@item
@section scale
-Scale the input video to @var{width}:@var{height}[:@var{interl}=@{1|-1@}] and/or convert the image format.
+Scale (resize) the input video to @var{width}:@var{height}[:@var{interl}=@{1|-1@}] and/or convert the image format.
The scale filter forces the output display aspect ratio to be the same
of the input, by changing the output sample aspect ratio.
filter may be changed by later filters in the filterchain, e.g. if
another "setsar" or a "setdar" filter is applied.
-The @code{setdar} and @code{setsar} filters accept a parameter string
-which represents the wanted aspect ratio. The parameter can
-be a floating point number string, an expression, or a string of the form
-@var{num}:@var{den}, where @var{num} and @var{den} are the numerator
-and denominator of the aspect ratio. If the parameter is not
-specified, it is assumed the value "0:1".
+The @code{setdar} and @code{setsar} filters accept a string in the
+form @var{num}:@var{den} expressing an aspect ratio, or the following
+named options, expressed as a sequence of @var{key}=@var{value} pairs,
+separated by ":".
+
+@table @option
+@item max
+Set the maximum integer value to use for expressing numerator and
+denominator when reducing the expressed aspect ratio to a rational.
+Default value is @code{100}.
+
+@item r, ratio:
+Set the aspect ratio used by the filter.
+
+The parameter can be a floating point number string, an expression, or
+a string of the form @var{num}:@var{den}, where @var{num} and
+@var{den} are the numerator and denominator of the aspect ratio. If
+the parameter is not specified, it is assumed the value "0".
+In case the form "@var{num}:@var{den}" the @code{:} character should
+be escaped.
+@end table
+
+If the keys are omitted in the named options list, the specifed values
+are assumed to be @var{ratio} and @var{max} in that order.
For example to change the display aspect ratio to 16:9, specify:
@example
-setdar=16:9
+setdar='16:9'
@end example
The example above is equivalent to:
To change the sample aspect ratio to 10:11, specify:
@example
-setsar=10:11
+setsar='10:11'
+@end example
+
+To set a display aspect ratio of 16:9, and specify a maximum integer value of
+1000 in the aspect ratio reduction, use the command:
+@example
+setdar=ratio='16:9':max=1000
@end example
@section setfield