@end table
@item win_size
-Set window size.
-
-It accepts the following values:
-@table @samp
-@item w16
-@item w32
-@item w64
-@item w128
-@item w256
-@item w512
-@item w1024
-@item w2048
-@item w4096
-@item w8192
-@item w16384
-@item w32768
-@item w65536
-@end table
-Default is @code{w4096}
+Set window size. Allowed range is from 16 to 131072.
+Default is @code{4096}
@item win_func
Set window function. Default is @code{hann}.
16-bit integers
@end table
+@item mix
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item response
Show IR frequency response, magnitude and phase in additional video stream.
By default it is disabled.
@item width, w
Specify the band-width of a filter in width_type units.
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item channels, c
Specify which channels to filter, by default all available are filtered.
@end table
@item width, w
Change allpass width.
Syntax for the command is : "@var{width}"
+
+@item mix, m
+Change allpass mix.
+Syntax for the command is : "@var{mix}"
@end table
@section aloop
Default value is @var{o}.
@end table
+
+@item m
+Set smooth factor. Default value is @var{11}. Allowed range is from @var{1} to @var{15}.
+@end table
+
+@subsection Commands
+
+This filter supports the following commands:
+@table @option
+@item s
+Change denoise strength. Argument is single float number.
+Syntax for the command is : "@var{s}"
+
+@item o
+Change output mode.
+Syntax for the command is : "i", "o" or "n" string.
@end table
@section anull
Set additional parameter which controls sigmoid function.
@end table
+@section asr
+Automatic Speech Recognition
+
+This filter uses PocketSphinx for speech recognition. To enable
+compilation of this filter, you need to configure FFmpeg with
+@code{--enable-pocketsphinx}.
+
+It accepts the following options:
+
+@table @option
+@item rate
+Set sampling rate of input audio. Defaults is @code{16000}.
+This need to match speech models, otherwise one will get poor results.
+
+@item hmm
+Set dictionary containing acoustic model files.
+
+@item dict
+Set pronunciation dictionary.
+
+@item lm
+Set language model file.
+
+@item lmctl
+Set language model set.
+
+@item lmname
+Set which language model to use.
+
+@item logfn
+Set output for log messages.
+@end table
+
+The filter exports recognized speech as the frame metadata @code{lavfi.asr.text}.
+
@anchor{astats}
@section astats
@item width, w
Specify the band-width of a filter in width_type units.
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item channels, c
Specify which channels to filter, by default all available are filtered.
@end table
@item width, w
Change bandpass width.
Syntax for the command is : "@var{width}"
+
+@item mix, m
+Change bandpass mix.
+Syntax for the command is : "@var{mix}"
@end table
@section bandreject
@item width, w
Specify the band-width of a filter in width_type units.
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item channels, c
Specify which channels to filter, by default all available are filtered.
@end table
@item width, w
Change bandreject width.
Syntax for the command is : "@var{width}"
+
+@item mix, m
+Change bandreject mix.
+Syntax for the command is : "@var{mix}"
@end table
@section bass, lowshelf
@item width, w
Determine how steep is the filter's shelf transition.
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item channels, c
Specify which channels to filter, by default all available are filtered.
@end table
@item gain, g
Change bass gain.
Syntax for the command is : "@var{gain}"
+
+@item mix, m
+Change bass mix.
+Syntax for the command is : "@var{mix}"
@end table
@section biquad
@item b2
Change biquad parameter.
Syntax for the command is : "@var{value}"
+
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
@end table
@section bs2b
used to prevent clipping.
@end table
+@section deesser
+
+Apply de-essing to the audio samples.
+
+@table @option
+@item i
+Set intensity for triggering de-essing. Allowed range is from 0 to 1.
+Default is 0.
+
+@item m
+Set amount of ducking on treble part of sound. Allowed range is from 0 to 1.
+Default is 0.5.
+
+@item f
+How much of original frequency content to keep when de-essing. Allowed range is from 0 to 1.
+Default is 0.5.
+
+@item s
+Set the output mode.
+
+It accepts the following values:
+@table @option
+@item i
+Pass input unchanged.
+
+@item o
+Pass ess filtered out.
+
+@item e
+Pass only ess.
+
+Default value is @var{o}.
+@end table
+
+@end table
+
@section drmeter
Measure audio dynamic range.
Set the required gain or attenuation in dB.
Beware of clipping when using a positive gain.
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item channels, c
Specify which channels to filter, by default all available are filtered.
@end table
@item gain, g
Change equalizer gain.
Syntax for the command is : "@var{gain}"
+
+@item mix, m
+Change equalizer mix.
+Syntax for the command is : "@var{mix}"
@end table
@section extrastereo
Applies only to double-pole filter.
The default is 0.707q and gives a Butterworth response.
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item channels, c
Specify which channels to filter, by default all available are filtered.
@end table
@item width, w
Change highpass width.
Syntax for the command is : "@var{width}"
+
+@item mix, m
+Change highpass mix.
+Syntax for the command is : "@var{mix}"
@end table
@section join
Applies only to double-pole filter.
The default is 0.707q and gives a Butterworth response.
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item channels, c
Specify which channels to filter, by default all available are filtered.
@end table
@item width, w
Change lowpass width.
Syntax for the command is : "@var{width}"
+
+@item mix, m
+Change lowpass mix.
+Syntax for the command is : "@var{mix}"
@end table
@section lv2
@item width, w
Determine how steep is the filter's shelf transition.
+@item mix, m
+How much to use filtered signal in output. Default is 1.
+Range is between 0 and 1.
+
@item channels, c
Specify which channels to filter, by default all available are filtered.
@end table
@item gain, g
Change treble gain.
Syntax for the command is : "@var{gain}"
+
+@item mix, m
+Change treble mix.
+Syntax for the command is : "@var{mix}"
@end table
@section tremolo
Similarity percentage with the above color.
0.01 matches only the exact key color, while 1.0 matches everything.
+@item blend
+Blend percentage.
+0.0 makes pixels either fully gray, or not gray at all.
+Higher values result in more preserved color.
+
@item yuv
Signals that the color passed is already in YUV instead of RGB.
@end example
@end itemize
+@section colorhold
+Remove all color information for all RGB colors except for certain one.
+
+The filter accepts the following options:
+
+@table @option
+@item color
+The color which will not be replaced with neutral gray.
+
+@item similarity
+Similarity percentage with the above color.
+0.01 matches only the exact key color, while 1.0 matches everything.
+
+@item blend
+Blend percentage. 0.0 makes pixels fully gray.
+Higher values result in more preserved color.
+@end table
+
@section colorlevels
Adjust video input frames using levels.
@end itemize
+@section derain
+
+Remove the rain in the input image/video by applying the derain methods based on
+convolutional neural networks. Supported models:
+
+@itemize
+@item
+Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN).
+See @url{http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf}.
+@end itemize
+
+Training scripts as well as scripts for model generation are provided in
+the repository at @url{https://github.com/XueweiMeng/derain_filter.git}.
+
+The filter accepts the following options:
+
+@table @option
+@item dnn_backend
+Specify which DNN backend to use for model loading and execution. This option accepts
+the following values:
+
+@table @samp
+@item native
+Native implementation of DNN loading and execution.
+@end table
+Default value is @samp{native}.
+
+@item model
+Set path to model file specifying network architecture and its parameters.
+Note that different backends use different file formats. TensorFlow backend
+can load files for both formats, while native backend can load files for only
+its format.
+@end table
+
@section deshake
Attempt to fix small changes in horizontal and/or vertical shift. This
the x and y offset coordinates where the text is drawn.
These parameters allow the @var{x} and @var{y} expressions to refer
-each other, so you can for example specify @code{y=x/dar}.
+to each other, so you can for example specify @code{y=x/dar}.
+
+@item pict_type
+A one character description of the current frame's picture type.
+
+@item pkt_pos
+The current packet's position in the input file or stream
+(in bytes, from the start of the input). A value of -1 indicates
+this info is not available.
+
+@item pkt_duration
+The current packet's duration, in seconds.
+
+@item pkt_size
+The current packet's size (in bytes).
@end table
@anchor{drawtext_expansion}
The second argument is optional and specifies a default value, used when the
metadata key is not found or empty.
+Available metadata can be identified by inspecting entries
+starting with TAG included within each frame section
+printed by running @code{ffprobe -show_frames}.
+
+String metadata generated in filters leading to
+the drawtext filter are also available.
+
@item n, frame_num
The frame number, starting from 0.
@item pict_type
-A 1 character description of the current picture type.
+A one character description of the current picture type.
@item pts
The timestamp of the current frame.
By default, @var{YYYY-MM-DD HH:MM:SS} format will be used.
@end table
+@subsection Commands
+
+This filter supports altering parameters via commands:
+@table @option
+@item reinit
+Alter existing filter parameters.
+
+Syntax for the argument is the same as for filter invocation, e.g.
+
+@example
+fontsize=56:fontcolor=green:text='Hello World'
+@end example
+
+Full filter invocation with sendcmd would look like this:
+
+@example
+sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World'
+@end example
+@end table
+
+If the entire argument can't be parsed or applied as valid values then the filter will
+continue with its existing parameters.
+
@subsection Examples
@itemize
@itemize
@item
-Generate a representative palette of a given video using @command{ffmpeg}:
+Cover a rectangular object by the supplied image of a given video using @command{ffmpeg}:
@example
ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
@end example
@itemize
@item
-Generate a representative palette of a given video using @command{ffmpeg}:
+Cover a rectangular object by the supplied image of a given video using @command{ffmpeg}:
@example
ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
@end example
@code{haldclut} also has the same interpolation options as @ref{lut3d} (both
filters share the same internals).
+This filter also supports the @ref{framesync} options.
+
More information about the Hald CLUT can be found on Eskil Steenberg's website
(Hald CLUT author) at @url{http://www.quelsolaar.com/technology/clut.html}.
@end table
@end table
-This filter also supports the @ref{framesync} options.
-
@section lumakey
Turn certain luma values into transparency.
@end table
The filter exports recognized text as the frame metadata @code{lavfi.ocr.text}.
+The filter exports confidence of recognized words as the frame metadata @code{lavfi.ocr.confidence}.
@section ocv
@item chp
Enable checking the parity bit. In the event of a parity error, the filter will output
@code{0x00} for that character. Default is false.
+
+@item lp
+Lowpass lines prior further proccessing. Default is disabled.
@end table
@subsection Examples
Commission (FCC) Code of Federal Regulations (CFR) Title 47 (2003) 73.682 (a).
@item bt601
+@item bt470
+@item smpte170m
Set color space conforming to:
@itemize
@item smpte240m
Set color space conforming to SMPTE ST 240:1999.
+
+@item bt2020
+Set color space conforming to ITU-R BT.2020 non-constant luminance system.
@end table
@item in_range
@example
'scale2ref[b][a];[a][b]overlay'
@end example
+
+@item
+Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio.
+@example
+[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
+@end example
@end itemize
@anchor{selectivecolor}
See @url{https://arxiv.org/abs/1609.05158}.
@end itemize
-Training scripts as well as scripts for model generation are provided in
-the repository at @url{https://github.com/HighVoltageRocknRoll/sr.git}.
+Training scripts as well as scripts for model file (.pb) saving can be found at
+@url{https://github.com/XueweiMeng/sr/tree/sr_dnn_native}. Original repository
+is at @url{https://github.com/HighVoltageRocknRoll/sr.git}.
+
+Native model files (.model) can be generated from TensorFlow model
+files (.pb) by using tools/python/convert.py
The filter accepts the following options:
Available value for @var{flags} is:
@table @option
-@item low_pass_filter, vlfp
+@item low_pass_filter, vlpf
Enable linear vertical low-pass filtering in the filter.
Vertical low-pass filtering is required when creating an interlaced
destination from a progressive source which contains high-frequency
vertical detail. Filtering will reduce interlace 'twitter' and Moire
patterning.
-@item complex_filter, cvlfp
+@item complex_filter, cvlpf
Enable complex vertical low-pass filtering.
This will slightly less reduce interlace 'twitter' and Moire
patterning but better retain detail and subjective sharpness impression.
@item blum
Set the blue luma coefficient.
+
+@item alternate
+If @code{intensity} is negative and this is set to 1, colors will change,
+otherwise colors will be less saturated, more towards gray.
@end table
@anchor{vignette}
Easterbrook for BBC R&D, the Weston 3 field deinterlacing filter
uses filter coefficients calculated by BBC R&D.
+This filter use field-dominance information in frame to decide which
+of each pair of fields to place first in the output.
+If it gets it wrong use @ref{setfield} filter before @code{w3fdif} filter.
+
There are two sets of filter coefficients, so called "simple":
and "complex". Which set of filter coefficients is used can
be set by passing an optional parameter:
Default is @code{3}.
@end table
+@section xmedian
+Pick median pixels from several input videos.
+
+The filter accept the following options:
+
+@table @option
+@item inputs
+Set number of inputs.
+Default is 3. Allowed range is from 3 to 255.
+If number of inputs is even number, than result will be mean value between two median values.
+
+@item planes
+Set which planes to filter. Default value is @code{15}, by which all planes are processed.
+@end table
+
@section xstack
Stack video inputs into custom layout.
Multiple values can be used when separated by '+'. In such
case values are summed together.
+For 2 inputs, a default layout of @code{0_0|w0_0} is set. In all other cases,
+a layout must be set by the user.
+
@item shortest
If set to 1, force the output to terminate when the shortest input
terminates. Default value is 0.
@end example
@end itemize
+@section nlmeans_opencl
+
+Non-local Means denoise filter through OpenCL, this filter accepts same options as @ref{nlmeans}.
+
@section overlay_opencl
Overlay one video on top of another.
@item limit
Time limit for the pauses. Any pause longer than that will be considered
a timestamp discontinuity and reset the timer. Default is 2 seconds.
+@item speed
+Speed factor for processing. The value must be a float larger than zero.
+Values larger than 1.0 will result in faster than realtime processing,
+smaller will slow processing down. The @var{limit} is automatically adapted
+accordingly. Default is 1.0.
+
+A processing speed faster than what is possible without these filters cannot
+be achieved.
@end table
@anchor{select}
@end table
+@section showspatial
+
+Convert stereo input audio to a video output, representing the spatial relationship
+between two channels.
+
+The filter accepts the following options:
+
+@table @option
+@item size, s
+Specify the video size for the output. For the syntax of this option, check the
+@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}.
+Default value is @code{512x512}.
+
+@item win_size
+Set window size. Allowed range is from @var{1024} to @var{65536}. Default size is @var{4096}.
+
+@item win_func
+Set window function.
+
+It accepts the following values:
+@table @samp
+@item rect
+@item bartlett
+@item hann
+@item hanning
+@item hamming
+@item blackman
+@item welch
+@item flattop
+@item bharris
+@item bnuttall
+@item bhann
+@item sine
+@item nuttall
+@item lanczos
+@item gauss
+@item tukey
+@item dolph
+@item cauchy
+@item parzen
+@item poisson
+@item bohman
+@end table
+
+Default value is @code{hann}.
+
+@item overlap
+Set ratio of overlap window. Default value is @code{0.5}.
+When value is @code{1} overlap is set to recommended size for specific
+window function currently used.
+@end table
+
@anchor{showspectrum}
@section showspectrum
Default value is @samp{sqrt}.
+@item fscale
+Specify frequency scale.
+
+It accepts the following values:
+@table @samp
+@item lin
+linear
+@item log
+logarithmic
+@end table
+
+Default value is @samp{lin}.
+
@item saturation
Set saturation modifier for displayed colors. Negative values provide
alternative color scheme. @code{0} is no saturation at all.
@end table
Default value is @samp{log}.
+@item fscale
+Specify frequency scale.
+
+It accepts the following values:
+@table @samp
+@item lin
+linear
+@item log
+logarithmic
+@end table
+
+Default value is @samp{lin}.
+
@item saturation
Set saturation modifier for displayed colors. Negative values provide
alternative color scheme. @code{0} is no saturation at all.
@end table
Default is linear.
+
+@item draw
+Set the draw mode.
+
+Available values are:
+@table @samp
+@item scale
+Scale pixel values for each drawn sample.
+
+@item full
+Draw every sample directly.
+@end table
+
+Default value is @code{scale}.
@end table
@subsection Examples