@c man end FILTERGRAPH DESCRIPTION
+@anchor{commands}
+@chapter Changing options at runtime with a command
+
+Some options can be changed during the operation of the filter using
+a command. These options are marked 'T' on the output of
+@command{ffmpeg} @option{-h filter=<name of filter>}.
+The name of the command is the name of the option and the argument is
+the new value.
+
@anchor{framesync}
@chapter Options for filters with several inputs (framesync)
@c man begin OPTIONS FOR FILTERS WITH SEVERAL INPUTS
smaller than number of channels all remaining channels will not be delayed.
If you want to delay exact number of samples, append 'S' to number.
If you want instead to delay in seconds, append 's' to number.
+
+@item all
+Use last set delay for all remaining channels. By default is disabled.
+This option if enabled changes how option @code{delays} is interpreted.
@end table
@subsection Examples
@example
adelay=0|500S|700S
@end example
+
+@item
+Delay all channels by same number of samples:
+@example
+adelay=delays=64S:all=1
+@end example
@end itemize
@section aderivative, aintegral
@end example
@item
-If delay is very short, then it sound like a (metallic) robot playing music:
+If delay is very short, then it sounds like a (metallic) robot playing music:
@example
aecho=0.8:0.88:6:0.4
@end example
@example
afftfilt="'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'"
@end example
+
+@item
+Apply robotize effect:
+@example
+afftfilt="real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75"
+@end example
+
+@item
+Apply whisper effect:
+@example
+afftfilt="real='hypot(re,im)*cos((random(0)*2-1)*2*3.14)':imag='hypot(re,im)*sin((random(1)*2-1)*2*3.14)':win_size=128:overlap=0.8"
+@end example
@end itemize
@anchor{afir}
room equalization, cross talk cancellation, wavefield synthesis,
auralization, ambiophonics, ambisonics and spatialization.
-This filter uses second stream as FIR coefficients.
-If second stream holds single channel, it will be used
-for all input channels in first stream, otherwise
-number of channels in second stream must be same as
-number of channels in first stream.
+This filter uses the second stream as FIR coefficients.
+If the second stream holds a single channel, it will be used
+for all input channels in the first stream, otherwise
+the number of channels in the second stream must be same as
+the number of channels in the first stream.
It accepts the following parameters:
@item channels, c
Specify which channels to filter, by default all available are filtered.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@subsection Commands
context similarity is defined by comparing their surrounding patches of size
@option{p}. Patches are searched in an area of @option{r} around the sample.
-The filter accepts the following options.
+The filter accepts the following options:
@table @option
@item s
Syntax for the command is : "i", "o" or "n" string.
@end table
+@section anlms
+Apply Normalized Least-Mean-Squares algorithm to the first audio stream using the second audio stream.
+
+This adaptive filter is used to mimic a desired filter by finding the filter coefficients that
+relate to producing the least mean square of the error signal (difference between the desired,
+2nd input audio stream and the actual signal, the 1st input audio stream).
+
+A description of the accepted options follows.
+
+@table @option
+@item order
+Set filter order.
+
+@item mu
+Set filter mu.
+
+@item eps
+Set the filter eps.
+
+@item leakage
+Set the filter leakage.
+
+@item out_mode
+It accepts the following values:
+@table @option
+@item i
+Pass the 1st input.
+
+@item d
+Pass the 2nd input.
+
+@item o
+Pass filtered samples.
+
+@item n
+Pass difference between desired and filtered samples.
+
+Default value is @var{o}.
+@end table
+@end table
+
+@subsection Examples
+
+@itemize
+@item
+One of many usages of this filter is noise reduction, input audio is filtered
+with same samples that are delayed by fixed amount, one such example for stereo audio is:
+@example
+asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
+@end example
+@end itemize
+
+@subsection Commands
+
+This filter supports the same commands as options, excluding option @code{order}.
+
@section anull
Pass the audio source unchanged to the output.
@end example
@end itemize
+@section arnndn
+
+Reduce noise from speech using Recurrent Neural Networks.
+
+This filter accepts the following options:
+
+@table @option
+@item model, m
+Set train model file to load. This option is always required.
+@end table
+
@section asetnsamples
Set the number of samples per each output audio frame.
@end example
@end itemize
+@subsection Commands
+
+This filter supports the following commands:
+@table @option
+@item tempo
+Change filter tempo scale factor.
+Syntax for the command is : "@var{tempo}"
+@end table
+
@section atrim
Trim the input so that the output contains one continuous subpart of the input.
@end itemize
+@section axcorrelate
+Calculate normalized cross-correlation between two input audio streams.
+
+Resulted samples are always between -1 and 1 inclusive.
+If result is 1 it means two input samples are highly correlated in that selected segment.
+Result 0 means they are not correlated at all.
+If result is -1 it means two input samples are out of phase, which means they cancel each
+other.
+
+The filter accepts the following options:
+
+@table @option
+@item size
+Set size of segment over which cross-correlation is calculated.
+Default is 256. Allowed range is from 2 to 131072.
+
+@item algo
+Set algorithm for cross-correlation. Can be @code{slow} or @code{fast}.
+Default is @code{slow}. Fast algorithm assumes mean values over any given segment
+are always zero and thus need much less calculations to make.
+This is generally not true, but is valid for typical audio streams.
+@end table
+
+@subsection Examples
+
+@itemize
+@item
+Calculate correlation between channels in stereo audio stream:
+@example
+ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
+@end example
+@end itemize
+
@section bandpass
Apply a two-pole Butterworth band-pass filter with central
@item channels, c
Specify which channels to filter, by default all available are filtered.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@subsection Commands
@item channels, c
Specify which channels to filter, by default all available are filtered.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@subsection Commands
@item channels, c
Specify which channels to filter, by default all available are filtered.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@subsection Commands
@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.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@section bs2b
positions of microphones or speakers.
For example, you have recorded guitar with two microphones placed in
-different location. Because the front of sound wave has fixed speed in
+different locations. Because the front of sound wave has fixed speed in
normal conditions, the phasing of microphones can vary and depends on
their location and interposition. The best sound mix can be achieved when
-these microphones are in phase (synchronized). Note that distance of
-~30 cm between microphones makes one microphone to capture signal in
-antiphase to another microphone. That makes the final mix sounding moody.
+these microphones are in phase (synchronized). Note that a distance of
+~30 cm between microphones makes one microphone capture the signal in
+antiphase to the other microphone. That makes the final mix sound moody.
This filter helps to solve phasing problems by adding different delays
to each microphone track and make them synchronized.
Remember that synchronization/delay tolerance depends on sample rate, too.
Higher sample rates will give more tolerance.
-It accepts the following parameters:
+The filter accepts the following parameters:
@table @option
@item mm
Default is 1.
@item temp
-Set temperature degree in Celsius. This is the temperature of the environment.
+Set temperature in degrees Celsius. This is the temperature of the environment.
Default is 20.
@end table
@item channels, c
Specify which channels to filter, by default all available are filtered.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@subsection Examples
@item channels, c
Specify which channels to filter, by default all available are filtered.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@subsection Commands
@item channels, c
Specify which channels to filter, by default all available are filtered.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@subsection Examples
@end table
@end table
+@subsection Commands
+
+This filter supports the following commands:
+@table @option
+@item tempo
+Change filter tempo scale factor.
+Syntax for the command is : "@var{tempo}"
+
+@item pitch
+Change filter pitch scale factor.
+Syntax for the command is : "@var{pitch}"
+@end table
+
@section sidechaincompress
This filter acts like normal compressor but has the ability to compress
or equal to a noise tolerance value for a duration greater or equal to the
minimum detected noise duration.
-The printed times and duration are expressed in seconds.
+The printed times and duration are expressed in seconds. The
+@code{lavfi.silence_start} or @code{lavfi.silence_start.X} metadata key
+is set on the first frame whose timestamp equals or exceeds the detection
+duration and it contains the timestamp of the first frame of the silence.
+
+The @code{lavfi.silence_duration} or @code{lavfi.silence_duration.X}
+and @code{lavfi.silence_end} or @code{lavfi.silence_end.X} metadata
+keys are set on the first frame after the silence. If @option{mono} is
+enabled, and each channel is evaluated separately, the @code{.X}
+suffixed keys are used, and @code{X} corresponds to the channel number.
The filter accepts the following options:
specified value) or amplitude ratio. Default is -60dB, or 0.001.
@item duration, d
-Set silence duration until notification (default is 2 seconds).
+Set silence duration until notification (default is 2 seconds). See
+@ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}
+for the accepted syntax.
@item mono, m
Process each channel separately, instead of combined. By default is disabled.
@example
silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB
@end example
+
+@item
+Trim all digital silence samples, using peak detection, from beginning to end
+where there is more than 0 samples of digital silence in audio and digital
+silence is detected in all channels at same positions in stream:
+@example
+silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0
+@end example
@end itemize
@section sofalizer
@item channels, c
Specify which channels to filter, by default all available are filtered.
+
+@item normalize, n
+Normalize biquad coefficients, by default is disabled.
+Enabling it will normalize magnitude response at DC to 0dB.
@end table
@subsection Commands
Set which planes to filter. Default is all. Allowed range is from 0 to 15.
@end table
+@subsection Commands
+
+This filter supports the following @ref{commands} that corresponds to option of same name:
+@table @option
+@item factor
+@item threshold
+@item tolerance
+@item low
+@item high
+@item planes
+@end table
+
@section ass
Same as the @ref{subtitles} filter, except that it doesn't require libavcodec
@item p
Set what planes of frame filter will use for averaging. Default is all.
+
+@item a
+Set what variant of algorithm filter will use for averaging. Default is @code{p} parallel.
+Alternatively can be set to @code{s} serial.
+
+Parallel can be faster then serial, while other way around is never true.
+Parallel will abort early on first change being greater then thresholds, while serial
+will continue processing other side of frames if they are equal or bellow thresholds.
@end table
+@subsection Commands
+This filter supports same @ref{commands} as options except option @code{s}.
+The command accepts the same syntax of the corresponding option.
+
@section avgblur
Apply average blur filter.
Default is @code{0}.
@end table
+@subsection Commands
+This filter supports same commands as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@section bbox
Compute the bounding box for the non-black pixels in the input frame
Set the minimal luminance value. Default is @code{16}.
@end table
+@section bilateral
+Apply bilateral filter, spatial smoothing while preserving edges.
+
+The filter accepts the following options:
+@table @option
+@item sigmaS
+Set sigma of gaussian function to calculate spatial weight.
+Allowed range is 0 to 10. Default is 0.1.
+
+@item sigmaR
+Set sigma of gaussian function to calculate range weight.
+Allowed range is 0 to 1. Default is 0.1.
+
+@item planes
+Set planes to filter. Default is first only.
+@end table
+
@section bitplanenoise
Show and measure bit plane noise.
top field first will be assumed.
@item deint
-Specify which frames to deinterlace. Accept one of the following
+Specify which frames to deinterlace. Accepts one of the following
values:
@table @option
This can be used to pass exact YUV values as hexadecimal numbers.
@end table
+@subsection Commands
+This filter supports same @ref{commands} as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@section chromakey
YUV colorspace color/chroma keying.
This can be used to pass exact YUV values as hexadecimal numbers.
@end table
+@subsection Commands
+This filter supports same @ref{commands} as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@subsection Examples
@itemize
Set edge mode, can be @var{smear}, default, or @var{warp}.
@end table
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
@section ciescope
Display CIE color diagram with pixels overlaid onto it.
Adjust red, green and blue highlights (brightest pixels).
Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{0}.
+
+@item pl
+Preserve lightness when changing color balance. Default is disabled.
@end table
@subsection Examples
@end example
@end itemize
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
@section colorchannelmixer
Adjust video input frames by re-mixing color channels.
@end example
@end itemize
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
@section colorkey
RGB colorspace color keying.
@end example
@end itemize
+@section dnn_processing
+
+Do image processing with deep neural networks. Currently only AVFrame with RGB24
+and BGR24 are supported, more formats will be added later.
+
+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.
+
+@item tensorflow
+TensorFlow backend. To enable this backend you
+need to install the TensorFlow for C library (see
+@url{https://www.tensorflow.org/install/install_c}) and configure FFmpeg with
+@code{--enable-libtensorflow}
+@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 and native
+backend can load files for only its format.
+
+Native model file (.model) can be generated from TensorFlow model file (.pb) by using tools/python/convert.py
+
+@item input
+Set the input name of the dnn network.
+
+@item output
+Set the output name of the dnn network.
+
+@item fmt
+Set the pixel format for the Frame. Allowed values are @code{AV_PIX_FMT_RGB24}, and @code{AV_PIX_FMT_BGR24}.
+Default value is @code{AV_PIX_FMT_RGB24}.
+
+@end table
+
@section drawbox
Draw a colored box on the input image.
@end example
@end itemize
+@subsection Commands
+This filter supports same commands as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
+@anchor{drawgraph}
+@section drawgraph
+Draw a graph using input video metadata.
+
+It accepts the following parameters:
+
+@table @option
+@item m1
+Set 1st frame metadata key from which metadata values will be used to draw a graph.
+
+@item fg1
+Set 1st foreground color expression.
+
+@item m2
+Set 2nd frame metadata key from which metadata values will be used to draw a graph.
+
+@item fg2
+Set 2nd foreground color expression.
+
+@item m3
+Set 3rd frame metadata key from which metadata values will be used to draw a graph.
+
+@item fg3
+Set 3rd foreground color expression.
+
+@item m4
+Set 4th frame metadata key from which metadata values will be used to draw a graph.
+
+@item fg4
+Set 4th foreground color expression.
+
+@item min
+Set minimal value of metadata value.
+
+@item max
+Set maximal value of metadata value.
+
+@item bg
+Set graph background color. Default is white.
+
+@item mode
+Set graph mode.
+
+Available values for mode is:
+@table @samp
+@item bar
+@item dot
+@item line
+@end table
+
+Default is @code{line}.
+
+@item slide
+Set slide mode.
+
+Available values for slide is:
+@table @samp
+@item frame
+Draw new frame when right border is reached.
+
+@item replace
+Replace old columns with new ones.
+
+@item scroll
+Scroll from right to left.
+
+@item rscroll
+Scroll from left to right.
+
+@item picture
+Draw single picture.
+@end table
+
+Default is @code{frame}.
+
+@item size
+Set size of graph video. For the syntax of this option, check the
+@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}.
+The default value is @code{900x256}.
+
+The foreground color expressions can use the following variables:
+@table @option
+@item MIN
+Minimal value of metadata value.
+
+@item MAX
+Maximal value of metadata value.
+
+@item VAL
+Current metadata key value.
+@end table
+
+The color is defined as 0xAABBGGRR.
+@end table
+
+Example using metadata from @ref{signalstats} filter:
+@example
+signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
+@end example
+
+Example using metadata from @ref{ebur128} filter:
+@example
+ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
+@end example
+
@section drawgrid
Draw a grid on the input image.
@end example
@end itemize
+@subsection Commands
+This filter supports same commands as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@anchor{drawtext}
@section drawtext
If optionally followed by @code{+} output frame will be marked as interlaced,
else if followed by @code{-} output frame will be marked as progressive, else
it will be marked same as input frame.
+If optionally followed by @code{t} output frame will use only top field, or in
+case of @code{b} it will use only bottom field.
If line starts with @code{#} or @code{;} that line is skipped.
@item mode
Set color for pixels in fixed mode. Default is @var{black}.
@end table
+@subsection Commands
+This filter supports same @ref{commands} as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@section find_rect
Find a rectangular object
Default is @code{-1}.
@end table
+@subsection Commands
+This filter supports same commands as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@section geq
Apply generic equation to each pixel.
@item alpha(x, y)
Return the value of the pixel at location (@var{x},@var{y}) of the alpha
plane. Return 0 if there is no such plane.
+
+@item interpolation
+Set one of interpolation methods:
+@table @option
+@item nearest, n
+@item bilinear, b
+@end table
+Default is bilinear.
@end table
For functions, if @var{x} and @var{y} are outside the area, the value will be
@end itemize
-@section graphmonitor, agraphmonitor
+@anchor{graphmonitor}
+@section graphmonitor
Show various filtergraph stats.
With this filter one can debug complete filtergraph.
Note that this filter is faster than using @ref{overlay} and @ref{pad} filter
to create same output.
-The filter accept the following option:
+The filter accepts the following option:
@table @option
@item inputs
@table @option
@item model_path
Set the model path which is to be used for SVM.
-Default value: @code{"vmaf_v0.6.1.pkl"}
+Default value: @code{"/usr/local/share/model/vmaf_v0.6.1.pkl"}
@item log_path
Set the file path to be used to store logs.
@item phone_model
Invokes the phone model which will generate VMAF scores higher than in the
regular model, which is more suitable for laptop, TV, etc. viewing conditions.
+Default value: @code{false}
@item psnr
Enables computing psnr along with vmaf.
+Default value: @code{false}
@item ssim
Enables computing ssim along with vmaf.
+Default value: @code{false}
@item ms_ssim
Enables computing ms_ssim along with vmaf.
+Default value: @code{false}
@item pool
-Set the pool method (mean, min or harmonic mean) to be used for computing vmaf.
+Set the pool method to be used for computing vmaf.
+Options are @code{min}, @code{harmonic_mean} or @code{mean} (default).
@item n_threads
Set number of threads to be used when computing vmaf.
+Default value: @code{0}, which makes use of all available logical processors.
@item n_subsample
Set interval for frame subsampling used when computing vmaf.
+Default value: @code{1}
@item enable_conf_interval
Enables confidence interval.
+Default value: @code{false}
@end table
This filter also supports the @ref{framesync} options.
+@subsection Examples
+@itemize
+@item
On the below examples the input file @file{main.mpg} being processed is
compared with the reference file @file{ref.mpg}.
ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf -f null -
@end example
+@item
Example with options:
@example
ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf="psnr=1:log_fmt=json" -f null -
@end example
+@item
+Example with options and different containers:
+@example
+ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]libvmaf=psnr=1:log_fmt=json" -f null -
+@end example
+@end itemize
+
@section limiter
Limits the pixel components values to the specified range [min, max].
@item tolerance
Set the range of luma values to be keyed out.
-Default value is @code{0}.
+Default value is @code{0.01}.
@item softness
Set the range of softness. Default value is @code{0}.
Use this to control gradual transition from zero to full transparency.
@end table
+@subsection Commands
+This filter supports same @ref{commands} as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@section lut, lutrgb, lutyuv
Compute a look-up table for binding each pixel component input value
By default value 0xf, all planes will be processed.
@end table
+@section maskedmax
+
+Merge the second and third input stream into output stream using absolute differences
+between second input stream and first input stream and absolute difference between
+third input stream and first input stream. The picked value will be from second input
+stream if second absolute difference is greater than first one or from third input stream
+otherwise.
+
+This filter accepts the following options:
+@table @option
+@item planes
+Set which planes will be processed as bitmap, unprocessed planes will be
+copied from first stream.
+By default value 0xf, all planes will be processed.
+@end table
+
@section maskedmerge
Merge the first input stream with the second input stream using per pixel
By default value 0xf, all planes will be processed.
@end table
+@section maskedmin
+
+Merge the second and third input stream into output stream using absolute differences
+between second input stream and first input stream and absolute difference between
+third input stream and first input stream. The picked value will be from second input
+stream if second absolute difference is less than first one or from third input stream
+otherwise.
+
+This filter accepts the following options:
+@table @option
+@item planes
+Set which planes will be processed as bitmap, unprocessed planes will be
+copied from first stream.
+By default value 0xf, all planes will be processed.
+@end table
+
@section maskfun
Create mask from input video.
Set per-block quantization parameter (QP) used by the internal
encoder.
-Higher values should result in a smoother motion vector field but less
-optimal individual vectors. Default value is 1.
-@end table
+Higher values should result in a smoother motion vector field but less
+optimal individual vectors. Default value is 1.
+@end table
+
+@section median
+
+Pick median pixel from certain rectangle defined by radius.
+
+This filter accepts the following options:
+
+@table @option
+@item radius
+Set horizontal radius size. Default value is @code{1}.
+Allowed range is integer from 1 to 127.
+
+@item planes
+Set which planes to process. Default is @code{15}, which is all available planes.
+
+@item radiusV
+Set vertical radius size. Default value is @code{0}.
+Allowed range is integer from 0 to 127.
+If it is 0, value will be picked from horizontal @code{radius} option.
+@end table
+
+@subsection Commands
+This filter supports same @ref{commands} as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
@section mergeplanes
@end table
+@subsection Commands
+This filter supports same @ref{commands} as options, excluding @var{smoothing} option.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@subsection Examples
Stretch video contrast to use the full dynamic range, with no temporal
or "bilateral". The default value is "gaussian".
The meaning of @var{param1}, @var{param2}, @var{param3}, and @var{param4}
-depend on the smooth type. @var{param1} and
+depends on the smooth type. @var{param1} and
@var{param2} accept integer positive values or 0. @var{param3} and
@var{param4} accept floating point values.
Draw scope. By default is enabled.
@end table
+@subsection Commands
+This filter supports same @ref{commands} as options.
+The command accepts the same syntax of the corresponding option.
+
+If the specified expression is not valid, it is kept at its current
+value.
+
@subsection Examples
@itemize
@end table
@end table
+@section photosensitivity
+Reduce various flashes in video, so to help users with epilepsy.
+
+It accepts the following options:
+@table @option
+@item frames, f
+Set how many frames to use when filtering. Default is 30.
+
+@item threshold, t
+Set detection threshold factor. Default is 1.
+Lower is stricter.
+
+@item skip
+Set how many pixels to skip when sampling frames. Default is 1.
+Allowed range is from 1 to 1024.
+
+@item bypass
+Leave frames unchanged. Default is disabled.
+@end table
+
@section pixdesctest
Pixel format descriptor test filter, mainly useful for internal
Alter frame colors in video with pseudocolors.
-This filter accept the following options:
+This filter accepts the following options:
@table @option
@item c0
channels.
@end table
+@subsection Examples
+@itemize
+@item
For example:
@example
movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
reference file @file{ref_movie.mpg}. The PSNR of each individual frame
is stored in @file{stats.log}.
+@item
+Another example with different containers:
+@example
+ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]psnr" -f null -
+@end example
+@end itemize
+
@anchor{pullup}
@section pullup
@code{0x00} for that character. Default is false.
@item lp
-Lowpass lines prior further proccessing. Default is disabled.
+Lowpass lines prior to further processing. Default is disabled.
@end table
@subsection Examples
Set edge mode, can be @var{smear}, default, or @var{warp}.
@end table
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
@section roberts
Apply roberts cross operator to input video stream.
or @option{h}, you still need to specify the output resolution for this option
to work.
-@item force_divisible_by Ensures that the output resolution is divisible by the
+@item force_divisible_by
+Ensures that both the output dimensions, width and height, are divisible by the
given integer when used together with @option{force_original_aspect_ratio}. This
-works similar to using -n in the @option{w} and @option{h} options.
+works similar to using @code{-n} in the @option{w} and @option{h} options.
This option respects the value set for @option{force_original_aspect_ratio},
-increasing or decreasing the resolution accordingly. This may slightly modify
-the video's aspect ration.
+increasing or decreasing the resolution accordingly. The video's aspect ratio
+may be slightly modified.
-This can be handy, for example, if you want to have a video fit within a defined
-resolution using the @option{force_original_aspect_ratio} option but have
-encoder restrictions when it comes to width or height.
+This option can be handy if you need to have a video fit within or exceed
+a defined resolution using @option{force_original_aspect_ratio} but also have
+encoder restrictions on width or height divisibility.
@end table
@end example
@end itemize
+@section scroll
+Scroll input video horizontally and/or vertically by constant speed.
+
+The filter accepts the following options:
+@table @option
+@item horizontal, h
+Set the horizontal scrolling speed. Default is 0. Allowed range is from -1 to 1.
+Negative values changes scrolling direction.
+
+@item vertical, v
+Set the vertical scrolling speed. Default is 0. Allowed range is from -1 to 1.
+Negative values changes scrolling direction.
+
+@item hpos
+Set the initial horizontal scrolling position. Default is 0. Allowed range is from 0 to 1.
+
+@item vpos
+Set the initial vertical scrolling position. Default is 0. Allowed range is from 0 to 1.
+@end table
+
+@subsection Commands
+
+This filter supports the following @ref{commands}:
+@table @option
+@item horizontal, h
+Set the horizontal scrolling speed.
+@item vertical, v
+Set the vertical scrolling speed.
+@end table
+
@anchor{selectivecolor}
@section selectivecolor
This filter also supports the @ref{framesync} options.
+@subsection Examples
+@itemize
+@item
For example:
@example
movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
reference file @file{ref_movie.mpg}. The SSIM of each individual frame
is stored in @file{stats.log}.
+@item
Another example with both psnr and ssim at same time:
@example
ffmpeg -i main.mpg -i ref.mpg -lavfi "ssim;[0:v][1:v]psnr" -f null -
@end example
+@item
+Another example with different containers:
+@example
+ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]ssim" -f null -
+@end example
+@end itemize
+
@section stereo3d
Convert between different stereoscopic image formats.
(right eye left, left eye right)
@item abl
+@item tbl
above-below (left eye above, right eye below)
@item abr
+@item tbr
above-below (right eye above, left eye below)
@item ab2l
+@item tb2l
above-below with half height resolution
(left eye above, right eye below)
@item ab2r
+@item tb2r
above-below with half height resolution
(right eye above, left eye below)
(right eye left, left eye right)
@item abl
+@item tbl
above-below (left eye above, right eye below)
@item abr
+@item tbr
above-below (right eye above, left eye below)
@item ab2l
+@item tb2l
above-below with half height resolution
(left eye above, right eye below)
@item ab2r
+@item tb2r
above-below with half height resolution
(right eye above, left eye below)
@table @samp
@item e
+@item equirect
Equirectangular projection.
@item c3x2
Default value is @b{@samp{0}}.
+@item fin_pad
+@item fout_pad
+Set fixed padding for the input/output cubemap. Values in pixels.
+
+Default value is @b{@samp{0}}. If greater than zero it overrides other padding options.
+
@item in_forder
@item out_forder
Set order of faces for the input/output cubemap. Choose one direction for each position.
90 degrees clockwise
@item 2
180 degrees clockwise
-@item 4
+@item 3
270 degrees clockwise
@end table
Equi-Angular Cubemap.
@item flat
+@item gnomonic
+@item rectilinear
Regular video. @i{(output only)}
Format specific options:
@table @option
@item h_fov
@item v_fov
-Set horizontal/vertical field of view. Values in degrees.
+@item d_fov
+Set horizontal/vertical/diagonal field of view. Values in degrees.
+
+If diagonal field of view is set it overrides horizontal and vertical field of view.
@end table
@item dfisheye
-Dual fisheye. @i{(input only)}
+Dual fisheye.
Format specific options:
@table @option
@item in_pad
+@item out_pad
Set padding proportion. Values in decimals.
Example values:
@item fb
Facebook's 360 format.
+@item sg
+Stereographic format.
+
+Format specific options:
+@table @option
+@item h_fov
+@item v_fov
+@item d_fov
+Set horizontal/vertical/diagonal field of view. Values in degrees.
+
+If diagonal field of view is set it overrides horizontal and vertical field of view.
+@end table
+
+@item mercator
+Mercator format.
+
+@item ball
+Ball format, gives significant distortion toward the back.
+
+@item hammer
+Hammer-Aitoff map projection format.
+
+@item sinusoidal
+Sinusoidal map projection format.
+
@end table
@item interp
Default resolution depends on formats.
+@item in_stereo
+@item out_stereo
+Set the input/output stereo format.
+
+@table @samp
+@item 2d
+2D mono
+@item sbs
+Side by side
+@item tb
+Top bottom
+@end table
+
+Default value is @b{@samp{2d}} for input and output format.
+
@item yaw
@item pitch
@item roll
@item h_flip
@item v_flip
@item d_flip
-Flip the output video horizontally/vertically/in-depth. Boolean values.
+Flip the output video horizontally(swaps left-right)/vertically(swaps up-down)/in-depth(swaps back-forward). Boolean values.
+
+@item ih_flip
+@item iv_flip
+Set if input video is flipped horizontally/vertically. Boolean values.
@item in_trans
Set if input video is transposed. Boolean value, by default disabled.
@example
ffmpeg -i input.mkv -vf v360=eac:flat:yaw=180 output.mkv
@end example
+@item
+Convert transposed and horizontally flipped Equi-Angular Cubemap in side-by-side stereo format to equirectangular top-bottom stereo format:
+@example
+v360=eac:equirect:in_stereo=sbs:in_trans=1:ih_flip=1:out_stereo=tb
+@end example
@end itemize
@section vaguedenoiser
At end it will output number of frames detected as having variable delta pts,
and ones with constant delta pts.
-If there was frames with variable delta, than it will also show min and max delta
-encountered.
+If there was frames with variable delta, than it will also show min, max and
+average delta encountered.
@section vibrance
@section vmafmotion
-Obtain the average vmaf motion score of a video.
-It is one of the component filters of VMAF.
+Obtain the average VMAF motion score of a video.
+It is one of the component metrics of VMAF.
The obtained average motion score is printed through the logging system.
-In the below example the input file @file{ref.mpg} is being processed and score
-is computed.
+The filter accepts the following options:
+
+@table @option
+@item stats_file
+If specified, the filter will use the named file to save the motion score of
+each frame with respect to the previous frame.
+When filename equals "-" the data is sent to standard output.
+@end table
+Example:
@example
-ffmpeg -i ref.mpg -lavfi vmafmotion -f null -
+ffmpeg -i ref.mpg -vf vmafmotion -f null -
@end example
@section vstack
Note that this filter is faster than using @ref{overlay} and @ref{pad} filter
to create same output.
-The filter accept the following option:
+The filter accepts the following options:
@table @option
@item inputs
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
+This filter uses 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":
+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 value is @samp{complex}.
@item deint
-Specify which frames to deinterlace. Accept one of the following values:
+Specify which frames to deinterlace. Accepts one of the following values:
@table @samp
@item all
@item xflat
Similar as above, but use different colors.
+@item yflat
+Similar as above, but again with different colors.
+
@item chroma
Displays only chroma.
@item orange
Display orange graticule showing legal broadcast ranges.
+
+@item invert
+Display invert graticule showing legal broadcast ranges.
@end table
@item opacity, o
@section xmedian
Pick median pixels from several input videos.
-The filter accept the following options:
+The filter accepts the following options:
@table @option
@item inputs
All streams must be of same pixel format.
-The filter accept the following option:
+The filter accepts the following options:
@table @option
@item inputs
Multiple values can be used when separated by '+'. In such
case values are summed together.
+Note that if inputs are of different sizes gaps may appear, as not all of
+the output video frame will be filled. Similarly, videos can overlap each
+other if their position doesn't leave enough space for the full frame of
+adjoining videos.
+
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.
@itemize
@item
-Display 4 inputs into 2x2 grid,
-note that if inputs are of different sizes unused gaps might appear,
-as not all of output video is used.
+Display 4 inputs into 2x2 grid.
+
+Layout:
+@example
+input1(0, 0) | input3(w0, 0)
+input2(0, h0) | input4(w0, h0)
+@end example
+
@example
xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
@end example
+Note that if inputs are of different sizes, gaps or overlaps may occur.
+
@item
-Display 4 inputs into 1x4 grid,
-note that if inputs are of different sizes unused gaps might appear,
-as not all of output video is used.
+Display 4 inputs into 1x4 grid.
+
+Layout:
+@example
+input1(0, 0)
+input2(0, h0)
+input3(0, h0+h1)
+input4(0, h0+h1+h2)
+@end example
+
@example
xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
@end example
+Note that if inputs are of different widths, unused space will appear.
+
+@item
+Display 9 inputs into 3x3 grid.
+
+Layout:
+@example
+input1(0, 0) | input4(w0, 0) | input7(w0+w3, 0)
+input2(0, h0) | input5(w0, h0) | input8(w0+w3, h0)
+input3(0, h0+h1) | input6(w0, h0+h1) | input9(w0+w3, h0+h1)
+@end example
+
+@example
+xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w3_0|w0+w3_h0|w0+w3_h0+h1
+@end example
+
+Note that if inputs are of different sizes, gaps or overlaps may occur.
+
@item
-Display 9 inputs into 3x3 grid,
-note that if inputs are of different sizes unused gaps might appear,
-as not all of output video is used.
+Display 16 inputs into 4x4 grid.
+
+Layout:
+@example
+input1(0, 0) | input5(w0, 0) | input9 (w0+w4, 0) | input13(w0+w4+w8, 0)
+input2(0, h0) | input6(w0, h0) | input10(w0+w4, h0) | input14(w0+w4+w8, h0)
+input3(0, h0+h1) | input7(w0, h0+h1) | input11(w0+w4, h0+h1) | input15(w0+w4+w8, h0+h1)
+input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
+@end example
+
@example
-xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2
+xstack=inputs=16:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2|w0_0|w0_h0|w0_h0+h1|w0_h0+h1+h2|w0+w4_0|
+w0+w4_h0|w0+w4_h0+h1|w0+w4_h0+h1+h2|w0+w4+w8_0|w0+w4+w8_h0|w0+w4+w8_h0+h1|w0+w4+w8_h0+h1+h2
@end example
+
+Note that if inputs are of different sizes, gaps or overlaps may occur.
+
@end itemize
@anchor{yadif}
top field first will be assumed.
@item deint
-Specify which frames to deinterlace. Accept one of the following
+Specify which frames to deinterlace. Accepts one of the following
values:
@table @option
top field first will be assumed.
@item deint
-Specify which frames to deinterlace. Accept one of the following
+Specify which frames to deinterlace. Accepts one of the following
values:
@table @option
Default value is @code{0}.
@item y
-Set the x coordinate of the overlaid video on the main video.
+Set the y coordinate of the overlaid video on the main video.
Default value is @code{0}.
@end table
@item ring2
@item all
+@item max_frames, m
+Set the maximum number of frames generated for each test, default value is 30.
+
@end table
Default value is "all", which will cycle through the list of all tests.
@end itemize
+@section sierpinski
+
+Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
+
+This source accepts the following options:
+
+@table @option
+@item size, s
+Set frame size. 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 "640x480".
+
+@item rate, r
+Set frame rate, expressed as number of frames per second. Default
+value is "25".
+
+@item seed
+Set seed which is used for random panning.
+
+@item jump
+Set max jump for single pan destination. Allowed range is from 1 to 10000.
+
+@item type
+Set fractal type, can be default @code{carpet} or @code{triangle}.
+@end table
+
@c man end VIDEO SOURCES
@chapter Video Sinks
by white color.
@end table
+@section adrawgraph
+Draw a graph using input audio metadata.
+
+See @ref{drawgraph}
+
+@section agraphmonitor
+
+See @ref{graphmonitor}.
+
@section ahistogram
Convert input audio to a video output, displaying the volume histogram.
scope.
The filter is used to measure the difference between channels of stereo
-audio stream. A monoaural signal, consisting of identical left and right
+audio stream. A monaural signal, consisting of identical left and right
signal, results in straight vertical line. Any stereo separation is visible
as a deviation from this line, creating a Lissajous figure.
If the straight (or deviation from it) but horizontal line appears this
Close the current segment and step to the next one
@end table
-@section drawgraph, adrawgraph
-
-Draw a graph using input video or audio metadata.
-
-It accepts the following parameters:
-
-@table @option
-@item m1
-Set 1st frame metadata key from which metadata values will be used to draw a graph.
-
-@item fg1
-Set 1st foreground color expression.
-
-@item m2
-Set 2nd frame metadata key from which metadata values will be used to draw a graph.
-
-@item fg2
-Set 2nd foreground color expression.
-
-@item m3
-Set 3rd frame metadata key from which metadata values will be used to draw a graph.
-
-@item fg3
-Set 3rd foreground color expression.
-
-@item m4
-Set 4th frame metadata key from which metadata values will be used to draw a graph.
-
-@item fg4
-Set 4th foreground color expression.
-
-@item min
-Set minimal value of metadata value.
-
-@item max
-Set maximal value of metadata value.
-
-@item bg
-Set graph background color. Default is white.
-
-@item mode
-Set graph mode.
-
-Available values for mode is:
-@table @samp
-@item bar
-@item dot
-@item line
-@end table
-
-Default is @code{line}.
-
-@item slide
-Set slide mode.
-
-Available values for slide is:
-@table @samp
-@item frame
-Draw new frame when right border is reached.
-
-@item replace
-Replace old columns with new ones.
-
-@item scroll
-Scroll from right to left.
-
-@item rscroll
-Scroll from left to right.
-
-@item picture
-Draw single picture.
-@end table
-
-Default is @code{frame}.
-
-@item size
-Set size of graph video. For the syntax of this option, check the
-@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}.
-The default value is @code{900x256}.
-
-The foreground color expressions can use the following variables:
-@table @option
-@item MIN
-Minimal value of metadata value.
-
-@item MAX
-Maximal value of metadata value.
-
-@item VAL
-Current metadata key value.
-@end table
-
-The color is defined as 0xAABBGGRR.
-@end table
-
-Example using metadata from @ref{signalstats} filter:
-@example
-signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
-@end example
-
-Example using metadata from @ref{ebur128} filter:
-@example
-ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
-@end example
-
@anchor{ebur128}
@section ebur128
@item expr
Values are interpreted as floats, returns true if expression from option @code{expr}
evaluates to true.
+
+@item ends_with
+Values are interpreted as strings, returns true if metadata value ends with
+the @code{value} option string.
@end table
@item expr
option instead.
@item font
-Specify fontconfig pattern. This has lower priority than @var{fontfile}.
-The : in the pattern may be replaced by | to avoid unnecessary escaping.
+Specify fontconfig pattern. This has lower priority than @var{fontfile}. The
+@code{:} in the pattern may be replaced by @code{|} to avoid unnecessary
+escaping.
@item fontcolor
Specify font color expression. This is arithmetic expression that should return
@section spectrumsynth
-Sythesize audio from 2 input video spectrums, first input stream represents
+Synthesize audio from 2 input video spectrums, first input stream represents
magnitude across time and second represents phase across time.
The filter will transform from frequency domain as displayed in videos back
to time domain as presented in audio output.