1FFMPEG-FILTERS(1)                                            FFMPEG-FILTERS(1)
2
3
4

NAME

6       ffmpeg-filters - FFmpeg filters
7

DESCRIPTION

9       This document describes filters, sources, and sinks provided by the
10       libavfilter library.
11

FILTERING INTRODUCTION

13       Filtering in FFmpeg is enabled through the libavfilter library.
14
15       In libavfilter, a filter can have multiple inputs and multiple outputs.
16       To illustrate the sorts of things that are possible, we consider the
17       following filtergraph.
18
19                               [main]
20               input --> split ---------------------> overlay --> output
21                           |                             ^
22                           |[tmp]                  [flip]|
23                           +-----> crop --> vflip -------+
24
25       This filtergraph splits the input stream in two streams, then sends one
26       stream through the crop filter and the vflip filter, before merging it
27       back with the other stream by overlaying it on top. You can use the
28       following command to achieve this:
29
30               ffmpeg -i INPUT -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT
31
32       The result will be that the top half of the video is mirrored onto the
33       bottom half of the output video.
34
35       Filters in the same linear chain are separated by commas, and distinct
36       linear chains of filters are separated by semicolons. In our example,
37       crop,vflip are in one linear chain, split and overlay are separately in
38       another. The points where the linear chains join are labelled by names
39       enclosed in square brackets. In the example, the split filter generates
40       two outputs that are associated to the labels [main] and [tmp].
41
42       The stream sent to the second output of split, labelled as [tmp], is
43       processed through the crop filter, which crops away the lower half part
44       of the video, and then vertically flipped. The overlay filter takes in
45       input the first unchanged output of the split filter (which was
46       labelled as [main]), and overlay on its lower half the output generated
47       by the crop,vflip filterchain.
48
49       Some filters take in input a list of parameters: they are specified
50       after the filter name and an equal sign, and are separated from each
51       other by a colon.
52
53       There exist so-called source filters that do not have an audio/video
54       input, and sink filters that will not have audio/video output.
55

GRAPH

57       The graph2dot program included in the FFmpeg tools directory can be
58       used to parse a filtergraph description and issue a corresponding
59       textual representation in the dot language.
60
61       Invoke the command:
62
63               graph2dot -h
64
65       to see how to use graph2dot.
66
67       You can then pass the dot description to the dot program (from the
68       graphviz suite of programs) and obtain a graphical representation of
69       the filtergraph.
70
71       For example the sequence of commands:
72
73               echo <GRAPH_DESCRIPTION> | \
74               tools/graph2dot -o graph.tmp && \
75               dot -Tpng graph.tmp -o graph.png && \
76               display graph.png
77
78       can be used to create and display an image representing the graph
79       described by the GRAPH_DESCRIPTION string. Note that this string must
80       be a complete self-contained graph, with its inputs and outputs
81       explicitly defined.  For example if your command line is of the form:
82
83               ffmpeg -i infile -vf scale=640:360 outfile
84
85       your GRAPH_DESCRIPTION string will need to be of the form:
86
87               nullsrc,scale=640:360,nullsink
88
89       you may also need to set the nullsrc parameters and add a format filter
90       in order to simulate a specific input file.
91

FILTERGRAPH DESCRIPTION

93       A filtergraph is a directed graph of connected filters. It can contain
94       cycles, and there can be multiple links between a pair of filters. Each
95       link has one input pad on one side connecting it to one filter from
96       which it takes its input, and one output pad on the other side
97       connecting it to one filter accepting its output.
98
99       Each filter in a filtergraph is an instance of a filter class
100       registered in the application, which defines the features and the
101       number of input and output pads of the filter.
102
103       A filter with no input pads is called a "source", and a filter with no
104       output pads is called a "sink".
105
106   Filtergraph syntax
107       A filtergraph has a textual representation, which is recognized by the
108       -filter/-vf/-af and -filter_complex options in ffmpeg and -vf/-af in
109       ffplay, and by the "avfilter_graph_parse_ptr()" function defined in
110       libavfilter/avfilter.h.
111
112       A filterchain consists of a sequence of connected filters, each one
113       connected to the previous one in the sequence. A filterchain is
114       represented by a list of ","-separated filter descriptions.
115
116       A filtergraph consists of a sequence of filterchains. A sequence of
117       filterchains is represented by a list of ";"-separated filterchain
118       descriptions.
119
120       A filter is represented by a string of the form:
121       [in_link_1]...[in_link_N]filter_name@id=arguments[out_link_1]...[out_link_M]
122
123       filter_name is the name of the filter class of which the described
124       filter is an instance of, and has to be the name of one of the filter
125       classes registered in the program optionally followed by "@id".  The
126       name of the filter class is optionally followed by a string
127       "=arguments".
128
129       arguments is a string which contains the parameters used to initialize
130       the filter instance. It may have one of two forms:
131
132       •   A ':'-separated list of key=value pairs.
133
134       •   A ':'-separated list of value. In this case, the keys are assumed
135           to be the option names in the order they are declared. E.g. the
136           "fade" filter declares three options in this order -- type,
137           start_frame and nb_frames. Then the parameter list in:0:30 means
138           that the value in is assigned to the option type, 0 to start_frame
139           and 30 to nb_frames.
140
141       •   A ':'-separated list of mixed direct value and long key=value
142           pairs. The direct value must precede the key=value pairs, and
143           follow the same constraints order of the previous point. The
144           following key=value pairs can be set in any preferred order.
145
146       If the option value itself is a list of items (e.g. the "format" filter
147       takes a list of pixel formats), the items in the list are usually
148       separated by |.
149
150       The list of arguments can be quoted using the character ' as initial
151       and ending mark, and the character \ for escaping the characters within
152       the quoted text; otherwise the argument string is considered terminated
153       when the next special character (belonging to the set []=;,) is
154       encountered.
155
156       The name and arguments of the filter are optionally preceded and
157       followed by a list of link labels.  A link label allows one to name a
158       link and associate it to a filter output or input pad. The preceding
159       labels in_link_1 ... in_link_N, are associated to the filter input
160       pads, the following labels out_link_1 ... out_link_M, are associated to
161       the output pads.
162
163       When two link labels with the same name are found in the filtergraph, a
164       link between the corresponding input and output pad is created.
165
166       If an output pad is not labelled, it is linked by default to the first
167       unlabelled input pad of the next filter in the filterchain.  For
168       example in the filterchain
169
170               nullsrc, split[L1], [L2]overlay, nullsink
171
172       the split filter instance has two output pads, and the overlay filter
173       instance two input pads. The first output pad of split is labelled
174       "L1", the first input pad of overlay is labelled "L2", and the second
175       output pad of split is linked to the second input pad of overlay, which
176       are both unlabelled.
177
178       In a filter description, if the input label of the first filter is not
179       specified, "in" is assumed; if the output label of the last filter is
180       not specified, "out" is assumed.
181
182       In a complete filterchain all the unlabelled filter input and output
183       pads must be connected. A filtergraph is considered valid if all the
184       filter input and output pads of all the filterchains are connected.
185
186       Libavfilter will automatically insert scale filters where format
187       conversion is required. It is possible to specify swscale flags for
188       those automatically inserted scalers by prepending "sws_flags=flags;"
189       to the filtergraph description.
190
191       Here is a BNF description of the filtergraph syntax:
192
193               <NAME>             ::= sequence of alphanumeric characters and '_'
194               <FILTER_NAME>      ::= <NAME>["@"<NAME>]
195               <LINKLABEL>        ::= "[" <NAME> "]"
196               <LINKLABELS>       ::= <LINKLABEL> [<LINKLABELS>]
197               <FILTER_ARGUMENTS> ::= sequence of chars (possibly quoted)
198               <FILTER>           ::= [<LINKLABELS>] <FILTER_NAME> ["=" <FILTER_ARGUMENTS>] [<LINKLABELS>]
199               <FILTERCHAIN>      ::= <FILTER> [,<FILTERCHAIN>]
200               <FILTERGRAPH>      ::= [sws_flags=<flags>;] <FILTERCHAIN> [;<FILTERGRAPH>]
201
202   Notes on filtergraph escaping
203       Filtergraph description composition entails several levels of escaping.
204       See the "Quoting and escaping" section in the ffmpeg-utils(1) manual
205       for more information about the employed escaping procedure.
206
207       A first level escaping affects the content of each filter option value,
208       which may contain the special character ":" used to separate values, or
209       one of the escaping characters "\'".
210
211       A second level escaping affects the whole filter description, which may
212       contain the escaping characters "\'" or the special characters "[],;"
213       used by the filtergraph description.
214
215       Finally, when you specify a filtergraph on a shell commandline, you
216       need to perform a third level escaping for the shell special characters
217       contained within it.
218
219       For example, consider the following string to be embedded in the
220       drawtext filter description text value:
221
222               this is a 'string': may contain one, or more, special characters
223
224       This string contains the "'" special escaping character, and the ":"
225       special character, so it needs to be escaped in this way:
226
227               text=this is a \'string\'\: may contain one, or more, special characters
228
229       A second level of escaping is required when embedding the filter
230       description in a filtergraph description, in order to escape all the
231       filtergraph special characters. Thus the example above becomes:
232
233               drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
234
235       (note that in addition to the "\'" escaping special characters, also
236       "," needs to be escaped).
237
238       Finally an additional level of escaping is needed when writing the
239       filtergraph description in a shell command, which depends on the
240       escaping rules of the adopted shell. For example, assuming that "\" is
241       special and needs to be escaped with another "\", the previous string
242       will finally result in:
243
244               -vf "drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters"
245

TIMELINE EDITING

247       Some filters support a generic enable option. For the filters
248       supporting timeline editing, this option can be set to an expression
249       which is evaluated before sending a frame to the filter. If the
250       evaluation is non-zero, the filter will be enabled, otherwise the frame
251       will be sent unchanged to the next filter in the filtergraph.
252
253       The expression accepts the following values:
254
255       t   timestamp expressed in seconds, NAN if the input timestamp is
256           unknown
257
258       n   sequential number of the input frame, starting from 0
259
260       pos the position in the file of the input frame, NAN if unknown
261
262       w
263       h   width and height of the input frame if video
264
265       Additionally, these filters support an enable command that can be used
266       to re-define the expression.
267
268       Like any other filtering option, the enable option follows the same
269       rules.
270
271       For example, to enable a blur filter (smartblur) from 10 seconds to 3
272       minutes, and a curves filter starting at 3 seconds:
273
274               smartblur = enable='between(t,10,3*60)',
275               curves    = enable='gte(t,3)' : preset=cross_process
276
277       See "ffmpeg -filters" to view which filters have timeline support.
278

CHANGING OPTIONS AT RUNTIME WITH A COMMAND

280       Some options can be changed during the operation of the filter using a
281       command. These options are marked 'T' on the output of ffmpeg -h
282       filter=<name of filter>.  The name of the command is the name of the
283       option and the argument is the new value.
284

OPTIONS FOR FILTERS WITH SEVERAL INPUTS

286       Some filters with several inputs support a common set of options.
287       These options can only be set by name, not with the short notation.
288
289       eof_action
290           The action to take when EOF is encountered on the secondary input;
291           it accepts one of the following values:
292
293           repeat
294               Repeat the last frame (the default).
295
296           endall
297               End both streams.
298
299           pass
300               Pass the main input through.
301
302       shortest
303           If set to 1, force the output to terminate when the shortest input
304           terminates. Default value is 0.
305
306       repeatlast
307           If set to 1, force the filter to extend the last frame of secondary
308           streams until the end of the primary stream. A value of 0 disables
309           this behavior.  Default value is 1.
310

AUDIO FILTERS

312       When you configure your FFmpeg build, you can disable any of the
313       existing filters using "--disable-filters".  The configure output will
314       show the audio filters included in your build.
315
316       Below is a description of the currently available audio filters.
317
318   acompressor
319       A compressor is mainly used to reduce the dynamic range of a signal.
320       Especially modern music is mostly compressed at a high ratio to improve
321       the overall loudness. It's done to get the highest attention of a
322       listener, "fatten" the sound and bring more "power" to the track.  If a
323       signal is compressed too much it may sound dull or "dead" afterwards or
324       it may start to "pump" (which could be a powerful effect but can also
325       destroy a track completely).  The right compression is the key to reach
326       a professional sound and is the high art of mixing and mastering.
327       Because of its complex settings it may take a long time to get the
328       right feeling for this kind of effect.
329
330       Compression is done by detecting the volume above a chosen level
331       "threshold" and dividing it by the factor set with "ratio".  So if you
332       set the threshold to -12dB and your signal reaches -6dB a ratio of 2:1
333       will result in a signal at -9dB. Because an exact manipulation of the
334       signal would cause distortion of the waveform the reduction can be
335       levelled over the time. This is done by setting "Attack" and "Release".
336       "attack" determines how long the signal has to rise above the threshold
337       before any reduction will occur and "release" sets the time the signal
338       has to fall below the threshold to reduce the reduction again. Shorter
339       signals than the chosen attack time will be left untouched.  The
340       overall reduction of the signal can be made up afterwards with the
341       "makeup" setting. So compressing the peaks of a signal about 6dB and
342       raising the makeup to this level results in a signal twice as loud than
343       the source. To gain a softer entry in the compression the "knee"
344       flattens the hard edge at the threshold in the range of the chosen
345       decibels.
346
347       The filter accepts the following options:
348
349       level_in
350           Set input gain. Default is 1. Range is between 0.015625 and 64.
351
352       mode
353           Set mode of compressor operation. Can be "upward" or "downward".
354           Default is "downward".
355
356       threshold
357           If a signal of stream rises above this level it will affect the
358           gain reduction.  By default it is 0.125. Range is between
359           0.00097563 and 1.
360
361       ratio
362           Set a ratio by which the signal is reduced. 1:2 means that if the
363           level rose 4dB above the threshold, it will be only 2dB above after
364           the reduction.  Default is 2. Range is between 1 and 20.
365
366       attack
367           Amount of milliseconds the signal has to rise above the threshold
368           before gain reduction starts. Default is 20. Range is between 0.01
369           and 2000.
370
371       release
372           Amount of milliseconds the signal has to fall below the threshold
373           before reduction is decreased again. Default is 250. Range is
374           between 0.01 and 9000.
375
376       makeup
377           Set the amount by how much signal will be amplified after
378           processing.  Default is 1. Range is from 1 to 64.
379
380       knee
381           Curve the sharp knee around the threshold to enter gain reduction
382           more softly.  Default is 2.82843. Range is between 1 and 8.
383
384       link
385           Choose if the "average" level between all channels of input stream
386           or the louder("maximum") channel of input stream affects the
387           reduction. Default is "average".
388
389       detection
390           Should the exact signal be taken in case of "peak" or an RMS one in
391           case of "rms". Default is "rms" which is mostly smoother.
392
393       mix How much to use compressed signal in output. Default is 1.  Range
394           is between 0 and 1.
395
396       Commands
397
398       This filter supports the all above options as commands.
399
400   acontrast
401       Simple audio dynamic range compression/expansion filter.
402
403       The filter accepts the following options:
404
405       contrast
406           Set contrast. Default is 33. Allowed range is between 0 and 100.
407
408   acopy
409       Copy the input audio source unchanged to the output. This is mainly
410       useful for testing purposes.
411
412   acrossfade
413       Apply cross fade from one input audio stream to another input audio
414       stream.  The cross fade is applied for specified duration near the end
415       of first stream.
416
417       The filter accepts the following options:
418
419       nb_samples, ns
420           Specify the number of samples for which the cross fade effect has
421           to last.  At the end of the cross fade effect the first input audio
422           will be completely silent. Default is 44100.
423
424       duration, d
425           Specify the duration of the cross fade effect. See the Time
426           duration section in the ffmpeg-utils(1) manual for the accepted
427           syntax.  By default the duration is determined by nb_samples.  If
428           set this option is used instead of nb_samples.
429
430       overlap, o
431           Should first stream end overlap with second stream start. Default
432           is enabled.
433
434       curve1
435           Set curve for cross fade transition for first stream.
436
437       curve2
438           Set curve for cross fade transition for second stream.
439
440           For description of available curve types see afade filter
441           description.
442
443       Examples
444
445       •   Cross fade from one input to another:
446
447                   ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac
448
449       •   Cross fade from one input to another but without overlapping:
450
451                   ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac
452
453   acrossover
454       Split audio stream into several bands.
455
456       This filter splits audio stream into two or more frequency ranges.
457       Summing all streams back will give flat output.
458
459       The filter accepts the following options:
460
461       split
462           Set split frequencies. Those must be positive and increasing.
463
464       order
465           Set filter order for each band split. This controls filter roll-off
466           or steepness of filter transfer function.  Available values are:
467
468           2nd 12 dB per octave.
469
470           4th 24 dB per octave.
471
472           6th 36 dB per octave.
473
474           8th 48 dB per octave.
475
476           10th
477               60 dB per octave.
478
479           12th
480               72 dB per octave.
481
482           14th
483               84 dB per octave.
484
485           16th
486               96 dB per octave.
487
488           18th
489               108 dB per octave.
490
491           20th
492               120 dB per octave.
493
494           Default is 4th.
495
496       level
497           Set input gain level. Allowed range is from 0 to 1. Default value
498           is 1.
499
500       gains
501           Set output gain for each band. Default value is 1 for all bands.
502
503       Examples
504
505       •   Split input audio stream into two bands (low and high) with split
506           frequency of 1500 Hz, each band will be in separate stream:
507
508                   ffmpeg -i in.flac -filter_complex 'acrossover=split=1500[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
509
510       •   Same as above, but with higher filter order:
511
512                   ffmpeg -i in.flac -filter_complex 'acrossover=split=1500:order=8th[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
513
514       •   Same as above, but also with additional middle band (frequencies
515           between 1500 and 8000):
516
517                   ffmpeg -i in.flac -filter_complex 'acrossover=split=1500 8000:order=8th[LOW][MID][HIGH]' -map '[LOW]' low.wav -map '[MID]' mid.wav -map '[HIGH]' high.wav
518
519   acrusher
520       Reduce audio bit resolution.
521
522       This filter is bit crusher with enhanced functionality. A bit crusher
523       is used to audibly reduce number of bits an audio signal is sampled
524       with. This doesn't change the bit depth at all, it just produces the
525       effect. Material reduced in bit depth sounds more harsh and "digital".
526       This filter is able to even round to continuous values instead of
527       discrete bit depths.  Additionally it has a D/C offset which results in
528       different crushing of the lower and the upper half of the signal.  An
529       Anti-Aliasing setting is able to produce "softer" crushing sounds.
530
531       Another feature of this filter is the logarithmic mode.  This setting
532       switches from linear distances between bits to logarithmic ones.  The
533       result is a much more "natural" sounding crusher which doesn't gate low
534       signals for example. The human ear has a logarithmic perception, so
535       this kind of crushing is much more pleasant.  Logarithmic crushing is
536       also able to get anti-aliased.
537
538       The filter accepts the following options:
539
540       level_in
541           Set level in.
542
543       level_out
544           Set level out.
545
546       bits
547           Set bit reduction.
548
549       mix Set mixing amount.
550
551       mode
552           Can be linear: "lin" or logarithmic: "log".
553
554       dc  Set DC.
555
556       aa  Set anti-aliasing.
557
558       samples
559           Set sample reduction.
560
561       lfo Enable LFO. By default disabled.
562
563       lforange
564           Set LFO range.
565
566       lforate
567           Set LFO rate.
568
569       Commands
570
571       This filter supports the all above options as commands.
572
573   acue
574       Delay audio filtering until a given wallclock timestamp. See the cue
575       filter.
576
577   adeclick
578       Remove impulsive noise from input audio.
579
580       Samples detected as impulsive noise are replaced by interpolated
581       samples using autoregressive modelling.
582
583       window, w
584           Set window size, in milliseconds. Allowed range is from 10 to 100.
585           Default value is 55 milliseconds.  This sets size of window which
586           will be processed at once.
587
588       overlap, o
589           Set window overlap, in percentage of window size. Allowed range is
590           from 50 to 95. Default value is 75 percent.  Setting this to a very
591           high value increases impulsive noise removal but makes whole
592           process much slower.
593
594       arorder, a
595           Set autoregression order, in percentage of window size. Allowed
596           range is from 0 to 25. Default value is 2 percent. This option also
597           controls quality of interpolated samples using neighbour good
598           samples.
599
600       threshold, t
601           Set threshold value. Allowed range is from 1 to 100.  Default value
602           is 2.  This controls the strength of impulsive noise which is going
603           to be removed.  The lower value, the more samples will be detected
604           as impulsive noise.
605
606       burst, b
607           Set burst fusion, in percentage of window size. Allowed range is 0
608           to 10. Default value is 2.  If any two samples detected as noise
609           are spaced less than this value then any sample between those two
610           samples will be also detected as noise.
611
612       method, m
613           Set overlap method.
614
615           It accepts the following values:
616
617           add, a
618               Select overlap-add method. Even not interpolated samples are
619               slightly changed with this method.
620
621           save, s
622               Select overlap-save method. Not interpolated samples remain
623               unchanged.
624
625           Default value is "a".
626
627   adeclip
628       Remove clipped samples from input audio.
629
630       Samples detected as clipped are replaced by interpolated samples using
631       autoregressive modelling.
632
633       window, w
634           Set window size, in milliseconds. Allowed range is from 10 to 100.
635           Default value is 55 milliseconds.  This sets size of window which
636           will be processed at once.
637
638       overlap, o
639           Set window overlap, in percentage of window size. Allowed range is
640           from 50 to 95. Default value is 75 percent.
641
642       arorder, a
643           Set autoregression order, in percentage of window size. Allowed
644           range is from 0 to 25. Default value is 8 percent. This option also
645           controls quality of interpolated samples using neighbour good
646           samples.
647
648       threshold, t
649           Set threshold value. Allowed range is from 1 to 100.  Default value
650           is 10. Higher values make clip detection less aggressive.
651
652       hsize, n
653           Set size of histogram used to detect clips. Allowed range is from
654           100 to 9999.  Default value is 1000. Higher values make clip
655           detection less aggressive.
656
657       method, m
658           Set overlap method.
659
660           It accepts the following values:
661
662           add, a
663               Select overlap-add method. Even not interpolated samples are
664               slightly changed with this method.
665
666           save, s
667               Select overlap-save method. Not interpolated samples remain
668               unchanged.
669
670           Default value is "a".
671
672   adecorrelate
673       Apply decorrelation to input audio stream.
674
675       The filter accepts the following options:
676
677       stages
678           Set decorrelation stages of filtering. Allowed range is from 1 to
679           16. Default value is 6.
680
681       seed
682           Set random seed used for setting delay in samples across channels.
683
684   adelay
685       Delay one or more audio channels.
686
687       Samples in delayed channel are filled with silence.
688
689       The filter accepts the following option:
690
691       delays
692           Set list of delays in milliseconds for each channel separated by
693           '|'.  Unused delays will be silently ignored. If number of given
694           delays is smaller than number of channels all remaining channels
695           will not be delayed.  If you want to delay exact number of samples,
696           append 'S' to number.  If you want instead to delay in seconds,
697           append 's' to number.
698
699       all Use last set delay for all remaining channels. By default is
700           disabled.  This option if enabled changes how option "delays" is
701           interpreted.
702
703       Examples
704
705       •   Delay first channel by 1.5 seconds, the third channel by 0.5
706           seconds and leave the second channel (and any other channels that
707           may be present) unchanged.
708
709                   adelay=1500|0|500
710
711       •   Delay second channel by 500 samples, the third channel by 700
712           samples and leave the first channel (and any other channels that
713           may be present) unchanged.
714
715                   adelay=0|500S|700S
716
717       •   Delay all channels by same number of samples:
718
719                   adelay=delays=64S:all=1
720
721   adenorm
722       Remedy denormals in audio by adding extremely low-level noise.
723
724       This filter shall be placed before any filter that can produce
725       denormals.
726
727       A description of the accepted parameters follows.
728
729       level
730           Set level of added noise in dB. Default is "-351".  Allowed range
731           is from -451 to -90.
732
733       type
734           Set type of added noise.
735
736           dc  Add DC signal.
737
738           ac  Add AC signal.
739
740           square
741               Add square signal.
742
743           pulse
744               Add pulse signal.
745
746           Default is "dc".
747
748       Commands
749
750       This filter supports the all above options as commands.
751
752   aderivative, aintegral
753       Compute derivative/integral of audio stream.
754
755       Applying both filters one after another produces original audio.
756
757   adynamicequalizer
758       Apply dynamic equalization to input audio stream.
759
760       A description of the accepted options follows.
761
762       threshold
763           Set the detection threshold used to trigger equalization.
764           Threshold detection is using bandpass filter.  Default value is 0.
765           Allowed range is from 0 to 100.
766
767       dfrequency
768           Set the detection frequency in Hz used for bandpass filter used to
769           trigger equalization.  Default value is 1000 Hz. Allowed range is
770           between 2 and 1000000 Hz.
771
772       dqfactor
773           Set the detection resonance factor for bandpass filter used to
774           trigger equalization.  Default value is 1. Allowed range is from
775           0.001 to 1000.
776
777       tfrequency
778           Set the target frequency of equalization filter.  Default value is
779           1000 Hz. Allowed range is between 2 and 1000000 Hz.
780
781       tqfactor
782           Set the target resonance factor for target equalization filter.
783           Default value is 1. Allowed range is from 0.001 to 1000.
784
785       attack
786           Set the amount of milliseconds the signal from detection has to
787           rise above the detection threshold before equalization starts.
788           Default is 20. Allowed range is between 1 and 2000.
789
790       release
791           Set the amount of milliseconds the signal from detection has to
792           fall below the detection threshold before equalization ends.
793           Default is 200. Allowed range is between 1 and 2000.
794
795       knee
796           Curve the sharp knee around the detection threshold to calculate
797           equalization gain more softly.  Default is 1. Allowed range is
798           between 0 and 8.
799
800       ratio
801           Set the ratio by which the equalization gain is raised.  Default is
802           1. Allowed range is between 1 and 20.
803
804       makeup
805           Set the makeup offset in dB by which the equalization gain is
806           raised.  Default is 0. Allowed range is between 0 and 30.
807
808       range
809           Set the max allowed cut/boost amount in dB. Default is 0.  Allowed
810           range is from 0 to 200.
811
812       slew
813           Set the slew factor. Default is 1. Allowed range is from 1 to 200.
814
815       mode
816           Set the mode of filter operation, can be one of the following:
817
818           listen
819               Output only isolated bandpass signal.
820
821           cut Cut frequencies above detection threshold.
822
823           boost
824               Boost frequencies bellow detection threshold.
825
826           Default mode is cut.
827
828       Commands
829
830       This filter supports the all above options as commands.
831
832   adynamicsmooth
833       Apply dynamic smoothing to input audio stream.
834
835       A description of the accepted options follows.
836
837       sensitivity
838           Set an amount of sensitivity to frequency fluctations. Default is
839           2.  Allowed range is from 0 to 1e+06.
840
841       basefreq
842           Set a base frequency for smoothing. Default value is 22050.
843           Allowed range is from 2 to 1e+06.
844
845       Commands
846
847       This filter supports the all above options as commands.
848
849   aecho
850       Apply echoing to the input audio.
851
852       Echoes are reflected sound and can occur naturally amongst mountains
853       (and sometimes large buildings) when talking or shouting; digital echo
854       effects emulate this behaviour and are often used to help fill out the
855       sound of a single instrument or vocal. The time difference between the
856       original signal and the reflection is the "delay", and the loudness of
857       the reflected signal is the "decay".  Multiple echoes can have
858       different delays and decays.
859
860       A description of the accepted parameters follows.
861
862       in_gain
863           Set input gain of reflected signal. Default is 0.6.
864
865       out_gain
866           Set output gain of reflected signal. Default is 0.3.
867
868       delays
869           Set list of time intervals in milliseconds between original signal
870           and reflections separated by '|'. Allowed range for each "delay" is
871           "(0 - 90000.0]".  Default is 1000.
872
873       decays
874           Set list of loudness of reflected signals separated by '|'.
875           Allowed range for each "decay" is "(0 - 1.0]".  Default is 0.5.
876
877       Examples
878
879       •   Make it sound as if there are twice as many instruments as are
880           actually playing:
881
882                   aecho=0.8:0.88:60:0.4
883
884       •   If delay is very short, then it sounds like a (metallic) robot
885           playing music:
886
887                   aecho=0.8:0.88:6:0.4
888
889       •   A longer delay will sound like an open air concert in the
890           mountains:
891
892                   aecho=0.8:0.9:1000:0.3
893
894       •   Same as above but with one more mountain:
895
896                   aecho=0.8:0.9:1000|1800:0.3|0.25
897
898   aemphasis
899       Audio emphasis filter creates or restores material directly taken from
900       LPs or emphased CDs with different filter curves. E.g. to store music
901       on vinyl the signal has to be altered by a filter first to even out the
902       disadvantages of this recording medium.  Once the material is played
903       back the inverse filter has to be applied to restore the distortion of
904       the frequency response.
905
906       The filter accepts the following options:
907
908       level_in
909           Set input gain.
910
911       level_out
912           Set output gain.
913
914       mode
915           Set filter mode. For restoring material use "reproduction" mode,
916           otherwise use "production" mode. Default is "reproduction" mode.
917
918       type
919           Set filter type. Selects medium. Can be one of the following:
920
921           col select Columbia.
922
923           emi select EMI.
924
925           bsi select BSI (78RPM).
926
927           riaa
928               select RIAA.
929
930           cd  select Compact Disc (CD).
931
932           50fm
933               select 50Xs (FM).
934
935           75fm
936               select 75Xs (FM).
937
938           50kf
939               select 50Xs (FM-KF).
940
941           75kf
942               select 75Xs (FM-KF).
943
944       Commands
945
946       This filter supports the all above options as commands.
947
948   aeval
949       Modify an audio signal according to the specified expressions.
950
951       This filter accepts one or more expressions (one for each channel),
952       which are evaluated and used to modify a corresponding audio signal.
953
954       It accepts the following parameters:
955
956       exprs
957           Set the '|'-separated expressions list for each separate channel.
958           If the number of input channels is greater than the number of
959           expressions, the last specified expression is used for the
960           remaining output channels.
961
962       channel_layout, c
963           Set output channel layout. If not specified, the channel layout is
964           specified by the number of expressions. If set to same, it will use
965           by default the same input channel layout.
966
967       Each expression in exprs can contain the following constants and
968       functions:
969
970       ch  channel number of the current expression
971
972       n   number of the evaluated sample, starting from 0
973
974       s   sample rate
975
976       t   time of the evaluated sample expressed in seconds
977
978       nb_in_channels
979       nb_out_channels
980           input and output number of channels
981
982       val(CH)
983           the value of input channel with number CH
984
985       Note: this filter is slow. For faster processing you should use a
986       dedicated filter.
987
988       Examples
989
990       •   Half volume:
991
992                   aeval=val(ch)/2:c=same
993
994       •   Invert phase of the second channel:
995
996                   aeval=val(0)|-val(1)
997
998   aexciter
999       An exciter is used to produce high sound that is not present in the
1000       original signal. This is done by creating harmonic distortions of the
1001       signal which are restricted in range and added to the original signal.
1002       An Exciter raises the upper end of an audio signal without simply
1003       raising the higher frequencies like an equalizer would do to create a
1004       more "crisp" or "brilliant" sound.
1005
1006       The filter accepts the following options:
1007
1008       level_in
1009           Set input level prior processing of signal.  Allowed range is from
1010           0 to 64.  Default value is 1.
1011
1012       level_out
1013           Set output level after processing of signal.  Allowed range is from
1014           0 to 64.  Default value is 1.
1015
1016       amount
1017           Set the amount of harmonics added to original signal.  Allowed
1018           range is from 0 to 64.  Default value is 1.
1019
1020       drive
1021           Set the amount of newly created harmonics.  Allowed range is from
1022           0.1 to 10.  Default value is 8.5.
1023
1024       blend
1025           Set the octave of newly created harmonics.  Allowed range is from
1026           -10 to 10.  Default value is 0.
1027
1028       freq
1029           Set the lower frequency limit of producing harmonics in Hz.
1030           Allowed range is from 2000 to 12000 Hz.  Default is 7500 Hz.
1031
1032       ceil
1033           Set the upper frequency limit of producing harmonics.  Allowed
1034           range is from 9999 to 20000 Hz.  If value is lower than 10000 Hz no
1035           limit is applied.
1036
1037       listen
1038           Mute the original signal and output only added harmonics.  By
1039           default is disabled.
1040
1041       Commands
1042
1043       This filter supports the all above options as commands.
1044
1045   afade
1046       Apply fade-in/out effect to input audio.
1047
1048       A description of the accepted parameters follows.
1049
1050       type, t
1051           Specify the effect type, can be either "in" for fade-in, or "out"
1052           for a fade-out effect. Default is "in".
1053
1054       start_sample, ss
1055           Specify the number of the start sample for starting to apply the
1056           fade effect. Default is 0.
1057
1058       nb_samples, ns
1059           Specify the number of samples for which the fade effect has to
1060           last. At the end of the fade-in effect the output audio will have
1061           the same volume as the input audio, at the end of the fade-out
1062           transition the output audio will be silence. Default is 44100.
1063
1064       start_time, st
1065           Specify the start time of the fade effect. Default is 0.  The value
1066           must be specified as a time duration; see the Time duration section
1067           in the ffmpeg-utils(1) manual for the accepted syntax.  If set this
1068           option is used instead of start_sample.
1069
1070       duration, d
1071           Specify the duration of the fade effect. See the Time duration
1072           section in the ffmpeg-utils(1) manual for the accepted syntax.  At
1073           the end of the fade-in effect the output audio will have the same
1074           volume as the input audio, at the end of the fade-out transition
1075           the output audio will be silence.  By default the duration is
1076           determined by nb_samples.  If set this option is used instead of
1077           nb_samples.
1078
1079       curve
1080           Set curve for fade transition.
1081
1082           It accepts the following values:
1083
1084           tri select triangular, linear slope (default)
1085
1086           qsin
1087               select quarter of sine wave
1088
1089           hsin
1090               select half of sine wave
1091
1092           esin
1093               select exponential sine wave
1094
1095           log select logarithmic
1096
1097           ipar
1098               select inverted parabola
1099
1100           qua select quadratic
1101
1102           cub select cubic
1103
1104           squ select square root
1105
1106           cbr select cubic root
1107
1108           par select parabola
1109
1110           exp select exponential
1111
1112           iqsin
1113               select inverted quarter of sine wave
1114
1115           ihsin
1116               select inverted half of sine wave
1117
1118           dese
1119               select double-exponential seat
1120
1121           desi
1122               select double-exponential sigmoid
1123
1124           losi
1125               select logistic sigmoid
1126
1127           sinc
1128               select sine cardinal function
1129
1130           isinc
1131               select inverted sine cardinal function
1132
1133           nofade
1134               no fade applied
1135
1136       Commands
1137
1138       This filter supports the all above options as commands.
1139
1140       Examples
1141
1142       •   Fade in first 15 seconds of audio:
1143
1144                   afade=t=in:ss=0:d=15
1145
1146       •   Fade out last 25 seconds of a 900 seconds audio:
1147
1148                   afade=t=out:st=875:d=25
1149
1150   afftdn
1151       Denoise audio samples with FFT.
1152
1153       A description of the accepted parameters follows.
1154
1155       nr  Set the noise reduction in dB, allowed range is 0.01 to 97.
1156           Default value is 12 dB.
1157
1158       nf  Set the noise floor in dB, allowed range is -80 to -20.  Default
1159           value is -50 dB.
1160
1161       nt  Set the noise type.
1162
1163           It accepts the following values:
1164
1165           w   Select white noise.
1166
1167           v   Select vinyl noise.
1168
1169           s   Select shellac noise.
1170
1171           c   Select custom noise, defined in "bn" option.
1172
1173               Default value is white noise.
1174
1175       bn  Set custom band noise for every one of 15 bands.  Bands are
1176           separated by ' ' or '|'.
1177
1178       rf  Set the residual floor in dB, allowed range is -80 to -20.  Default
1179           value is -38 dB.
1180
1181       tn  Enable noise tracking. By default is disabled.  With this enabled,
1182           noise floor is automatically adjusted.
1183
1184       tr  Enable residual tracking. By default is disabled.
1185
1186       om  Set the output mode.
1187
1188           It accepts the following values:
1189
1190           i   Pass input unchanged.
1191
1192           o   Pass noise filtered out.
1193
1194           n   Pass only noise.
1195
1196               Default value is o.
1197
1198       Commands
1199
1200       This filter supports the following commands:
1201
1202       sample_noise, sn
1203           Start or stop measuring noise profile.  Syntax for the command is :
1204           "start" or "stop" string.  After measuring noise profile is stopped
1205           it will be automatically applied in filtering.
1206
1207       noise_reduction, nr
1208           Change noise reduction. Argument is single float number.  Syntax
1209           for the command is : "noise_reduction"
1210
1211       noise_floor, nf
1212           Change noise floor. Argument is single float number.  Syntax for
1213           the command is : "noise_floor"
1214
1215       output_mode, om
1216           Change output mode operation.  Syntax for the command is : "i", "o"
1217           or "n" string.
1218
1219   afftfilt
1220       Apply arbitrary expressions to samples in frequency domain.
1221
1222       real
1223           Set frequency domain real expression for each separate channel
1224           separated by '|'. Default is "re".  If the number of input channels
1225           is greater than the number of expressions, the last specified
1226           expression is used for the remaining output channels.
1227
1228       imag
1229           Set frequency domain imaginary expression for each separate channel
1230           separated by '|'. Default is "im".
1231
1232           Each expression in real and imag can contain the following
1233           constants and functions:
1234
1235           sr  sample rate
1236
1237           b   current frequency bin number
1238
1239           nb  number of available bins
1240
1241           ch  channel number of the current expression
1242
1243           chs number of channels
1244
1245           pts current frame pts
1246
1247           re  current real part of frequency bin of current channel
1248
1249           im  current imaginary part of frequency bin of current channel
1250
1251           real(b, ch)
1252               Return the value of real part of frequency bin at location
1253               (bin,channel)
1254
1255           imag(b, ch)
1256               Return the value of imaginary part of frequency bin at location
1257               (bin,channel)
1258
1259       win_size
1260           Set window size. Allowed range is from 16 to 131072.  Default is
1261           4096
1262
1263       win_func
1264           Set window function.
1265
1266           It accepts the following values:
1267
1268           rect
1269           bartlett
1270           hann, hanning
1271           hamming
1272           blackman
1273           welch
1274           flattop
1275           bharris
1276           bnuttall
1277           bhann
1278           sine
1279           nuttall
1280           lanczos
1281           gauss
1282           tukey
1283           dolph
1284           cauchy
1285           parzen
1286           poisson
1287           bohman
1288
1289           Default is "hann".
1290
1291       overlap
1292           Set window overlap. If set to 1, the recommended overlap for
1293           selected window function will be picked. Default is 0.75.
1294
1295       Examples
1296
1297       •   Leave almost only low frequencies in audio:
1298
1299                   afftfilt="'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'"
1300
1301       •   Apply robotize effect:
1302
1303                   afftfilt="real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75"
1304
1305       •   Apply whisper effect:
1306
1307                   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"
1308
1309   afir
1310       Apply an arbitrary Finite Impulse Response filter.
1311
1312       This filter is designed for applying long FIR filters, up to 60 seconds
1313       long.
1314
1315       It can be used as component for digital crossover filters, room
1316       equalization, cross talk cancellation, wavefield synthesis,
1317       auralization, ambiophonics, ambisonics and spatialization.
1318
1319       This filter uses the streams higher than first one as FIR coefficients.
1320       If the non-first stream holds a single channel, it will be used for all
1321       input channels in the first stream, otherwise the number of channels in
1322       the non-first stream must be same as the number of channels in the
1323       first stream.
1324
1325       It accepts the following parameters:
1326
1327       dry Set dry gain. This sets input gain.
1328
1329       wet Set wet gain. This sets final output gain.
1330
1331       length
1332           Set Impulse Response filter length. Default is 1, which means whole
1333           IR is processed.
1334
1335       gtype
1336           Enable applying gain measured from power of IR.
1337
1338           Set which approach to use for auto gain measurement.
1339
1340           none
1341               Do not apply any gain.
1342
1343           peak
1344               select peak gain, very conservative approach. This is default
1345               value.
1346
1347           dc  select DC gain, limited application.
1348
1349           gn  select gain to noise approach, this is most popular one.
1350
1351       irgain
1352           Set gain to be applied to IR coefficients before filtering.
1353           Allowed range is 0 to 1. This gain is applied after any gain
1354           applied with gtype option.
1355
1356       irfmt
1357           Set format of IR stream. Can be "mono" or "input".  Default is
1358           "input".
1359
1360       maxir
1361           Set max allowed Impulse Response filter duration in seconds.
1362           Default is 30 seconds.  Allowed range is 0.1 to 60 seconds.
1363
1364       response
1365           Show IR frequency response, magnitude(magenta), phase(green) and
1366           group delay(yellow) in additional video stream.  By default it is
1367           disabled.
1368
1369       channel
1370           Set for which IR channel to display frequency response. By default
1371           is first channel displayed. This option is used only when response
1372           is enabled.
1373
1374       size
1375           Set video stream size. This option is used only when response is
1376           enabled.
1377
1378       rate
1379           Set video stream frame rate. This option is used only when response
1380           is enabled.
1381
1382       minp
1383           Set minimal partition size used for convolution. Default is 8192.
1384           Allowed range is from 1 to 32768.  Lower values decreases latency
1385           at cost of higher CPU usage.
1386
1387       maxp
1388           Set maximal partition size used for convolution. Default is 8192.
1389           Allowed range is from 8 to 32768.  Lower values may increase CPU
1390           usage.
1391
1392       nbirs
1393           Set number of input impulse responses streams which will be
1394           switchable at runtime.  Allowed range is from 1 to 32. Default is
1395           1.
1396
1397       ir  Set IR stream which will be used for convolution, starting from 0,
1398           should always be lower than supplied value by "nbirs" option.
1399           Default is 0.  This option can be changed at runtime via commands.
1400
1401       Examples
1402
1403       •   Apply reverb to stream using mono IR file as second input, complete
1404           command using ffmpeg:
1405
1406                   ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav
1407
1408   aformat
1409       Set output format constraints for the input audio. The framework will
1410       negotiate the most appropriate format to minimize conversions.
1411
1412       It accepts the following parameters:
1413
1414       sample_fmts, f
1415           A '|'-separated list of requested sample formats.
1416
1417       sample_rates, r
1418           A '|'-separated list of requested sample rates.
1419
1420       channel_layouts, cl
1421           A '|'-separated list of requested channel layouts.
1422
1423           See the Channel Layout section in the ffmpeg-utils(1) manual for
1424           the required syntax.
1425
1426       If a parameter is omitted, all values are allowed.
1427
1428       Force the output to either unsigned 8-bit or signed 16-bit stereo
1429
1430               aformat=sample_fmts=u8|s16:channel_layouts=stereo
1431
1432   afreqshift
1433       Apply frequency shift to input audio samples.
1434
1435       The filter accepts the following options:
1436
1437       shift
1438           Specify frequency shift. Allowed range is -INT_MAX to INT_MAX.
1439           Default value is 0.0.
1440
1441       level
1442           Set output gain applied to final output. Allowed range is from 0.0
1443           to 1.0.  Default value is 1.0.
1444
1445       order
1446           Set filter order used for filtering. Allowed range is from 1 to 16.
1447           Default value is 8.
1448
1449       Commands
1450
1451       This filter supports the all above options as commands.
1452
1453   afwtdn
1454       Reduce broadband noise from input samples using Wavelets.
1455
1456       A description of the accepted options follows.
1457
1458       sigma
1459           Set the noise sigma, allowed range is from 0 to 1.  Default value
1460           is 0.  This option controls strength of denoising applied to input
1461           samples.  Most useful way to set this option is via decibels, eg.
1462           -45dB.
1463
1464       levels
1465           Set the number of wavelet levels of decomposition.  Allowed range
1466           is from 1 to 12.  Default value is 10.  Setting this too low make
1467           denoising performance very poor.
1468
1469       wavet
1470           Set wavelet type for decomposition of input frame.  They are sorted
1471           by number of coefficients, from lowest to highest.  More
1472           coefficients means worse filtering speed, but overall better
1473           quality.  Available wavelets are:
1474
1475           sym2
1476           sym4
1477           rbior68
1478           deb10
1479           sym10
1480           coif5
1481           bl3
1482       percent
1483           Set percent of full denoising. Allowed range is from 0 to 100
1484           percent.  Default value is 85 percent or partial denoising.
1485
1486       profile
1487           If enabled, first input frame will be used as noise profile.  If
1488           first frame samples contain non-noise performance will be very
1489           poor.
1490
1491       adaptive
1492           If enabled, input frames are analyzed for presence of noise.  If
1493           noise is detected with high possibility then input frame profile
1494           will be used for processing following frames, until new noise frame
1495           is detected.
1496
1497       samples
1498           Set size of single frame in number of samples. Allowed range is
1499           from 512 to 65536. Default frame size is 8192 samples.
1500
1501       softness
1502           Set softness applied inside thresholding function. Allowed range is
1503           from 0 to 10. Default softness is 1.
1504
1505       Commands
1506
1507       This filter supports the all above options as commands.
1508
1509   agate
1510       A gate is mainly used to reduce lower parts of a signal. This kind of
1511       signal processing reduces disturbing noise between useful signals.
1512
1513       Gating is done by detecting the volume below a chosen level threshold
1514       and dividing it by the factor set with ratio. The bottom of the noise
1515       floor is set via range. Because an exact manipulation of the signal
1516       would cause distortion of the waveform the reduction can be levelled
1517       over time. This is done by setting attack and release.
1518
1519       attack determines how long the signal has to fall below the threshold
1520       before any reduction will occur and release sets the time the signal
1521       has to rise above the threshold to reduce the reduction again.  Shorter
1522       signals than the chosen attack time will be left untouched.
1523
1524       level_in
1525           Set input level before filtering.  Default is 1. Allowed range is
1526           from 0.015625 to 64.
1527
1528       mode
1529           Set the mode of operation. Can be "upward" or "downward".  Default
1530           is "downward". If set to "upward" mode, higher parts of signal will
1531           be amplified, expanding dynamic range in upward direction.
1532           Otherwise, in case of "downward" lower parts of signal will be
1533           reduced.
1534
1535       range
1536           Set the level of gain reduction when the signal is below the
1537           threshold.  Default is 0.06125. Allowed range is from 0 to 1.
1538           Setting this to 0 disables reduction and then filter behaves like
1539           expander.
1540
1541       threshold
1542           If a signal rises above this level the gain reduction is released.
1543           Default is 0.125. Allowed range is from 0 to 1.
1544
1545       ratio
1546           Set a ratio by which the signal is reduced.  Default is 2. Allowed
1547           range is from 1 to 9000.
1548
1549       attack
1550           Amount of milliseconds the signal has to rise above the threshold
1551           before gain reduction stops.  Default is 20 milliseconds. Allowed
1552           range is from 0.01 to 9000.
1553
1554       release
1555           Amount of milliseconds the signal has to fall below the threshold
1556           before the reduction is increased again. Default is 250
1557           milliseconds.  Allowed range is from 0.01 to 9000.
1558
1559       makeup
1560           Set amount of amplification of signal after processing.  Default is
1561           1. Allowed range is from 1 to 64.
1562
1563       knee
1564           Curve the sharp knee around the threshold to enter gain reduction
1565           more softly.  Default is 2.828427125. Allowed range is from 1 to 8.
1566
1567       detection
1568           Choose if exact signal should be taken for detection or an RMS like
1569           one.  Default is "rms". Can be "peak" or "rms".
1570
1571       link
1572           Choose if the average level between all channels or the louder
1573           channel affects the reduction.  Default is "average". Can be
1574           "average" or "maximum".
1575
1576       Commands
1577
1578       This filter supports the all above options as commands.
1579
1580   aiir
1581       Apply an arbitrary Infinite Impulse Response filter.
1582
1583       It accepts the following parameters:
1584
1585       zeros, z
1586           Set B/numerator/zeros/reflection coefficients.
1587
1588       poles, p
1589           Set A/denominator/poles/ladder coefficients.
1590
1591       gains, k
1592           Set channels gains.
1593
1594       dry_gain
1595           Set input gain.
1596
1597       wet_gain
1598           Set output gain.
1599
1600       format, f
1601           Set coefficients format.
1602
1603           ll  lattice-ladder function
1604
1605           sf  analog transfer function
1606
1607           tf  digital transfer function
1608
1609           zp  Z-plane zeros/poles, cartesian (default)
1610
1611           pr  Z-plane zeros/poles, polar radians
1612
1613           pd  Z-plane zeros/poles, polar degrees
1614
1615           sp  S-plane zeros/poles
1616
1617       process, r
1618           Set type of processing.
1619
1620           d   direct processing
1621
1622           s   serial processing
1623
1624           p   parallel processing
1625
1626       precision, e
1627           Set filtering precision.
1628
1629           dbl double-precision floating-point (default)
1630
1631           flt single-precision floating-point
1632
1633           i32 32-bit integers
1634
1635           i16 16-bit integers
1636
1637       normalize, n
1638           Normalize filter coefficients, by default is enabled.  Enabling it
1639           will normalize magnitude response at DC to 0dB.
1640
1641       mix How much to use filtered signal in output. Default is 1.  Range is
1642           between 0 and 1.
1643
1644       response
1645           Show IR frequency response, magnitude(magenta), phase(green) and
1646           group delay(yellow) in additional video stream.  By default it is
1647           disabled.
1648
1649       channel
1650           Set for which IR channel to display frequency response. By default
1651           is first channel displayed. This option is used only when response
1652           is enabled.
1653
1654       size
1655           Set video stream size. This option is used only when response is
1656           enabled.
1657
1658       Coefficients in "tf" and "sf" format are separated by spaces and are in
1659       ascending order.
1660
1661       Coefficients in "zp" format are separated by spaces and order of
1662       coefficients doesn't matter. Coefficients in "zp" format are complex
1663       numbers with i imaginary unit.
1664
1665       Different coefficients and gains can be provided for every channel, in
1666       such case use '|' to separate coefficients or gains. Last provided
1667       coefficients will be used for all remaining channels.
1668
1669       Examples
1670
1671       •   Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample
1672           rate:
1673
1674                   aiir=k=1:z=7.957584807809675810E-1 -2.575128568908332300 3.674839853930788710 -2.57512875289799137 7.957586296317130880E-1:p=1 -2.86950072432325953 3.63022088054647218 -2.28075678147272232 6.361362326477423500E-1:f=tf:r=d
1675
1676       •   Same as above but in "zp" format:
1677
1678                   aiir=k=0.79575848078096756:z=0.80918701+0.58773007i 0.80918701-0.58773007i 0.80884700+0.58784055i 0.80884700-0.58784055i:p=0.63892345+0.59951235i 0.63892345-0.59951235i 0.79582691+0.44198673i 0.79582691-0.44198673i:f=zp:r=s
1679
1680       •   Apply 3-rd order analog normalized Butterworth low-pass filter,
1681           using analog transfer function format:
1682
1683                   aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d
1684
1685   alimiter
1686       The limiter prevents an input signal from rising over a desired
1687       threshold.  This limiter uses lookahead technology to prevent your
1688       signal from distorting.  It means that there is a small delay after the
1689       signal is processed. Keep in mind that the delay it produces is the
1690       attack time you set.
1691
1692       The filter accepts the following options:
1693
1694       level_in
1695           Set input gain. Default is 1.
1696
1697       level_out
1698           Set output gain. Default is 1.
1699
1700       limit
1701           Don't let signals above this level pass the limiter. Default is 1.
1702
1703       attack
1704           The limiter will reach its attenuation level in this amount of time
1705           in milliseconds. Default is 5 milliseconds.
1706
1707       release
1708           Come back from limiting to attenuation 1.0 in this amount of
1709           milliseconds.  Default is 50 milliseconds.
1710
1711       asc When gain reduction is always needed ASC takes care of releasing to
1712           an average reduction level rather than reaching a reduction of 0 in
1713           the release time.
1714
1715       asc_level
1716           Select how much the release time is affected by ASC, 0 means nearly
1717           no changes in release time while 1 produces higher release times.
1718
1719       level
1720           Auto level output signal. Default is enabled.  This normalizes
1721           audio back to 0dB if enabled.
1722
1723       Depending on picked setting it is recommended to upsample input 2x or
1724       4x times with aresample before applying this filter.
1725
1726   allpass
1727       Apply a two-pole all-pass filter with central frequency (in Hz)
1728       frequency, and filter-width width.  An all-pass filter changes the
1729       audio's frequency to phase relationship without changing its frequency
1730       to amplitude relationship.
1731
1732       The filter accepts the following options:
1733
1734       frequency, f
1735           Set frequency in Hz.
1736
1737       width_type, t
1738           Set method to specify band-width of filter.
1739
1740           h   Hz
1741
1742           q   Q-Factor
1743
1744           o   octave
1745
1746           s   slope
1747
1748           k   kHz
1749
1750       width, w
1751           Specify the band-width of a filter in width_type units.
1752
1753       mix, m
1754           How much to use filtered signal in output. Default is 1.  Range is
1755           between 0 and 1.
1756
1757       channels, c
1758           Specify which channels to filter, by default all available are
1759           filtered.
1760
1761       normalize, n
1762           Normalize biquad coefficients, by default is disabled.  Enabling it
1763           will normalize magnitude response at DC to 0dB.
1764
1765       order, o
1766           Set the filter order, can be 1 or 2. Default is 2.
1767
1768       transform, a
1769           Set transform type of IIR filter.
1770
1771           di
1772           dii
1773           tdii
1774           latt
1775           svf
1776       precision, r
1777           Set precison of filtering.
1778
1779           auto
1780               Pick automatic sample format depending on surround filters.
1781
1782           s16 Always use signed 16-bit.
1783
1784           s32 Always use signed 32-bit.
1785
1786           f32 Always use float 32-bit.
1787
1788           f64 Always use float 64-bit.
1789
1790       Commands
1791
1792       This filter supports the following commands:
1793
1794       frequency, f
1795           Change allpass frequency.  Syntax for the command is : "frequency"
1796
1797       width_type, t
1798           Change allpass width_type.  Syntax for the command is :
1799           "width_type"
1800
1801       width, w
1802           Change allpass width.  Syntax for the command is : "width"
1803
1804       mix, m
1805           Change allpass mix.  Syntax for the command is : "mix"
1806
1807   aloop
1808       Loop audio samples.
1809
1810       The filter accepts the following options:
1811
1812       loop
1813           Set the number of loops. Setting this value to -1 will result in
1814           infinite loops.  Default is 0.
1815
1816       size
1817           Set maximal number of samples. Default is 0.
1818
1819       start
1820           Set first sample of loop. Default is 0.
1821
1822   amerge
1823       Merge two or more audio streams into a single multi-channel stream.
1824
1825       The filter accepts the following options:
1826
1827       inputs
1828           Set the number of inputs. Default is 2.
1829
1830       If the channel layouts of the inputs are disjoint, and therefore
1831       compatible, the channel layout of the output will be set accordingly
1832       and the channels will be reordered as necessary. If the channel layouts
1833       of the inputs are not disjoint, the output will have all the channels
1834       of the first input then all the channels of the second input, in that
1835       order, and the channel layout of the output will be the default value
1836       corresponding to the total number of channels.
1837
1838       For example, if the first input is in 2.1 (FL+FR+LF) and the second
1839       input is FC+BL+BR, then the output will be in 5.1, with the channels in
1840       the following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of
1841       the first input, b1 is the first channel of the second input).
1842
1843       On the other hand, if both input are in stereo, the output channels
1844       will be in the default order: a1, a2, b1, b2, and the channel layout
1845       will be arbitrarily set to 4.0, which may or may not be the expected
1846       value.
1847
1848       All inputs must have the same sample rate, and format.
1849
1850       If inputs do not have the same duration, the output will stop with the
1851       shortest.
1852
1853       Examples
1854
1855       •   Merge two mono files into a stereo stream:
1856
1857                   amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
1858
1859       •   Multiple merges assuming 1 video stream and 6 audio streams in
1860           input.mkv:
1861
1862                   ffmpeg -i input.mkv -filter_complex "[0:1][0:2][0:3][0:4][0:5][0:6] amerge=inputs=6" -c:a pcm_s16le output.mkv
1863
1864   amix
1865       Mixes multiple audio inputs into a single output.
1866
1867       Note that this filter only supports float samples (the amerge and pan
1868       audio filters support many formats). If the amix input has integer
1869       samples then aresample will be automatically inserted to perform the
1870       conversion to float samples.
1871
1872       For example
1873
1874               ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
1875
1876       will mix 3 input audio streams to a single output with the same
1877       duration as the first input and a dropout transition time of 3 seconds.
1878
1879       It accepts the following parameters:
1880
1881       inputs
1882           The number of inputs. If unspecified, it defaults to 2.
1883
1884       duration
1885           How to determine the end-of-stream.
1886
1887           longest
1888               The duration of the longest input. (default)
1889
1890           shortest
1891               The duration of the shortest input.
1892
1893           first
1894               The duration of the first input.
1895
1896       dropout_transition
1897           The transition time, in seconds, for volume renormalization when an
1898           input stream ends. The default value is 2 seconds.
1899
1900       weights
1901           Specify weight of each input audio stream as sequence.  Each weight
1902           is separated by space. By default all inputs have same weight.
1903
1904       normalize
1905           Always scale inputs instead of only doing summation of samples.
1906           Beware of heavy clipping if inputs are not normalized prior or
1907           after filtering by this filter if this option is disabled. By
1908           default is enabled.
1909
1910       Commands
1911
1912       This filter supports the following commands:
1913
1914       weights
1915       normalize
1916           Syntax is same as option with same name.
1917
1918   amultiply
1919       Multiply first audio stream with second audio stream and store result
1920       in output audio stream. Multiplication is done by multiplying each
1921       sample from first stream with sample at same position from second
1922       stream.
1923
1924       With this element-wise multiplication one can create amplitude fades
1925       and amplitude modulations.
1926
1927   anequalizer
1928       High-order parametric multiband equalizer for each channel.
1929
1930       It accepts the following parameters:
1931
1932       params
1933           This option string is in format: "cchn f=cf w=w g=g t=f | ..."
1934           Each equalizer band is separated by '|'.
1935
1936           chn Set channel number to which equalization will be applied.  If
1937               input doesn't have that channel the entry is ignored.
1938
1939           f   Set central frequency for band.  If input doesn't have that
1940               frequency the entry is ignored.
1941
1942           w   Set band width in Hertz.
1943
1944           g   Set band gain in dB.
1945
1946           t   Set filter type for band, optional, can be:
1947
1948               0   Butterworth, this is default.
1949
1950               1   Chebyshev type 1.
1951
1952               2   Chebyshev type 2.
1953
1954       curves
1955           With this option activated frequency response of anequalizer is
1956           displayed in video stream.
1957
1958       size
1959           Set video stream size. Only useful if curves option is activated.
1960
1961       mgain
1962           Set max gain that will be displayed. Only useful if curves option
1963           is activated.  Setting this to a reasonable value makes it possible
1964           to display gain which is derived from neighbour bands which are too
1965           close to each other and thus produce higher gain when both are
1966           activated.
1967
1968       fscale
1969           Set frequency scale used to draw frequency response in video
1970           output.  Can be linear or logarithmic. Default is logarithmic.
1971
1972       colors
1973           Set color for each channel curve which is going to be displayed in
1974           video stream.  This is list of color names separated by space or by
1975           '|'.  Unrecognised or missing colors will be replaced by white
1976           color.
1977
1978       Examples
1979
1980       •   Lower gain by 10 of central frequency 200Hz and width 100 Hz for
1981           first 2 channels using Chebyshev type 1 filter:
1982
1983                   anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
1984
1985       Commands
1986
1987       This filter supports the following commands:
1988
1989       change
1990           Alter existing filter parameters.  Syntax for the commands is :
1991           "fN|f=freq|w=width|g=gain"
1992
1993           fN is existing filter number, starting from 0, if no such filter is
1994           available error is returned.  freq set new frequency parameter.
1995           width set new width parameter in Hertz.  gain set new gain
1996           parameter in dB.
1997
1998           Full filter invocation with asendcmd may look like this:
1999           asendcmd=c='4.0 anequalizer change
2000           0|f=200|w=50|g=1',anequalizer=...
2001
2002   anlmdn
2003       Reduce broadband noise in audio samples using Non-Local Means
2004       algorithm.
2005
2006       Each sample is adjusted by looking for other samples with similar
2007       contexts. This context similarity is defined by comparing their
2008       surrounding patches of size p. Patches are searched in an area of r
2009       around the sample.
2010
2011       The filter accepts the following options:
2012
2013       strength, s
2014           Set denoising strength. Allowed range is from 0.00001 to 10.
2015           Default value is 0.00001.
2016
2017       patch, p
2018           Set patch radius duration. Allowed range is from 1 to 100
2019           milliseconds.  Default value is 2 milliseconds.
2020
2021       research, r
2022           Set research radius duration. Allowed range is from 2 to 300
2023           milliseconds.  Default value is 6 milliseconds.
2024
2025       output, o
2026           Set the output mode.
2027
2028           It accepts the following values:
2029
2030           i   Pass input unchanged.
2031
2032           o   Pass noise filtered out.
2033
2034           n   Pass only noise.
2035
2036               Default value is o.
2037
2038       smooth, m
2039           Set smooth factor. Default value is 11. Allowed range is from 1 to
2040           15.
2041
2042       Commands
2043
2044       This filter supports the all above options as commands.
2045
2046   anlmf, anlms
2047       Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first
2048       audio stream using the second audio stream.
2049
2050       This adaptive filter is used to mimic a desired filter by finding the
2051       filter coefficients that relate to producing the least mean square of
2052       the error signal (difference between the desired, 2nd input audio
2053       stream and the actual signal, the 1st input audio stream).
2054
2055       A description of the accepted options follows.
2056
2057       order
2058           Set filter order.
2059
2060       mu  Set filter mu.
2061
2062       eps Set the filter eps.
2063
2064       leakage
2065           Set the filter leakage.
2066
2067       out_mode
2068           It accepts the following values:
2069
2070           i   Pass the 1st input.
2071
2072           d   Pass the 2nd input.
2073
2074           o   Pass filtered samples.
2075
2076           n   Pass difference between desired and filtered samples.
2077
2078               Default value is o.
2079
2080       Examples
2081
2082       •   One of many usages of this filter is noise reduction, input audio
2083           is filtered with same samples that are delayed by fixed amount, one
2084           such example for stereo audio is:
2085
2086                   asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
2087
2088       Commands
2089
2090       This filter supports the same commands as options, excluding option
2091       "order".
2092
2093   anull
2094       Pass the audio source unchanged to the output.
2095
2096   apad
2097       Pad the end of an audio stream with silence.
2098
2099       This can be used together with ffmpeg -shortest to extend audio streams
2100       to the same length as the video stream.
2101
2102       A description of the accepted options follows.
2103
2104       packet_size
2105           Set silence packet size. Default value is 4096.
2106
2107       pad_len
2108           Set the number of samples of silence to add to the end. After the
2109           value is reached, the stream is terminated. This option is mutually
2110           exclusive with whole_len.
2111
2112       whole_len
2113           Set the minimum total number of samples in the output audio stream.
2114           If the value is longer than the input audio length, silence is
2115           added to the end, until the value is reached. This option is
2116           mutually exclusive with pad_len.
2117
2118       pad_dur
2119           Specify the duration of samples of silence to add. See the Time
2120           duration section in the ffmpeg-utils(1) manual for the accepted
2121           syntax. Used only if set to non-negative value.
2122
2123       whole_dur
2124           Specify the minimum total duration in the output audio stream. See
2125           the Time duration section in the ffmpeg-utils(1) manual for the
2126           accepted syntax. Used only if set to non-negative value. If the
2127           value is longer than the input audio length, silence is added to
2128           the end, until the value is reached.  This option is mutually
2129           exclusive with pad_dur
2130
2131       If neither the pad_len nor the whole_len nor pad_dur nor whole_dur
2132       option is set, the filter will add silence to the end of the input
2133       stream indefinitely.
2134
2135       Note that for ffmpeg 4.4 and earlier a zero pad_dur or whole_dur also
2136       caused the filter to add silence indefinitely.
2137
2138       Examples
2139
2140       •   Add 1024 samples of silence to the end of the input:
2141
2142                   apad=pad_len=1024
2143
2144       •   Make sure the audio output will contain at least 10000 samples, pad
2145           the input with silence if required:
2146
2147                   apad=whole_len=10000
2148
2149       •   Use ffmpeg to pad the audio input with silence, so that the video
2150           stream will always result the shortest and will be converted until
2151           the end in the output file when using the shortest option:
2152
2153                   ffmpeg -i VIDEO -i AUDIO -filter_complex "[1:0]apad" -shortest OUTPUT
2154
2155   aphaser
2156       Add a phasing effect to the input audio.
2157
2158       A phaser filter creates series of peaks and troughs in the frequency
2159       spectrum.  The position of the peaks and troughs are modulated so that
2160       they vary over time, creating a sweeping effect.
2161
2162       A description of the accepted parameters follows.
2163
2164       in_gain
2165           Set input gain. Default is 0.4.
2166
2167       out_gain
2168           Set output gain. Default is 0.74
2169
2170       delay
2171           Set delay in milliseconds. Default is 3.0.
2172
2173       decay
2174           Set decay. Default is 0.4.
2175
2176       speed
2177           Set modulation speed in Hz. Default is 0.5.
2178
2179       type
2180           Set modulation type. Default is triangular.
2181
2182           It accepts the following values:
2183
2184           triangular, t
2185           sinusoidal, s
2186
2187   aphaseshift
2188       Apply phase shift to input audio samples.
2189
2190       The filter accepts the following options:
2191
2192       shift
2193           Specify phase shift. Allowed range is from -1.0 to 1.0.  Default
2194           value is 0.0.
2195
2196       level
2197           Set output gain applied to final output. Allowed range is from 0.0
2198           to 1.0.  Default value is 1.0.
2199
2200       order
2201           Set filter order used for filtering. Allowed range is from 1 to 16.
2202           Default value is 8.
2203
2204       Commands
2205
2206       This filter supports the all above options as commands.
2207
2208   apsyclip
2209       Apply Psychoacoustic clipper to input audio stream.
2210
2211       The filter accepts the following options:
2212
2213       level_in
2214           Set input gain. By default it is 1. Range is [0.015625 - 64].
2215
2216       level_out
2217           Set output gain. By default it is 1. Range is [0.015625 - 64].
2218
2219       clip
2220           Set the clipping start value. Default value is 0dBFS or 1.
2221
2222       diff
2223           Output only difference samples, useful to hear introduced
2224           distortions.  By default is disabled.
2225
2226       adaptive
2227           Set strenght of adaptive distortion applied. Default value is 0.5.
2228           Allowed range is from 0 to 1.
2229
2230       iterations
2231           Set number of iterations of psychoacoustic clipper.  Allowed range
2232           is from 1 to 20. Default value is 10.
2233
2234       level
2235           Auto level output signal. Default is disabled.  This normalizes
2236           audio back to 0dBFS if enabled.
2237
2238       Commands
2239
2240       This filter supports the all above options as commands.
2241
2242   apulsator
2243       Audio pulsator is something between an autopanner and a tremolo.  But
2244       it can produce funny stereo effects as well. Pulsator changes the
2245       volume of the left and right channel based on a LFO (low frequency
2246       oscillator) with different waveforms and shifted phases.  This filter
2247       have the ability to define an offset between left and right channel. An
2248       offset of 0 means that both LFO shapes match each other.  The left and
2249       right channel are altered equally - a conventional tremolo.  An offset
2250       of 50% means that the shape of the right channel is exactly shifted in
2251       phase (or moved backwards about half of the frequency) - pulsator acts
2252       as an autopanner. At 1 both curves match again. Every setting in
2253       between moves the phase shift gapless between all stages and produces
2254       some "bypassing" sounds with sine and triangle waveforms. The more you
2255       set the offset near 1 (starting from the 0.5) the faster the signal
2256       passes from the left to the right speaker.
2257
2258       The filter accepts the following options:
2259
2260       level_in
2261           Set input gain. By default it is 1. Range is [0.015625 - 64].
2262
2263       level_out
2264           Set output gain. By default it is 1. Range is [0.015625 - 64].
2265
2266       mode
2267           Set waveform shape the LFO will use. Can be one of: sine, triangle,
2268           square, sawup or sawdown. Default is sine.
2269
2270       amount
2271           Set modulation. Define how much of original signal is affected by
2272           the LFO.
2273
2274       offset_l
2275           Set left channel offset. Default is 0. Allowed range is [0 - 1].
2276
2277       offset_r
2278           Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
2279
2280       width
2281           Set pulse width. Default is 1. Allowed range is [0 - 2].
2282
2283       timing
2284           Set possible timing mode. Can be one of: bpm, ms or hz. Default is
2285           hz.
2286
2287       bpm Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if
2288           timing is set to bpm.
2289
2290       ms  Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if
2291           timing is set to ms.
2292
2293       hz  Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100].
2294           Only used if timing is set to hz.
2295
2296   aresample
2297       Resample the input audio to the specified parameters, using the
2298       libswresample library. If none are specified then the filter will
2299       automatically convert between its input and output.
2300
2301       This filter is also able to stretch/squeeze the audio data to make it
2302       match the timestamps or to inject silence / cut out audio to make it
2303       match the timestamps, do a combination of both or do neither.
2304
2305       The filter accepts the syntax [sample_rate:]resampler_options, where
2306       sample_rate expresses a sample rate and resampler_options is a list of
2307       key=value pairs, separated by ":". See the "Resampler Options" section
2308       in the ffmpeg-resampler(1) manual for the complete list of supported
2309       options.
2310
2311       Examples
2312
2313       •   Resample the input audio to 44100Hz:
2314
2315                   aresample=44100
2316
2317       •   Stretch/squeeze samples to the given timestamps, with a maximum of
2318           1000 samples per second compensation:
2319
2320                   aresample=async=1000
2321
2322   areverse
2323       Reverse an audio clip.
2324
2325       Warning: This filter requires memory to buffer the entire clip, so
2326       trimming is suggested.
2327
2328       Examples
2329
2330       •   Take the first 5 seconds of a clip, and reverse it.
2331
2332                   atrim=end=5,areverse
2333
2334   arnndn
2335       Reduce noise from speech using Recurrent Neural Networks.
2336
2337       This filter accepts the following options:
2338
2339       model, m
2340           Set train model file to load. This option is always required.
2341
2342       mix Set how much to mix filtered samples into final output.  Allowed
2343           range is from -1 to 1. Default value is 1.  Negative values are
2344           special, they set how much to keep filtered noise in the final
2345           filter output. Set this option to -1 to hear actual noise removed
2346           from input signal.
2347
2348       Commands
2349
2350       This filter supports the all above options as commands.
2351
2352   asdr
2353       Measure Audio Signal-to-Distortion Ratio.
2354
2355       This filter takes two audio streams for input, and outputs first audio
2356       stream.  Results are in dB per channel at end of either input.
2357
2358   asetnsamples
2359       Set the number of samples per each output audio frame.
2360
2361       The last output packet may contain a different number of samples, as
2362       the filter will flush all the remaining samples when the input audio
2363       signals its end.
2364
2365       The filter accepts the following options:
2366
2367       nb_out_samples, n
2368           Set the number of frames per each output audio frame. The number is
2369           intended as the number of samples per each channel.  Default value
2370           is 1024.
2371
2372       pad, p
2373           If set to 1, the filter will pad the last audio frame with zeroes,
2374           so that the last frame will contain the same number of samples as
2375           the previous ones. Default value is 1.
2376
2377       For example, to set the number of per-frame samples to 1234 and disable
2378       padding for the last frame, use:
2379
2380               asetnsamples=n=1234:p=0
2381
2382   asetrate
2383       Set the sample rate without altering the PCM data.  This will result in
2384       a change of speed and pitch.
2385
2386       The filter accepts the following options:
2387
2388       sample_rate, r
2389           Set the output sample rate. Default is 44100 Hz.
2390
2391   ashowinfo
2392       Show a line containing various information for each input audio frame.
2393       The input audio is not modified.
2394
2395       The shown line contains a sequence of key/value pairs of the form
2396       key:value.
2397
2398       The following values are shown in the output:
2399
2400       n   The (sequential) number of the input frame, starting from 0.
2401
2402       pts The presentation timestamp of the input frame, in time base units;
2403           the time base depends on the filter input pad, and is usually
2404           1/sample_rate.
2405
2406       pts_time
2407           The presentation timestamp of the input frame in seconds.
2408
2409       pos position of the frame in the input stream, -1 if this information
2410           in unavailable and/or meaningless (for example in case of synthetic
2411           audio)
2412
2413       fmt The sample format.
2414
2415       chlayout
2416           The channel layout.
2417
2418       rate
2419           The sample rate for the audio frame.
2420
2421       nb_samples
2422           The number of samples (per channel) in the frame.
2423
2424       checksum
2425           The Adler-32 checksum (printed in hexadecimal) of the audio data.
2426           For planar audio, the data is treated as if all the planes were
2427           concatenated.
2428
2429       plane_checksums
2430           A list of Adler-32 checksums for each data plane.
2431
2432   asoftclip
2433       Apply audio soft clipping.
2434
2435       Soft clipping is a type of distortion effect where the amplitude of a
2436       signal is saturated along a smooth curve, rather than the abrupt shape
2437       of hard-clipping.
2438
2439       This filter accepts the following options:
2440
2441       type
2442           Set type of soft-clipping.
2443
2444           It accepts the following values:
2445
2446           hard
2447           tanh
2448           atan
2449           cubic
2450           exp
2451           alg
2452           quintic
2453           sin
2454           erf
2455       threshold
2456           Set threshold from where to start clipping. Default value is 0dB or
2457           1.
2458
2459       output
2460           Set gain applied to output. Default value is 0dB or 1.
2461
2462       param
2463           Set additional parameter which controls sigmoid function.
2464
2465       oversample
2466           Set oversampling factor.
2467
2468       Commands
2469
2470       This filter supports the all above options as commands.
2471
2472   aspectralstats
2473       Display frequency domain statistical information about the audio
2474       channels.  Statistics are calculated and stored as metadata for each
2475       audio channel and for each audio frame.
2476
2477       It accepts the following option:
2478
2479       win_size
2480           Set the window length in samples. Default value is 2048.  Allowed
2481           range is from 32 to 65536.
2482
2483       win_func
2484           Set window function.
2485
2486           It accepts the following values:
2487
2488           rect
2489           bartlett
2490           hann, hanning
2491           hamming
2492           blackman
2493           welch
2494           flattop
2495           bharris
2496           bnuttall
2497           bhann
2498           sine
2499           nuttall
2500           lanczos
2501           gauss
2502           tukey
2503           dolph
2504           cauchy
2505           parzen
2506           poisson
2507           bohman
2508
2509           Default is "hann".
2510
2511       overlap
2512           Set window overlap. Allowed range is from 0 to 1. Default value is
2513           0.5.
2514
2515       A list of each metadata key follows:
2516
2517       mean
2518       variance
2519       centroid
2520       spread
2521       skewness
2522       kurtosis
2523       entropy
2524       flatness
2525       crest
2526       flux
2527       slope
2528       decrease
2529       rolloff
2530
2531   asr
2532       Automatic Speech Recognition
2533
2534       This filter uses PocketSphinx for speech recognition. To enable
2535       compilation of this filter, you need to configure FFmpeg with
2536       "--enable-pocketsphinx".
2537
2538       It accepts the following options:
2539
2540       rate
2541           Set sampling rate of input audio. Defaults is 16000.  This need to
2542           match speech models, otherwise one will get poor results.
2543
2544       hmm Set dictionary containing acoustic model files.
2545
2546       dict
2547           Set pronunciation dictionary.
2548
2549       lm  Set language model file.
2550
2551       lmctl
2552           Set language model set.
2553
2554       lmname
2555           Set which language model to use.
2556
2557       logfn
2558           Set output for log messages.
2559
2560       The filter exports recognized speech as the frame metadata
2561       "lavfi.asr.text".
2562
2563   astats
2564       Display time domain statistical information about the audio channels.
2565       Statistics are calculated and displayed for each audio channel and,
2566       where applicable, an overall figure is also given.
2567
2568       It accepts the following option:
2569
2570       length
2571           Short window length in seconds, used for peak and trough RMS
2572           measurement.  Default is 0.05 (50 milliseconds). Allowed range is
2573           "[0 - 10]".
2574
2575       metadata
2576           Set metadata injection. All the metadata keys are prefixed with
2577           "lavfi.astats.X", where "X" is channel number starting from 1 or
2578           string "Overall". Default is disabled.
2579
2580           Available keys for each channel are: DC_offset Min_level Max_level
2581           Min_difference Max_difference Mean_difference RMS_difference
2582           Peak_level RMS_peak RMS_trough Crest_factor Flat_factor Peak_count
2583           Noise_floor Noise_floor_count Entropy Bit_depth Dynamic_range
2584           Zero_crossings Zero_crossings_rate Number_of_NaNs Number_of_Infs
2585           Number_of_denormals
2586
2587           and for Overall: DC_offset Min_level Max_level Min_difference
2588           Max_difference Mean_difference RMS_difference Peak_level RMS_level
2589           RMS_peak RMS_trough Flat_factor Peak_count Noise_floor
2590           Noise_floor_count Entropy Bit_depth Number_of_samples
2591           Number_of_NaNs Number_of_Infs Number_of_denormals
2592
2593           For example full key look like this "lavfi.astats.1.DC_offset" or
2594           this "lavfi.astats.Overall.Peak_count".
2595
2596           For description what each key means read below.
2597
2598       reset
2599           Set the number of frames over which cumulative stats are calculated
2600           before being reset Default is disabled.
2601
2602       measure_perchannel
2603           Select the parameters which are measured per channel. The metadata
2604           keys can be used as flags, default is all which measures
2605           everything.  none disables all per channel measurement.
2606
2607       measure_overall
2608           Select the parameters which are measured overall. The metadata keys
2609           can be used as flags, default is all which measures everything.
2610           none disables all overall measurement.
2611
2612       A description of each shown parameter follows:
2613
2614       DC offset
2615           Mean amplitude displacement from zero.
2616
2617       Min level
2618           Minimal sample level.
2619
2620       Max level
2621           Maximal sample level.
2622
2623       Min difference
2624           Minimal difference between two consecutive samples.
2625
2626       Max difference
2627           Maximal difference between two consecutive samples.
2628
2629       Mean difference
2630           Mean difference between two consecutive samples.  The average of
2631           each difference between two consecutive samples.
2632
2633       RMS difference
2634           Root Mean Square difference between two consecutive samples.
2635
2636       Peak level dB
2637       RMS level dB
2638           Standard peak and RMS level measured in dBFS.
2639
2640       RMS peak dB
2641       RMS trough dB
2642           Peak and trough values for RMS level measured over a short window.
2643
2644       Crest factor
2645           Standard ratio of peak to RMS level (note: not in dB).
2646
2647       Flat factor
2648           Flatness (i.e. consecutive samples with the same value) of the
2649           signal at its peak levels (i.e. either Min level or Max level).
2650
2651       Peak count
2652           Number of occasions (not the number of samples) that the signal
2653           attained either Min level or Max level.
2654
2655       Noise floor dB
2656           Minimum local peak measured in dBFS over a short window.
2657
2658       Noise floor count
2659           Number of occasions (not the number of samples) that the signal
2660           attained Noise floor.
2661
2662       Entropy
2663           Entropy measured across whole audio. Entropy of value near 1.0 is
2664           typically measured for white noise.
2665
2666       Bit depth
2667           Overall bit depth of audio. Number of bits used for each sample.
2668
2669       Dynamic range
2670           Measured dynamic range of audio in dB.
2671
2672       Zero crossings
2673           Number of points where the waveform crosses the zero level axis.
2674
2675       Zero crossings rate
2676           Rate of Zero crossings and number of audio samples.
2677
2678   asubboost
2679       Boost subwoofer frequencies.
2680
2681       The filter accepts the following options:
2682
2683       dry Set dry gain, how much of original signal is kept. Allowed range is
2684           from 0 to 1.  Default value is 0.7.
2685
2686       wet Set wet gain, how much of filtered signal is kept. Allowed range is
2687           from 0 to 1.  Default value is 0.7.
2688
2689       decay
2690           Set delay line decay gain value. Allowed range is from 0 to 1.
2691           Default value is 0.7.
2692
2693       feedback
2694           Set delay line feedback gain value. Allowed range is from 0 to 1.
2695           Default value is 0.9.
2696
2697       cutoff
2698           Set cutoff frequency in Hertz. Allowed range is 50 to 900.  Default
2699           value is 100.
2700
2701       slope
2702           Set slope amount for cutoff frequency. Allowed range is 0.0001 to
2703           1.  Default value is 0.5.
2704
2705       delay
2706           Set delay. Allowed range is from 1 to 100.  Default value is 20.
2707
2708       Commands
2709
2710       This filter supports the all above options as commands.
2711
2712   asubcut
2713       Cut subwoofer frequencies.
2714
2715       This filter allows to set custom, steeper roll off than highpass
2716       filter, and thus is able to more attenuate frequency content in stop-
2717       band.
2718
2719       The filter accepts the following options:
2720
2721       cutoff
2722           Set cutoff frequency in Hertz. Allowed range is 2 to 200.  Default
2723           value is 20.
2724
2725       order
2726           Set filter order. Available values are from 3 to 20.  Default value
2727           is 10.
2728
2729       level
2730           Set input gain level. Allowed range is from 0 to 1. Default value
2731           is 1.
2732
2733       Commands
2734
2735       This filter supports the all above options as commands.
2736
2737   asupercut
2738       Cut super frequencies.
2739
2740       The filter accepts the following options:
2741
2742       cutoff
2743           Set cutoff frequency in Hertz. Allowed range is 20000 to 192000.
2744           Default value is 20000.
2745
2746       order
2747           Set filter order. Available values are from 3 to 20.  Default value
2748           is 10.
2749
2750       level
2751           Set input gain level. Allowed range is from 0 to 1. Default value
2752           is 1.
2753
2754       Commands
2755
2756       This filter supports the all above options as commands.
2757
2758   asuperpass
2759       Apply high order Butterworth band-pass filter.
2760
2761       The filter accepts the following options:
2762
2763       centerf
2764           Set center frequency in Hertz. Allowed range is 2 to 999999.
2765           Default value is 1000.
2766
2767       order
2768           Set filter order. Available values are from 4 to 20.  Default value
2769           is 4.
2770
2771       qfactor
2772           Set Q-factor. Allowed range is from 0.01 to 100. Default value is
2773           1.
2774
2775       level
2776           Set input gain level. Allowed range is from 0 to 2. Default value
2777           is 1.
2778
2779       Commands
2780
2781       This filter supports the all above options as commands.
2782
2783   asuperstop
2784       Apply high order Butterworth band-stop filter.
2785
2786       The filter accepts the following options:
2787
2788       centerf
2789           Set center frequency in Hertz. Allowed range is 2 to 999999.
2790           Default value is 1000.
2791
2792       order
2793           Set filter order. Available values are from 4 to 20.  Default value
2794           is 4.
2795
2796       qfactor
2797           Set Q-factor. Allowed range is from 0.01 to 100. Default value is
2798           1.
2799
2800       level
2801           Set input gain level. Allowed range is from 0 to 2. Default value
2802           is 1.
2803
2804       Commands
2805
2806       This filter supports the all above options as commands.
2807
2808   atempo
2809       Adjust audio tempo.
2810
2811       The filter accepts exactly one parameter, the audio tempo. If not
2812       specified then the filter will assume nominal 1.0 tempo. Tempo must be
2813       in the [0.5, 100.0] range.
2814
2815       Note that tempo greater than 2 will skip some samples rather than blend
2816       them in.  If for any reason this is a concern it is always possible to
2817       daisy-chain several instances of atempo to achieve the desired product
2818       tempo.
2819
2820       Examples
2821
2822       •   Slow down audio to 80% tempo:
2823
2824                   atempo=0.8
2825
2826       •   To speed up audio to 300% tempo:
2827
2828                   atempo=3
2829
2830       •   To speed up audio to 300% tempo by daisy-chaining two atempo
2831           instances:
2832
2833                   atempo=sqrt(3),atempo=sqrt(3)
2834
2835       Commands
2836
2837       This filter supports the following commands:
2838
2839       tempo
2840           Change filter tempo scale factor.  Syntax for the command is :
2841           "tempo"
2842
2843   atilt
2844       Apply spectral tilt filter to audio stream.
2845
2846       This filter apply any spectral roll-off slope over any specified
2847       frequency band.
2848
2849       The filter accepts the following options:
2850
2851       freq
2852           Set central frequency of tilt in Hz. Default is 10000 Hz.
2853
2854       slope
2855           Set slope direction of tilt. Default is 0. Allowed range is from -1
2856           to 1.
2857
2858       width
2859           Set width of tilt. Default is 1000. Allowed range is from 100 to
2860           10000.
2861
2862       order
2863           Set order of tilt filter.
2864
2865       level
2866           Set input volume level. Allowed range is from 0 to 4.  Defalt is 1.
2867
2868       Commands
2869
2870       This filter supports the all above options as commands.
2871
2872   atrim
2873       Trim the input so that the output contains one continuous subpart of
2874       the input.
2875
2876       It accepts the following parameters:
2877
2878       start
2879           Timestamp (in seconds) of the start of the section to keep. I.e.
2880           the audio sample with the timestamp start will be the first sample
2881           in the output.
2882
2883       end Specify time of the first audio sample that will be dropped, i.e.
2884           the audio sample immediately preceding the one with the timestamp
2885           end will be the last sample in the output.
2886
2887       start_pts
2888           Same as start, except this option sets the start timestamp in
2889           samples instead of seconds.
2890
2891       end_pts
2892           Same as end, except this option sets the end timestamp in samples
2893           instead of seconds.
2894
2895       duration
2896           The maximum duration of the output in seconds.
2897
2898       start_sample
2899           The number of the first sample that should be output.
2900
2901       end_sample
2902           The number of the first sample that should be dropped.
2903
2904       start, end, and duration are expressed as time duration specifications;
2905       see the Time duration section in the ffmpeg-utils(1) manual.
2906
2907       Note that the first two sets of the start/end options and the duration
2908       option look at the frame timestamp, while the _sample options simply
2909       count the samples that pass through the filter. So start/end_pts and
2910       start/end_sample will give different results when the timestamps are
2911       wrong, inexact or do not start at zero. Also note that this filter does
2912       not modify the timestamps. If you wish to have the output timestamps
2913       start at zero, insert the asetpts filter after the atrim filter.
2914
2915       If multiple start or end options are set, this filter tries to be
2916       greedy and keep all samples that match at least one of the specified
2917       constraints. To keep only the part that matches all the constraints at
2918       once, chain multiple atrim filters.
2919
2920       The defaults are such that all the input is kept. So it is possible to
2921       set e.g.  just the end values to keep everything before the specified
2922       time.
2923
2924       Examples:
2925
2926       •   Drop everything except the second minute of input:
2927
2928                   ffmpeg -i INPUT -af atrim=60:120
2929
2930       •   Keep only the first 1000 samples:
2931
2932                   ffmpeg -i INPUT -af atrim=end_sample=1000
2933
2934   axcorrelate
2935       Calculate normalized windowed cross-correlation between two input audio
2936       streams.
2937
2938       Resulted samples are always between -1 and 1 inclusive.  If result is 1
2939       it means two input samples are highly correlated in that selected
2940       segment.  Result 0 means they are not correlated at all.  If result is
2941       -1 it means two input samples are out of phase, which means they cancel
2942       each other.
2943
2944       The filter accepts the following options:
2945
2946       size
2947           Set size of segment over which cross-correlation is calculated.
2948           Default is 256. Allowed range is from 2 to 131072.
2949
2950       algo
2951           Set algorithm for cross-correlation. Can be "slow" or "fast".
2952           Default is "slow". Fast algorithm assumes mean values over any
2953           given segment are always zero and thus need much less calculations
2954           to make.  This is generally not true, but is valid for typical
2955           audio streams.
2956
2957       Examples
2958
2959       •   Calculate correlation between channels in stereo audio stream:
2960
2961                   ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
2962
2963   bandpass
2964       Apply a two-pole Butterworth band-pass filter with central frequency
2965       frequency, and (3dB-point) band-width width.  The csg option selects a
2966       constant skirt gain (peak gain = Q) instead of the default: constant
2967       0dB peak gain.  The filter roll off at 6dB per octave (20dB per
2968       decade).
2969
2970       The filter accepts the following options:
2971
2972       frequency, f
2973           Set the filter's central frequency. Default is 3000.
2974
2975       csg Constant skirt gain if set to 1. Defaults to 0.
2976
2977       width_type, t
2978           Set method to specify band-width of filter.
2979
2980           h   Hz
2981
2982           q   Q-Factor
2983
2984           o   octave
2985
2986           s   slope
2987
2988           k   kHz
2989
2990       width, w
2991           Specify the band-width of a filter in width_type units.
2992
2993       mix, m
2994           How much to use filtered signal in output. Default is 1.  Range is
2995           between 0 and 1.
2996
2997       channels, c
2998           Specify which channels to filter, by default all available are
2999           filtered.
3000
3001       normalize, n
3002           Normalize biquad coefficients, by default is disabled.  Enabling it
3003           will normalize magnitude response at DC to 0dB.
3004
3005       transform, a
3006           Set transform type of IIR filter.
3007
3008           di
3009           dii
3010           tdii
3011           latt
3012           svf
3013       precision, r
3014           Set precison of filtering.
3015
3016           auto
3017               Pick automatic sample format depending on surround filters.
3018
3019           s16 Always use signed 16-bit.
3020
3021           s32 Always use signed 32-bit.
3022
3023           f32 Always use float 32-bit.
3024
3025           f64 Always use float 64-bit.
3026
3027       Commands
3028
3029       This filter supports the following commands:
3030
3031       frequency, f
3032           Change bandpass frequency.  Syntax for the command is : "frequency"
3033
3034       width_type, t
3035           Change bandpass width_type.  Syntax for the command is :
3036           "width_type"
3037
3038       width, w
3039           Change bandpass width.  Syntax for the command is : "width"
3040
3041       mix, m
3042           Change bandpass mix.  Syntax for the command is : "mix"
3043
3044   bandreject
3045       Apply a two-pole Butterworth band-reject filter with central frequency
3046       frequency, and (3dB-point) band-width width.  The filter roll off at
3047       6dB per octave (20dB per decade).
3048
3049       The filter accepts the following options:
3050
3051       frequency, f
3052           Set the filter's central frequency. Default is 3000.
3053
3054       width_type, t
3055           Set method to specify band-width of filter.
3056
3057           h   Hz
3058
3059           q   Q-Factor
3060
3061           o   octave
3062
3063           s   slope
3064
3065           k   kHz
3066
3067       width, w
3068           Specify the band-width of a filter in width_type units.
3069
3070       mix, m
3071           How much to use filtered signal in output. Default is 1.  Range is
3072           between 0 and 1.
3073
3074       channels, c
3075           Specify which channels to filter, by default all available are
3076           filtered.
3077
3078       normalize, n
3079           Normalize biquad coefficients, by default is disabled.  Enabling it
3080           will normalize magnitude response at DC to 0dB.
3081
3082       transform, a
3083           Set transform type of IIR filter.
3084
3085           di
3086           dii
3087           tdii
3088           latt
3089           svf
3090       precision, r
3091           Set precison of filtering.
3092
3093           auto
3094               Pick automatic sample format depending on surround filters.
3095
3096           s16 Always use signed 16-bit.
3097
3098           s32 Always use signed 32-bit.
3099
3100           f32 Always use float 32-bit.
3101
3102           f64 Always use float 64-bit.
3103
3104       Commands
3105
3106       This filter supports the following commands:
3107
3108       frequency, f
3109           Change bandreject frequency.  Syntax for the command is :
3110           "frequency"
3111
3112       width_type, t
3113           Change bandreject width_type.  Syntax for the command is :
3114           "width_type"
3115
3116       width, w
3117           Change bandreject width.  Syntax for the command is : "width"
3118
3119       mix, m
3120           Change bandreject mix.  Syntax for the command is : "mix"
3121
3122   bass, lowshelf
3123       Boost or cut the bass (lower) frequencies of the audio using a two-pole
3124       shelving filter with a response similar to that of a standard hi-fi's
3125       tone-controls. This is also known as shelving equalisation (EQ).
3126
3127       The filter accepts the following options:
3128
3129       gain, g
3130           Give the gain at 0 Hz. Its useful range is about -20 (for a large
3131           cut) to +20 (for a large boost).  Beware of clipping when using a
3132           positive gain.
3133
3134       frequency, f
3135           Set the filter's central frequency and so can be used to extend or
3136           reduce the frequency range to be boosted or cut.  The default value
3137           is 100 Hz.
3138
3139       width_type, t
3140           Set method to specify band-width of filter.
3141
3142           h   Hz
3143
3144           q   Q-Factor
3145
3146           o   octave
3147
3148           s   slope
3149
3150           k   kHz
3151
3152       width, w
3153           Determine how steep is the filter's shelf transition.
3154
3155       poles, p
3156           Set number of poles. Default is 2.
3157
3158       mix, m
3159           How much to use filtered signal in output. Default is 1.  Range is
3160           between 0 and 1.
3161
3162       channels, c
3163           Specify which channels to filter, by default all available are
3164           filtered.
3165
3166       normalize, n
3167           Normalize biquad coefficients, by default is disabled.  Enabling it
3168           will normalize magnitude response at DC to 0dB.
3169
3170       transform, a
3171           Set transform type of IIR filter.
3172
3173           di
3174           dii
3175           tdii
3176           latt
3177           svf
3178       precision, r
3179           Set precison of filtering.
3180
3181           auto
3182               Pick automatic sample format depending on surround filters.
3183
3184           s16 Always use signed 16-bit.
3185
3186           s32 Always use signed 32-bit.
3187
3188           f32 Always use float 32-bit.
3189
3190           f64 Always use float 64-bit.
3191
3192       Commands
3193
3194       This filter supports the following commands:
3195
3196       frequency, f
3197           Change bass frequency.  Syntax for the command is : "frequency"
3198
3199       width_type, t
3200           Change bass width_type.  Syntax for the command is : "width_type"
3201
3202       width, w
3203           Change bass width.  Syntax for the command is : "width"
3204
3205       gain, g
3206           Change bass gain.  Syntax for the command is : "gain"
3207
3208       mix, m
3209           Change bass mix.  Syntax for the command is : "mix"
3210
3211   biquad
3212       Apply a biquad IIR filter with the given coefficients.  Where b0, b1,
3213       b2 and a0, a1, a2 are the numerator and denominator coefficients
3214       respectively.  and channels, c specify which channels to filter, by
3215       default all available are filtered.
3216
3217       Commands
3218
3219       This filter supports the following commands:
3220
3221       a0
3222       a1
3223       a2
3224       b0
3225       b1
3226       b2  Change biquad parameter.  Syntax for the command is : "value"
3227
3228       mix, m
3229           How much to use filtered signal in output. Default is 1.  Range is
3230           between 0 and 1.
3231
3232       channels, c
3233           Specify which channels to filter, by default all available are
3234           filtered.
3235
3236       normalize, n
3237           Normalize biquad coefficients, by default is disabled.  Enabling it
3238           will normalize magnitude response at DC to 0dB.
3239
3240       transform, a
3241           Set transform type of IIR filter.
3242
3243           di
3244           dii
3245           tdii
3246           latt
3247           svf
3248       precision, r
3249           Set precison of filtering.
3250
3251           auto
3252               Pick automatic sample format depending on surround filters.
3253
3254           s16 Always use signed 16-bit.
3255
3256           s32 Always use signed 32-bit.
3257
3258           f32 Always use float 32-bit.
3259
3260           f64 Always use float 64-bit.
3261
3262   bs2b
3263       Bauer stereo to binaural transformation, which improves headphone
3264       listening of stereo audio records.
3265
3266       To enable compilation of this filter you need to configure FFmpeg with
3267       "--enable-libbs2b".
3268
3269       It accepts the following parameters:
3270
3271       profile
3272           Pre-defined crossfeed level.
3273
3274           default
3275               Default level (fcut=700, feed=50).
3276
3277           cmoy
3278               Chu Moy circuit (fcut=700, feed=60).
3279
3280           jmeier
3281               Jan Meier circuit (fcut=650, feed=95).
3282
3283       fcut
3284           Cut frequency (in Hz).
3285
3286       feed
3287           Feed level (in Hz).
3288
3289   channelmap
3290       Remap input channels to new locations.
3291
3292       It accepts the following parameters:
3293
3294       map Map channels from input to output. The argument is a '|'-separated
3295           list of mappings, each in the "in_channel-out_channel" or
3296           in_channel form. in_channel can be either the name of the input
3297           channel (e.g. FL for front left) or its index in the input channel
3298           layout.  out_channel is the name of the output channel or its index
3299           in the output channel layout. If out_channel is not given then it
3300           is implicitly an index, starting with zero and increasing by one
3301           for each mapping.
3302
3303       channel_layout
3304           The channel layout of the output stream.
3305
3306       If no mapping is present, the filter will implicitly map input channels
3307       to output channels, preserving indices.
3308
3309       Examples
3310
3311       •   For example, assuming a 5.1+downmix input MOV file,
3312
3313                   ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
3314
3315           will create an output WAV file tagged as stereo from the downmix
3316           channels of the input.
3317
3318       •   To fix a 5.1 WAV improperly encoded in AAC's native channel order
3319
3320                   ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
3321
3322   channelsplit
3323       Split each channel from an input audio stream into a separate output
3324       stream.
3325
3326       It accepts the following parameters:
3327
3328       channel_layout
3329           The channel layout of the input stream. The default is "stereo".
3330
3331       channels
3332           A channel layout describing the channels to be extracted as
3333           separate output streams or "all" to extract each input channel as a
3334           separate stream. The default is "all".
3335
3336           Choosing channels not present in channel layout in the input will
3337           result in an error.
3338
3339       Examples
3340
3341       •   For example, assuming a stereo input MP3 file,
3342
3343                   ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
3344
3345           will create an output Matroska file with two audio streams, one
3346           containing only the left channel and the other the right channel.
3347
3348       •   Split a 5.1 WAV file into per-channel files:
3349
3350                   ffmpeg -i in.wav -filter_complex
3351                   'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
3352                   -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
3353                   front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
3354                   side_right.wav
3355
3356       •   Extract only LFE from a 5.1 WAV file:
3357
3358                   ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
3359                   -map '[LFE]' lfe.wav
3360
3361   chorus
3362       Add a chorus effect to the audio.
3363
3364       Can make a single vocal sound like a chorus, but can also be applied to
3365       instrumentation.
3366
3367       Chorus resembles an echo effect with a short delay, but whereas with
3368       echo the delay is constant, with chorus, it is varied using using
3369       sinusoidal or triangular modulation.  The modulation depth defines the
3370       range the modulated delay is played before or after the delay. Hence
3371       the delayed sound will sound slower or faster, that is the delayed
3372       sound tuned around the original one, like in a chorus where some vocals
3373       are slightly off key.
3374
3375       It accepts the following parameters:
3376
3377       in_gain
3378           Set input gain. Default is 0.4.
3379
3380       out_gain
3381           Set output gain. Default is 0.4.
3382
3383       delays
3384           Set delays. A typical delay is around 40ms to 60ms.
3385
3386       decays
3387           Set decays.
3388
3389       speeds
3390           Set speeds.
3391
3392       depths
3393           Set depths.
3394
3395       Examples
3396
3397       •   A single delay:
3398
3399                   chorus=0.7:0.9:55:0.4:0.25:2
3400
3401       •   Two delays:
3402
3403                   chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
3404
3405       •   Fuller sounding chorus with three delays:
3406
3407                   chorus=0.5:0.9:50|60|40:0.4|0.32|0.3:0.25|0.4|0.3:2|2.3|1.3
3408
3409   compand
3410       Compress or expand the audio's dynamic range.
3411
3412       It accepts the following parameters:
3413
3414       attacks
3415       decays
3416           A list of times in seconds for each channel over which the
3417           instantaneous level of the input signal is averaged to determine
3418           its volume. attacks refers to increase of volume and decays refers
3419           to decrease of volume. For most situations, the attack time
3420           (response to the audio getting louder) should be shorter than the
3421           decay time, because the human ear is more sensitive to sudden loud
3422           audio than sudden soft audio. A typical value for attack is 0.3
3423           seconds and a typical value for decay is 0.8 seconds.  If specified
3424           number of attacks & decays is lower than number of channels, the
3425           last set attack/decay will be used for all remaining channels.
3426
3427       points
3428           A list of points for the transfer function, specified in dB
3429           relative to the maximum possible signal amplitude. Each key points
3430           list must be defined using the following syntax:
3431           "x0/y0|x1/y1|x2/y2|...." or "x0/y0 x1/y1 x2/y2 ...."
3432
3433           The input values must be in strictly increasing order but the
3434           transfer function does not have to be monotonically rising. The
3435           point "0/0" is assumed but may be overridden (by "0/out-dBn").
3436           Typical values for the transfer function are "-70/-70|-60/-20|1/0".
3437
3438       soft-knee
3439           Set the curve radius in dB for all joints. It defaults to 0.01.
3440
3441       gain
3442           Set the additional gain in dB to be applied at all points on the
3443           transfer function. This allows for easy adjustment of the overall
3444           gain.  It defaults to 0.
3445
3446       volume
3447           Set an initial volume, in dB, to be assumed for each channel when
3448           filtering starts. This permits the user to supply a nominal level
3449           initially, so that, for example, a very large gain is not applied
3450           to initial signal levels before the companding has begun to
3451           operate. A typical value for audio which is initially quiet is -90
3452           dB. It defaults to 0.
3453
3454       delay
3455           Set a delay, in seconds. The input audio is analyzed immediately,
3456           but audio is delayed before being fed to the volume adjuster.
3457           Specifying a delay approximately equal to the attack/decay times
3458           allows the filter to effectively operate in predictive rather than
3459           reactive mode. It defaults to 0.
3460
3461       Examples
3462
3463       •   Make music with both quiet and loud passages suitable for listening
3464           to in a noisy environment:
3465
3466                   compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
3467
3468           Another example for audio with whisper and explosion parts:
3469
3470                   compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
3471
3472       •   A noise gate for when the noise is at a lower level than the
3473           signal:
3474
3475                   compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
3476
3477       •   Here is another noise gate, this time for when the noise is at a
3478           higher level than the signal (making it, in some ways, similar to
3479           squelch):
3480
3481                   compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
3482
3483       •   2:1 compression starting at -6dB:
3484
3485                   compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
3486
3487       •   2:1 compression starting at -9dB:
3488
3489                   compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
3490
3491       •   2:1 compression starting at -12dB:
3492
3493                   compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
3494
3495       •   2:1 compression starting at -18dB:
3496
3497                   compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
3498
3499       •   3:1 compression starting at -15dB:
3500
3501                   compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
3502
3503       •   Compressor/Gate:
3504
3505                   compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
3506
3507       •   Expander:
3508
3509                   compand=attacks=0:points=-80/-169|-54/-80|-49.5/-64.6|-41.1/-41.1|-25.8/-15|-10.8/-4.5|0/0|20/8.3
3510
3511       •   Hard limiter at -6dB:
3512
3513                   compand=attacks=0:points=-80/-80|-6/-6|20/-6
3514
3515       •   Hard limiter at -12dB:
3516
3517                   compand=attacks=0:points=-80/-80|-12/-12|20/-12
3518
3519       •   Hard noise gate at -35 dB:
3520
3521                   compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
3522
3523       •   Soft limiter:
3524
3525                   compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
3526
3527   compensationdelay
3528       Compensation Delay Line is a metric based delay to compensate differing
3529       positions of microphones or speakers.
3530
3531       For example, you have recorded guitar with two microphones placed in
3532       different locations. Because the front of sound wave has fixed speed in
3533       normal conditions, the phasing of microphones can vary and depends on
3534       their location and interposition. The best sound mix can be achieved
3535       when these microphones are in phase (synchronized). Note that a
3536       distance of ~30 cm between microphones makes one microphone capture the
3537       signal in antiphase to the other microphone. That makes the final mix
3538       sound moody.  This filter helps to solve phasing problems by adding
3539       different delays to each microphone track and make them synchronized.
3540
3541       The best result can be reached when you take one track as base and
3542       synchronize other tracks one by one with it.  Remember that
3543       synchronization/delay tolerance depends on sample rate, too.  Higher
3544       sample rates will give more tolerance.
3545
3546       The filter accepts the following parameters:
3547
3548       mm  Set millimeters distance. This is compensation distance for fine
3549           tuning.  Default is 0.
3550
3551       cm  Set cm distance. This is compensation distance for tightening
3552           distance setup.  Default is 0.
3553
3554       m   Set meters distance. This is compensation distance for hard
3555           distance setup.  Default is 0.
3556
3557       dry Set dry amount. Amount of unprocessed (dry) signal.  Default is 0.
3558
3559       wet Set wet amount. Amount of processed (wet) signal.  Default is 1.
3560
3561       temp
3562           Set temperature in degrees Celsius. This is the temperature of the
3563           environment.  Default is 20.
3564
3565   crossfeed
3566       Apply headphone crossfeed filter.
3567
3568       Crossfeed is the process of blending the left and right channels of
3569       stereo audio recording.  It is mainly used to reduce extreme stereo
3570       separation of low frequencies.
3571
3572       The intent is to produce more speaker like sound to the listener.
3573
3574       The filter accepts the following options:
3575
3576       strength
3577           Set strength of crossfeed. Default is 0.2. Allowed range is from 0
3578           to 1.  This sets gain of low shelf filter for side part of stereo
3579           image.  Default is -6dB. Max allowed is -30db when strength is set
3580           to 1.
3581
3582       range
3583           Set soundstage wideness. Default is 0.5. Allowed range is from 0 to
3584           1.  This sets cut off frequency of low shelf filter. Default is cut
3585           off near 1550 Hz. With range set to 1 cut off frequency is set to
3586           2100 Hz.
3587
3588       slope
3589           Set curve slope of low shelf filter. Default is 0.5.  Allowed range
3590           is from 0.01 to 1.
3591
3592       level_in
3593           Set input gain. Default is 0.9.
3594
3595       level_out
3596           Set output gain. Default is 1.
3597
3598       Commands
3599
3600       This filter supports the all above options as commands.
3601
3602   crystalizer
3603       Simple algorithm for audio noise sharpening.
3604
3605       This filter linearly increases differences betweeen each audio sample.
3606
3607       The filter accepts the following options:
3608
3609       i   Sets the intensity of effect (default: 2.0). Must be in range
3610           between -10.0 to 0 (unchanged sound) to 10.0 (maximum effect).  To
3611           inverse filtering use negative value.
3612
3613       c   Enable clipping. By default is enabled.
3614
3615       Commands
3616
3617       This filter supports the all above options as commands.
3618
3619   dcshift
3620       Apply a DC shift to the audio.
3621
3622       This can be useful to remove a DC offset (caused perhaps by a hardware
3623       problem in the recording chain) from the audio. The effect of a DC
3624       offset is reduced headroom and hence volume. The astats filter can be
3625       used to determine if a signal has a DC offset.
3626
3627       shift
3628           Set the DC shift, allowed range is [-1, 1]. It indicates the amount
3629           to shift the audio.
3630
3631       limitergain
3632           Optional. It should have a value much less than 1 (e.g. 0.05 or
3633           0.02) and is used to prevent clipping.
3634
3635   deesser
3636       Apply de-essing to the audio samples.
3637
3638       i   Set intensity for triggering de-essing. Allowed range is from 0 to
3639           1.  Default is 0.
3640
3641       m   Set amount of ducking on treble part of sound. Allowed range is
3642           from 0 to 1.  Default is 0.5.
3643
3644       f   How much of original frequency content to keep when de-essing.
3645           Allowed range is from 0 to 1.  Default is 0.5.
3646
3647       s   Set the output mode.
3648
3649           It accepts the following values:
3650
3651           i   Pass input unchanged.
3652
3653           o   Pass ess filtered out.
3654
3655           e   Pass only ess.
3656
3657               Default value is o.
3658
3659   drmeter
3660       Measure audio dynamic range.
3661
3662       DR values of 14 and higher is found in very dynamic material. DR of 8
3663       to 13 is found in transition material. And anything less that 8 have
3664       very poor dynamics and is very compressed.
3665
3666       The filter accepts the following options:
3667
3668       length
3669           Set window length in seconds used to split audio into segments of
3670           equal length.  Default is 3 seconds.
3671
3672   dynaudnorm
3673       Dynamic Audio Normalizer.
3674
3675       This filter applies a certain amount of gain to the input audio in
3676       order to bring its peak magnitude to a target level (e.g. 0 dBFS).
3677       However, in contrast to more "simple" normalization algorithms, the
3678       Dynamic Audio Normalizer *dynamically* re-adjusts the gain factor to
3679       the input audio.  This allows for applying extra gain to the "quiet"
3680       sections of the audio while avoiding distortions or clipping the "loud"
3681       sections. In other words: The Dynamic Audio Normalizer will "even out"
3682       the volume of quiet and loud sections, in the sense that the volume of
3683       each section is brought to the same target level. Note, however, that
3684       the Dynamic Audio Normalizer achieves this goal *without* applying
3685       "dynamic range compressing". It will retain 100% of the dynamic range
3686       *within* each section of the audio file.
3687
3688       framelen, f
3689           Set the frame length in milliseconds. In range from 10 to 8000
3690           milliseconds.  Default is 500 milliseconds.  The Dynamic Audio
3691           Normalizer processes the input audio in small chunks, referred to
3692           as frames. This is required, because a peak magnitude has no
3693           meaning for just a single sample value. Instead, we need to
3694           determine the peak magnitude for a contiguous sequence of sample
3695           values. While a "standard" normalizer would simply use the peak
3696           magnitude of the complete file, the Dynamic Audio Normalizer
3697           determines the peak magnitude individually for each frame. The
3698           length of a frame is specified in milliseconds. By default, the
3699           Dynamic Audio Normalizer uses a frame length of 500 milliseconds,
3700           which has been found to give good results with most files.  Note
3701           that the exact frame length, in number of samples, will be
3702           determined automatically, based on the sampling rate of the
3703           individual input audio file.
3704
3705       gausssize, g
3706           Set the Gaussian filter window size. In range from 3 to 301, must
3707           be odd number. Default is 31.  Probably the most important
3708           parameter of the Dynamic Audio Normalizer is the "window size" of
3709           the Gaussian smoothing filter. The filter's window size is
3710           specified in frames, centered around the current frame. For the
3711           sake of simplicity, this must be an odd number. Consequently, the
3712           default value of 31 takes into account the current frame, as well
3713           as the 15 preceding frames and the 15 subsequent frames. Using a
3714           larger window results in a stronger smoothing effect and thus in
3715           less gain variation, i.e. slower gain adaptation. Conversely, using
3716           a smaller window results in a weaker smoothing effect and thus in
3717           more gain variation, i.e. faster gain adaptation.  In other words,
3718           the more you increase this value, the more the Dynamic Audio
3719           Normalizer will behave like a "traditional" normalization filter.
3720           On the contrary, the more you decrease this value, the more the
3721           Dynamic Audio Normalizer will behave like a dynamic range
3722           compressor.
3723
3724       peak, p
3725           Set the target peak value. This specifies the highest permissible
3726           magnitude level for the normalized audio input. This filter will
3727           try to approach the target peak magnitude as closely as possible,
3728           but at the same time it also makes sure that the normalized signal
3729           will never exceed the peak magnitude.  A frame's maximum local gain
3730           factor is imposed directly by the target peak magnitude. The
3731           default value is 0.95 and thus leaves a headroom of 5%*.  It is not
3732           recommended to go above this value.
3733
3734       maxgain, m
3735           Set the maximum gain factor. In range from 1.0 to 100.0. Default is
3736           10.0.  The Dynamic Audio Normalizer determines the maximum possible
3737           (local) gain factor for each input frame, i.e. the maximum gain
3738           factor that does not result in clipping or distortion. The maximum
3739           gain factor is determined by the frame's highest magnitude sample.
3740           However, the Dynamic Audio Normalizer additionally bounds the
3741           frame's maximum gain factor by a predetermined (global) maximum
3742           gain factor. This is done in order to avoid excessive gain factors
3743           in "silent" or almost silent frames. By default, the maximum gain
3744           factor is 10.0, For most inputs the default value should be
3745           sufficient and it usually is not recommended to increase this
3746           value. Though, for input with an extremely low overall volume
3747           level, it may be necessary to allow even higher gain factors. Note,
3748           however, that the Dynamic Audio Normalizer does not simply apply a
3749           "hard" threshold (i.e. cut off values above the threshold).
3750           Instead, a "sigmoid" threshold function will be applied. This way,
3751           the gain factors will smoothly approach the threshold value, but
3752           never exceed that value.
3753
3754       targetrms, r
3755           Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 -
3756           disabled.  By default, the Dynamic Audio Normalizer performs "peak"
3757           normalization.  This means that the maximum local gain factor for
3758           each frame is defined (only) by the frame's highest magnitude
3759           sample. This way, the samples can be amplified as much as possible
3760           without exceeding the maximum signal level, i.e. without clipping.
3761           Optionally, however, the Dynamic Audio Normalizer can also take
3762           into account the frame's root mean square, abbreviated RMS. In
3763           electrical engineering, the RMS is commonly used to determine the
3764           power of a time-varying signal. It is therefore considered that the
3765           RMS is a better approximation of the "perceived loudness" than just
3766           looking at the signal's peak magnitude. Consequently, by adjusting
3767           all frames to a constant RMS value, a uniform "perceived loudness"
3768           can be established. If a target RMS value has been specified, a
3769           frame's local gain factor is defined as the factor that would
3770           result in exactly that RMS value.  Note, however, that the maximum
3771           local gain factor is still restricted by the frame's highest
3772           magnitude sample, in order to prevent clipping.
3773
3774       coupling, n
3775           Enable channels coupling. By default is enabled.  By default, the
3776           Dynamic Audio Normalizer will amplify all channels by the same
3777           amount. This means the same gain factor will be applied to all
3778           channels, i.e.  the maximum possible gain factor is determined by
3779           the "loudest" channel.  However, in some recordings, it may happen
3780           that the volume of the different channels is uneven, e.g. one
3781           channel may be "quieter" than the other one(s).  In this case, this
3782           option can be used to disable the channel coupling. This way, the
3783           gain factor will be determined independently for each channel,
3784           depending only on the individual channel's highest magnitude
3785           sample. This allows for harmonizing the volume of the different
3786           channels.
3787
3788       correctdc, c
3789           Enable DC bias correction. By default is disabled.  An audio signal
3790           (in the time domain) is a sequence of sample values.  In the
3791           Dynamic Audio Normalizer these sample values are represented in the
3792           -1.0 to 1.0 range, regardless of the original input format.
3793           Normally, the audio signal, or "waveform", should be centered
3794           around the zero point.  That means if we calculate the mean value
3795           of all samples in a file, or in a single frame, then the result
3796           should be 0.0 or at least very close to that value. If, however,
3797           there is a significant deviation of the mean value from 0.0, in
3798           either positive or negative direction, this is referred to as a DC
3799           bias or DC offset. Since a DC bias is clearly undesirable, the
3800           Dynamic Audio Normalizer provides optional DC bias correction.
3801           With DC bias correction enabled, the Dynamic Audio Normalizer will
3802           determine the mean value, or "DC correction" offset, of each input
3803           frame and subtract that value from all of the frame's sample values
3804           which ensures those samples are centered around 0.0 again. Also, in
3805           order to avoid "gaps" at the frame boundaries, the DC correction
3806           offset values will be interpolated smoothly between neighbouring
3807           frames.
3808
3809       altboundary, b
3810           Enable alternative boundary mode. By default is disabled.  The
3811           Dynamic Audio Normalizer takes into account a certain neighbourhood
3812           around each frame. This includes the preceding frames as well as
3813           the subsequent frames. However, for the "boundary" frames, located
3814           at the very beginning and at the very end of the audio file, not
3815           all neighbouring frames are available. In particular, for the first
3816           few frames in the audio file, the preceding frames are not known.
3817           And, similarly, for the last few frames in the audio file, the
3818           subsequent frames are not known. Thus, the question arises which
3819           gain factors should be assumed for the missing frames in the
3820           "boundary" region. The Dynamic Audio Normalizer implements two
3821           modes to deal with this situation. The default boundary mode
3822           assumes a gain factor of exactly 1.0 for the missing frames,
3823           resulting in a smooth "fade in" and "fade out" at the beginning and
3824           at the end of the input, respectively.
3825
3826       compress, s
3827           Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
3828           By default, the Dynamic Audio Normalizer does not apply
3829           "traditional" compression. This means that signal peaks will not be
3830           pruned and thus the full dynamic range will be retained within each
3831           local neighbourhood. However, in some cases it may be desirable to
3832           combine the Dynamic Audio Normalizer's normalization algorithm with
3833           a more "traditional" compression.  For this purpose, the Dynamic
3834           Audio Normalizer provides an optional compression (thresholding)
3835           function. If (and only if) the compression feature is enabled, all
3836           input frames will be processed by a soft knee thresholding function
3837           prior to the actual normalization process. Put simply, the
3838           thresholding function is going to prune all samples whose magnitude
3839           exceeds a certain threshold value.  However, the Dynamic Audio
3840           Normalizer does not simply apply a fixed threshold value. Instead,
3841           the threshold value will be adjusted for each individual frame.  In
3842           general, smaller parameters result in stronger compression, and
3843           vice versa.  Values below 3.0 are not recommended, because audible
3844           distortion may appear.
3845
3846       threshold, t
3847           Set the target threshold value. This specifies the lowest
3848           permissible magnitude level for the audio input which will be
3849           normalized.  If input frame volume is above this value frame will
3850           be normalized.  Otherwise frame may not be normalized at all. The
3851           default value is set to 0, which means all input frames will be
3852           normalized.  This option is mostly useful if digital noise is not
3853           wanted to be amplified.
3854
3855       Commands
3856
3857       This filter supports the all above options as commands.
3858
3859   earwax
3860       Make audio easier to listen to on headphones.
3861
3862       This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio
3863       so that when listened to on headphones the stereo image is moved from
3864       inside your head (standard for headphones) to outside and in front of
3865       the listener (standard for speakers).
3866
3867       Ported from SoX.
3868
3869   equalizer
3870       Apply a two-pole peaking equalisation (EQ) filter. With this filter,
3871       the signal-level at and around a selected frequency can be increased or
3872       decreased, whilst (unlike bandpass and bandreject filters) that at all
3873       other frequencies is unchanged.
3874
3875       In order to produce complex equalisation curves, this filter can be
3876       given several times, each with a different central frequency.
3877
3878       The filter accepts the following options:
3879
3880       frequency, f
3881           Set the filter's central frequency in Hz.
3882
3883       width_type, t
3884           Set method to specify band-width of filter.
3885
3886           h   Hz
3887
3888           q   Q-Factor
3889
3890           o   octave
3891
3892           s   slope
3893
3894           k   kHz
3895
3896       width, w
3897           Specify the band-width of a filter in width_type units.
3898
3899       gain, g
3900           Set the required gain or attenuation in dB.  Beware of clipping
3901           when using a positive gain.
3902
3903       mix, m
3904           How much to use filtered signal in output. Default is 1.  Range is
3905           between 0 and 1.
3906
3907       channels, c
3908           Specify which channels to filter, by default all available are
3909           filtered.
3910
3911       normalize, n
3912           Normalize biquad coefficients, by default is disabled.  Enabling it
3913           will normalize magnitude response at DC to 0dB.
3914
3915       transform, a
3916           Set transform type of IIR filter.
3917
3918           di
3919           dii
3920           tdii
3921           latt
3922           svf
3923       precision, r
3924           Set precison of filtering.
3925
3926           auto
3927               Pick automatic sample format depending on surround filters.
3928
3929           s16 Always use signed 16-bit.
3930
3931           s32 Always use signed 32-bit.
3932
3933           f32 Always use float 32-bit.
3934
3935           f64 Always use float 64-bit.
3936
3937       Examples
3938
3939       •   Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
3940
3941                   equalizer=f=1000:t=h:width=200:g=-10
3942
3943       •   Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz
3944           with Q 2:
3945
3946                   equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
3947
3948       Commands
3949
3950       This filter supports the following commands:
3951
3952       frequency, f
3953           Change equalizer frequency.  Syntax for the command is :
3954           "frequency"
3955
3956       width_type, t
3957           Change equalizer width_type.  Syntax for the command is :
3958           "width_type"
3959
3960       width, w
3961           Change equalizer width.  Syntax for the command is : "width"
3962
3963       gain, g
3964           Change equalizer gain.  Syntax for the command is : "gain"
3965
3966       mix, m
3967           Change equalizer mix.  Syntax for the command is : "mix"
3968
3969   extrastereo
3970       Linearly increases the difference between left and right channels which
3971       adds some sort of "live" effect to playback.
3972
3973       The filter accepts the following options:
3974
3975       m   Sets the difference coefficient (default: 2.5). 0.0 means mono
3976           sound (average of both channels), with 1.0 sound will be unchanged,
3977           with -1.0 left and right channels will be swapped.
3978
3979       c   Enable clipping. By default is enabled.
3980
3981       Commands
3982
3983       This filter supports the all above options as commands.
3984
3985   firequalizer
3986       Apply FIR Equalization using arbitrary frequency response.
3987
3988       The filter accepts the following option:
3989
3990       gain
3991           Set gain curve equation (in dB). The expression can contain
3992           variables:
3993
3994           f   the evaluated frequency
3995
3996           sr  sample rate
3997
3998           ch  channel number, set to 0 when multichannels evaluation is
3999               disabled
4000
4001           chid
4002               channel id, see libavutil/channel_layout.h, set to the first
4003               channel id when multichannels evaluation is disabled
4004
4005           chs number of channels
4006
4007           chlayout
4008               channel_layout, see libavutil/channel_layout.h
4009
4010           and functions:
4011
4012           gain_interpolate(f)
4013               interpolate gain on frequency f based on gain_entry
4014
4015           cubic_interpolate(f)
4016               same as gain_interpolate, but smoother
4017
4018           This option is also available as command. Default is
4019           gain_interpolate(f).
4020
4021       gain_entry
4022           Set gain entry for gain_interpolate function. The expression can
4023           contain functions:
4024
4025           entry(f, g)
4026               store gain entry at frequency f with value g
4027
4028           This option is also available as command.
4029
4030       delay
4031           Set filter delay in seconds. Higher value means more accurate.
4032           Default is 0.01.
4033
4034       accuracy
4035           Set filter accuracy in Hz. Lower value means more accurate.
4036           Default is 5.
4037
4038       wfunc
4039           Set window function. Acceptable values are:
4040
4041           rectangular
4042               rectangular window, useful when gain curve is already smooth
4043
4044           hann
4045               hann window (default)
4046
4047           hamming
4048               hamming window
4049
4050           blackman
4051               blackman window
4052
4053           nuttall3
4054               3-terms continuous 1st derivative nuttall window
4055
4056           mnuttall3
4057               minimum 3-terms discontinuous nuttall window
4058
4059           nuttall
4060               4-terms continuous 1st derivative nuttall window
4061
4062           bnuttall
4063               minimum 4-terms discontinuous nuttall (blackman-nuttall) window
4064
4065           bharris
4066               blackman-harris window
4067
4068           tukey
4069               tukey window
4070
4071       fixed
4072           If enabled, use fixed number of audio samples. This improves speed
4073           when filtering with large delay. Default is disabled.
4074
4075       multi
4076           Enable multichannels evaluation on gain. Default is disabled.
4077
4078       zero_phase
4079           Enable zero phase mode by subtracting timestamp to compensate
4080           delay.  Default is disabled.
4081
4082       scale
4083           Set scale used by gain. Acceptable values are:
4084
4085           linlin
4086               linear frequency, linear gain
4087
4088           linlog
4089               linear frequency, logarithmic (in dB) gain (default)
4090
4091           loglin
4092               logarithmic (in octave scale where 20 Hz is 0) frequency,
4093               linear gain
4094
4095           loglog
4096               logarithmic frequency, logarithmic gain
4097
4098       dumpfile
4099           Set file for dumping, suitable for gnuplot.
4100
4101       dumpscale
4102           Set scale for dumpfile. Acceptable values are same with scale
4103           option.  Default is linlog.
4104
4105       fft2
4106           Enable 2-channel convolution using complex FFT. This improves speed
4107           significantly.  Default is disabled.
4108
4109       min_phase
4110           Enable minimum phase impulse response. Default is disabled.
4111
4112       Examples
4113
4114       •   lowpass at 1000 Hz:
4115
4116                   firequalizer=gain='if(lt(f,1000), 0, -INF)'
4117
4118       •   lowpass at 1000 Hz with gain_entry:
4119
4120                   firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
4121
4122       •   custom equalization:
4123
4124                   firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
4125
4126       •   higher delay with zero phase to compensate delay:
4127
4128                   firequalizer=delay=0.1:fixed=on:zero_phase=on
4129
4130       •   lowpass on left channel, highpass on right channel:
4131
4132                   firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
4133                   :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
4134
4135   flanger
4136       Apply a flanging effect to the audio.
4137
4138       The filter accepts the following options:
4139
4140       delay
4141           Set base delay in milliseconds. Range from 0 to 30. Default value
4142           is 0.
4143
4144       depth
4145           Set added sweep delay in milliseconds. Range from 0 to 10. Default
4146           value is 2.
4147
4148       regen
4149           Set percentage regeneration (delayed signal feedback). Range from
4150           -95 to 95.  Default value is 0.
4151
4152       width
4153           Set percentage of delayed signal mixed with original. Range from 0
4154           to 100.  Default value is 71.
4155
4156       speed
4157           Set sweeps per second (Hz). Range from 0.1 to 10. Default value is
4158           0.5.
4159
4160       shape
4161           Set swept wave shape, can be triangular or sinusoidal.  Default
4162           value is sinusoidal.
4163
4164       phase
4165           Set swept wave percentage-shift for multi channel. Range from 0 to
4166           100.  Default value is 25.
4167
4168       interp
4169           Set delay-line interpolation, linear or quadratic.  Default is
4170           linear.
4171
4172   haas
4173       Apply Haas effect to audio.
4174
4175       Note that this makes most sense to apply on mono signals.  With this
4176       filter applied to mono signals it give some directionality and
4177       stretches its stereo image.
4178
4179       The filter accepts the following options:
4180
4181       level_in
4182           Set input level. By default is 1, or 0dB
4183
4184       level_out
4185           Set output level. By default is 1, or 0dB.
4186
4187       side_gain
4188           Set gain applied to side part of signal. By default is 1.
4189
4190       middle_source
4191           Set kind of middle source. Can be one of the following:
4192
4193           left
4194               Pick left channel.
4195
4196           right
4197               Pick right channel.
4198
4199           mid Pick middle part signal of stereo image.
4200
4201           side
4202               Pick side part signal of stereo image.
4203
4204       middle_phase
4205           Change middle phase. By default is disabled.
4206
4207       left_delay
4208           Set left channel delay. By default is 2.05 milliseconds.
4209
4210       left_balance
4211           Set left channel balance. By default is -1.
4212
4213       left_gain
4214           Set left channel gain. By default is 1.
4215
4216       left_phase
4217           Change left phase. By default is disabled.
4218
4219       right_delay
4220           Set right channel delay. By defaults is 2.12 milliseconds.
4221
4222       right_balance
4223           Set right channel balance. By default is 1.
4224
4225       right_gain
4226           Set right channel gain. By default is 1.
4227
4228       right_phase
4229           Change right phase. By default is enabled.
4230
4231   hdcd
4232       Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM
4233       stream with embedded HDCD codes is expanded into a 20-bit PCM stream.
4234
4235       The filter supports the Peak Extend and Low-level Gain Adjustment
4236       features of HDCD, and detects the Transient Filter flag.
4237
4238               ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
4239
4240       When using the filter with wav, note the default encoding for wav is
4241       16-bit, so the resulting 20-bit stream will be truncated back to
4242       16-bit. Use something like -acodec pcm_s24le after the filter to get
4243       24-bit PCM output.
4244
4245               ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
4246               ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
4247
4248       The filter accepts the following options:
4249
4250       disable_autoconvert
4251           Disable any automatic format conversion or resampling in the filter
4252           graph.
4253
4254       process_stereo
4255           Process the stereo channels together. If target_gain does not match
4256           between channels, consider it invalid and use the last valid
4257           target_gain.
4258
4259       cdt_ms
4260           Set the code detect timer period in ms.
4261
4262       force_pe
4263           Always extend peaks above -3dBFS even if PE isn't signaled.
4264
4265       analyze_mode
4266           Replace audio with a solid tone and adjust the amplitude to signal
4267           some specific aspect of the decoding process. The output file can
4268           be loaded in an audio editor alongside the original to aid
4269           analysis.
4270
4271           "analyze_mode=pe:force_pe=true" can be used to see all samples
4272           above the PE level.
4273
4274           Modes are:
4275
4276           0, off
4277               Disabled
4278
4279           1, lle
4280               Gain adjustment level at each sample
4281
4282           2, pe
4283               Samples where peak extend occurs
4284
4285           3, cdt
4286               Samples where the code detect timer is active
4287
4288           4, tgm
4289               Samples where the target gain does not match between channels
4290
4291   headphone
4292       Apply head-related transfer functions (HRTFs) to create virtual
4293       loudspeakers around the user for binaural listening via headphones.
4294       The HRIRs are provided via additional streams, for each channel one
4295       stereo input stream is needed.
4296
4297       The filter accepts the following options:
4298
4299       map Set mapping of input streams for convolution.  The argument is a
4300           '|'-separated list of channel names in order as they are given as
4301           additional stream inputs for filter.  This also specify number of
4302           input streams. Number of input streams must be not less than number
4303           of channels in first stream plus one.
4304
4305       gain
4306           Set gain applied to audio. Value is in dB. Default is 0.
4307
4308       type
4309           Set processing type. Can be time or freq. time is processing audio
4310           in time domain which is slow.  freq is processing audio in
4311           frequency domain which is fast.  Default is freq.
4312
4313       lfe Set custom gain for LFE channels. Value is in dB. Default is 0.
4314
4315       size
4316           Set size of frame in number of samples which will be processed at
4317           once.  Default value is 1024. Allowed range is from 1024 to 96000.
4318
4319       hrir
4320           Set format of hrir stream.  Default value is stereo. Alternative
4321           value is multich.  If value is set to stereo, number of additional
4322           streams should be greater or equal to number of input channels in
4323           first input stream.  Also each additional stream should have stereo
4324           number of channels.  If value is set to multich, number of
4325           additional streams should be exactly one. Also number of input
4326           channels of additional stream should be equal or greater than twice
4327           number of channels of first input stream.
4328
4329       Examples
4330
4331       •   Full example using wav files as coefficients with amovie filters
4332           for 7.1 downmix, each amovie filter use stereo file with IR
4333           coefficients as input.  The files give coefficients for each
4334           position of virtual loudspeaker:
4335
4336                   ffmpeg -i input.wav
4337                   -filter_complex "amovie=azi_270_ele_0_DFC.wav[sr];amovie=azi_90_ele_0_DFC.wav[sl];amovie=azi_225_ele_0_DFC.wav[br];amovie=azi_135_ele_0_DFC.wav[bl];amovie=azi_0_ele_0_DFC.wav,asplit[fc][lfe];amovie=azi_35_ele_0_DFC.wav[fl];amovie=azi_325_ele_0_DFC.wav[fr];[0:a][fl][fr][fc][lfe][bl][br][sl][sr]headphone=FL|FR|FC|LFE|BL|BR|SL|SR"
4338                   output.wav
4339
4340       •   Full example using wav files as coefficients with amovie filters
4341           for 7.1 downmix, but now in multich hrir format.
4342
4343                   ffmpeg -i input.wav -filter_complex "amovie=minp.wav[hrirs];[0:a][hrirs]headphone=map=FL|FR|FC|LFE|BL|BR|SL|SR:hrir=multich"
4344                   output.wav
4345
4346   highpass
4347       Apply a high-pass filter with 3dB point frequency.  The filter can be
4348       either single-pole, or double-pole (the default).  The filter roll off
4349       at 6dB per pole per octave (20dB per pole per decade).
4350
4351       The filter accepts the following options:
4352
4353       frequency, f
4354           Set frequency in Hz. Default is 3000.
4355
4356       poles, p
4357           Set number of poles. Default is 2.
4358
4359       width_type, t
4360           Set method to specify band-width of filter.
4361
4362           h   Hz
4363
4364           q   Q-Factor
4365
4366           o   octave
4367
4368           s   slope
4369
4370           k   kHz
4371
4372       width, w
4373           Specify the band-width of a filter in width_type units.  Applies
4374           only to double-pole filter.  The default is 0.707q and gives a
4375           Butterworth response.
4376
4377       mix, m
4378           How much to use filtered signal in output. Default is 1.  Range is
4379           between 0 and 1.
4380
4381       channels, c
4382           Specify which channels to filter, by default all available are
4383           filtered.
4384
4385       normalize, n
4386           Normalize biquad coefficients, by default is disabled.  Enabling it
4387           will normalize magnitude response at DC to 0dB.
4388
4389       transform, a
4390           Set transform type of IIR filter.
4391
4392           di
4393           dii
4394           tdii
4395           latt
4396           svf
4397       precision, r
4398           Set precison of filtering.
4399
4400           auto
4401               Pick automatic sample format depending on surround filters.
4402
4403           s16 Always use signed 16-bit.
4404
4405           s32 Always use signed 32-bit.
4406
4407           f32 Always use float 32-bit.
4408
4409           f64 Always use float 64-bit.
4410
4411       Commands
4412
4413       This filter supports the following commands:
4414
4415       frequency, f
4416           Change highpass frequency.  Syntax for the command is : "frequency"
4417
4418       width_type, t
4419           Change highpass width_type.  Syntax for the command is :
4420           "width_type"
4421
4422       width, w
4423           Change highpass width.  Syntax for the command is : "width"
4424
4425       mix, m
4426           Change highpass mix.  Syntax for the command is : "mix"
4427
4428   join
4429       Join multiple input streams into one multi-channel stream.
4430
4431       It accepts the following parameters:
4432
4433       inputs
4434           The number of input streams. It defaults to 2.
4435
4436       channel_layout
4437           The desired output channel layout. It defaults to stereo.
4438
4439       map Map channels from inputs to output. The argument is a '|'-separated
4440           list of mappings, each in the "input_idx.in_channel-out_channel"
4441           form. input_idx is the 0-based index of the input stream.
4442           in_channel can be either the name of the input channel (e.g. FL for
4443           front left) or its index in the specified input stream. out_channel
4444           is the name of the output channel.
4445
4446       The filter will attempt to guess the mappings when they are not
4447       specified explicitly. It does so by first trying to find an unused
4448       matching input channel and if that fails it picks the first unused
4449       input channel.
4450
4451       Join 3 inputs (with properly set channel layouts):
4452
4453               ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
4454
4455       Build a 5.1 output from 6 single-channel streams:
4456
4457               ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
4458               'join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-SL|4.0-SR|5.0-LFE'
4459               out
4460
4461   ladspa
4462       Load a LADSPA (Linux Audio Developer's Simple Plugin API) plugin.
4463
4464       To enable compilation of this filter you need to configure FFmpeg with
4465       "--enable-ladspa".
4466
4467       file, f
4468           Specifies the name of LADSPA plugin library to load. If the
4469           environment variable LADSPA_PATH is defined, the LADSPA plugin is
4470           searched in each one of the directories specified by the colon
4471           separated list in LADSPA_PATH, otherwise in the standard LADSPA
4472           paths, which are in this order: HOME/.ladspa/lib/,
4473           /usr/local/lib/ladspa/, /usr/lib/ladspa/.
4474
4475       plugin, p
4476           Specifies the plugin within the library. Some libraries contain
4477           only one plugin, but others contain many of them. If this is not
4478           set filter will list all available plugins within the specified
4479           library.
4480
4481       controls, c
4482           Set the '|' separated list of controls which are zero or more
4483           floating point values that determine the behavior of the loaded
4484           plugin (for example delay, threshold or gain).  Controls need to be
4485           defined using the following syntax:
4486           c0=value0|c1=value1|c2=value2|..., where valuei is the value set on
4487           the i-th control.  Alternatively they can be also defined using the
4488           following syntax: value0|value1|value2|..., where valuei is the
4489           value set on the i-th control.  If controls is set to "help", all
4490           available controls and their valid ranges are printed.
4491
4492       sample_rate, s
4493           Specify the sample rate, default to 44100. Only used if plugin have
4494           zero inputs.
4495
4496       nb_samples, n
4497           Set the number of samples per channel per each output frame,
4498           default is 1024. Only used if plugin have zero inputs.
4499
4500       duration, d
4501           Set the minimum duration of the sourced audio. See the Time
4502           duration section in the ffmpeg-utils(1) manual for the accepted
4503           syntax.  Note that the resulting duration may be greater than the
4504           specified duration, as the generated audio is always cut at the end
4505           of a complete frame.  If not specified, or the expressed duration
4506           is negative, the audio is supposed to be generated forever.  Only
4507           used if plugin have zero inputs.
4508
4509       latency, l
4510           Enable latency compensation, by default is disabled.  Only used if
4511           plugin have inputs.
4512
4513       Examples
4514
4515       •   List all available plugins within amp (LADSPA example plugin)
4516           library:
4517
4518                   ladspa=file=amp
4519
4520       •   List all available controls and their valid ranges for "vcf_notch"
4521           plugin from "VCF" library:
4522
4523                   ladspa=f=vcf:p=vcf_notch:c=help
4524
4525       •   Simulate low quality audio equipment using "Computer Music Toolkit"
4526           (CMT) plugin library:
4527
4528                   ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
4529
4530       •   Add reverberation to the audio using TAP-plugins (Tom's Audio
4531           Processing plugins):
4532
4533                   ladspa=file=tap_reverb:tap_reverb
4534
4535       •   Generate white noise, with 0.2 amplitude:
4536
4537                   ladspa=file=cmt:noise_source_white:c=c0=.2
4538
4539       •   Generate 20 bpm clicks using plugin "C* Click - Metronome" from the
4540           "C* Audio Plugin Suite" (CAPS) library:
4541
4542                   ladspa=file=caps:Click:c=c1=20'
4543
4544       •   Apply "C* Eq10X2 - Stereo 10-band equaliser" effect:
4545
4546                   ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
4547
4548       •   Increase volume by 20dB using fast lookahead limiter from Steve
4549           Harris "SWH Plugins" collection:
4550
4551                   ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2
4552
4553       •   Attenuate low frequencies using Multiband EQ from Steve Harris "SWH
4554           Plugins" collection:
4555
4556                   ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0
4557
4558       •   Reduce stereo image using "Narrower" from the "C* Audio Plugin
4559           Suite" (CAPS) library:
4560
4561                   ladspa=caps:Narrower
4562
4563       •   Another white noise, now using "C* Audio Plugin Suite" (CAPS)
4564           library:
4565
4566                   ladspa=caps:White:.2
4567
4568       •   Some fractal noise, using "C* Audio Plugin Suite" (CAPS) library:
4569
4570                   ladspa=caps:Fractal:c=c1=1
4571
4572       •   Dynamic volume normalization using "VLevel" plugin:
4573
4574                   ladspa=vlevel-ladspa:vlevel_mono
4575
4576       Commands
4577
4578       This filter supports the following commands:
4579
4580       cN  Modify the N-th control value.
4581
4582           If the specified value is not valid, it is ignored and prior one is
4583           kept.
4584
4585   loudnorm
4586       EBU R128 loudness normalization. Includes both dynamic and linear
4587       normalization modes.  Support for both single pass (livestreams, files)
4588       and double pass (files) modes.  This algorithm can target IL, LRA, and
4589       maximum true peak. In dynamic mode, to accurately detect true peaks,
4590       the audio stream will be upsampled to 192 kHz.  Use the "-ar" option or
4591       "aresample" filter to explicitly set an output sample rate.
4592
4593       The filter accepts the following options:
4594
4595       I, i
4596           Set integrated loudness target.  Range is -70.0 - -5.0. Default
4597           value is -24.0.
4598
4599       LRA, lra
4600           Set loudness range target.  Range is 1.0 - 20.0. Default value is
4601           7.0.
4602
4603       TP, tp
4604           Set maximum true peak.  Range is -9.0 - +0.0. Default value is
4605           -2.0.
4606
4607       measured_I, measured_i
4608           Measured IL of input file.  Range is -99.0 - +0.0.
4609
4610       measured_LRA, measured_lra
4611           Measured LRA of input file.  Range is  0.0 - 99.0.
4612
4613       measured_TP, measured_tp
4614           Measured true peak of input file.  Range is  -99.0 - +99.0.
4615
4616       measured_thresh
4617           Measured threshold of input file.  Range is -99.0 - +0.0.
4618
4619       offset
4620           Set offset gain. Gain is applied before the true-peak limiter.
4621           Range is  -99.0 - +99.0. Default is +0.0.
4622
4623       linear
4624           Normalize by linearly scaling the source audio.  "measured_I",
4625           "measured_LRA", "measured_TP", and "measured_thresh" must all be
4626           specified. Target LRA shouldn't be lower than source LRA and the
4627           change in integrated loudness shouldn't result in a true peak which
4628           exceeds the target TP. If any of these conditions aren't met,
4629           normalization mode will revert to dynamic.  Options are "true" or
4630           "false". Default is "true".
4631
4632       dual_mono
4633           Treat mono input files as "dual-mono". If a mono file is intended
4634           for playback on a stereo system, its EBU R128 measurement will be
4635           perceptually incorrect.  If set to "true", this option will
4636           compensate for this effect.  Multi-channel input files are not
4637           affected by this option.  Options are true or false. Default is
4638           false.
4639
4640       print_format
4641           Set print format for stats. Options are summary, json, or none.
4642           Default value is none.
4643
4644   lowpass
4645       Apply a low-pass filter with 3dB point frequency.  The filter can be
4646       either single-pole or double-pole (the default).  The filter roll off
4647       at 6dB per pole per octave (20dB per pole per decade).
4648
4649       The filter accepts the following options:
4650
4651       frequency, f
4652           Set frequency in Hz. Default is 500.
4653
4654       poles, p
4655           Set number of poles. Default is 2.
4656
4657       width_type, t
4658           Set method to specify band-width of filter.
4659
4660           h   Hz
4661
4662           q   Q-Factor
4663
4664           o   octave
4665
4666           s   slope
4667
4668           k   kHz
4669
4670       width, w
4671           Specify the band-width of a filter in width_type units.  Applies
4672           only to double-pole filter.  The default is 0.707q and gives a
4673           Butterworth response.
4674
4675       mix, m
4676           How much to use filtered signal in output. Default is 1.  Range is
4677           between 0 and 1.
4678
4679       channels, c
4680           Specify which channels to filter, by default all available are
4681           filtered.
4682
4683       normalize, n
4684           Normalize biquad coefficients, by default is disabled.  Enabling it
4685           will normalize magnitude response at DC to 0dB.
4686
4687       transform, a
4688           Set transform type of IIR filter.
4689
4690           di
4691           dii
4692           tdii
4693           latt
4694           svf
4695       precision, r
4696           Set precison of filtering.
4697
4698           auto
4699               Pick automatic sample format depending on surround filters.
4700
4701           s16 Always use signed 16-bit.
4702
4703           s32 Always use signed 32-bit.
4704
4705           f32 Always use float 32-bit.
4706
4707           f64 Always use float 64-bit.
4708
4709       Examples
4710
4711       •   Lowpass only LFE channel, it LFE is not present it does nothing:
4712
4713                   lowpass=c=LFE
4714
4715       Commands
4716
4717       This filter supports the following commands:
4718
4719       frequency, f
4720           Change lowpass frequency.  Syntax for the command is : "frequency"
4721
4722       width_type, t
4723           Change lowpass width_type.  Syntax for the command is :
4724           "width_type"
4725
4726       width, w
4727           Change lowpass width.  Syntax for the command is : "width"
4728
4729       mix, m
4730           Change lowpass mix.  Syntax for the command is : "mix"
4731
4732   lv2
4733       Load a LV2 (LADSPA Version 2) plugin.
4734
4735       To enable compilation of this filter you need to configure FFmpeg with
4736       "--enable-lv2".
4737
4738       plugin, p
4739           Specifies the plugin URI. You may need to escape ':'.
4740
4741       controls, c
4742           Set the '|' separated list of controls which are zero or more
4743           floating point values that determine the behavior of the loaded
4744           plugin (for example delay, threshold or gain).  If controls is set
4745           to "help", all available controls and their valid ranges are
4746           printed.
4747
4748       sample_rate, s
4749           Specify the sample rate, default to 44100. Only used if plugin have
4750           zero inputs.
4751
4752       nb_samples, n
4753           Set the number of samples per channel per each output frame,
4754           default is 1024. Only used if plugin have zero inputs.
4755
4756       duration, d
4757           Set the minimum duration of the sourced audio. See the Time
4758           duration section in the ffmpeg-utils(1) manual for the accepted
4759           syntax.  Note that the resulting duration may be greater than the
4760           specified duration, as the generated audio is always cut at the end
4761           of a complete frame.  If not specified, or the expressed duration
4762           is negative, the audio is supposed to be generated forever.  Only
4763           used if plugin have zero inputs.
4764
4765       Examples
4766
4767       •   Apply bass enhancer plugin from Calf:
4768
4769                   lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2
4770
4771       •   Apply vinyl plugin from Calf:
4772
4773                   lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
4774
4775       •   Apply bit crusher plugin from ArtyFX:
4776
4777                   lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3
4778
4779   mcompand
4780       Multiband Compress or expand the audio's dynamic range.
4781
4782       The input audio is divided into bands using 4th order Linkwitz-Riley
4783       IIRs.  This is akin to the crossover of a loudspeaker, and results in
4784       flat frequency response when absent compander action.
4785
4786       It accepts the following parameters:
4787
4788       args
4789           This option syntax is: attack,decay,[attack,decay..] soft-knee
4790           points crossover_frequency [delay [initial_volume [gain]]] |
4791           attack,decay ...  For explanation of each item refer to compand
4792           filter documentation.
4793
4794   pan
4795       Mix channels with specific gain levels. The filter accepts the output
4796       channel layout followed by a set of channels definitions.
4797
4798       This filter is also designed to efficiently remap the channels of an
4799       audio stream.
4800
4801       The filter accepts parameters of the form: "l|outdef|outdef|..."
4802
4803       l   output channel layout or number of channels
4804
4805       outdef
4806           output channel specification, of the form:
4807           "out_name=[gain*]in_name[(+-)[gain*]in_name...]"
4808
4809       out_name
4810           output channel to define, either a channel name (FL, FR, etc.) or a
4811           channel number (c0, c1, etc.)
4812
4813       gain
4814           multiplicative coefficient for the channel, 1 leaving the volume
4815           unchanged
4816
4817       in_name
4818           input channel to use, see out_name for details; it is not possible
4819           to mix named and numbered input channels
4820
4821       If the `=' in a channel specification is replaced by `<', then the
4822       gains for that specification will be renormalized so that the total is
4823       1, thus avoiding clipping noise.
4824
4825       Mixing examples
4826
4827       For example, if you want to down-mix from stereo to mono, but with a
4828       bigger factor for the left channel:
4829
4830               pan=1c|c0=0.9*c0+0.1*c1
4831
4832       A customized down-mix to stereo that works automatically for 3-, 4-, 5-
4833       and 7-channels surround:
4834
4835               pan=stereo| FL < FL + 0.5*FC + 0.6*BL + 0.6*SL | FR < FR + 0.5*FC + 0.6*BR + 0.6*SR
4836
4837       Note that ffmpeg integrates a default down-mix (and up-mix) system that
4838       should be preferred (see "-ac" option) unless you have very specific
4839       needs.
4840
4841       Remapping examples
4842
4843       The channel remapping will be effective if, and only if:
4844
4845       *<gain coefficients are zeroes or ones,>
4846       *<only one input per channel output,>
4847
4848       If all these conditions are satisfied, the filter will notify the user
4849       ("Pure channel mapping detected"), and use an optimized and lossless
4850       method to do the remapping.
4851
4852       For example, if you have a 5.1 source and want a stereo audio stream by
4853       dropping the extra channels:
4854
4855               pan="stereo| c0=FL | c1=FR"
4856
4857       Given the same source, you can also switch front left and front right
4858       channels and keep the input channel layout:
4859
4860               pan="5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5"
4861
4862       If the input is a stereo audio stream, you can mute the front left
4863       channel (and still keep the stereo channel layout) with:
4864
4865               pan="stereo|c1=c1"
4866
4867       Still with a stereo audio stream input, you can copy the right channel
4868       in both front left and right:
4869
4870               pan="stereo| c0=FR | c1=FR"
4871
4872   replaygain
4873       ReplayGain scanner filter. This filter takes an audio stream as an
4874       input and outputs it unchanged.  At end of filtering it displays
4875       "track_gain" and "track_peak".
4876
4877   resample
4878       Convert the audio sample format, sample rate and channel layout. It is
4879       not meant to be used directly.
4880
4881   rubberband
4882       Apply time-stretching and pitch-shifting with librubberband.
4883
4884       To enable compilation of this filter, you need to configure FFmpeg with
4885       "--enable-librubberband".
4886
4887       The filter accepts the following options:
4888
4889       tempo
4890           Set tempo scale factor.
4891
4892       pitch
4893           Set pitch scale factor.
4894
4895       transients
4896           Set transients detector.  Possible values are:
4897
4898           crisp
4899           mixed
4900           smooth
4901       detector
4902           Set detector.  Possible values are:
4903
4904           compound
4905           percussive
4906           soft
4907       phase
4908           Set phase.  Possible values are:
4909
4910           laminar
4911           independent
4912       window
4913           Set processing window size.  Possible values are:
4914
4915           standard
4916           short
4917           long
4918       smoothing
4919           Set smoothing.  Possible values are:
4920
4921           off
4922           on
4923       formant
4924           Enable formant preservation when shift pitching.  Possible values
4925           are:
4926
4927           shifted
4928           preserved
4929       pitchq
4930           Set pitch quality.  Possible values are:
4931
4932           quality
4933           speed
4934           consistency
4935       channels
4936           Set channels.  Possible values are:
4937
4938           apart
4939           together
4940
4941       Commands
4942
4943       This filter supports the following commands:
4944
4945       tempo
4946           Change filter tempo scale factor.  Syntax for the command is :
4947           "tempo"
4948
4949       pitch
4950           Change filter pitch scale factor.  Syntax for the command is :
4951           "pitch"
4952
4953   sidechaincompress
4954       This filter acts like normal compressor but has the ability to compress
4955       detected signal using second input signal.  It needs two input streams
4956       and returns one output stream.  First input stream will be processed
4957       depending on second stream signal.  The filtered signal then can be
4958       filtered with other filters in later stages of processing. See pan and
4959       amerge filter.
4960
4961       The filter accepts the following options:
4962
4963       level_in
4964           Set input gain. Default is 1. Range is between 0.015625 and 64.
4965
4966       mode
4967           Set mode of compressor operation. Can be "upward" or "downward".
4968           Default is "downward".
4969
4970       threshold
4971           If a signal of second stream raises above this level it will affect
4972           the gain reduction of first stream.  By default is 0.125. Range is
4973           between 0.00097563 and 1.
4974
4975       ratio
4976           Set a ratio about which the signal is reduced. 1:2 means that if
4977           the level raised 4dB above the threshold, it will be only 2dB above
4978           after the reduction.  Default is 2. Range is between 1 and 20.
4979
4980       attack
4981           Amount of milliseconds the signal has to rise above the threshold
4982           before gain reduction starts. Default is 20. Range is between 0.01
4983           and 2000.
4984
4985       release
4986           Amount of milliseconds the signal has to fall below the threshold
4987           before reduction is decreased again. Default is 250. Range is
4988           between 0.01 and 9000.
4989
4990       makeup
4991           Set the amount by how much signal will be amplified after
4992           processing.  Default is 1. Range is from 1 to 64.
4993
4994       knee
4995           Curve the sharp knee around the threshold to enter gain reduction
4996           more softly.  Default is 2.82843. Range is between 1 and 8.
4997
4998       link
4999           Choose if the "average" level between all channels of side-chain
5000           stream or the louder("maximum") channel of side-chain stream
5001           affects the reduction. Default is "average".
5002
5003       detection
5004           Should the exact signal be taken in case of "peak" or an RMS one in
5005           case of "rms". Default is "rms" which is mainly smoother.
5006
5007       level_sc
5008           Set sidechain gain. Default is 1. Range is between 0.015625 and 64.
5009
5010       mix How much to use compressed signal in output. Default is 1.  Range
5011           is between 0 and 1.
5012
5013       Commands
5014
5015       This filter supports the all above options as commands.
5016
5017       Examples
5018
5019       •   Full ffmpeg example taking 2 audio inputs, 1st input to be
5020           compressed depending on the signal of 2nd input and later
5021           compressed signal to be merged with 2nd input:
5022
5023                   ffmpeg -i main.flac -i sidechain.flac -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge"
5024
5025   sidechaingate
5026       A sidechain gate acts like a normal (wideband) gate but has the ability
5027       to filter the detected signal before sending it to the gain reduction
5028       stage.  Normally a gate uses the full range signal to detect a level
5029       above the threshold.  For example: If you cut all lower frequencies
5030       from your sidechain signal the gate will decrease the volume of your
5031       track only if not enough highs appear. With this technique you are able
5032       to reduce the resonation of a natural drum or remove "rumbling" of
5033       muted strokes from a heavily distorted guitar.  It needs two input
5034       streams and returns one output stream.  First input stream will be
5035       processed depending on second stream signal.
5036
5037       The filter accepts the following options:
5038
5039       level_in
5040           Set input level before filtering.  Default is 1. Allowed range is
5041           from 0.015625 to 64.
5042
5043       mode
5044           Set the mode of operation. Can be "upward" or "downward".  Default
5045           is "downward". If set to "upward" mode, higher parts of signal will
5046           be amplified, expanding dynamic range in upward direction.
5047           Otherwise, in case of "downward" lower parts of signal will be
5048           reduced.
5049
5050       range
5051           Set the level of gain reduction when the signal is below the
5052           threshold.  Default is 0.06125. Allowed range is from 0 to 1.
5053           Setting this to 0 disables reduction and then filter behaves like
5054           expander.
5055
5056       threshold
5057           If a signal rises above this level the gain reduction is released.
5058           Default is 0.125. Allowed range is from 0 to 1.
5059
5060       ratio
5061           Set a ratio about which the signal is reduced.  Default is 2.
5062           Allowed range is from 1 to 9000.
5063
5064       attack
5065           Amount of milliseconds the signal has to rise above the threshold
5066           before gain reduction stops.  Default is 20 milliseconds. Allowed
5067           range is from 0.01 to 9000.
5068
5069       release
5070           Amount of milliseconds the signal has to fall below the threshold
5071           before the reduction is increased again. Default is 250
5072           milliseconds.  Allowed range is from 0.01 to 9000.
5073
5074       makeup
5075           Set amount of amplification of signal after processing.  Default is
5076           1. Allowed range is from 1 to 64.
5077
5078       knee
5079           Curve the sharp knee around the threshold to enter gain reduction
5080           more softly.  Default is 2.828427125. Allowed range is from 1 to 8.
5081
5082       detection
5083           Choose if exact signal should be taken for detection or an RMS like
5084           one.  Default is rms. Can be peak or rms.
5085
5086       link
5087           Choose if the average level between all channels or the louder
5088           channel affects the reduction.  Default is average. Can be average
5089           or maximum.
5090
5091       level_sc
5092           Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
5093
5094       Commands
5095
5096       This filter supports the all above options as commands.
5097
5098   silencedetect
5099       Detect silence in an audio stream.
5100
5101       This filter logs a message when it detects that the input audio volume
5102       is less or equal to a noise tolerance value for a duration greater or
5103       equal to the minimum detected noise duration.
5104
5105       The printed times and duration are expressed in seconds. The
5106       "lavfi.silence_start" or "lavfi.silence_start.X" metadata key is set on
5107       the first frame whose timestamp equals or exceeds the detection
5108       duration and it contains the timestamp of the first frame of the
5109       silence.
5110
5111       The "lavfi.silence_duration" or "lavfi.silence_duration.X" and
5112       "lavfi.silence_end" or "lavfi.silence_end.X" metadata keys are set on
5113       the first frame after the silence. If mono is enabled, and each channel
5114       is evaluated separately, the ".X" suffixed keys are used, and "X"
5115       corresponds to the channel number.
5116
5117       The filter accepts the following options:
5118
5119       noise, n
5120           Set noise tolerance. Can be specified in dB (in case "dB" is
5121           appended to the specified value) or amplitude ratio. Default is
5122           -60dB, or 0.001.
5123
5124       duration, d
5125           Set silence duration until notification (default is 2 seconds). See
5126           the Time duration section in the ffmpeg-utils(1) manual for the
5127           accepted syntax.
5128
5129       mono, m
5130           Process each channel separately, instead of combined. By default is
5131           disabled.
5132
5133       Examples
5134
5135       •   Detect 5 seconds of silence with -50dB noise tolerance:
5136
5137                   silencedetect=n=-50dB:d=5
5138
5139       •   Complete example with ffmpeg to detect silence with 0.0001 noise
5140           tolerance in silence.mp3:
5141
5142                   ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
5143
5144   silenceremove
5145       Remove silence from the beginning, middle or end of the audio.
5146
5147       The filter accepts the following options:
5148
5149       start_periods
5150           This value is used to indicate if audio should be trimmed at
5151           beginning of the audio. A value of zero indicates no silence should
5152           be trimmed from the beginning. When specifying a non-zero value, it
5153           trims audio up until it finds non-silence. Normally, when trimming
5154           silence from beginning of audio the start_periods will be 1 but it
5155           can be increased to higher values to trim all audio up to specific
5156           count of non-silence periods.  Default value is 0.
5157
5158       start_duration
5159           Specify the amount of time that non-silence must be detected before
5160           it stops trimming audio. By increasing the duration, bursts of
5161           noises can be treated as silence and trimmed off. Default value is
5162           0.
5163
5164       start_threshold
5165           This indicates what sample value should be treated as silence. For
5166           digital audio, a value of 0 may be fine but for audio recorded from
5167           analog, you may wish to increase the value to account for
5168           background noise.  Can be specified in dB (in case "dB" is appended
5169           to the specified value) or amplitude ratio. Default value is 0.
5170
5171       start_silence
5172           Specify max duration of silence at beginning that will be kept
5173           after trimming. Default is 0, which is equal to trimming all
5174           samples detected as silence.
5175
5176       start_mode
5177           Specify mode of detection of silence end in start of multi-channel
5178           audio.  Can be any or all. Default is any.  With any, any sample
5179           that is detected as non-silence will cause stopped trimming of
5180           silence.  With all, only if all channels are detected as non-
5181           silence will cause stopped trimming of silence.
5182
5183       stop_periods
5184           Set the count for trimming silence from the end of audio.  To
5185           remove silence from the middle of a file, specify a stop_periods
5186           that is negative. This value is then treated as a positive value
5187           and is used to indicate the effect should restart processing as
5188           specified by start_periods, making it suitable for removing periods
5189           of silence in the middle of the audio.  Default value is 0.
5190
5191       stop_duration
5192           Specify a duration of silence that must exist before audio is not
5193           copied any more. By specifying a higher duration, silence that is
5194           wanted can be left in the audio.  Default value is 0.
5195
5196       stop_threshold
5197           This is the same as start_threshold but for trimming silence from
5198           the end of audio.  Can be specified in dB (in case "dB" is appended
5199           to the specified value) or amplitude ratio. Default value is 0.
5200
5201       stop_silence
5202           Specify max duration of silence at end that will be kept after
5203           trimming. Default is 0, which is equal to trimming all samples
5204           detected as silence.
5205
5206       stop_mode
5207           Specify mode of detection of silence start in end of multi-channel
5208           audio.  Can be any or all. Default is any.  With any, any sample
5209           that is detected as non-silence will cause stopped trimming of
5210           silence.  With all, only if all channels are detected as non-
5211           silence will cause stopped trimming of silence.
5212
5213       detection
5214           Set how is silence detected. Can be "rms" or "peak". Second is
5215           faster and works better with digital silence which is exactly 0.
5216           Default value is "rms".
5217
5218       window
5219           Set duration in number of seconds used to calculate size of window
5220           in number of samples for detecting silence.  Default value is 0.02.
5221           Allowed range is from 0 to 10.
5222
5223       Examples
5224
5225       •   The following example shows how this filter can be used to start a
5226           recording that does not contain the delay at the start which
5227           usually occurs between pressing the record button and the start of
5228           the performance:
5229
5230                   silenceremove=start_periods=1:start_duration=5:start_threshold=0.02
5231
5232       •   Trim all silence encountered from beginning to end where there is
5233           more than 1 second of silence in audio:
5234
5235                   silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB
5236
5237       •   Trim all digital silence samples, using peak detection, from
5238           beginning to end where there is more than 0 samples of digital
5239           silence in audio and digital silence is detected in all channels at
5240           same positions in stream:
5241
5242                   silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0
5243
5244   sofalizer
5245       SOFAlizer uses head-related transfer functions (HRTFs) to create
5246       virtual loudspeakers around the user for binaural listening via
5247       headphones (audio formats up to 9 channels supported).  The HRTFs are
5248       stored in SOFA files (see <http://www.sofacoustics.org/> for a
5249       database).  SOFAlizer is developed at the Acoustics Research Institute
5250       (ARI) of the Austrian Academy of Sciences.
5251
5252       To enable compilation of this filter you need to configure FFmpeg with
5253       "--enable-libmysofa".
5254
5255       The filter accepts the following options:
5256
5257       sofa
5258           Set the SOFA file used for rendering.
5259
5260       gain
5261           Set gain applied to audio. Value is in dB. Default is 0.
5262
5263       rotation
5264           Set rotation of virtual loudspeakers in deg. Default is 0.
5265
5266       elevation
5267           Set elevation of virtual speakers in deg. Default is 0.
5268
5269       radius
5270           Set distance in meters between loudspeakers and the listener with
5271           near-field HRTFs. Default is 1.
5272
5273       type
5274           Set processing type. Can be time or freq. time is processing audio
5275           in time domain which is slow.  freq is processing audio in
5276           frequency domain which is fast.  Default is freq.
5277
5278       speakers
5279           Set custom positions of virtual loudspeakers. Syntax for this
5280           option is: <CH> <AZIM> <ELEV>[|<CH> <AZIM> <ELEV>|...].  Each
5281           virtual loudspeaker is described with short channel name following
5282           with azimuth and elevation in degrees.  Each virtual loudspeaker
5283           description is separated by '|'.  For example to override front
5284           left and front right channel positions use: 'speakers=FL 45 15|FR
5285           345 15'.  Descriptions with unrecognised channel names are ignored.
5286
5287       lfegain
5288           Set custom gain for LFE channels. Value is in dB. Default is 0.
5289
5290       framesize
5291           Set custom frame size in number of samples. Default is 1024.
5292           Allowed range is from 1024 to 96000. Only used if option type is
5293           set to freq.
5294
5295       normalize
5296           Should all IRs be normalized upon importing SOFA file.  By default
5297           is enabled.
5298
5299       interpolate
5300           Should nearest IRs be interpolated with neighbor IRs if exact
5301           position does not match. By default is disabled.
5302
5303       minphase
5304           Minphase all IRs upon loading of SOFA file. By default is disabled.
5305
5306       anglestep
5307           Set neighbor search angle step. Only used if option interpolate is
5308           enabled.
5309
5310       radstep
5311           Set neighbor search radius step. Only used if option interpolate is
5312           enabled.
5313
5314       Examples
5315
5316       •   Using ClubFritz6 sofa file:
5317
5318                   sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=1
5319
5320       •   Using ClubFritz12 sofa file and bigger radius with small rotation:
5321
5322                   sofalizer=sofa=/path/to/ClubFritz12.sofa:type=freq:radius=2:rotation=5
5323
5324       •   Similar as above but with custom speaker positions for front left,
5325           front right, back left and back right and also with custom gain:
5326
5327                   "sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=2:speakers=FL 45|FR 315|BL 135|BR 225:gain=28"
5328
5329   speechnorm
5330       Speech Normalizer.
5331
5332       This filter expands or compresses each half-cycle of audio samples
5333       (local set of samples all above or all below zero and between two
5334       nearest zero crossings) depending on threshold value, so audio reaches
5335       target peak value under conditions controlled by below options.
5336
5337       The filter accepts the following options:
5338
5339       peak, p
5340           Set the expansion target peak value. This specifies the highest
5341           allowed absolute amplitude level for the normalized audio input.
5342           Default value is 0.95. Allowed range is from 0.0 to 1.0.
5343
5344       expansion, e
5345           Set the maximum expansion factor. Allowed range is from 1.0 to
5346           50.0. Default value is 2.0.  This option controls maximum local
5347           half-cycle of samples expansion. The maximum expansion would be
5348           such that local peak value reaches target peak value but never to
5349           surpass it and that ratio between new and previous peak value does
5350           not surpass this option value.
5351
5352       compression, c
5353           Set the maximum compression factor. Allowed range is from 1.0 to
5354           50.0. Default value is 2.0.  This option controls maximum local
5355           half-cycle of samples compression. This option is used only if
5356           threshold option is set to value greater than 0.0, then in such
5357           cases when local peak is lower or same as value set by threshold
5358           all samples belonging to that peak's half-cycle will be compressed
5359           by current compression factor.
5360
5361       threshold, t
5362           Set the threshold value. Default value is 0.0. Allowed range is
5363           from 0.0 to 1.0.  This option specifies which half-cycles of
5364           samples will be compressed and which will be expanded.  Any half-
5365           cycle samples with their local peak value below or same as this
5366           option value will be compressed by current compression factor,
5367           otherwise, if greater than threshold value they will be expanded
5368           with expansion factor so that it could reach peak target value but
5369           never surpass it.
5370
5371       raise, r
5372           Set the expansion raising amount per each half-cycle of samples.
5373           Default value is 0.001.  Allowed range is from 0.0 to 1.0. This
5374           controls how fast expansion factor is raised per each new half-
5375           cycle until it reaches expansion value.  Setting this options too
5376           high may lead to distortions.
5377
5378       fall, f
5379           Set the compression raising amount per each half-cycle of samples.
5380           Default value is 0.001.  Allowed range is from 0.0 to 1.0. This
5381           controls how fast compression factor is raised per each new half-
5382           cycle until it reaches compression value.
5383
5384       channels, h
5385           Specify which channels to filter, by default all available channels
5386           are filtered.
5387
5388       invert, i
5389           Enable inverted filtering, by default is disabled. This inverts
5390           interpretation of threshold option. When enabled any half-cycle of
5391           samples with their local peak value below or same as threshold
5392           option will be expanded otherwise it will be compressed.
5393
5394       link, l
5395           Link channels when calculating gain applied to each filtered
5396           channel sample, by default is disabled.  When disabled each
5397           filtered channel gain calculation is independent, otherwise when
5398           this option is enabled the minimum of all possible gains for each
5399           filtered channel is used.
5400
5401       Commands
5402
5403       This filter supports the all above options as commands.
5404
5405   stereotools
5406       This filter has some handy utilities to manage stereo signals, for
5407       converting M/S stereo recordings to L/R signal while having control
5408       over the parameters or spreading the stereo image of master track.
5409
5410       The filter accepts the following options:
5411
5412       level_in
5413           Set input level before filtering for both channels. Defaults is 1.
5414           Allowed range is from 0.015625 to 64.
5415
5416       level_out
5417           Set output level after filtering for both channels. Defaults is 1.
5418           Allowed range is from 0.015625 to 64.
5419
5420       balance_in
5421           Set input balance between both channels. Default is 0.  Allowed
5422           range is from -1 to 1.
5423
5424       balance_out
5425           Set output balance between both channels. Default is 0.  Allowed
5426           range is from -1 to 1.
5427
5428       softclip
5429           Enable softclipping. Results in analog distortion instead of harsh
5430           digital 0dB clipping. Disabled by default.
5431
5432       mutel
5433           Mute the left channel. Disabled by default.
5434
5435       muter
5436           Mute the right channel. Disabled by default.
5437
5438       phasel
5439           Change the phase of the left channel. Disabled by default.
5440
5441       phaser
5442           Change the phase of the right channel. Disabled by default.
5443
5444       mode
5445           Set stereo mode. Available values are:
5446
5447           lr>lr
5448               Left/Right to Left/Right, this is default.
5449
5450           lr>ms
5451               Left/Right to Mid/Side.
5452
5453           ms>lr
5454               Mid/Side to Left/Right.
5455
5456           lr>ll
5457               Left/Right to Left/Left.
5458
5459           lr>rr
5460               Left/Right to Right/Right.
5461
5462           lr>l+r
5463               Left/Right to Left + Right.
5464
5465           lr>rl
5466               Left/Right to Right/Left.
5467
5468           ms>ll
5469               Mid/Side to Left/Left.
5470
5471           ms>rr
5472               Mid/Side to Right/Right.
5473
5474           ms>rl
5475               Mid/Side to Right/Left.
5476
5477           lr>l-r
5478               Left/Right to Left - Right.
5479
5480       slev
5481           Set level of side signal. Default is 1.  Allowed range is from
5482           0.015625 to 64.
5483
5484       sbal
5485           Set balance of side signal. Default is 0.  Allowed range is from -1
5486           to 1.
5487
5488       mlev
5489           Set level of the middle signal. Default is 1.  Allowed range is
5490           from 0.015625 to 64.
5491
5492       mpan
5493           Set middle signal pan. Default is 0. Allowed range is from -1 to 1.
5494
5495       base
5496           Set stereo base between mono and inversed channels. Default is 0.
5497           Allowed range is from -1 to 1.
5498
5499       delay
5500           Set delay in milliseconds how much to delay left from right channel
5501           and vice versa. Default is 0. Allowed range is from -20 to 20.
5502
5503       sclevel
5504           Set S/C level. Default is 1. Allowed range is from 1 to 100.
5505
5506       phase
5507           Set the stereo phase in degrees. Default is 0. Allowed range is
5508           from 0 to 360.
5509
5510       bmode_in, bmode_out
5511           Set balance mode for balance_in/balance_out option.
5512
5513           Can be one of the following:
5514
5515           balance
5516               Classic balance mode. Attenuate one channel at time.  Gain is
5517               raised up to 1.
5518
5519           amplitude
5520               Similar as classic mode above but gain is raised up to 2.
5521
5522           power
5523               Equal power distribution, from -6dB to +6dB range.
5524
5525       Commands
5526
5527       This filter supports the all above options as commands.
5528
5529       Examples
5530
5531       •   Apply karaoke like effect:
5532
5533                   stereotools=mlev=0.015625
5534
5535       •   Convert M/S signal to L/R:
5536
5537                   "stereotools=mode=ms>lr"
5538
5539   stereowiden
5540       This filter enhance the stereo effect by suppressing signal common to
5541       both channels and by delaying the signal of left into right and vice
5542       versa, thereby widening the stereo effect.
5543
5544       The filter accepts the following options:
5545
5546       delay
5547           Time in milliseconds of the delay of left signal into right and
5548           vice versa.  Default is 20 milliseconds.
5549
5550       feedback
5551           Amount of gain in delayed signal into right and vice versa. Gives a
5552           delay effect of left signal in right output and vice versa which
5553           gives widening effect. Default is 0.3.
5554
5555       crossfeed
5556           Cross feed of left into right with inverted phase. This helps in
5557           suppressing the mono. If the value is 1 it will cancel all the
5558           signal common to both channels. Default is 0.3.
5559
5560       drymix
5561           Set level of input signal of original channel. Default is 0.8.
5562
5563       Commands
5564
5565       This filter supports the all above options except "delay" as commands.
5566
5567   superequalizer
5568       Apply 18 band equalizer.
5569
5570       The filter accepts the following options:
5571
5572       1b  Set 65Hz band gain.
5573
5574       2b  Set 92Hz band gain.
5575
5576       3b  Set 131Hz band gain.
5577
5578       4b  Set 185Hz band gain.
5579
5580       5b  Set 262Hz band gain.
5581
5582       6b  Set 370Hz band gain.
5583
5584       7b  Set 523Hz band gain.
5585
5586       8b  Set 740Hz band gain.
5587
5588       9b  Set 1047Hz band gain.
5589
5590       10b Set 1480Hz band gain.
5591
5592       11b Set 2093Hz band gain.
5593
5594       12b Set 2960Hz band gain.
5595
5596       13b Set 4186Hz band gain.
5597
5598       14b Set 5920Hz band gain.
5599
5600       15b Set 8372Hz band gain.
5601
5602       16b Set 11840Hz band gain.
5603
5604       17b Set 16744Hz band gain.
5605
5606       18b Set 20000Hz band gain.
5607
5608   surround
5609       Apply audio surround upmix filter.
5610
5611       This filter allows to produce multichannel output from audio stream.
5612
5613       The filter accepts the following options:
5614
5615       chl_out
5616           Set output channel layout. By default, this is 5.1.
5617
5618           See the Channel Layout section in the ffmpeg-utils(1) manual for
5619           the required syntax.
5620
5621       chl_in
5622           Set input channel layout. By default, this is stereo.
5623
5624           See the Channel Layout section in the ffmpeg-utils(1) manual for
5625           the required syntax.
5626
5627       level_in
5628           Set input volume level. By default, this is 1.
5629
5630       level_out
5631           Set output volume level. By default, this is 1.
5632
5633       lfe Enable LFE channel output if output channel layout has it. By
5634           default, this is enabled.
5635
5636       lfe_low
5637           Set LFE low cut off frequency. By default, this is 128 Hz.
5638
5639       lfe_high
5640           Set LFE high cut off frequency. By default, this is 256 Hz.
5641
5642       lfe_mode
5643           Set LFE mode, can be add or sub. Default is add.  In add mode, LFE
5644           channel is created from input audio and added to output.  In sub
5645           mode, LFE channel is created from input audio and added to output
5646           but also all non-LFE output channels are subtracted with output LFE
5647           channel.
5648
5649       angle
5650           Set angle of stereo surround transform, Allowed range is from 0 to
5651           360.  Default is 90.
5652
5653       fc_in
5654           Set front center input volume. By default, this is 1.
5655
5656       fc_out
5657           Set front center output volume. By default, this is 1.
5658
5659       fl_in
5660           Set front left input volume. By default, this is 1.
5661
5662       fl_out
5663           Set front left output volume. By default, this is 1.
5664
5665       fr_in
5666           Set front right input volume. By default, this is 1.
5667
5668       fr_out
5669           Set front right output volume. By default, this is 1.
5670
5671       sl_in
5672           Set side left input volume. By default, this is 1.
5673
5674       sl_out
5675           Set side left output volume. By default, this is 1.
5676
5677       sr_in
5678           Set side right input volume. By default, this is 1.
5679
5680       sr_out
5681           Set side right output volume. By default, this is 1.
5682
5683       bl_in
5684           Set back left input volume. By default, this is 1.
5685
5686       bl_out
5687           Set back left output volume. By default, this is 1.
5688
5689       br_in
5690           Set back right input volume. By default, this is 1.
5691
5692       br_out
5693           Set back right output volume. By default, this is 1.
5694
5695       bc_in
5696           Set back center input volume. By default, this is 1.
5697
5698       bc_out
5699           Set back center output volume. By default, this is 1.
5700
5701       lfe_in
5702           Set LFE input volume. By default, this is 1.
5703
5704       lfe_out
5705           Set LFE output volume. By default, this is 1.
5706
5707       allx
5708           Set spread usage of stereo image across X axis for all channels.
5709
5710       ally
5711           Set spread usage of stereo image across Y axis for all channels.
5712
5713       fcx, flx, frx, blx, brx, slx, srx, bcx
5714           Set spread usage of stereo image across X axis for each channel.
5715
5716       fcy, fly, fry, bly, bry, sly, sry, bcy
5717           Set spread usage of stereo image across Y axis for each channel.
5718
5719       win_size
5720           Set window size. Allowed range is from 1024 to 65536. Default size
5721           is 4096.
5722
5723       win_func
5724           Set window function.
5725
5726           It accepts the following values:
5727
5728           rect
5729           bartlett
5730           hann, hanning
5731           hamming
5732           blackman
5733           welch
5734           flattop
5735           bharris
5736           bnuttall
5737           bhann
5738           sine
5739           nuttall
5740           lanczos
5741           gauss
5742           tukey
5743           dolph
5744           cauchy
5745           parzen
5746           poisson
5747           bohman
5748
5749           Default is "hann".
5750
5751       overlap
5752           Set window overlap. If set to 1, the recommended overlap for
5753           selected window function will be picked. Default is 0.5.
5754
5755   treble, highshelf
5756       Boost or cut treble (upper) frequencies of the audio using a two-pole
5757       shelving filter with a response similar to that of a standard hi-fi's
5758       tone-controls. This is also known as shelving equalisation (EQ).
5759
5760       The filter accepts the following options:
5761
5762       gain, g
5763           Give the gain at whichever is the lower of ~22 kHz and the Nyquist
5764           frequency. Its useful range is about -20 (for a large cut) to +20
5765           (for a large boost). Beware of clipping when using a positive gain.
5766
5767       frequency, f
5768           Set the filter's central frequency and so can be used to extend or
5769           reduce the frequency range to be boosted or cut.  The default value
5770           is 3000 Hz.
5771
5772       width_type, t
5773           Set method to specify band-width of filter.
5774
5775           h   Hz
5776
5777           q   Q-Factor
5778
5779           o   octave
5780
5781           s   slope
5782
5783           k   kHz
5784
5785       width, w
5786           Determine how steep is the filter's shelf transition.
5787
5788       poles, p
5789           Set number of poles. Default is 2.
5790
5791       mix, m
5792           How much to use filtered signal in output. Default is 1.  Range is
5793           between 0 and 1.
5794
5795       channels, c
5796           Specify which channels to filter, by default all available are
5797           filtered.
5798
5799       normalize, n
5800           Normalize biquad coefficients, by default is disabled.  Enabling it
5801           will normalize magnitude response at DC to 0dB.
5802
5803       transform, a
5804           Set transform type of IIR filter.
5805
5806           di
5807           dii
5808           tdii
5809           latt
5810           svf
5811       precision, r
5812           Set precison of filtering.
5813
5814           auto
5815               Pick automatic sample format depending on surround filters.
5816
5817           s16 Always use signed 16-bit.
5818
5819           s32 Always use signed 32-bit.
5820
5821           f32 Always use float 32-bit.
5822
5823           f64 Always use float 64-bit.
5824
5825       Commands
5826
5827       This filter supports the following commands:
5828
5829       frequency, f
5830           Change treble frequency.  Syntax for the command is : "frequency"
5831
5832       width_type, t
5833           Change treble width_type.  Syntax for the command is : "width_type"
5834
5835       width, w
5836           Change treble width.  Syntax for the command is : "width"
5837
5838       gain, g
5839           Change treble gain.  Syntax for the command is : "gain"
5840
5841       mix, m
5842           Change treble mix.  Syntax for the command is : "mix"
5843
5844   tremolo
5845       Sinusoidal amplitude modulation.
5846
5847       The filter accepts the following options:
5848
5849       f   Modulation frequency in Hertz. Modulation frequencies in the
5850           subharmonic range (20 Hz or lower) will result in a tremolo effect.
5851           This filter may also be used as a ring modulator by specifying a
5852           modulation frequency higher than 20 Hz.  Range is 0.1 - 20000.0.
5853           Default value is 5.0 Hz.
5854
5855       d   Depth of modulation as a percentage. Range is 0.0 - 1.0.  Default
5856           value is 0.5.
5857
5858   vibrato
5859       Sinusoidal phase modulation.
5860
5861       The filter accepts the following options:
5862
5863       f   Modulation frequency in Hertz.  Range is 0.1 - 20000.0. Default
5864           value is 5.0 Hz.
5865
5866       d   Depth of modulation as a percentage. Range is 0.0 - 1.0.  Default
5867           value is 0.5.
5868
5869   volume
5870       Adjust the input audio volume.
5871
5872       It accepts the following parameters:
5873
5874       volume
5875           Set audio volume expression.
5876
5877           Output values are clipped to the maximum value.
5878
5879           The output audio volume is given by the relation:
5880
5881                   <output_volume> = <volume> * <input_volume>
5882
5883           The default value for volume is "1.0".
5884
5885       precision
5886           This parameter represents the mathematical precision.
5887
5888           It determines which input sample formats will be allowed, which
5889           affects the precision of the volume scaling.
5890
5891           fixed
5892               8-bit fixed-point; this limits input sample format to U8, S16,
5893               and S32.
5894
5895           float
5896               32-bit floating-point; this limits input sample format to FLT.
5897               (default)
5898
5899           double
5900               64-bit floating-point; this limits input sample format to DBL.
5901
5902       replaygain
5903           Choose the behaviour on encountering ReplayGain side data in input
5904           frames.
5905
5906           drop
5907               Remove ReplayGain side data, ignoring its contents (the
5908               default).
5909
5910           ignore
5911               Ignore ReplayGain side data, but leave it in the frame.
5912
5913           track
5914               Prefer the track gain, if present.
5915
5916           album
5917               Prefer the album gain, if present.
5918
5919       replaygain_preamp
5920           Pre-amplification gain in dB to apply to the selected replaygain
5921           gain.
5922
5923           Default value for replaygain_preamp is 0.0.
5924
5925       replaygain_noclip
5926           Prevent clipping by limiting the gain applied.
5927
5928           Default value for replaygain_noclip is 1.
5929
5930       eval
5931           Set when the volume expression is evaluated.
5932
5933           It accepts the following values:
5934
5935           once
5936               only evaluate expression once during the filter initialization,
5937               or when the volume command is sent
5938
5939           frame
5940               evaluate expression for each incoming frame
5941
5942           Default value is once.
5943
5944       The volume expression can contain the following parameters.
5945
5946       n   frame number (starting at zero)
5947
5948       nb_channels
5949           number of channels
5950
5951       nb_consumed_samples
5952           number of samples consumed by the filter
5953
5954       nb_samples
5955           number of samples in the current frame
5956
5957       pos original frame position in the file
5958
5959       pts frame PTS
5960
5961       sample_rate
5962           sample rate
5963
5964       startpts
5965           PTS at start of stream
5966
5967       startt
5968           time at start of stream
5969
5970       t   frame time
5971
5972       tb  timestamp timebase
5973
5974       volume
5975           last set volume value
5976
5977       Note that when eval is set to once only the sample_rate and tb
5978       variables are available, all other variables will evaluate to NAN.
5979
5980       Commands
5981
5982       This filter supports the following commands:
5983
5984       volume
5985           Modify the volume expression.  The command accepts the same syntax
5986           of the corresponding option.
5987
5988           If the specified expression is not valid, it is kept at its current
5989           value.
5990
5991       Examples
5992
5993       •   Halve the input audio volume:
5994
5995                   volume=volume=0.5
5996                   volume=volume=1/2
5997                   volume=volume=-6.0206dB
5998
5999           In all the above example the named key for volume can be omitted,
6000           for example like in:
6001
6002                   volume=0.5
6003
6004       •   Increase input audio power by 6 decibels using fixed-point
6005           precision:
6006
6007                   volume=volume=6dB:precision=fixed
6008
6009       •   Fade volume after time 10 with an annihilation period of 5 seconds:
6010
6011                   volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame
6012
6013   volumedetect
6014       Detect the volume of the input video.
6015
6016       The filter has no parameters. The input is not modified. Statistics
6017       about the volume will be printed in the log when the input stream end
6018       is reached.
6019
6020       In particular it will show the mean volume (root mean square), maximum
6021       volume (on a per-sample basis), and the beginning of a histogram of the
6022       registered volume values (from the maximum value to a cumulated 1/1000
6023       of the samples).
6024
6025       All volumes are in decibels relative to the maximum PCM value.
6026
6027       Examples
6028
6029       Here is an excerpt of the output:
6030
6031               [Parsed_volumedetect_0  0xa23120] mean_volume: -27 dB
6032               [Parsed_volumedetect_0  0xa23120] max_volume: -4 dB
6033               [Parsed_volumedetect_0  0xa23120] histogram_4db: 6
6034               [Parsed_volumedetect_0  0xa23120] histogram_5db: 62
6035               [Parsed_volumedetect_0  0xa23120] histogram_6db: 286
6036               [Parsed_volumedetect_0  0xa23120] histogram_7db: 1042
6037               [Parsed_volumedetect_0  0xa23120] histogram_8db: 2551
6038               [Parsed_volumedetect_0  0xa23120] histogram_9db: 4609
6039               [Parsed_volumedetect_0  0xa23120] histogram_10db: 8409
6040
6041       It means that:
6042
6043       •   The mean square energy is approximately -27 dB, or 10^-2.7.
6044
6045       •   The largest sample is at -4 dB, or more precisely between -4 dB and
6046           -5 dB.
6047
6048       •   There are 6 samples at -4 dB, 62 at -5 dB, 286 at -6 dB, etc.
6049
6050       In other words, raising the volume by +4 dB does not cause any
6051       clipping, raising it by +5 dB causes clipping for 6 samples, etc.
6052

AUDIO SOURCES

6054       Below is a description of the currently available audio sources.
6055
6056   abuffer
6057       Buffer audio frames, and make them available to the filter chain.
6058
6059       This source is mainly intended for a programmatic use, in particular
6060       through the interface defined in libavfilter/buffersrc.h.
6061
6062       It accepts the following parameters:
6063
6064       time_base
6065           The timebase which will be used for timestamps of submitted frames.
6066           It must be either a floating-point number or in
6067           numerator/denominator form.
6068
6069       sample_rate
6070           The sample rate of the incoming audio buffers.
6071
6072       sample_fmt
6073           The sample format of the incoming audio buffers.  Either a sample
6074           format name or its corresponding integer representation from the
6075           enum AVSampleFormat in libavutil/samplefmt.h
6076
6077       channel_layout
6078           The channel layout of the incoming audio buffers.  Either a channel
6079           layout name from channel_layout_map in libavutil/channel_layout.c
6080           or its corresponding integer representation from the AV_CH_LAYOUT_*
6081           macros in libavutil/channel_layout.h
6082
6083       channels
6084           The number of channels of the incoming audio buffers.  If both
6085           channels and channel_layout are specified, then they must be
6086           consistent.
6087
6088       Examples
6089
6090               abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo
6091
6092       will instruct the source to accept planar 16bit signed stereo at
6093       44100Hz.  Since the sample format with name "s16p" corresponds to the
6094       number 6 and the "stereo" channel layout corresponds to the value 0x3,
6095       this is equivalent to:
6096
6097               abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3
6098
6099   aevalsrc
6100       Generate an audio signal specified by an expression.
6101
6102       This source accepts in input one or more expressions (one for each
6103       channel), which are evaluated and used to generate a corresponding
6104       audio signal.
6105
6106       This source accepts the following options:
6107
6108       exprs
6109           Set the '|'-separated expressions list for each separate channel.
6110           In case the channel_layout option is not specified, the selected
6111           channel layout depends on the number of provided expressions.
6112           Otherwise the last specified expression is applied to the remaining
6113           output channels.
6114
6115       channel_layout, c
6116           Set the channel layout. The number of channels in the specified
6117           layout must be equal to the number of specified expressions.
6118
6119       duration, d
6120           Set the minimum duration of the sourced audio. See the Time
6121           duration section in the ffmpeg-utils(1) manual for the accepted
6122           syntax.  Note that the resulting duration may be greater than the
6123           specified duration, as the generated audio is always cut at the end
6124           of a complete frame.
6125
6126           If not specified, or the expressed duration is negative, the audio
6127           is supposed to be generated forever.
6128
6129       nb_samples, n
6130           Set the number of samples per channel per each output frame,
6131           default to 1024.
6132
6133       sample_rate, s
6134           Specify the sample rate, default to 44100.
6135
6136       Each expression in exprs can contain the following constants:
6137
6138       n   number of the evaluated sample, starting from 0
6139
6140       t   time of the evaluated sample expressed in seconds, starting from 0
6141
6142       s   sample rate
6143
6144       Examples
6145
6146       •   Generate silence:
6147
6148                   aevalsrc=0
6149
6150       •   Generate a sin signal with frequency of 440 Hz, set sample rate to
6151           8000 Hz:
6152
6153                   aevalsrc="sin(440*2*PI*t):s=8000"
6154
6155       •   Generate a two channels signal, specify the channel layout (Front
6156           Center + Back Center) explicitly:
6157
6158                   aevalsrc="sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC"
6159
6160       •   Generate white noise:
6161
6162                   aevalsrc="-2+random(0)"
6163
6164       •   Generate an amplitude modulated signal:
6165
6166                   aevalsrc="sin(10*2*PI*t)*sin(880*2*PI*t)"
6167
6168       •   Generate 2.5 Hz binaural beats on a 360 Hz carrier:
6169
6170                   aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)"
6171
6172   afirsrc
6173       Generate a FIR coefficients using frequency sampling method.
6174
6175       The resulting stream can be used with afir filter for filtering the
6176       audio signal.
6177
6178       The filter accepts the following options:
6179
6180       taps, t
6181           Set number of filter coefficents in output audio stream.  Default
6182           value is 1025.
6183
6184       frequency, f
6185           Set frequency points from where magnitude and phase are set.  This
6186           must be in non decreasing order, and first element must be 0, while
6187           last element must be 1. Elements are separated by white spaces.
6188
6189       magnitude, m
6190           Set magnitude value for every frequency point set by frequency.
6191           Number of values must be same as number of frequency points.
6192           Values are separated by white spaces.
6193
6194       phase, p
6195           Set phase value for every frequency point set by frequency.  Number
6196           of values must be same as number of frequency points.  Values are
6197           separated by white spaces.
6198
6199       sample_rate, r
6200           Set sample rate, default is 44100.
6201
6202       nb_samples, n
6203           Set number of samples per each frame. Default is 1024.
6204
6205       win_func, w
6206           Set window function. Default is blackman.
6207
6208   anullsrc
6209       The null audio source, return unprocessed audio frames. It is mainly
6210       useful as a template and to be employed in analysis / debugging tools,
6211       or as the source for filters which ignore the input data (for example
6212       the sox synth filter).
6213
6214       This source accepts the following options:
6215
6216       channel_layout, cl
6217           Specifies the channel layout, and can be either an integer or a
6218           string representing a channel layout. The default value of
6219           channel_layout is "stereo".
6220
6221           Check the channel_layout_map definition in
6222           libavutil/channel_layout.c for the mapping between strings and
6223           channel layout values.
6224
6225       sample_rate, r
6226           Specifies the sample rate, and defaults to 44100.
6227
6228       nb_samples, n
6229           Set the number of samples per requested frames.
6230
6231       duration, d
6232           Set the duration of the sourced audio. See the Time duration
6233           section in the ffmpeg-utils(1) manual for the accepted syntax.
6234
6235           If not specified, or the expressed duration is negative, the audio
6236           is supposed to be generated forever.
6237
6238       Examples
6239
6240       •   Set the sample rate to 48000 Hz and the channel layout to
6241           AV_CH_LAYOUT_MONO.
6242
6243                   anullsrc=r=48000:cl=4
6244
6245       •   Do the same operation with a more obvious syntax:
6246
6247                   anullsrc=r=48000:cl=mono
6248
6249       All the parameters need to be explicitly defined.
6250
6251   flite
6252       Synthesize a voice utterance using the libflite library.
6253
6254       To enable compilation of this filter you need to configure FFmpeg with
6255       "--enable-libflite".
6256
6257       Note that versions of the flite library prior to 2.0 are not thread-
6258       safe.
6259
6260       The filter accepts the following options:
6261
6262       list_voices
6263           If set to 1, list the names of the available voices and exit
6264           immediately. Default value is 0.
6265
6266       nb_samples, n
6267           Set the maximum number of samples per frame. Default value is 512.
6268
6269       textfile
6270           Set the filename containing the text to speak.
6271
6272       text
6273           Set the text to speak.
6274
6275       voice, v
6276           Set the voice to use for the speech synthesis. Default value is
6277           "kal". See also the list_voices option.
6278
6279       Examples
6280
6281       •   Read from file speech.txt, and synthesize the text using the
6282           standard flite voice:
6283
6284                   flite=textfile=speech.txt
6285
6286       •   Read the specified text selecting the "slt" voice:
6287
6288                   flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
6289
6290       •   Input text to ffmpeg:
6291
6292                   ffmpeg -f lavfi -i flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
6293
6294       •   Make ffplay speak the specified text, using "flite" and the "lavfi"
6295           device:
6296
6297                   ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.'
6298
6299       For more information about libflite, check:
6300       <http://www.festvox.org/flite/>
6301
6302   anoisesrc
6303       Generate a noise audio signal.
6304
6305       The filter accepts the following options:
6306
6307       sample_rate, r
6308           Specify the sample rate. Default value is 48000 Hz.
6309
6310       amplitude, a
6311           Specify the amplitude (0.0 - 1.0) of the generated audio stream.
6312           Default value is 1.0.
6313
6314       duration, d
6315           Specify the duration of the generated audio stream. Not specifying
6316           this option results in noise with an infinite length.
6317
6318       color, colour, c
6319           Specify the color of noise. Available noise colors are white, pink,
6320           brown, blue, violet and velvet. Default color is white.
6321
6322       seed, s
6323           Specify a value used to seed the PRNG.
6324
6325       nb_samples, n
6326           Set the number of samples per each output frame, default is 1024.
6327
6328       Examples
6329
6330       •   Generate 60 seconds of pink noise, with a 44.1 kHz sampling rate
6331           and an amplitude of 0.5:
6332
6333                   anoisesrc=d=60:c=pink:r=44100:a=0.5
6334
6335   hilbert
6336       Generate odd-tap Hilbert transform FIR coefficients.
6337
6338       The resulting stream can be used with afir filter for phase-shifting
6339       the signal by 90 degrees.
6340
6341       This is used in many matrix coding schemes and for analytic signal
6342       generation.  The process is often written as a multiplication by i (or
6343       j), the imaginary unit.
6344
6345       The filter accepts the following options:
6346
6347       sample_rate, s
6348           Set sample rate, default is 44100.
6349
6350       taps, t
6351           Set length of FIR filter, default is 22051.
6352
6353       nb_samples, n
6354           Set number of samples per each frame.
6355
6356       win_func, w
6357           Set window function to be used when generating FIR coefficients.
6358
6359   sinc
6360       Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or
6361       band-reject FIR coefficients.
6362
6363       The resulting stream can be used with afir filter for filtering the
6364       audio signal.
6365
6366       The filter accepts the following options:
6367
6368       sample_rate, r
6369           Set sample rate, default is 44100.
6370
6371       nb_samples, n
6372           Set number of samples per each frame. Default is 1024.
6373
6374       hp  Set high-pass frequency. Default is 0.
6375
6376       lp  Set low-pass frequency. Default is 0.  If high-pass frequency is
6377           lower than low-pass frequency and low-pass frequency is higher than
6378           0 then filter will create band-pass filter coefficients, otherwise
6379           band-reject filter coefficients.
6380
6381       phase
6382           Set filter phase response. Default is 50. Allowed range is from 0
6383           to 100.
6384
6385       beta
6386           Set Kaiser window beta.
6387
6388       att Set stop-band attenuation. Default is 120dB, allowed range is from
6389           40 to 180 dB.
6390
6391       round
6392           Enable rounding, by default is disabled.
6393
6394       hptaps
6395           Set number of taps for high-pass filter.
6396
6397       lptaps
6398           Set number of taps for low-pass filter.
6399
6400   sine
6401       Generate an audio signal made of a sine wave with amplitude 1/8.
6402
6403       The audio signal is bit-exact.
6404
6405       The filter accepts the following options:
6406
6407       frequency, f
6408           Set the carrier frequency. Default is 440 Hz.
6409
6410       beep_factor, b
6411           Enable a periodic beep every second with frequency beep_factor
6412           times the carrier frequency. Default is 0, meaning the beep is
6413           disabled.
6414
6415       sample_rate, r
6416           Specify the sample rate, default is 44100.
6417
6418       duration, d
6419           Specify the duration of the generated audio stream.
6420
6421       samples_per_frame
6422           Set the number of samples per output frame.
6423
6424           The expression can contain the following constants:
6425
6426           n   The (sequential) number of the output audio frame, starting
6427               from 0.
6428
6429           pts The PTS (Presentation TimeStamp) of the output audio frame,
6430               expressed in TB units.
6431
6432           t   The PTS of the output audio frame, expressed in seconds.
6433
6434           TB  The timebase of the output audio frames.
6435
6436           Default is 1024.
6437
6438       Examples
6439
6440       •   Generate a simple 440 Hz sine wave:
6441
6442                   sine
6443
6444       •   Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5
6445           seconds:
6446
6447                   sine=220:4:d=5
6448                   sine=f=220:b=4:d=5
6449                   sine=frequency=220:beep_factor=4:duration=5
6450
6451       •   Generate a 1 kHz sine wave following "1602,1601,1602,1601,1602"
6452           NTSC pattern:
6453
6454                   sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))'
6455

AUDIO SINKS

6457       Below is a description of the currently available audio sinks.
6458
6459   abuffersink
6460       Buffer audio frames, and make them available to the end of filter
6461       chain.
6462
6463       This sink is mainly intended for programmatic use, in particular
6464       through the interface defined in libavfilter/buffersink.h or the
6465       options system.
6466
6467       It accepts a pointer to an AVABufferSinkContext structure, which
6468       defines the incoming buffers' formats, to be passed as the opaque
6469       parameter to "avfilter_init_filter" for initialization.
6470
6471   anullsink
6472       Null audio sink; do absolutely nothing with the input audio. It is
6473       mainly useful as a template and for use in analysis / debugging tools.
6474

VIDEO FILTERS

6476       When you configure your FFmpeg build, you can disable any of the
6477       existing filters using "--disable-filters".  The configure output will
6478       show the video filters included in your build.
6479
6480       Below is a description of the currently available video filters.
6481
6482   addroi
6483       Mark a region of interest in a video frame.
6484
6485       The frame data is passed through unchanged, but metadata is attached to
6486       the frame indicating regions of interest which can affect the behaviour
6487       of later encoding.  Multiple regions can be marked by applying the
6488       filter multiple times.
6489
6490       x   Region distance in pixels from the left edge of the frame.
6491
6492       y   Region distance in pixels from the top edge of the frame.
6493
6494       w   Region width in pixels.
6495
6496       h   Region height in pixels.
6497
6498           The parameters x, y, w and h are expressions, and may contain the
6499           following variables:
6500
6501           iw  Width of the input frame.
6502
6503           ih  Height of the input frame.
6504
6505       qoffset
6506           Quantisation offset to apply within the region.
6507
6508           This must be a real value in the range -1 to +1.  A value of zero
6509           indicates no quality change.  A negative value asks for better
6510           quality (less quantisation), while a positive value asks for worse
6511           quality (greater quantisation).
6512
6513           The range is calibrated so that the extreme values indicate the
6514           largest possible offset - if the rest of the frame is encoded with
6515           the worst possible quality, an offset of -1 indicates that this
6516           region should be encoded with the best possible quality anyway.
6517           Intermediate values are then interpolated in some codec-dependent
6518           way.
6519
6520           For example, in 10-bit H.264 the quantisation parameter varies
6521           between -12 and 51.  A typical qoffset value of -1/10 therefore
6522           indicates that this region should be encoded with a QP around one-
6523           tenth of the full range better than the rest of the frame.  So, if
6524           most of the frame were to be encoded with a QP of around 30, this
6525           region would get a QP of around 24 (an offset of approximately
6526           -1/10 * (51 - -12) = -6.3).  An extreme value of -1 would indicate
6527           that this region should be encoded with the best possible quality
6528           regardless of the treatment of the rest of the frame - that is,
6529           should be encoded at a QP of -12.
6530
6531       clear
6532           If set to true, remove any existing regions of interest marked on
6533           the frame before adding the new one.
6534
6535       Examples
6536
6537       •   Mark the centre quarter of the frame as interesting.
6538
6539                   addroi=iw/4:ih/4:iw/2:ih/2:-1/10
6540
6541       •   Mark the 100-pixel-wide region on the left edge of the frame as
6542           very uninteresting (to be encoded at much lower quality than the
6543           rest of the frame).
6544
6545                   addroi=0:0:100:ih:+1/5
6546
6547   alphaextract
6548       Extract the alpha component from the input as a grayscale video. This
6549       is especially useful with the alphamerge filter.
6550
6551   alphamerge
6552       Add or replace the alpha component of the primary input with the
6553       grayscale value of a second input. This is intended for use with
6554       alphaextract to allow the transmission or storage of frame sequences
6555       that have alpha in a format that doesn't support an alpha channel.
6556
6557       For example, to reconstruct full frames from a normal YUV-encoded video
6558       and a separate video created with alphaextract, you might use:
6559
6560               movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out]
6561
6562   amplify
6563       Amplify differences between current pixel and pixels of adjacent frames
6564       in same pixel location.
6565
6566       This filter accepts the following options:
6567
6568       radius
6569           Set frame radius. Default is 2. Allowed range is from 1 to 63.  For
6570           example radius of 3 will instruct filter to calculate average of 7
6571           frames.
6572
6573       factor
6574           Set factor to amplify difference. Default is 2. Allowed range is
6575           from 0 to 65535.
6576
6577       threshold
6578           Set threshold for difference amplification. Any difference greater
6579           or equal to this value will not alter source pixel. Default is 10.
6580           Allowed range is from 0 to 65535.
6581
6582       tolerance
6583           Set tolerance for difference amplification. Any difference lower to
6584           this value will not alter source pixel. Default is 0.  Allowed
6585           range is from 0 to 65535.
6586
6587       low Set lower limit for changing source pixel. Default is 65535.
6588           Allowed range is from 0 to 65535.  This option controls maximum
6589           possible value that will decrease source pixel value.
6590
6591       high
6592           Set high limit for changing source pixel. Default is 65535. Allowed
6593           range is from 0 to 65535.  This option controls maximum possible
6594           value that will increase source pixel value.
6595
6596       planes
6597           Set which planes to filter. Default is all. Allowed range is from 0
6598           to 15.
6599
6600       Commands
6601
6602       This filter supports the following commands that corresponds to option
6603       of same name:
6604
6605       factor
6606       threshold
6607       tolerance
6608       low
6609       high
6610       planes
6611
6612   ass
6613       Same as the subtitles filter, except that it doesn't require libavcodec
6614       and libavformat to work. On the other hand, it is limited to ASS
6615       (Advanced Substation Alpha) subtitles files.
6616
6617       This filter accepts the following option in addition to the common
6618       options from the subtitles filter:
6619
6620       shaping
6621           Set the shaping engine
6622
6623           Available values are:
6624
6625           auto
6626               The default libass shaping engine, which is the best available.
6627
6628           simple
6629               Fast, font-agnostic shaper that can do only substitutions
6630
6631           complex
6632               Slower shaper using OpenType for substitutions and positioning
6633
6634           The default is "auto".
6635
6636   atadenoise
6637       Apply an Adaptive Temporal Averaging Denoiser to the video input.
6638
6639       The filter accepts the following options:
6640
6641       0a  Set threshold A for 1st plane. Default is 0.02.  Valid range is 0
6642           to 0.3.
6643
6644       0b  Set threshold B for 1st plane. Default is 0.04.  Valid range is 0
6645           to 5.
6646
6647       1a  Set threshold A for 2nd plane. Default is 0.02.  Valid range is 0
6648           to 0.3.
6649
6650       1b  Set threshold B for 2nd plane. Default is 0.04.  Valid range is 0
6651           to 5.
6652
6653       2a  Set threshold A for 3rd plane. Default is 0.02.  Valid range is 0
6654           to 0.3.
6655
6656       2b  Set threshold B for 3rd plane. Default is 0.04.  Valid range is 0
6657           to 5.
6658
6659           Threshold A is designed to react on abrupt changes in the input
6660           signal and threshold B is designed to react on continuous changes
6661           in the input signal.
6662
6663       s   Set number of frames filter will use for averaging. Default is 9.
6664           Must be odd number in range [5, 129].
6665
6666       p   Set what planes of frame filter will use for averaging. Default is
6667           all.
6668
6669       a   Set what variant of algorithm filter will use for averaging.
6670           Default is "p" parallel.  Alternatively can be set to "s" serial.
6671
6672           Parallel can be faster then serial, while other way around is never
6673           true.  Parallel will abort early on first change being greater then
6674           thresholds, while serial will continue processing other side of
6675           frames if they are equal or below thresholds.
6676
6677       0s
6678       1s
6679       2s  Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767.
6680           Valid range is from 0 to 32767.  This options controls weight for
6681           each pixel in radius defined by size.  Default value means every
6682           pixel have same weight.  Setting this option to 0 effectively
6683           disables filtering.
6684
6685       Commands
6686
6687       This filter supports same commands as options except option "s".  The
6688       command accepts the same syntax of the corresponding option.
6689
6690   avgblur
6691       Apply average blur filter.
6692
6693       The filter accepts the following options:
6694
6695       sizeX
6696           Set horizontal radius size.
6697
6698       planes
6699           Set which planes to filter. By default all planes are filtered.
6700
6701       sizeY
6702           Set vertical radius size, if zero it will be same as "sizeX".
6703           Default is 0.
6704
6705       Commands
6706
6707       This filter supports same commands as options.  The command accepts the
6708       same syntax of the corresponding option.
6709
6710       If the specified expression is not valid, it is kept at its current
6711       value.
6712
6713   bbox
6714       Compute the bounding box for the non-black pixels in the input frame
6715       luminance plane.
6716
6717       This filter computes the bounding box containing all the pixels with a
6718       luminance value greater than the minimum allowed value.  The parameters
6719       describing the bounding box are printed on the filter log.
6720
6721       The filter accepts the following option:
6722
6723       min_val
6724           Set the minimal luminance value. Default is 16.
6725
6726       Commands
6727
6728       This filter supports the all above options as commands.
6729
6730   bilateral
6731       Apply bilateral filter, spatial smoothing while preserving edges.
6732
6733       The filter accepts the following options:
6734
6735       sigmaS
6736           Set sigma of gaussian function to calculate spatial weight.
6737           Allowed range is 0 to 512. Default is 0.1.
6738
6739       sigmaR
6740           Set sigma of gaussian function to calculate range weight.  Allowed
6741           range is 0 to 1. Default is 0.1.
6742
6743       planes
6744           Set planes to filter. Default is first only.
6745
6746       Commands
6747
6748       This filter supports the all above options as commands.
6749
6750   bitplanenoise
6751       Show and measure bit plane noise.
6752
6753       The filter accepts the following options:
6754
6755       bitplane
6756           Set which plane to analyze. Default is 1.
6757
6758       filter
6759           Filter out noisy pixels from "bitplane" set above.  Default is
6760           disabled.
6761
6762   blackdetect
6763       Detect video intervals that are (almost) completely black. Can be
6764       useful to detect chapter transitions, commercials, or invalid
6765       recordings.
6766
6767       The filter outputs its detection analysis to both the log as well as
6768       frame metadata. If a black segment of at least the specified minimum
6769       duration is found, a line with the start and end timestamps as well as
6770       duration is printed to the log with level "info". In addition, a log
6771       line with level "debug" is printed per frame showing the black amount
6772       detected for that frame.
6773
6774       The filter also attaches metadata to the first frame of a black segment
6775       with key "lavfi.black_start" and to the first frame after the black
6776       segment ends with key "lavfi.black_end". The value is the frame's
6777       timestamp. This metadata is added regardless of the minimum duration
6778       specified.
6779
6780       The filter accepts the following options:
6781
6782       black_min_duration, d
6783           Set the minimum detected black duration expressed in seconds. It
6784           must be a non-negative floating point number.
6785
6786           Default value is 2.0.
6787
6788       picture_black_ratio_th, pic_th
6789           Set the threshold for considering a picture "black".  Express the
6790           minimum value for the ratio:
6791
6792                   <nb_black_pixels> / <nb_pixels>
6793
6794           for which a picture is considered black.  Default value is 0.98.
6795
6796       pixel_black_th, pix_th
6797           Set the threshold for considering a pixel "black".
6798
6799           The threshold expresses the maximum pixel luminance value for which
6800           a pixel is considered "black". The provided value is scaled
6801           according to the following equation:
6802
6803                   <absolute_threshold> = <luminance_minimum_value> + <pixel_black_th> * <luminance_range_size>
6804
6805           luminance_range_size and luminance_minimum_value depend on the
6806           input video format, the range is [0-255] for YUV full-range formats
6807           and [16-235] for YUV non full-range formats.
6808
6809           Default value is 0.10.
6810
6811       The following example sets the maximum pixel threshold to the minimum
6812       value, and detects only black intervals of 2 or more seconds:
6813
6814               blackdetect=d=2:pix_th=0.00
6815
6816   blackframe
6817       Detect frames that are (almost) completely black. Can be useful to
6818       detect chapter transitions or commercials. Output lines consist of the
6819       frame number of the detected frame, the percentage of blackness, the
6820       position in the file if known or -1 and the timestamp in seconds.
6821
6822       In order to display the output lines, you need to set the loglevel at
6823       least to the AV_LOG_INFO value.
6824
6825       This filter exports frame metadata "lavfi.blackframe.pblack".  The
6826       value represents the percentage of pixels in the picture that are below
6827       the threshold value.
6828
6829       It accepts the following parameters:
6830
6831       amount
6832           The percentage of the pixels that have to be below the threshold;
6833           it defaults to 98.
6834
6835       threshold, thresh
6836           The threshold below which a pixel value is considered black; it
6837           defaults to 32.
6838
6839   blend
6840       Blend two video frames into each other.
6841
6842       The "blend" filter takes two input streams and outputs one stream, the
6843       first input is the "top" layer and second input is "bottom" layer.  By
6844       default, the output terminates when the longest input terminates.
6845
6846       The "tblend" (time blend) filter takes two consecutive frames from one
6847       single stream, and outputs the result obtained by blending the new
6848       frame on top of the old frame.
6849
6850       A description of the accepted options follows.
6851
6852       c0_mode
6853       c1_mode
6854       c2_mode
6855       c3_mode
6856       all_mode
6857           Set blend mode for specific pixel component or all pixel components
6858           in case of all_mode. Default value is "normal".
6859
6860           Available values for component modes are:
6861
6862           addition
6863           and
6864           average
6865           bleach
6866           burn
6867           darken
6868           difference
6869           divide
6870           dodge
6871           exclusion
6872           extremity
6873           freeze
6874           geometric
6875           glow
6876           grainextract
6877           grainmerge
6878           hardlight
6879           hardmix
6880           hardoverlay
6881           harmonic
6882           heat
6883           interpolate
6884           lighten
6885           linearlight
6886           multiply
6887           multiply128
6888           negation
6889           normal
6890           or
6891           overlay
6892           phoenix
6893           pinlight
6894           reflect
6895           screen
6896           softdifference
6897           softlight
6898           stain
6899           subtract
6900           vividlight
6901           xor
6902       c0_opacity
6903       c1_opacity
6904       c2_opacity
6905       c3_opacity
6906       all_opacity
6907           Set blend opacity for specific pixel component or all pixel
6908           components in case of all_opacity. Only used in combination with
6909           pixel component blend modes.
6910
6911       c0_expr
6912       c1_expr
6913       c2_expr
6914       c3_expr
6915       all_expr
6916           Set blend expression for specific pixel component or all pixel
6917           components in case of all_expr. Note that related mode options will
6918           be ignored if those are set.
6919
6920           The expressions can use the following variables:
6921
6922           N   The sequential number of the filtered frame, starting from 0.
6923
6924           X
6925           Y   the coordinates of the current sample
6926
6927           W
6928           H   the width and height of currently filtered plane
6929
6930           SW
6931           SH  Width and height scale for the plane being filtered. It is the
6932               ratio between the dimensions of the current plane to the luma
6933               plane, e.g. for a "yuv420p" frame, the values are "1,1" for the
6934               luma plane and "0.5,0.5" for the chroma planes.
6935
6936           T   Time of the current frame, expressed in seconds.
6937
6938           TOP, A
6939               Value of pixel component at current location for first video
6940               frame (top layer).
6941
6942           BOTTOM, B
6943               Value of pixel component at current location for second video
6944               frame (bottom layer).
6945
6946       The "blend" filter also supports the framesync options.
6947
6948       Examples
6949
6950       •   Apply transition from bottom layer to top layer in first 10
6951           seconds:
6952
6953                   blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))'
6954
6955       •   Apply linear horizontal transition from top layer to bottom layer:
6956
6957                   blend=all_expr='A*(X/W)+B*(1-X/W)'
6958
6959       •   Apply 1x1 checkerboard effect:
6960
6961                   blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)'
6962
6963       •   Apply uncover left effect:
6964
6965                   blend=all_expr='if(gte(N*SW+X,W),A,B)'
6966
6967       •   Apply uncover down effect:
6968
6969                   blend=all_expr='if(gte(Y-N*SH,0),A,B)'
6970
6971       •   Apply uncover up-left effect:
6972
6973                   blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)'
6974
6975       •   Split diagonally video and shows top and bottom layer on each side:
6976
6977                   blend=all_expr='if(gt(X,Y*(W/H)),A,B)'
6978
6979       •   Display differences between the current and the previous frame:
6980
6981                   tblend=all_mode=grainextract
6982
6983       Commands
6984
6985       This filter supports same commands as options.
6986
6987   bm3d
6988       Denoise frames using Block-Matching 3D algorithm.
6989
6990       The filter accepts the following options.
6991
6992       sigma
6993           Set denoising strength. Default value is 1.  Allowed range is from
6994           0 to 999.9.  The denoising algorithm is very sensitive to sigma, so
6995           adjust it according to the source.
6996
6997       block
6998           Set local patch size. This sets dimensions in 2D.
6999
7000       bstep
7001           Set sliding step for processing blocks. Default value is 4.
7002           Allowed range is from 1 to 64.  Smaller values allows processing
7003           more reference blocks and is slower.
7004
7005       group
7006           Set maximal number of similar blocks for 3rd dimension. Default
7007           value is 1.  When set to 1, no block matching is done. Larger
7008           values allows more blocks in single group.  Allowed range is from 1
7009           to 256.
7010
7011       range
7012           Set radius for search block matching. Default is 9.  Allowed range
7013           is from 1 to INT32_MAX.
7014
7015       mstep
7016           Set step between two search locations for block matching. Default
7017           is 1.  Allowed range is from 1 to 64. Smaller is slower.
7018
7019       thmse
7020           Set threshold of mean square error for block matching. Valid range
7021           is 0 to INT32_MAX.
7022
7023       hdthr
7024           Set thresholding parameter for hard thresholding in 3D transformed
7025           domain.  Larger values results in stronger hard-thresholding
7026           filtering in frequency domain.
7027
7028       estim
7029           Set filtering estimation mode. Can be "basic" or "final".  Default
7030           is "basic".
7031
7032       ref If enabled, filter will use 2nd stream for block matching.  Default
7033           is disabled for "basic" value of estim option, and always enabled
7034           if value of estim is "final".
7035
7036       planes
7037           Set planes to filter. Default is all available except alpha.
7038
7039       Examples
7040
7041       •   Basic filtering with bm3d:
7042
7043                   bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic
7044
7045       •   Same as above, but filtering only luma:
7046
7047                   bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic:planes=1
7048
7049       •   Same as above, but with both estimation modes:
7050
7051                   split[a][b],[a]bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic[a],[b][a]bm3d=sigma=3:block=4:bstep=2:group=16:estim=final:ref=1
7052
7053       •   Same as above, but prefilter with nlmeans filter instead:
7054
7055                   split[a][b],[a]nlmeans=s=3:r=7:p=3[a],[b][a]bm3d=sigma=3:block=4:bstep=2:group=16:estim=final:ref=1
7056
7057   boxblur
7058       Apply a boxblur algorithm to the input video.
7059
7060       It accepts the following parameters:
7061
7062       luma_radius, lr
7063       luma_power, lp
7064       chroma_radius, cr
7065       chroma_power, cp
7066       alpha_radius, ar
7067       alpha_power, ap
7068
7069       A description of the accepted options follows.
7070
7071       luma_radius, lr
7072       chroma_radius, cr
7073       alpha_radius, ar
7074           Set an expression for the box radius in pixels used for blurring
7075           the corresponding input plane.
7076
7077           The radius value must be a non-negative number, and must not be
7078           greater than the value of the expression "min(w,h)/2" for the luma
7079           and alpha planes, and of "min(cw,ch)/2" for the chroma planes.
7080
7081           Default value for luma_radius is "2". If not specified,
7082           chroma_radius and alpha_radius default to the corresponding value
7083           set for luma_radius.
7084
7085           The expressions can contain the following constants:
7086
7087           w
7088           h   The input width and height in pixels.
7089
7090           cw
7091           ch  The input chroma image width and height in pixels.
7092
7093           hsub
7094           vsub
7095               The horizontal and vertical chroma subsample values. For
7096               example, for the pixel format "yuv422p", hsub is 2 and vsub is
7097               1.
7098
7099       luma_power, lp
7100       chroma_power, cp
7101       alpha_power, ap
7102           Specify how many times the boxblur filter is applied to the
7103           corresponding plane.
7104
7105           Default value for luma_power is 2. If not specified, chroma_power
7106           and alpha_power default to the corresponding value set for
7107           luma_power.
7108
7109           A value of 0 will disable the effect.
7110
7111       Examples
7112
7113       •   Apply a boxblur filter with the luma, chroma, and alpha radii set
7114           to 2:
7115
7116                   boxblur=luma_radius=2:luma_power=1
7117                   boxblur=2:1
7118
7119       •   Set the luma radius to 2, and alpha and chroma radius to 0:
7120
7121                   boxblur=2:1:cr=0:ar=0
7122
7123       •   Set the luma and chroma radii to a fraction of the video dimension:
7124
7125                   boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1
7126
7127   bwdif
7128       Deinterlace the input video ("bwdif" stands for "Bob Weaver
7129       Deinterlacing Filter").
7130
7131       Motion adaptive deinterlacing based on yadif with the use of w3fdif and
7132       cubic interpolation algorithms.  It accepts the following parameters:
7133
7134       mode
7135           The interlacing mode to adopt. It accepts one of the following
7136           values:
7137
7138           0, send_frame
7139               Output one frame for each frame.
7140
7141           1, send_field
7142               Output one frame for each field.
7143
7144           The default value is "send_field".
7145
7146       parity
7147           The picture field parity assumed for the input interlaced video. It
7148           accepts one of the following values:
7149
7150           0, tff
7151               Assume the top field is first.
7152
7153           1, bff
7154               Assume the bottom field is first.
7155
7156           -1, auto
7157               Enable automatic detection of field parity.
7158
7159           The default value is "auto".  If the interlacing is unknown or the
7160           decoder does not export this information, top field first will be
7161           assumed.
7162
7163       deint
7164           Specify which frames to deinterlace. Accepts one of the following
7165           values:
7166
7167           0, all
7168               Deinterlace all frames.
7169
7170           1, interlaced
7171               Only deinterlace frames marked as interlaced.
7172
7173           The default value is "all".
7174
7175   cas
7176       Apply Contrast Adaptive Sharpen filter to video stream.
7177
7178       The filter accepts the following options:
7179
7180       strength
7181           Set the sharpening strength. Default value is 0.
7182
7183       planes
7184           Set planes to filter. Default value is to filter all planes except
7185           alpha plane.
7186
7187       Commands
7188
7189       This filter supports same commands as options.
7190
7191   chromahold
7192       Remove all color information for all colors except for certain one.
7193
7194       The filter accepts the following options:
7195
7196       color
7197           The color which will not be replaced with neutral chroma.
7198
7199       similarity
7200           Similarity percentage with the above color.  0.01 matches only the
7201           exact key color, while 1.0 matches everything.
7202
7203       blend
7204           Blend percentage.  0.0 makes pixels either fully gray, or not gray
7205           at all.  Higher values result in more preserved color.
7206
7207       yuv Signals that the color passed is already in YUV instead of RGB.
7208
7209           Literal colors like "green" or "red" don't make sense with this
7210           enabled anymore.  This can be used to pass exact YUV values as
7211           hexadecimal numbers.
7212
7213       Commands
7214
7215       This filter supports same commands as options.  The command accepts the
7216       same syntax of the corresponding option.
7217
7218       If the specified expression is not valid, it is kept at its current
7219       value.
7220
7221   chromakey
7222       YUV colorspace color/chroma keying.
7223
7224       The filter accepts the following options:
7225
7226       color
7227           The color which will be replaced with transparency.
7228
7229       similarity
7230           Similarity percentage with the key color.
7231
7232           0.01 matches only the exact key color, while 1.0 matches
7233           everything.
7234
7235       blend
7236           Blend percentage.
7237
7238           0.0 makes pixels either fully transparent, or not transparent at
7239           all.
7240
7241           Higher values result in semi-transparent pixels, with a higher
7242           transparency the more similar the pixels color is to the key color.
7243
7244       yuv Signals that the color passed is already in YUV instead of RGB.
7245
7246           Literal colors like "green" or "red" don't make sense with this
7247           enabled anymore.  This can be used to pass exact YUV values as
7248           hexadecimal numbers.
7249
7250       Commands
7251
7252       This filter supports same commands as options.  The command accepts the
7253       same syntax of the corresponding option.
7254
7255       If the specified expression is not valid, it is kept at its current
7256       value.
7257
7258       Examples
7259
7260       •   Make every green pixel in the input image transparent:
7261
7262                   ffmpeg -i input.png -vf chromakey=green out.png
7263
7264       •   Overlay a greenscreen-video on top of a static black background.
7265
7266                   ffmpeg -f lavfi -i color=c=black:s=1280x720 -i video.mp4 -shortest -filter_complex "[1:v]chromakey=0x70de77:0.1:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" output.mkv
7267
7268   chromanr
7269       Reduce chrominance noise.
7270
7271       The filter accepts the following options:
7272
7273       thres
7274           Set threshold for averaging chrominance values.  Sum of absolute
7275           difference of Y, U and V pixel components of current pixel and
7276           neighbour pixels lower than this threshold will be used in
7277           averaging. Luma component is left unchanged and is copied to
7278           output.  Default value is 30. Allowed range is from 1 to 200.
7279
7280       sizew
7281           Set horizontal radius of rectangle used for averaging.  Allowed
7282           range is from 1 to 100. Default value is 5.
7283
7284       sizeh
7285           Set vertical radius of rectangle used for averaging.  Allowed range
7286           is from 1 to 100. Default value is 5.
7287
7288       stepw
7289           Set horizontal step when averaging. Default value is 1.  Allowed
7290           range is from 1 to 50.  Mostly useful to speed-up filtering.
7291
7292       steph
7293           Set vertical step when averaging. Default value is 1.  Allowed
7294           range is from 1 to 50.  Mostly useful to speed-up filtering.
7295
7296       threy
7297           Set Y threshold for averaging chrominance values.  Set finer
7298           control for max allowed difference between Y components of current
7299           pixel and neigbour pixels.  Default value is 200. Allowed range is
7300           from 1 to 200.
7301
7302       threu
7303           Set U threshold for averaging chrominance values.  Set finer
7304           control for max allowed difference between U components of current
7305           pixel and neigbour pixels.  Default value is 200. Allowed range is
7306           from 1 to 200.
7307
7308       threv
7309           Set V threshold for averaging chrominance values.  Set finer
7310           control for max allowed difference between V components of current
7311           pixel and neigbour pixels.  Default value is 200. Allowed range is
7312           from 1 to 200.
7313
7314       distance
7315           Set distance type used in calculations.
7316
7317           manhattan
7318               Absolute difference.
7319
7320           euclidean
7321               Difference squared.
7322
7323           Default distance type is manhattan.
7324
7325       Commands
7326
7327       This filter supports same commands as options.  The command accepts the
7328       same syntax of the corresponding option.
7329
7330   chromashift
7331       Shift chroma pixels horizontally and/or vertically.
7332
7333       The filter accepts the following options:
7334
7335       cbh Set amount to shift chroma-blue horizontally.
7336
7337       cbv Set amount to shift chroma-blue vertically.
7338
7339       crh Set amount to shift chroma-red horizontally.
7340
7341       crv Set amount to shift chroma-red vertically.
7342
7343       edge
7344           Set edge mode, can be smear, default, or warp.
7345
7346       Commands
7347
7348       This filter supports the all above options as commands.
7349
7350   ciescope
7351       Display CIE color diagram with pixels overlaid onto it.
7352
7353       The filter accepts the following options:
7354
7355       system
7356           Set color system.
7357
7358           ntsc, 470m
7359           ebu, 470bg
7360           smpte
7361           240m
7362           apple
7363           widergb
7364           cie1931
7365           rec709, hdtv
7366           uhdtv, rec2020
7367           dcip3
7368       cie Set CIE system.
7369
7370           xyy
7371           ucs
7372           luv
7373       gamuts
7374           Set what gamuts to draw.
7375
7376           See "system" option for available values.
7377
7378       size, s
7379           Set ciescope size, by default set to 512.
7380
7381       intensity, i
7382           Set intensity used to map input pixel values to CIE diagram.
7383
7384       contrast
7385           Set contrast used to draw tongue colors that are out of active
7386           color system gamut.
7387
7388       corrgamma
7389           Correct gamma displayed on scope, by default enabled.
7390
7391       showwhite
7392           Show white point on CIE diagram, by default disabled.
7393
7394       gamma
7395           Set input gamma. Used only with XYZ input color space.
7396
7397   codecview
7398       Visualize information exported by some codecs.
7399
7400       Some codecs can export information through frames using side-data or
7401       other means. For example, some MPEG based codecs export motion vectors
7402       through the export_mvs flag in the codec flags2 option.
7403
7404       The filter accepts the following option:
7405
7406       block
7407           Display block partition structure using the luma plane.
7408
7409       mv  Set motion vectors to visualize.
7410
7411           Available flags for mv are:
7412
7413           pf  forward predicted MVs of P-frames
7414
7415           bf  forward predicted MVs of B-frames
7416
7417           bb  backward predicted MVs of B-frames
7418
7419       qp  Display quantization parameters using the chroma planes.
7420
7421       mv_type, mvt
7422           Set motion vectors type to visualize. Includes MVs from all frames
7423           unless specified by frame_type option.
7424
7425           Available flags for mv_type are:
7426
7427           fp  forward predicted MVs
7428
7429           bp  backward predicted MVs
7430
7431       frame_type, ft
7432           Set frame type to visualize motion vectors of.
7433
7434           Available flags for frame_type are:
7435
7436           if  intra-coded frames (I-frames)
7437
7438           pf  predicted frames (P-frames)
7439
7440           bf  bi-directionally predicted frames (B-frames)
7441
7442       Examples
7443
7444       •   Visualize forward predicted MVs of all frames using ffplay:
7445
7446                   ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp
7447
7448       •   Visualize multi-directionals MVs of P and B-Frames using ffplay:
7449
7450                   ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
7451
7452   colorbalance
7453       Modify intensity of primary colors (red, green and blue) of input
7454       frames.
7455
7456       The filter allows an input frame to be adjusted in the shadows,
7457       midtones or highlights regions for the red-cyan, green-magenta or blue-
7458       yellow balance.
7459
7460       A positive adjustment value shifts the balance towards the primary
7461       color, a negative value towards the complementary color.
7462
7463       The filter accepts the following options:
7464
7465       rs
7466       gs
7467       bs  Adjust red, green and blue shadows (darkest pixels).
7468
7469       rm
7470       gm
7471       bm  Adjust red, green and blue midtones (medium pixels).
7472
7473       rh
7474       gh
7475       bh  Adjust red, green and blue highlights (brightest pixels).
7476
7477           Allowed ranges for options are "[-1.0, 1.0]". Defaults are 0.
7478
7479       pl  Preserve lightness when changing color balance. Default is
7480           disabled.
7481
7482       Examples
7483
7484       •   Add red color cast to shadows:
7485
7486                   colorbalance=rs=.3
7487
7488       Commands
7489
7490       This filter supports the all above options as commands.
7491
7492   colorcontrast
7493       Adjust color contrast between RGB components.
7494
7495       The filter accepts the following options:
7496
7497       rc  Set the red-cyan contrast. Defaults is 0.0. Allowed range is from
7498           -1.0 to 1.0.
7499
7500       gm  Set the green-magenta contrast. Defaults is 0.0. Allowed range is
7501           from -1.0 to 1.0.
7502
7503       by  Set the blue-yellow contrast. Defaults is 0.0. Allowed range is
7504           from -1.0 to 1.0.
7505
7506       rcw
7507       gmw
7508       byw Set the weight of each "rc", "gm", "by" option value. Default value
7509           is 0.0.  Allowed range is from 0.0 to 1.0. If all weights are 0.0
7510           filtering is disabled.
7511
7512       pl  Set the amount of preserving lightness. Default value is 0.0.
7513           Allowed range is from 0.0 to 1.0.
7514
7515       Commands
7516
7517       This filter supports the all above options as commands.
7518
7519   colorcorrect
7520       Adjust color white balance selectively for blacks and whites.  This
7521       filter operates in YUV colorspace.
7522
7523       The filter accepts the following options:
7524
7525       rl  Set the red shadow spot. Allowed range is from -1.0 to 1.0.
7526           Default value is 0.
7527
7528       bl  Set the blue shadow spot. Allowed range is from -1.0 to 1.0.
7529           Default value is 0.
7530
7531       rh  Set the red highlight spot. Allowed range is from -1.0 to 1.0.
7532           Default value is 0.
7533
7534       bh  Set the red highlight spot. Allowed range is from -1.0 to 1.0.
7535           Default value is 0.
7536
7537       saturation
7538           Set the amount of saturation. Allowed range is from -3.0 to 3.0.
7539           Default value is 1.
7540
7541       analyze
7542           If set to anything other than "manual" it will analyze every frame
7543           and use derived parameters for filtering output frame.
7544
7545           Possible values are:
7546
7547           manual
7548           average
7549           minmax
7550           median
7551
7552           Default value is "manual".
7553
7554       Commands
7555
7556       This filter supports the all above options as commands.
7557
7558   colorchannelmixer
7559       Adjust video input frames by re-mixing color channels.
7560
7561       This filter modifies a color channel by adding the values associated to
7562       the other channels of the same pixels. For example if the value to
7563       modify is red, the output value will be:
7564
7565               <red>=<red>*<rr> + <blue>*<rb> + <green>*<rg> + <alpha>*<ra>
7566
7567       The filter accepts the following options:
7568
7569       rr
7570       rg
7571       rb
7572       ra  Adjust contribution of input red, green, blue and alpha channels
7573           for output red channel.  Default is 1 for rr, and 0 for rg, rb and
7574           ra.
7575
7576       gr
7577       gg
7578       gb
7579       ga  Adjust contribution of input red, green, blue and alpha channels
7580           for output green channel.  Default is 1 for gg, and 0 for gr, gb
7581           and ga.
7582
7583       br
7584       bg
7585       bb
7586       ba  Adjust contribution of input red, green, blue and alpha channels
7587           for output blue channel.  Default is 1 for bb, and 0 for br, bg and
7588           ba.
7589
7590       ar
7591       ag
7592       ab
7593       aa  Adjust contribution of input red, green, blue and alpha channels
7594           for output alpha channel.  Default is 1 for aa, and 0 for ar, ag
7595           and ab.
7596
7597           Allowed ranges for options are "[-2.0, 2.0]".
7598
7599       pc  Set preserve color mode. The accepted values are:
7600
7601           none
7602               Disable color preserving, this is default.
7603
7604           lum Preserve luminance.
7605
7606           max Preserve max value of RGB triplet.
7607
7608           avg Preserve average value of RGB triplet.
7609
7610           sum Preserve sum value of RGB triplet.
7611
7612           nrm Preserve normalized value of RGB triplet.
7613
7614           pwr Preserve power value of RGB triplet.
7615
7616       pa  Set the preserve color amount when changing colors. Allowed range
7617           is from "[0.0, 1.0]".  Default is 0.0, thus disabled.
7618
7619       Examples
7620
7621       •   Convert source to grayscale:
7622
7623                   colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
7624
7625       •   Simulate sepia tones:
7626
7627                   colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
7628
7629       Commands
7630
7631       This filter supports the all above options as commands.
7632
7633   colorize
7634       Overlay a solid color on the video stream.
7635
7636       The filter accepts the following options:
7637
7638       hue Set the color hue. Allowed range is from 0 to 360.  Default value
7639           is 0.
7640
7641       saturation
7642           Set the color saturation. Allowed range is from 0 to 1.  Default
7643           value is 0.5.
7644
7645       lightness
7646           Set the color lightness. Allowed range is from 0 to 1.  Default
7647           value is 0.5.
7648
7649       mix Set the mix of source lightness. By default is set to 1.0.  Allowed
7650           range is from 0.0 to 1.0.
7651
7652       Commands
7653
7654       This filter supports the all above options as commands.
7655
7656   colorkey
7657       RGB colorspace color keying.  This filter operates on 8-bit RGB format
7658       frames by setting the alpha component of each pixel which falls within
7659       the similarity radius of the key color to 0. The alpha value for pixels
7660       outside the similarity radius depends on the value of the blend option.
7661
7662       The filter accepts the following options:
7663
7664       color
7665           Set the color for which alpha will be set to 0 (full transparency).
7666           See "Color" section in the ffmpeg-utils manual.  Default is
7667           "black".
7668
7669       similarity
7670           Set the radius from the key color within which other colors also
7671           have full transparency.  The computed distance is related to the
7672           unit fractional distance in 3D space between the RGB values of the
7673           key color and the pixel's color. Range is 0.01 to 1.0. 0.01 matches
7674           within a very small radius around the exact key color, while 1.0
7675           matches everything.  Default is 0.01.
7676
7677       blend
7678           Set how the alpha value for pixels that fall outside the similarity
7679           radius is computed.  0.0 makes pixels either fully transparent or
7680           fully opaque.  Higher values result in semi-transparent pixels,
7681           with greater transparency the more similar the pixel color is to
7682           the key color.  Range is 0.0 to 1.0. Default is 0.0.
7683
7684       Examples
7685
7686       •   Make every green pixel in the input image transparent:
7687
7688                   ffmpeg -i input.png -vf colorkey=green out.png
7689
7690       •   Overlay a greenscreen-video on top of a static background image.
7691
7692                   ffmpeg -i background.png -i video.mp4 -filter_complex "[1:v]colorkey=0x3BBD1E:0.3:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" output.flv
7693
7694       Commands
7695
7696       This filter supports same commands as options.  The command accepts the
7697       same syntax of the corresponding option.
7698
7699       If the specified expression is not valid, it is kept at its current
7700       value.
7701
7702   colorhold
7703       Remove all color information for all RGB colors except for certain one.
7704
7705       The filter accepts the following options:
7706
7707       color
7708           The color which will not be replaced with neutral gray.
7709
7710       similarity
7711           Similarity percentage with the above color.  0.01 matches only the
7712           exact key color, while 1.0 matches everything.
7713
7714       blend
7715           Blend percentage. 0.0 makes pixels fully gray.  Higher values
7716           result in more preserved color.
7717
7718       Commands
7719
7720       This filter supports same commands as options.  The command accepts the
7721       same syntax of the corresponding option.
7722
7723       If the specified expression is not valid, it is kept at its current
7724       value.
7725
7726   colorlevels
7727       Adjust video input frames using levels.
7728
7729       The filter accepts the following options:
7730
7731       rimin
7732       gimin
7733       bimin
7734       aimin
7735           Adjust red, green, blue and alpha input black point.  Allowed
7736           ranges for options are "[-1.0, 1.0]". Defaults are 0.
7737
7738       rimax
7739       gimax
7740       bimax
7741       aimax
7742           Adjust red, green, blue and alpha input white point.  Allowed
7743           ranges for options are "[-1.0, 1.0]". Defaults are 1.
7744
7745           Input levels are used to lighten highlights (bright tones), darken
7746           shadows (dark tones), change the balance of bright and dark tones.
7747
7748       romin
7749       gomin
7750       bomin
7751       aomin
7752           Adjust red, green, blue and alpha output black point.  Allowed
7753           ranges for options are "[0, 1.0]". Defaults are 0.
7754
7755       romax
7756       gomax
7757       bomax
7758       aomax
7759           Adjust red, green, blue and alpha output white point.  Allowed
7760           ranges for options are "[0, 1.0]". Defaults are 1.
7761
7762           Output levels allows manual selection of a constrained output level
7763           range.
7764
7765       preserve
7766           Set preserve color mode. The accepted values are:
7767
7768           none
7769               Disable color preserving, this is default.
7770
7771           lum Preserve luminance.
7772
7773           max Preserve max value of RGB triplet.
7774
7775           avg Preserve average value of RGB triplet.
7776
7777           sum Preserve sum value of RGB triplet.
7778
7779           nrm Preserve normalized value of RGB triplet.
7780
7781           pwr Preserve power value of RGB triplet.
7782
7783       Examples
7784
7785       •   Make video output darker:
7786
7787                   colorlevels=rimin=0.058:gimin=0.058:bimin=0.058
7788
7789       •   Increase contrast:
7790
7791                   colorlevels=rimin=0.039:gimin=0.039:bimin=0.039:rimax=0.96:gimax=0.96:bimax=0.96
7792
7793       •   Make video output lighter:
7794
7795                   colorlevels=rimax=0.902:gimax=0.902:bimax=0.902
7796
7797       •   Increase brightness:
7798
7799                   colorlevels=romin=0.5:gomin=0.5:bomin=0.5
7800
7801       Commands
7802
7803       This filter supports the all above options as commands.
7804
7805   colormatrix
7806       Convert color matrix.
7807
7808       The filter accepts the following options:
7809
7810       src
7811       dst Specify the source and destination color matrix. Both values must
7812           be specified.
7813
7814           The accepted values are:
7815
7816           bt709
7817               BT.709
7818
7819           fcc FCC
7820
7821           bt601
7822               BT.601
7823
7824           bt470
7825               BT.470
7826
7827           bt470bg
7828               BT.470BG
7829
7830           smpte170m
7831               SMPTE-170M
7832
7833           smpte240m
7834               SMPTE-240M
7835
7836           bt2020
7837               BT.2020
7838
7839       For example to convert from BT.601 to SMPTE-240M, use the command:
7840
7841               colormatrix=bt601:smpte240m
7842
7843   colorspace
7844       Convert colorspace, transfer characteristics or color primaries.  Input
7845       video needs to have an even size.
7846
7847       The filter accepts the following options:
7848
7849       all Specify all color properties at once.
7850
7851           The accepted values are:
7852
7853           bt470m
7854               BT.470M
7855
7856           bt470bg
7857               BT.470BG
7858
7859           bt601-6-525
7860               BT.601-6 525
7861
7862           bt601-6-625
7863               BT.601-6 625
7864
7865           bt709
7866               BT.709
7867
7868           smpte170m
7869               SMPTE-170M
7870
7871           smpte240m
7872               SMPTE-240M
7873
7874           bt2020
7875               BT.2020
7876
7877       space
7878           Specify output colorspace.
7879
7880           The accepted values are:
7881
7882           bt709
7883               BT.709
7884
7885           fcc FCC
7886
7887           bt470bg
7888               BT.470BG or BT.601-6 625
7889
7890           smpte170m
7891               SMPTE-170M or BT.601-6 525
7892
7893           smpte240m
7894               SMPTE-240M
7895
7896           ycgco
7897               YCgCo
7898
7899           bt2020ncl
7900               BT.2020 with non-constant luminance
7901
7902       trc Specify output transfer characteristics.
7903
7904           The accepted values are:
7905
7906           bt709
7907               BT.709
7908
7909           bt470m
7910               BT.470M
7911
7912           bt470bg
7913               BT.470BG
7914
7915           gamma22
7916               Constant gamma of 2.2
7917
7918           gamma28
7919               Constant gamma of 2.8
7920
7921           smpte170m
7922               SMPTE-170M, BT.601-6 625 or BT.601-6 525
7923
7924           smpte240m
7925               SMPTE-240M
7926
7927           srgb
7928               SRGB
7929
7930           iec61966-2-1
7931               iec61966-2-1
7932
7933           iec61966-2-4
7934               iec61966-2-4
7935
7936           xvycc
7937               xvycc
7938
7939           bt2020-10
7940               BT.2020 for 10-bits content
7941
7942           bt2020-12
7943               BT.2020 for 12-bits content
7944
7945       primaries
7946           Specify output color primaries.
7947
7948           The accepted values are:
7949
7950           bt709
7951               BT.709
7952
7953           bt470m
7954               BT.470M
7955
7956           bt470bg
7957               BT.470BG or BT.601-6 625
7958
7959           smpte170m
7960               SMPTE-170M or BT.601-6 525
7961
7962           smpte240m
7963               SMPTE-240M
7964
7965           film
7966               film
7967
7968           smpte431
7969               SMPTE-431
7970
7971           smpte432
7972               SMPTE-432
7973
7974           bt2020
7975               BT.2020
7976
7977           jedec-p22
7978               JEDEC P22 phosphors
7979
7980       range
7981           Specify output color range.
7982
7983           The accepted values are:
7984
7985           tv  TV (restricted) range
7986
7987           mpeg
7988               MPEG (restricted) range
7989
7990           pc  PC (full) range
7991
7992           jpeg
7993               JPEG (full) range
7994
7995       format
7996           Specify output color format.
7997
7998           The accepted values are:
7999
8000           yuv420p
8001               YUV 4:2:0 planar 8-bits
8002
8003           yuv420p10
8004               YUV 4:2:0 planar 10-bits
8005
8006           yuv420p12
8007               YUV 4:2:0 planar 12-bits
8008
8009           yuv422p
8010               YUV 4:2:2 planar 8-bits
8011
8012           yuv422p10
8013               YUV 4:2:2 planar 10-bits
8014
8015           yuv422p12
8016               YUV 4:2:2 planar 12-bits
8017
8018           yuv444p
8019               YUV 4:4:4 planar 8-bits
8020
8021           yuv444p10
8022               YUV 4:4:4 planar 10-bits
8023
8024           yuv444p12
8025               YUV 4:4:4 planar 12-bits
8026
8027       fast
8028           Do a fast conversion, which skips gamma/primary correction. This
8029           will take significantly less CPU, but will be mathematically
8030           incorrect. To get output compatible with that produced by the
8031           colormatrix filter, use fast=1.
8032
8033       dither
8034           Specify dithering mode.
8035
8036           The accepted values are:
8037
8038           none
8039               No dithering
8040
8041           fsb Floyd-Steinberg dithering
8042
8043       wpadapt
8044           Whitepoint adaptation mode.
8045
8046           The accepted values are:
8047
8048           bradford
8049               Bradford whitepoint adaptation
8050
8051           vonkries
8052               von Kries whitepoint adaptation
8053
8054           identity
8055               identity whitepoint adaptation (i.e. no whitepoint adaptation)
8056
8057       iall
8058           Override all input properties at once. Same accepted values as all.
8059
8060       ispace
8061           Override input colorspace. Same accepted values as space.
8062
8063       iprimaries
8064           Override input color primaries. Same accepted values as primaries.
8065
8066       itrc
8067           Override input transfer characteristics. Same accepted values as
8068           trc.
8069
8070       irange
8071           Override input color range. Same accepted values as range.
8072
8073       The filter converts the transfer characteristics, color space and color
8074       primaries to the specified user values. The output value, if not
8075       specified, is set to a default value based on the "all" property. If
8076       that property is also not specified, the filter will log an error. The
8077       output color range and format default to the same value as the input
8078       color range and format. The input transfer characteristics, color
8079       space, color primaries and color range should be set on the input data.
8080       If any of these are missing, the filter will log an error and no
8081       conversion will take place.
8082
8083       For example to convert the input to SMPTE-240M, use the command:
8084
8085               colorspace=smpte240m
8086
8087   colortemperature
8088       Adjust color temperature in video to simulate variations in ambient
8089       color temperature.
8090
8091       The filter accepts the following options:
8092
8093       temperature
8094           Set the temperature in Kelvin. Allowed range is from 1000 to 40000.
8095           Default value is 6500 K.
8096
8097       mix Set mixing with filtered output. Allowed range is from 0 to 1.
8098           Default value is 1.
8099
8100       pl  Set the amount of preserving lightness. Allowed range is from 0 to
8101           1.  Default value is 0.
8102
8103       Commands
8104
8105       This filter supports same commands as options.
8106
8107   convolution
8108       Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49
8109       elements.
8110
8111       The filter accepts the following options:
8112
8113       0m
8114       1m
8115       2m
8116       3m  Set matrix for each plane.  Matrix is sequence of 9, 25 or 49
8117           signed integers in square mode, and from 1 to 49 odd number of
8118           signed integers in row mode.
8119
8120       0rdiv
8121       1rdiv
8122       2rdiv
8123       3rdiv
8124           Set multiplier for calculated value for each plane.  If unset or 0,
8125           it will be sum of all matrix elements.
8126
8127       0bias
8128       1bias
8129       2bias
8130       3bias
8131           Set bias for each plane. This value is added to the result of the
8132           multiplication.  Useful for making the overall image brighter or
8133           darker. Default is 0.0.
8134
8135       0mode
8136       1mode
8137       2mode
8138       3mode
8139           Set matrix mode for each plane. Can be square, row or column.
8140           Default is square.
8141
8142       Commands
8143
8144       This filter supports the all above options as commands.
8145
8146       Examples
8147
8148       •   Apply sharpen:
8149
8150                   convolution="0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0"
8151
8152       •   Apply blur:
8153
8154                   convolution="1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1/9:1/9:1/9:1/9"
8155
8156       •   Apply edge enhance:
8157
8158                   convolution="0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128"
8159
8160       •   Apply edge detect:
8161
8162                   convolution="0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:5:5:5:1:0:128:128:128"
8163
8164       •   Apply laplacian edge detector which includes diagonals:
8165
8166                   convolution="1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:5:5:5:1:0:128:128:0"
8167
8168       •   Apply emboss:
8169
8170                   convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2"
8171
8172   convolve
8173       Apply 2D convolution of video stream in frequency domain using second
8174       stream as impulse.
8175
8176       The filter accepts the following options:
8177
8178       planes
8179           Set which planes to process.
8180
8181       impulse
8182           Set which impulse video frames will be processed, can be first or
8183           all. Default is all.
8184
8185       The "convolve" filter also supports the framesync options.
8186
8187   copy
8188       Copy the input video source unchanged to the output. This is mainly
8189       useful for testing purposes.
8190
8191   coreimage
8192       Video filtering on GPU using Apple's CoreImage API on OSX.
8193
8194       Hardware acceleration is based on an OpenGL context. Usually, this
8195       means it is processed by video hardware. However, software-based OpenGL
8196       implementations exist which means there is no guarantee for hardware
8197       processing. It depends on the respective OSX.
8198
8199       There are many filters and image generators provided by Apple that come
8200       with a large variety of options. The filter has to be referenced by its
8201       name along with its options.
8202
8203       The coreimage filter accepts the following options:
8204
8205       list_filters
8206           List all available filters and generators along with all their
8207           respective options as well as possible minimum and maximum values
8208           along with the default values.
8209
8210                   list_filters=true
8211
8212       filter
8213           Specify all filters by their respective name and options.  Use
8214           list_filters to determine all valid filter names and options.
8215           Numerical options are specified by a float value and are
8216           automatically clamped to their respective value range.  Vector and
8217           color options have to be specified by a list of space separated
8218           float values. Character escaping has to be done.  A special option
8219           name "default" is available to use default options for a filter.
8220
8221           It is required to specify either "default" or at least one of the
8222           filter options.  All omitted options are used with their default
8223           values.  The syntax of the filter string is as follows:
8224
8225                   filter=<NAME>@<OPTION>=<VALUE>[@<OPTION>=<VALUE>][@...][#<NAME>@<OPTION>=<VALUE>[@<OPTION>=<VALUE>][@...]][#...]
8226
8227       output_rect
8228           Specify a rectangle where the output of the filter chain is copied
8229           into the input image. It is given by a list of space separated
8230           float values:
8231
8232                   output_rect=x\ y\ width\ height
8233
8234           If not given, the output rectangle equals the dimensions of the
8235           input image.  The output rectangle is automatically cropped at the
8236           borders of the input image. Negative values are valid for each
8237           component.
8238
8239                   output_rect=25\ 25\ 100\ 100
8240
8241       Several filters can be chained for successive processing without GPU-
8242       HOST transfers allowing for fast processing of complex filter chains.
8243       Currently, only filters with zero (generators) or exactly one (filters)
8244       input image and one output image are supported. Also, transition
8245       filters are not yet usable as intended.
8246
8247       Some filters generate output images with additional padding depending
8248       on the respective filter kernel. The padding is automatically removed
8249       to ensure the filter output has the same size as the input image.
8250
8251       For image generators, the size of the output image is determined by the
8252       previous output image of the filter chain or the input image of the
8253       whole filterchain, respectively. The generators do not use the pixel
8254       information of this image to generate their output. However, the
8255       generated output is blended onto this image, resulting in partial or
8256       complete coverage of the output image.
8257
8258       The coreimagesrc video source can be used for generating input images
8259       which are directly fed into the filter chain. By using it, providing
8260       input images by another video source or an input video is not required.
8261
8262       Examples
8263
8264       •   List all filters available:
8265
8266                   coreimage=list_filters=true
8267
8268       •   Use the CIBoxBlur filter with default options to blur an image:
8269
8270                   coreimage=filter=CIBoxBlur@default
8271
8272       •   Use a filter chain with CISepiaTone at default values and
8273           CIVignetteEffect with its center at 100x100 and a radius of 50
8274           pixels:
8275
8276                   coreimage=filter=CIBoxBlur@default#CIVignetteEffect@inputCenter=100\ 100@inputRadius=50
8277
8278       •   Use nullsrc and CIQRCodeGenerator to create a QR code for the
8279           FFmpeg homepage, given as complete and escaped command-line for
8280           Apple's standard bash shell:
8281
8282                   ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
8283
8284   cover_rect
8285       Cover a rectangular object
8286
8287       It accepts the following options:
8288
8289       cover
8290           Filepath of the optional cover image, needs to be in yuv420.
8291
8292       mode
8293           Set covering mode.
8294
8295           It accepts the following values:
8296
8297           cover
8298               cover it by the supplied image
8299
8300           blur
8301               cover it by interpolating the surrounding pixels
8302
8303           Default value is blur.
8304
8305       Examples
8306
8307       •   Cover a rectangular object by the supplied image of a given video
8308           using ffmpeg:
8309
8310                   ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
8311
8312   crop
8313       Crop the input video to given dimensions.
8314
8315       It accepts the following parameters:
8316
8317       w, out_w
8318           The width of the output video. It defaults to "iw".  This
8319           expression is evaluated only once during the filter configuration,
8320           or when the w or out_w command is sent.
8321
8322       h, out_h
8323           The height of the output video. It defaults to "ih".  This
8324           expression is evaluated only once during the filter configuration,
8325           or when the h or out_h command is sent.
8326
8327       x   The horizontal position, in the input video, of the left edge of
8328           the output video. It defaults to "(in_w-out_w)/2".  This expression
8329           is evaluated per-frame.
8330
8331       y   The vertical position, in the input video, of the top edge of the
8332           output video.  It defaults to "(in_h-out_h)/2".  This expression is
8333           evaluated per-frame.
8334
8335       keep_aspect
8336           If set to 1 will force the output display aspect ratio to be the
8337           same of the input, by changing the output sample aspect ratio. It
8338           defaults to 0.
8339
8340       exact
8341           Enable exact cropping. If enabled, subsampled videos will be
8342           cropped at exact width/height/x/y as specified and will not be
8343           rounded to nearest smaller value.  It defaults to 0.
8344
8345       The out_w, out_h, x, y parameters are expressions containing the
8346       following constants:
8347
8348       x
8349       y   The computed values for x and y. They are evaluated for each new
8350           frame.
8351
8352       in_w
8353       in_h
8354           The input width and height.
8355
8356       iw
8357       ih  These are the same as in_w and in_h.
8358
8359       out_w
8360       out_h
8361           The output (cropped) width and height.
8362
8363       ow
8364       oh  These are the same as out_w and out_h.
8365
8366       a   same as iw / ih
8367
8368       sar input sample aspect ratio
8369
8370       dar input display aspect ratio, it is the same as (iw / ih) * sar
8371
8372       hsub
8373       vsub
8374           horizontal and vertical chroma subsample values. For example for
8375           the pixel format "yuv422p" hsub is 2 and vsub is 1.
8376
8377       n   The number of the input frame, starting from 0.
8378
8379       pos the position in the file of the input frame, NAN if unknown
8380
8381       t   The timestamp expressed in seconds. It's NAN if the input timestamp
8382           is unknown.
8383
8384       The expression for out_w may depend on the value of out_h, and the
8385       expression for out_h may depend on out_w, but they cannot depend on x
8386       and y, as x and y are evaluated after out_w and out_h.
8387
8388       The x and y parameters specify the expressions for the position of the
8389       top-left corner of the output (non-cropped) area. They are evaluated
8390       for each frame. If the evaluated value is not valid, it is approximated
8391       to the nearest valid value.
8392
8393       The expression for x may depend on y, and the expression for y may
8394       depend on x.
8395
8396       Examples
8397
8398       •   Crop area with size 100x100 at position (12,34).
8399
8400                   crop=100:100:12:34
8401
8402           Using named options, the example above becomes:
8403
8404                   crop=w=100:h=100:x=12:y=34
8405
8406       •   Crop the central input area with size 100x100:
8407
8408                   crop=100:100
8409
8410       •   Crop the central input area with size 2/3 of the input video:
8411
8412                   crop=2/3*in_w:2/3*in_h
8413
8414       •   Crop the input video central square:
8415
8416                   crop=out_w=in_h
8417                   crop=in_h
8418
8419       •   Delimit the rectangle with the top-left corner placed at position
8420           100:100 and the right-bottom corner corresponding to the right-
8421           bottom corner of the input image.
8422
8423                   crop=in_w-100:in_h-100:100:100
8424
8425       •   Crop 10 pixels from the left and right borders, and 20 pixels from
8426           the top and bottom borders
8427
8428                   crop=in_w-2*10:in_h-2*20
8429
8430       •   Keep only the bottom right quarter of the input image:
8431
8432                   crop=in_w/2:in_h/2:in_w/2:in_h/2
8433
8434       •   Crop height for getting Greek harmony:
8435
8436                   crop=in_w:1/PHI*in_w
8437
8438       •   Apply trembling effect:
8439
8440                   crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)
8441
8442       •   Apply erratic camera effect depending on timestamp:
8443
8444                   crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)"
8445
8446       •   Set x depending on the value of y:
8447
8448                   crop=in_w/2:in_h/2:y:10+10*sin(n/10)
8449
8450       Commands
8451
8452       This filter supports the following commands:
8453
8454       w, out_w
8455       h, out_h
8456       x
8457       y   Set width/height of the output video and the horizontal/vertical
8458           position in the input video.  The command accepts the same syntax
8459           of the corresponding option.
8460
8461           If the specified expression is not valid, it is kept at its current
8462           value.
8463
8464   cropdetect
8465       Auto-detect the crop size.
8466
8467       It calculates the necessary cropping parameters and prints the
8468       recommended parameters via the logging system. The detected dimensions
8469       correspond to the non-black area of the input video.
8470
8471       It accepts the following parameters:
8472
8473       limit
8474           Set higher black value threshold, which can be optionally specified
8475           from nothing (0) to everything (255 for 8-bit based formats). An
8476           intensity value greater to the set value is considered non-black.
8477           It defaults to 24.  You can also specify a value between 0.0 and
8478           1.0 which will be scaled depending on the bitdepth of the pixel
8479           format.
8480
8481       round
8482           The value which the width/height should be divisible by. It
8483           defaults to 16. The offset is automatically adjusted to center the
8484           video. Use 2 to get only even dimensions (needed for 4:2:2 video).
8485           16 is best when encoding to most video codecs.
8486
8487       skip
8488           Set the number of initial frames for which evaluation is skipped.
8489           Default is 2. Range is 0 to INT_MAX.
8490
8491       reset_count, reset
8492           Set the counter that determines after how many frames cropdetect
8493           will reset the previously detected largest video area and start
8494           over to detect the current optimal crop area. Default value is 0.
8495
8496           This can be useful when channel logos distort the video area. 0
8497           indicates 'never reset', and returns the largest area encountered
8498           during playback.
8499
8500   cue
8501       Delay video filtering until a given wallclock timestamp. The filter
8502       first passes on preroll amount of frames, then it buffers at most
8503       buffer amount of frames and waits for the cue. After reaching the cue
8504       it forwards the buffered frames and also any subsequent frames coming
8505       in its input.
8506
8507       The filter can be used synchronize the output of multiple ffmpeg
8508       processes for realtime output devices like decklink. By putting the
8509       delay in the filtering chain and pre-buffering frames the process can
8510       pass on data to output almost immediately after the target wallclock
8511       timestamp is reached.
8512
8513       Perfect frame accuracy cannot be guaranteed, but the result is good
8514       enough for some use cases.
8515
8516       cue The cue timestamp expressed in a UNIX timestamp in microseconds.
8517           Default is 0.
8518
8519       preroll
8520           The duration of content to pass on as preroll expressed in seconds.
8521           Default is 0.
8522
8523       buffer
8524           The maximum duration of content to buffer before waiting for the
8525           cue expressed in seconds. Default is 0.
8526
8527   curves
8528       Apply color adjustments using curves.
8529
8530       This filter is similar to the Adobe Photoshop and GIMP curves tools.
8531       Each component (red, green and blue) has its values defined by N key
8532       points tied from each other using a smooth curve. The x-axis represents
8533       the pixel values from the input frame, and the y-axis the new pixel
8534       values to be set for the output frame.
8535
8536       By default, a component curve is defined by the two points (0;0) and
8537       (1;1). This creates a straight line where each original pixel value is
8538       "adjusted" to its own value, which means no change to the image.
8539
8540       The filter allows you to redefine these two points and add some more. A
8541       new curve (using a natural cubic spline interpolation) will be define
8542       to pass smoothly through all these new coordinates. The new defined
8543       points needs to be strictly increasing over the x-axis, and their x and
8544       y values must be in the [0;1] interval.  If the computed curves
8545       happened to go outside the vector spaces, the values will be clipped
8546       accordingly.
8547
8548       The filter accepts the following options:
8549
8550       preset
8551           Select one of the available color presets. This option can be used
8552           in addition to the r, g, b parameters; in this case, the later
8553           options takes priority on the preset values.  Available presets
8554           are:
8555
8556           none
8557           color_negative
8558           cross_process
8559           darker
8560           increase_contrast
8561           lighter
8562           linear_contrast
8563           medium_contrast
8564           negative
8565           strong_contrast
8566           vintage
8567
8568           Default is "none".
8569
8570       master, m
8571           Set the master key points. These points will define a second pass
8572           mapping. It is sometimes called a "luminance" or "value" mapping.
8573           It can be used with r, g, b or all since it acts like a post-
8574           processing LUT.
8575
8576       red, r
8577           Set the key points for the red component.
8578
8579       green, g
8580           Set the key points for the green component.
8581
8582       blue, b
8583           Set the key points for the blue component.
8584
8585       all Set the key points for all components (not including master).  Can
8586           be used in addition to the other key points component options. In
8587           this case, the unset component(s) will fallback on this all
8588           setting.
8589
8590       psfile
8591           Specify a Photoshop curves file (".acv") to import the settings
8592           from.
8593
8594       plot
8595           Save Gnuplot script of the curves in specified file.
8596
8597       To avoid some filtergraph syntax conflicts, each key points list need
8598       to be defined using the following syntax: "x0/y0 x1/y1 x2/y2 ...".
8599
8600       Commands
8601
8602       This filter supports same commands as options.
8603
8604       Examples
8605
8606       •   Increase slightly the middle level of blue:
8607
8608                   curves=blue='0/0 0.5/0.58 1/1'
8609
8610       •   Vintage effect:
8611
8612                   curves=r='0/0.11 .42/.51 1/0.95':g='0/0 0.50/0.48 1/1':b='0/0.22 .49/.44 1/0.8'
8613
8614           Here we obtain the following coordinates for each components:
8615
8616           red "(0;0.11) (0.42;0.51) (1;0.95)"
8617
8618           green
8619               "(0;0) (0.50;0.48) (1;1)"
8620
8621           blue
8622               "(0;0.22) (0.49;0.44) (1;0.80)"
8623
8624       •   The previous example can also be achieved with the associated
8625           built-in preset:
8626
8627                   curves=preset=vintage
8628
8629       •   Or simply:
8630
8631                   curves=vintage
8632
8633       •   Use a Photoshop preset and redefine the points of the green
8634           component:
8635
8636                   curves=psfile='MyCurvesPresets/purple.acv':green='0/0 0.45/0.53 1/1'
8637
8638       •   Check out the curves of the "cross_process" profile using ffmpeg
8639           and gnuplot:
8640
8641                   ffmpeg -f lavfi -i color -vf curves=cross_process:plot=/tmp/curves.plt -frames:v 1 -f null -
8642                   gnuplot -p /tmp/curves.plt
8643
8644   datascope
8645       Video data analysis filter.
8646
8647       This filter shows hexadecimal pixel values of part of video.
8648
8649       The filter accepts the following options:
8650
8651       size, s
8652           Set output video size.
8653
8654       x   Set x offset from where to pick pixels.
8655
8656       y   Set y offset from where to pick pixels.
8657
8658       mode
8659           Set scope mode, can be one of the following:
8660
8661           mono
8662               Draw hexadecimal pixel values with white color on black
8663               background.
8664
8665           color
8666               Draw hexadecimal pixel values with input video pixel color on
8667               black background.
8668
8669           color2
8670               Draw hexadecimal pixel values on color background picked from
8671               input video, the text color is picked in such way so its always
8672               visible.
8673
8674       axis
8675           Draw rows and columns numbers on left and top of video.
8676
8677       opacity
8678           Set background opacity.
8679
8680       format
8681           Set display number format. Can be "hex", or "dec". Default is
8682           "hex".
8683
8684       components
8685           Set pixel components to display. By default all pixel components
8686           are displayed.
8687
8688       Commands
8689
8690       This filter supports same commands as options excluding "size" option.
8691
8692   dblur
8693       Apply Directional blur filter.
8694
8695       The filter accepts the following options:
8696
8697       angle
8698           Set angle of directional blur. Default is 45.
8699
8700       radius
8701           Set radius of directional blur. Default is 5.
8702
8703       planes
8704           Set which planes to filter. By default all planes are filtered.
8705
8706       Commands
8707
8708       This filter supports same commands as options.  The command accepts the
8709       same syntax of the corresponding option.
8710
8711       If the specified expression is not valid, it is kept at its current
8712       value.
8713
8714   dctdnoiz
8715       Denoise frames using 2D DCT (frequency domain filtering).
8716
8717       This filter is not designed for real time.
8718
8719       The filter accepts the following options:
8720
8721       sigma, s
8722           Set the noise sigma constant.
8723
8724           This sigma defines a hard threshold of "3 * sigma"; every DCT
8725           coefficient (absolute value) below this threshold with be dropped.
8726
8727           If you need a more advanced filtering, see expr.
8728
8729           Default is 0.
8730
8731       overlap
8732           Set number overlapping pixels for each block. Since the filter can
8733           be slow, you may want to reduce this value, at the cost of a less
8734           effective filter and the risk of various artefacts.
8735
8736           If the overlapping value doesn't permit processing the whole input
8737           width or height, a warning will be displayed and according borders
8738           won't be denoised.
8739
8740           Default value is blocksize-1, which is the best possible setting.
8741
8742       expr, e
8743           Set the coefficient factor expression.
8744
8745           For each coefficient of a DCT block, this expression will be
8746           evaluated as a multiplier value for the coefficient.
8747
8748           If this is option is set, the sigma option will be ignored.
8749
8750           The absolute value of the coefficient can be accessed through the c
8751           variable.
8752
8753       n   Set the blocksize using the number of bits. "1<<n" defines the
8754           blocksize, which is the width and height of the processed blocks.
8755
8756           The default value is 3 (8x8) and can be raised to 4 for a blocksize
8757           of 16x16. Note that changing this setting has huge consequences on
8758           the speed processing. Also, a larger block size does not
8759           necessarily means a better de-noising.
8760
8761       Examples
8762
8763       Apply a denoise with a sigma of 4.5:
8764
8765               dctdnoiz=4.5
8766
8767       The same operation can be achieved using the expression system:
8768
8769               dctdnoiz=e='gte(c, 4.5*3)'
8770
8771       Violent denoise using a block size of "16x16":
8772
8773               dctdnoiz=15:n=4
8774
8775   deband
8776       Remove banding artifacts from input video.  It works by replacing
8777       banded pixels with average value of referenced pixels.
8778
8779       The filter accepts the following options:
8780
8781       1thr
8782       2thr
8783       3thr
8784       4thr
8785           Set banding detection threshold for each plane. Default is 0.02.
8786           Valid range is 0.00003 to 0.5.  If difference between current pixel
8787           and reference pixel is less than threshold, it will be considered
8788           as banded.
8789
8790       range, r
8791           Banding detection range in pixels. Default is 16. If positive,
8792           random number in range 0 to set value will be used. If negative,
8793           exact absolute value will be used.  The range defines square of
8794           four pixels around current pixel.
8795
8796       direction, d
8797           Set direction in radians from which four pixel will be compared. If
8798           positive, random direction from 0 to set direction will be picked.
8799           If negative, exact of absolute value will be picked. For example
8800           direction 0, -PI or -2*PI radians will pick only pixels on same row
8801           and -PI/2 will pick only pixels on same column.
8802
8803       blur, b
8804           If enabled, current pixel is compared with average value of all
8805           four surrounding pixels. The default is enabled. If disabled
8806           current pixel is compared with all four surrounding pixels. The
8807           pixel is considered banded if only all four differences with
8808           surrounding pixels are less than threshold.
8809
8810       coupling, c
8811           If enabled, current pixel is changed if and only if all pixel
8812           components are banded, e.g. banding detection threshold is
8813           triggered for all color components.  The default is disabled.
8814
8815       Commands
8816
8817       This filter supports the all above options as commands.
8818
8819   deblock
8820       Remove blocking artifacts from input video.
8821
8822       The filter accepts the following options:
8823
8824       filter
8825           Set filter type, can be weak or strong. Default is strong.  This
8826           controls what kind of deblocking is applied.
8827
8828       block
8829           Set size of block, allowed range is from 4 to 512. Default is 8.
8830
8831       alpha
8832       beta
8833       gamma
8834       delta
8835           Set blocking detection thresholds. Allowed range is 0 to 1.
8836           Defaults are: 0.098 for alpha and 0.05 for the rest.  Using higher
8837           threshold gives more deblocking strength.  Setting alpha controls
8838           threshold detection at exact edge of block.  Remaining options
8839           controls threshold detection near the edge. Each one for
8840           below/above or left/right. Setting any of those to 0 disables
8841           deblocking.
8842
8843       planes
8844           Set planes to filter. Default is to filter all available planes.
8845
8846       Examples
8847
8848       •   Deblock using weak filter and block size of 4 pixels.
8849
8850                   deblock=filter=weak:block=4
8851
8852       •   Deblock using strong filter, block size of 4 pixels and custom
8853           thresholds for deblocking more edges.
8854
8855                   deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05
8856
8857       •   Similar as above, but filter only first plane.
8858
8859                   deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=1
8860
8861       •   Similar as above, but filter only second and third plane.
8862
8863                   deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=6
8864
8865       Commands
8866
8867       This filter supports the all above options as commands.
8868
8869   decimate
8870       Drop duplicated frames at regular intervals.
8871
8872       The filter accepts the following options:
8873
8874       cycle
8875           Set the number of frames from which one will be dropped. Setting
8876           this to N means one frame in every batch of N frames will be
8877           dropped.  Default is 5.
8878
8879       dupthresh
8880           Set the threshold for duplicate detection. If the difference metric
8881           for a frame is less than or equal to this value, then it is
8882           declared as duplicate. Default is 1.1
8883
8884       scthresh
8885           Set scene change threshold. Default is 15.
8886
8887       blockx
8888       blocky
8889           Set the size of the x and y-axis blocks used during metric
8890           calculations.  Larger blocks give better noise suppression, but
8891           also give worse detection of small movements. Must be a power of
8892           two. Default is 32.
8893
8894       ppsrc
8895           Mark main input as a pre-processed input and activate clean source
8896           input stream. This allows the input to be pre-processed with
8897           various filters to help the metrics calculation while keeping the
8898           frame selection lossless. When set to 1, the first stream is for
8899           the pre-processed input, and the second stream is the clean source
8900           from where the kept frames are chosen. Default is 0.
8901
8902       chroma
8903           Set whether or not chroma is considered in the metric calculations.
8904           Default is 1.
8905
8906   deconvolve
8907       Apply 2D deconvolution of video stream in frequency domain using second
8908       stream as impulse.
8909
8910       The filter accepts the following options:
8911
8912       planes
8913           Set which planes to process.
8914
8915       impulse
8916           Set which impulse video frames will be processed, can be first or
8917           all. Default is all.
8918
8919       noise
8920           Set noise when doing divisions. Default is 0.0000001. Useful when
8921           width and height are not same and not power of 2 or if stream prior
8922           to convolving had noise.
8923
8924       The "deconvolve" filter also supports the framesync options.
8925
8926   dedot
8927       Reduce cross-luminance (dot-crawl) and cross-color (rainbows) from
8928       video.
8929
8930       It accepts the following options:
8931
8932       m   Set mode of operation. Can be combination of dotcrawl for cross-
8933           luminance reduction and/or rainbows for cross-color reduction.
8934
8935       lt  Set spatial luma threshold. Lower values increases reduction of
8936           cross-luminance.
8937
8938       tl  Set tolerance for temporal luma. Higher values increases reduction
8939           of cross-luminance.
8940
8941       tc  Set tolerance for chroma temporal variation. Higher values
8942           increases reduction of cross-color.
8943
8944       ct  Set temporal chroma threshold. Lower values increases reduction of
8945           cross-color.
8946
8947   deflate
8948       Apply deflate effect to the video.
8949
8950       This filter replaces the pixel by the local(3x3) average by taking into
8951       account only values lower than the pixel.
8952
8953       It accepts the following options:
8954
8955       threshold0
8956       threshold1
8957       threshold2
8958       threshold3
8959           Limit the maximum change for each plane, default is 65535.  If 0,
8960           plane will remain unchanged.
8961
8962       Commands
8963
8964       This filter supports the all above options as commands.
8965
8966   deflicker
8967       Remove temporal frame luminance variations.
8968
8969       It accepts the following options:
8970
8971       size, s
8972           Set moving-average filter size in frames. Default is 5. Allowed
8973           range is 2 - 129.
8974
8975       mode, m
8976           Set averaging mode to smooth temporal luminance variations.
8977
8978           Available values are:
8979
8980           am  Arithmetic mean
8981
8982           gm  Geometric mean
8983
8984           hm  Harmonic mean
8985
8986           qm  Quadratic mean
8987
8988           cm  Cubic mean
8989
8990           pm  Power mean
8991
8992           median
8993               Median
8994
8995       bypass
8996           Do not actually modify frame. Useful when one only wants metadata.
8997
8998   dejudder
8999       Remove judder produced by partially interlaced telecined content.
9000
9001       Judder can be introduced, for instance, by pullup filter. If the
9002       original source was partially telecined content then the output of
9003       "pullup,dejudder" will have a variable frame rate. May change the
9004       recorded frame rate of the container. Aside from that change, this
9005       filter will not affect constant frame rate video.
9006
9007       The option available in this filter is:
9008
9009       cycle
9010           Specify the length of the window over which the judder repeats.
9011
9012           Accepts any integer greater than 1. Useful values are:
9013
9014           4   If the original was telecined from 24 to 30 fps (Film to NTSC).
9015
9016           5   If the original was telecined from 25 to 30 fps (PAL to NTSC).
9017
9018           20  If a mixture of the two.
9019
9020           The default is 4.
9021
9022   delogo
9023       Suppress a TV station logo by a simple interpolation of the surrounding
9024       pixels. Just set a rectangle covering the logo and watch it disappear
9025       (and sometimes something even uglier appear - your mileage may vary).
9026
9027       It accepts the following parameters:
9028
9029       x
9030       y   Specify the top left corner coordinates of the logo. They must be
9031           specified.
9032
9033       w
9034       h   Specify the width and height of the logo to clear. They must be
9035           specified.
9036
9037       show
9038           When set to 1, a green rectangle is drawn on the screen to simplify
9039           finding the right x, y, w, and h parameters.  The default value is
9040           0.
9041
9042           The rectangle is drawn on the outermost pixels which will be
9043           (partly) replaced with interpolated values. The values of the next
9044           pixels immediately outside this rectangle in each direction will be
9045           used to compute the interpolated pixel values inside the rectangle.
9046
9047       Examples
9048
9049       •   Set a rectangle covering the area with top left corner coordinates
9050           0,0 and size 100x77:
9051
9052                   delogo=x=0:y=0:w=100:h=77
9053
9054   derain
9055       Remove the rain in the input image/video by applying the derain methods
9056       based on convolutional neural networks. Supported models:
9057
9058       •   Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN).
9059           See
9060           <http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf>.
9061
9062       Training as well as model generation scripts are provided in the
9063       repository at <https://github.com/XueweiMeng/derain_filter.git>.
9064
9065       Native model files (.model) can be generated from TensorFlow model
9066       files (.pb) by using tools/python/convert.py
9067
9068       The filter accepts the following options:
9069
9070       filter_type
9071           Specify which filter to use. This option accepts the following
9072           values:
9073
9074           derain
9075               Derain filter. To conduct derain filter, you need to use a
9076               derain model.
9077
9078           dehaze
9079               Dehaze filter. To conduct dehaze filter, you need to use a
9080               dehaze model.
9081
9082           Default value is derain.
9083
9084       dnn_backend
9085           Specify which DNN backend to use for model loading and execution.
9086           This option accepts the following values:
9087
9088           native
9089               Native implementation of DNN loading and execution.
9090
9091           tensorflow
9092               TensorFlow backend. To enable this backend you need to install
9093               the TensorFlow for C library (see
9094               <https://www.tensorflow.org/install/lang_c>) and configure
9095               FFmpeg with "--enable-libtensorflow"
9096
9097           Default value is native.
9098
9099       model
9100           Set path to model file specifying network architecture and its
9101           parameters.  Note that different backends use different file
9102           formats. TensorFlow and native backend can load files for only its
9103           format.
9104
9105       To get full functionality (such as async execution), please use the
9106       dnn_processing filter.
9107
9108   deshake
9109       Attempt to fix small changes in horizontal and/or vertical shift. This
9110       filter helps remove camera shake from hand-holding a camera, bumping a
9111       tripod, moving on a vehicle, etc.
9112
9113       The filter accepts the following options:
9114
9115       x
9116       y
9117       w
9118       h   Specify a rectangular area where to limit the search for motion
9119           vectors.  If desired the search for motion vectors can be limited
9120           to a rectangular area of the frame defined by its top left corner,
9121           width and height. These parameters have the same meaning as the
9122           drawbox filter which can be used to visualise the position of the
9123           bounding box.
9124
9125           This is useful when simultaneous movement of subjects within the
9126           frame might be confused for camera motion by the motion vector
9127           search.
9128
9129           If any or all of x, y, w and h are set to -1 then the full frame is
9130           used. This allows later options to be set without specifying the
9131           bounding box for the motion vector search.
9132
9133           Default - search the whole frame.
9134
9135       rx
9136       ry  Specify the maximum extent of movement in x and y directions in the
9137           range 0-64 pixels. Default 16.
9138
9139       edge
9140           Specify how to generate pixels to fill blanks at the edge of the
9141           frame. Available values are:
9142
9143           blank, 0
9144               Fill zeroes at blank locations
9145
9146           original, 1
9147               Original image at blank locations
9148
9149           clamp, 2
9150               Extruded edge value at blank locations
9151
9152           mirror, 3
9153               Mirrored edge at blank locations
9154
9155           Default value is mirror.
9156
9157       blocksize
9158           Specify the blocksize to use for motion search. Range 4-128 pixels,
9159           default 8.
9160
9161       contrast
9162           Specify the contrast threshold for blocks. Only blocks with more
9163           than the specified contrast (difference between darkest and
9164           lightest pixels) will be considered. Range 1-255, default 125.
9165
9166       search
9167           Specify the search strategy. Available values are:
9168
9169           exhaustive, 0
9170               Set exhaustive search
9171
9172           less, 1
9173               Set less exhaustive search.
9174
9175           Default value is exhaustive.
9176
9177       filename
9178           If set then a detailed log of the motion search is written to the
9179           specified file.
9180
9181   despill
9182       Remove unwanted contamination of foreground colors, caused by reflected
9183       color of greenscreen or bluescreen.
9184
9185       This filter accepts the following options:
9186
9187       type
9188           Set what type of despill to use.
9189
9190       mix Set how spillmap will be generated.
9191
9192       expand
9193           Set how much to get rid of still remaining spill.
9194
9195       red Controls amount of red in spill area.
9196
9197       green
9198           Controls amount of green in spill area.  Should be -1 for
9199           greenscreen.
9200
9201       blue
9202           Controls amount of blue in spill area.  Should be -1 for
9203           bluescreen.
9204
9205       brightness
9206           Controls brightness of spill area, preserving colors.
9207
9208       alpha
9209           Modify alpha from generated spillmap.
9210
9211       Commands
9212
9213       This filter supports the all above options as commands.
9214
9215   detelecine
9216       Apply an exact inverse of the telecine operation. It requires a
9217       predefined pattern specified using the pattern option which must be the
9218       same as that passed to the telecine filter.
9219
9220       This filter accepts the following options:
9221
9222       first_field
9223           top, t
9224               top field first
9225
9226           bottom, b
9227               bottom field first The default value is "top".
9228
9229       pattern
9230           A string of numbers representing the pulldown pattern you wish to
9231           apply.  The default value is 23.
9232
9233       start_frame
9234           A number representing position of the first frame with respect to
9235           the telecine pattern. This is to be used if the stream is cut. The
9236           default value is 0.
9237
9238   dilation
9239       Apply dilation effect to the video.
9240
9241       This filter replaces the pixel by the local(3x3) maximum.
9242
9243       It accepts the following options:
9244
9245       threshold0
9246       threshold1
9247       threshold2
9248       threshold3
9249           Limit the maximum change for each plane, default is 65535.  If 0,
9250           plane will remain unchanged.
9251
9252       coordinates
9253           Flag which specifies the pixel to refer to. Default is 255 i.e. all
9254           eight pixels are used.
9255
9256           Flags to local 3x3 coordinates maps like this:
9257
9258               1 2 3
9259               4   5
9260               6 7 8
9261
9262       Commands
9263
9264       This filter supports the all above options as commands.
9265
9266   displace
9267       Displace pixels as indicated by second and third input stream.
9268
9269       It takes three input streams and outputs one stream, the first input is
9270       the source, and second and third input are displacement maps.
9271
9272       The second input specifies how much to displace pixels along the
9273       x-axis, while the third input specifies how much to displace pixels
9274       along the y-axis.  If one of displacement map streams terminates, last
9275       frame from that displacement map will be used.
9276
9277       Note that once generated, displacements maps can be reused over and
9278       over again.
9279
9280       A description of the accepted options follows.
9281
9282       edge
9283           Set displace behavior for pixels that are out of range.
9284
9285           Available values are:
9286
9287           blank
9288               Missing pixels are replaced by black pixels.
9289
9290           smear
9291               Adjacent pixels will spread out to replace missing pixels.
9292
9293           wrap
9294               Out of range pixels are wrapped so they point to pixels of
9295               other side.
9296
9297           mirror
9298               Out of range pixels will be replaced with mirrored pixels.
9299
9300           Default is smear.
9301
9302       Examples
9303
9304       •   Add ripple effect to rgb input of video size hd720:
9305
9306                   ffmpeg -i INPUT -f lavfi -i nullsrc=s=hd720,lutrgb=128:128:128 -f lavfi -i nullsrc=s=hd720,geq='r=128+30*sin(2*PI*X/400+T):g=128+30*sin(2*PI*X/400+T):b=128+30*sin(2*PI*X/400+T)' -lavfi '[0][1][2]displace' OUTPUT
9307
9308       •   Add wave effect to rgb input of video size hd720:
9309
9310                   ffmpeg -i INPUT -f lavfi -i nullsrc=hd720,geq='r=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T)):g=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T)):b=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T))' -lavfi '[1]split[x][y],[0][x][y]displace' OUTPUT
9311
9312   dnn_classify
9313       Do classification with deep neural networks based on bounding boxes.
9314
9315       The filter accepts the following options:
9316
9317       dnn_backend
9318           Specify which DNN backend to use for model loading and execution.
9319           This option accepts only openvino now, tensorflow backends will be
9320           added.
9321
9322       model
9323           Set path to model file specifying network architecture and its
9324           parameters.  Note that different backends use different file
9325           formats.
9326
9327       input
9328           Set the input name of the dnn network.
9329
9330       output
9331           Set the output name of the dnn network.
9332
9333       confidence
9334           Set the confidence threshold (default: 0.5).
9335
9336       labels
9337           Set path to label file specifying the mapping between label id and
9338           name.  Each label name is written in one line, tailing spaces and
9339           empty lines are skipped.  The first line is the name of label id 0,
9340           and the second line is the name of label id 1, etc.  The label id
9341           is considered as name if the label file is not provided.
9342
9343       backend_configs
9344           Set the configs to be passed into backend
9345
9346           For tensorflow backend, you can set its configs with sess_config
9347           options, please use tools/python/tf_sess_config.py to get the
9348           configs for your system.
9349
9350   dnn_detect
9351       Do object detection with deep neural networks.
9352
9353       The filter accepts the following options:
9354
9355       dnn_backend
9356           Specify which DNN backend to use for model loading and execution.
9357           This option accepts only openvino now, tensorflow backends will be
9358           added.
9359
9360       model
9361           Set path to model file specifying network architecture and its
9362           parameters.  Note that different backends use different file
9363           formats.
9364
9365       input
9366           Set the input name of the dnn network.
9367
9368       output
9369           Set the output name of the dnn network.
9370
9371       confidence
9372           Set the confidence threshold (default: 0.5).
9373
9374       labels
9375           Set path to label file specifying the mapping between label id and
9376           name.  Each label name is written in one line, tailing spaces and
9377           empty lines are skipped.  The first line is the name of label id 0
9378           (usually it is 'background'), and the second line is the name of
9379           label id 1, etc.  The label id is considered as name if the label
9380           file is not provided.
9381
9382       backend_configs
9383           Set the configs to be passed into backend. To use async execution,
9384           set async (default: set).  Roll back to sync execution if the
9385           backend does not support async.
9386
9387   dnn_processing
9388       Do image processing with deep neural networks. It works together with
9389       another filter which converts the pixel format of the Frame to what the
9390       dnn network requires.
9391
9392       The filter accepts the following options:
9393
9394       dnn_backend
9395           Specify which DNN backend to use for model loading and execution.
9396           This option accepts the following values:
9397
9398           native
9399               Native implementation of DNN loading and execution.
9400
9401           tensorflow
9402               TensorFlow backend. To enable this backend you need to install
9403               the TensorFlow for C library (see
9404               <https://www.tensorflow.org/install/lang_c>) and configure
9405               FFmpeg with "--enable-libtensorflow"
9406
9407           openvino
9408               OpenVINO backend. To enable this backend you need to build and
9409               install the OpenVINO for C library (see
9410               <https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md>)
9411               and configure FFmpeg with "--enable-libopenvino"
9412               (--extra-cflags=-I... --extra-ldflags=-L... might be needed if
9413               the header files and libraries are not installed into system
9414               path)
9415
9416           Default value is native.
9417
9418       model
9419           Set path to model file specifying network architecture and its
9420           parameters.  Note that different backends use different file
9421           formats. TensorFlow, OpenVINO and native backend can load files for
9422           only its format.
9423
9424           Native model file (.model) can be generated from TensorFlow model
9425           file (.pb) by using tools/python/convert.py
9426
9427       input
9428           Set the input name of the dnn network.
9429
9430       output
9431           Set the output name of the dnn network.
9432
9433       backend_configs
9434           Set the configs to be passed into backend. To use async execution,
9435           set async (default: set).  Roll back to sync execution if the
9436           backend does not support async.
9437
9438           For tensorflow backend, you can set its configs with sess_config
9439           options, please use tools/python/tf_sess_config.py to get the
9440           configs of TensorFlow backend for your system.
9441
9442       Examples
9443
9444       •   Remove rain in rgb24 frame with can.pb (see derain filter):
9445
9446                   ./ffmpeg -i rain.jpg -vf format=rgb24,dnn_processing=dnn_backend=tensorflow:model=can.pb:input=x:output=y derain.jpg
9447
9448       •   Halve the pixel value of the frame with format gray32f:
9449
9450                   ffmpeg -i input.jpg -vf format=grayf32,dnn_processing=model=halve_gray_float.model:input=dnn_in:output=dnn_out:dnn_backend=native -y out.native.png
9451
9452       •   Handle the Y channel with srcnn.pb (see sr filter) for frame with
9453           yuv420p (planar YUV formats supported):
9454
9455                   ./ffmpeg -i 480p.jpg -vf format=yuv420p,scale=w=iw*2:h=ih*2,dnn_processing=dnn_backend=tensorflow:model=srcnn.pb:input=x:output=y -y srcnn.jpg
9456
9457       •   Handle the Y channel with espcn.pb (see sr filter), which changes
9458           frame size, for format yuv420p (planar YUV formats supported),
9459           please use tools/python/tf_sess_config.py to get the configs of
9460           TensorFlow backend for your system.
9461
9462                   ./ffmpeg -i 480p.jpg -vf format=yuv420p,dnn_processing=dnn_backend=tensorflow:model=espcn.pb:input=x:output=y:backend_configs=sess_config=0x10022805320e09cdccccccccccec3f20012a01303801 -y tmp.espcn.jpg
9463
9464   drawbox
9465       Draw a colored box on the input image.
9466
9467       It accepts the following parameters:
9468
9469       x
9470       y   The expressions which specify the top left corner coordinates of
9471           the box. It defaults to 0.
9472
9473       width, w
9474       height, h
9475           The expressions which specify the width and height of the box; if 0
9476           they are interpreted as the input width and height. It defaults to
9477           0.
9478
9479       color, c
9480           Specify the color of the box to write. For the general syntax of
9481           this option, check the "Color" section in the ffmpeg-utils manual.
9482           If the special value "invert" is used, the box edge color is the
9483           same as the video with inverted luma.
9484
9485       thickness, t
9486           The expression which sets the thickness of the box edge.  A value
9487           of "fill" will create a filled box. Default value is 3.
9488
9489           See below for the list of accepted constants.
9490
9491       replace
9492           Applicable if the input has alpha. With value 1, the pixels of the
9493           painted box will overwrite the video's color and alpha pixels.
9494           Default is 0, which composites the box onto the input, leaving the
9495           video's alpha intact.
9496
9497       The parameters for x, y, w and h and t are expressions containing the
9498       following constants:
9499
9500       dar The input display aspect ratio, it is the same as (w / h) * sar.
9501
9502       hsub
9503       vsub
9504           horizontal and vertical chroma subsample values. For example for
9505           the pixel format "yuv422p" hsub is 2 and vsub is 1.
9506
9507       in_h, ih
9508       in_w, iw
9509           The input width and height.
9510
9511       sar The input sample aspect ratio.
9512
9513       x
9514       y   The x and y offset coordinates where the box is drawn.
9515
9516       w
9517       h   The width and height of the drawn box.
9518
9519       box_source
9520           Box source can be set as side_data_detection_bboxes if you want to
9521           use box data in detection bboxes of side data.
9522
9523           If box_source is set, the x, y, width and height will be ignored
9524           and still use box data in detection bboxes of side data. So please
9525           do not use this parameter if you were not sure about the box
9526           source.
9527
9528       t   The thickness of the drawn box.
9529
9530           These constants allow the x, y, w, h and t expressions to refer to
9531           each other, so you may for example specify "y=x/dar" or "h=w/dar".
9532
9533       Examples
9534
9535       •   Draw a black box around the edge of the input image:
9536
9537                   drawbox
9538
9539       •   Draw a box with color red and an opacity of 50%:
9540
9541                   drawbox=10:20:200:60:red@0.5
9542
9543           The previous example can be specified as:
9544
9545                   drawbox=x=10:y=20:w=200:h=60:color=red@0.5
9546
9547       •   Fill the box with pink color:
9548
9549                   drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=fill
9550
9551       •   Draw a 2-pixel red 2.40:1 mask:
9552
9553                   drawbox=x=-t:y=0.5*(ih-iw/2.4)-t:w=iw+t*2:h=iw/2.4+t*2:t=2:c=red
9554
9555       Commands
9556
9557       This filter supports same commands as options.  The command accepts the
9558       same syntax of the corresponding option.
9559
9560       If the specified expression is not valid, it is kept at its current
9561       value.
9562
9563   drawgraph
9564       Draw a graph using input video metadata.
9565
9566       It accepts the following parameters:
9567
9568       m1  Set 1st frame metadata key from which metadata values will be used
9569           to draw a graph.
9570
9571       fg1 Set 1st foreground color expression.
9572
9573       m2  Set 2nd frame metadata key from which metadata values will be used
9574           to draw a graph.
9575
9576       fg2 Set 2nd foreground color expression.
9577
9578       m3  Set 3rd frame metadata key from which metadata values will be used
9579           to draw a graph.
9580
9581       fg3 Set 3rd foreground color expression.
9582
9583       m4  Set 4th frame metadata key from which metadata values will be used
9584           to draw a graph.
9585
9586       fg4 Set 4th foreground color expression.
9587
9588       min Set minimal value of metadata value.
9589
9590       max Set maximal value of metadata value.
9591
9592       bg  Set graph background color. Default is white.
9593
9594       mode
9595           Set graph mode.
9596
9597           Available values for mode is:
9598
9599           bar
9600           dot
9601           line
9602
9603           Default is "line".
9604
9605       slide
9606           Set slide mode.
9607
9608           Available values for slide is:
9609
9610           frame
9611               Draw new frame when right border is reached.
9612
9613           replace
9614               Replace old columns with new ones.
9615
9616           scroll
9617               Scroll from right to left.
9618
9619           rscroll
9620               Scroll from left to right.
9621
9622           picture
9623               Draw single picture.
9624
9625           Default is "frame".
9626
9627       size
9628           Set size of graph video. For the syntax of this option, check the
9629           "Video size" section in the ffmpeg-utils manual.  The default value
9630           is "900x256".
9631
9632       rate, r
9633           Set the output frame rate. Default value is 25.
9634
9635           The foreground color expressions can use the following variables:
9636
9637           MIN Minimal value of metadata value.
9638
9639           MAX Maximal value of metadata value.
9640
9641           VAL Current metadata key value.
9642
9643           The color is defined as 0xAABBGGRR.
9644
9645       Example using metadata from signalstats filter:
9646
9647               signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
9648
9649       Example using metadata from ebur128 filter:
9650
9651               ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
9652
9653   drawgrid
9654       Draw a grid on the input image.
9655
9656       It accepts the following parameters:
9657
9658       x
9659       y   The expressions which specify the coordinates of some point of grid
9660           intersection (meant to configure offset). Both default to 0.
9661
9662       width, w
9663       height, h
9664           The expressions which specify the width and height of the grid
9665           cell, if 0 they are interpreted as the input width and height,
9666           respectively, minus "thickness", so image gets framed. Default to
9667           0.
9668
9669       color, c
9670           Specify the color of the grid. For the general syntax of this
9671           option, check the "Color" section in the ffmpeg-utils manual. If
9672           the special value "invert" is used, the grid color is the same as
9673           the video with inverted luma.
9674
9675       thickness, t
9676           The expression which sets the thickness of the grid line. Default
9677           value is 1.
9678
9679           See below for the list of accepted constants.
9680
9681       replace
9682           Applicable if the input has alpha. With 1 the pixels of the painted
9683           grid will overwrite the video's color and alpha pixels.  Default is
9684           0, which composites the grid onto the input, leaving the video's
9685           alpha intact.
9686
9687       The parameters for x, y, w and h and t are expressions containing the
9688       following constants:
9689
9690       dar The input display aspect ratio, it is the same as (w / h) * sar.
9691
9692       hsub
9693       vsub
9694           horizontal and vertical chroma subsample values. For example for
9695           the pixel format "yuv422p" hsub is 2 and vsub is 1.
9696
9697       in_h, ih
9698       in_w, iw
9699           The input grid cell width and height.
9700
9701       sar The input sample aspect ratio.
9702
9703       x
9704       y   The x and y coordinates of some point of grid intersection (meant
9705           to configure offset).
9706
9707       w
9708       h   The width and height of the drawn cell.
9709
9710       t   The thickness of the drawn cell.
9711
9712           These constants allow the x, y, w, h and t expressions to refer to
9713           each other, so you may for example specify "y=x/dar" or "h=w/dar".
9714
9715       Examples
9716
9717       •   Draw a grid with cell 100x100 pixels, thickness 2 pixels, with
9718           color red and an opacity of 50%:
9719
9720                   drawgrid=width=100:height=100:thickness=2:color=red@0.5
9721
9722       •   Draw a white 3x3 grid with an opacity of 50%:
9723
9724                   drawgrid=w=iw/3:h=ih/3:t=2:c=white@0.5
9725
9726       Commands
9727
9728       This filter supports same commands as options.  The command accepts the
9729       same syntax of the corresponding option.
9730
9731       If the specified expression is not valid, it is kept at its current
9732       value.
9733
9734   drawtext
9735       Draw a text string or text from a specified file on top of a video,
9736       using the libfreetype library.
9737
9738       To enable compilation of this filter, you need to configure FFmpeg with
9739       "--enable-libfreetype".  To enable default font fallback and the font
9740       option you need to configure FFmpeg with "--enable-libfontconfig".  To
9741       enable the text_shaping option, you need to configure FFmpeg with
9742       "--enable-libfribidi".
9743
9744       Syntax
9745
9746       It accepts the following parameters:
9747
9748       box Used to draw a box around text using the background color.  The
9749           value must be either 1 (enable) or 0 (disable).  The default value
9750           of box is 0.
9751
9752       boxborderw
9753           Set the width of the border to be drawn around the box using
9754           boxcolor.  The default value of boxborderw is 0.
9755
9756       boxcolor
9757           The color to be used for drawing box around text. For the syntax of
9758           this option, check the "Color" section in the ffmpeg-utils manual.
9759
9760           The default value of boxcolor is "white".
9761
9762       line_spacing
9763           Set the line spacing in pixels of the border to be drawn around the
9764           box using box.  The default value of line_spacing is 0.
9765
9766       borderw
9767           Set the width of the border to be drawn around the text using
9768           bordercolor.  The default value of borderw is 0.
9769
9770       bordercolor
9771           Set the color to be used for drawing border around text. For the
9772           syntax of this option, check the "Color" section in the ffmpeg-
9773           utils manual.
9774
9775           The default value of bordercolor is "black".
9776
9777       expansion
9778           Select how the text is expanded. Can be either "none", "strftime"
9779           (deprecated) or "normal" (default). See the drawtext_expansion,
9780           Text expansion section below for details.
9781
9782       basetime
9783           Set a start time for the count. Value is in microseconds. Only
9784           applied in the deprecated strftime expansion mode. To emulate in
9785           normal expansion mode use the "pts" function, supplying the start
9786           time (in seconds) as the second argument.
9787
9788       fix_bounds
9789           If true, check and fix text coords to avoid clipping.
9790
9791       fontcolor
9792           The color to be used for drawing fonts. For the syntax of this
9793           option, check the "Color" section in the ffmpeg-utils manual.
9794
9795           The default value of fontcolor is "black".
9796
9797       fontcolor_expr
9798           String which is expanded the same way as text to obtain dynamic
9799           fontcolor value. By default this option has empty value and is not
9800           processed. When this option is set, it overrides fontcolor option.
9801
9802       font
9803           The font family to be used for drawing text. By default Sans.
9804
9805       fontfile
9806           The font file to be used for drawing text. The path must be
9807           included.  This parameter is mandatory if the fontconfig support is
9808           disabled.
9809
9810       alpha
9811           Draw the text applying alpha blending. The value can be a number
9812           between 0.0 and 1.0.  The expression accepts the same variables x,
9813           y as well.  The default value is 1.  Please see fontcolor_expr.
9814
9815       fontsize
9816           The font size to be used for drawing text.  The default value of
9817           fontsize is 16.
9818
9819       text_shaping
9820           If set to 1, attempt to shape the text (for example, reverse the
9821           order of right-to-left text and join Arabic characters) before
9822           drawing it.  Otherwise, just draw the text exactly as given.  By
9823           default 1 (if supported).
9824
9825       ft_load_flags
9826           The flags to be used for loading the fonts.
9827
9828           The flags map the corresponding flags supported by libfreetype, and
9829           are a combination of the following values:
9830
9831           default
9832           no_scale
9833           no_hinting
9834           render
9835           no_bitmap
9836           vertical_layout
9837           force_autohint
9838           crop_bitmap
9839           pedantic
9840           ignore_global_advance_width
9841           no_recurse
9842           ignore_transform
9843           monochrome
9844           linear_design
9845           no_autohint
9846
9847           Default value is "default".
9848
9849           For more information consult the documentation for the FT_LOAD_*
9850           libfreetype flags.
9851
9852       shadowcolor
9853           The color to be used for drawing a shadow behind the drawn text.
9854           For the syntax of this option, check the "Color" section in the
9855           ffmpeg-utils manual.
9856
9857           The default value of shadowcolor is "black".
9858
9859       shadowx
9860       shadowy
9861           The x and y offsets for the text shadow position with respect to
9862           the position of the text. They can be either positive or negative
9863           values. The default value for both is "0".
9864
9865       start_number
9866           The starting frame number for the n/frame_num variable. The default
9867           value is "0".
9868
9869       tabsize
9870           The size in number of spaces to use for rendering the tab.  Default
9871           value is 4.
9872
9873       timecode
9874           Set the initial timecode representation in "hh:mm:ss[:;.]ff"
9875           format. It can be used with or without text parameter.
9876           timecode_rate option must be specified.
9877
9878       timecode_rate, rate, r
9879           Set the timecode frame rate (timecode only). Value will be rounded
9880           to nearest integer. Minimum value is "1".  Drop-frame timecode is
9881           supported for frame rates 30 & 60.
9882
9883       tc24hmax
9884           If set to 1, the output of the timecode option will wrap around at
9885           24 hours.  Default is 0 (disabled).
9886
9887       text
9888           The text string to be drawn. The text must be a sequence of UTF-8
9889           encoded characters.  This parameter is mandatory if no file is
9890           specified with the parameter textfile.
9891
9892       textfile
9893           A text file containing text to be drawn. The text must be a
9894           sequence of UTF-8 encoded characters.
9895
9896           This parameter is mandatory if no text string is specified with the
9897           parameter text.
9898
9899           If both text and textfile are specified, an error is thrown.
9900
9901       text_source
9902           Text source should be set as side_data_detection_bboxes if you want
9903           to use text data in detection bboxes of side data.
9904
9905           If text source is set, text and textfile will be ignored and still
9906           use text data in detection bboxes of side data. So please do not
9907           use this parameter if you are not sure about the text source.
9908
9909       reload
9910           If set to 1, the textfile will be reloaded before each frame.  Be
9911           sure to update it atomically, or it may be read partially, or even
9912           fail.
9913
9914       x
9915       y   The expressions which specify the offsets where text will be drawn
9916           within the video frame. They are relative to the top/left border of
9917           the output image.
9918
9919           The default value of x and y is "0".
9920
9921           See below for the list of accepted constants and functions.
9922
9923       The parameters for x and y are expressions containing the following
9924       constants and functions:
9925
9926       dar input display aspect ratio, it is the same as (w / h) * sar
9927
9928       hsub
9929       vsub
9930           horizontal and vertical chroma subsample values. For example for
9931           the pixel format "yuv422p" hsub is 2 and vsub is 1.
9932
9933       line_h, lh
9934           the height of each text line
9935
9936       main_h, h, H
9937           the input height
9938
9939       main_w, w, W
9940           the input width
9941
9942       max_glyph_a, ascent
9943           the maximum distance from the baseline to the highest/upper grid
9944           coordinate used to place a glyph outline point, for all the
9945           rendered glyphs.  It is a positive value, due to the grid's
9946           orientation with the Y axis upwards.
9947
9948       max_glyph_d, descent
9949           the maximum distance from the baseline to the lowest grid
9950           coordinate used to place a glyph outline point, for all the
9951           rendered glyphs.  This is a negative value, due to the grid's
9952           orientation, with the Y axis upwards.
9953
9954       max_glyph_h
9955           maximum glyph height, that is the maximum height for all the glyphs
9956           contained in the rendered text, it is equivalent to ascent -
9957           descent.
9958
9959       max_glyph_w
9960           maximum glyph width, that is the maximum width for all the glyphs
9961           contained in the rendered text
9962
9963       n   the number of input frame, starting from 0
9964
9965       rand(min, max)
9966           return a random number included between min and max
9967
9968       sar The input sample aspect ratio.
9969
9970       t   timestamp expressed in seconds, NAN if the input timestamp is
9971           unknown
9972
9973       text_h, th
9974           the height of the rendered text
9975
9976       text_w, tw
9977           the width of the rendered text
9978
9979       x
9980       y   the x and y offset coordinates where the text is drawn.
9981
9982           These parameters allow the x and y expressions to refer to each
9983           other, so you can for example specify "y=x/dar".
9984
9985       pict_type
9986           A one character description of the current frame's picture type.
9987
9988       pkt_pos
9989           The current packet's position in the input file or stream (in
9990           bytes, from the start of the input). A value of -1 indicates this
9991           info is not available.
9992
9993       pkt_duration
9994           The current packet's duration, in seconds.
9995
9996       pkt_size
9997           The current packet's size (in bytes).
9998
9999       Text expansion
10000
10001       If expansion is set to "strftime", the filter recognizes strftime()
10002       sequences in the provided text and expands them accordingly. Check the
10003       documentation of strftime(). This feature is deprecated.
10004
10005       If expansion is set to "none", the text is printed verbatim.
10006
10007       If expansion is set to "normal" (which is the default), the following
10008       expansion mechanism is used.
10009
10010       The backslash character \, followed by any character, always expands to
10011       the second character.
10012
10013       Sequences of the form "%{...}" are expanded. The text between the
10014       braces is a function name, possibly followed by arguments separated by
10015       ':'.  If the arguments contain special characters or delimiters (':' or
10016       '}'), they should be escaped.
10017
10018       Note that they probably must also be escaped as the value for the text
10019       option in the filter argument string and as the filter argument in the
10020       filtergraph description, and possibly also for the shell, that makes up
10021       to four levels of escaping; using a text file avoids these problems.
10022
10023       The following functions are available:
10024
10025       expr, e
10026           The expression evaluation result.
10027
10028           It must take one argument specifying the expression to be
10029           evaluated, which accepts the same constants and functions as the x
10030           and y values. Note that not all constants should be used, for
10031           example the text size is not known when evaluating the expression,
10032           so the constants text_w and text_h will have an undefined value.
10033
10034       expr_int_format, eif
10035           Evaluate the expression's value and output as formatted integer.
10036
10037           The first argument is the expression to be evaluated, just as for
10038           the expr function.  The second argument specifies the output
10039           format. Allowed values are x, X, d and u. They are treated exactly
10040           as in the "printf" function.  The third parameter is optional and
10041           sets the number of positions taken by the output.  It can be used
10042           to add padding with zeros from the left.
10043
10044       gmtime
10045           The time at which the filter is running, expressed in UTC.  It can
10046           accept an argument: a strftime() format string.
10047
10048       localtime
10049           The time at which the filter is running, expressed in the local
10050           time zone.  It can accept an argument: a strftime() format string.
10051
10052       metadata
10053           Frame metadata. Takes one or two arguments.
10054
10055           The first argument is mandatory and specifies the metadata key.
10056
10057           The second argument is optional and specifies a default value, used
10058           when the metadata key is not found or empty.
10059
10060           Available metadata can be identified by inspecting entries starting
10061           with TAG included within each frame section printed by running
10062           "ffprobe -show_frames".
10063
10064           String metadata generated in filters leading to the drawtext filter
10065           are also available.
10066
10067       n, frame_num
10068           The frame number, starting from 0.
10069
10070       pict_type
10071           A one character description of the current picture type.
10072
10073       pts The timestamp of the current frame.  It can take up to three
10074           arguments.
10075
10076           The first argument is the format of the timestamp; it defaults to
10077           "flt" for seconds as a decimal number with microsecond accuracy;
10078           "hms" stands for a formatted [-]HH:MM:SS.mmm timestamp with
10079           millisecond accuracy.  "gmtime" stands for the timestamp of the
10080           frame formatted as UTC time; "localtime" stands for the timestamp
10081           of the frame formatted as local time zone time.
10082
10083           The second argument is an offset added to the timestamp.
10084
10085           If the format is set to "hms", a third argument "24HH" may be
10086           supplied to present the hour part of the formatted timestamp in 24h
10087           format (00-23).
10088
10089           If the format is set to "localtime" or "gmtime", a third argument
10090           may be supplied: a strftime() format string.  By default, YYYY-MM-
10091           DD HH:MM:SS format will be used.
10092
10093       Commands
10094
10095       This filter supports altering parameters via commands:
10096
10097       reinit
10098           Alter existing filter parameters.
10099
10100           Syntax for the argument is the same as for filter invocation, e.g.
10101
10102                   fontsize=56:fontcolor=green:text='Hello World'
10103
10104           Full filter invocation with sendcmd would look like this:
10105
10106                   sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World'
10107
10108       If the entire argument can't be parsed or applied as valid values then
10109       the filter will continue with its existing parameters.
10110
10111       Examples
10112
10113       •   Draw "Test Text" with font FreeSerif, using the default values for
10114           the optional parameters.
10115
10116                   drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'"
10117
10118       •   Draw 'Test Text' with font FreeSerif of size 24 at position x=100
10119           and y=50 (counting from the top-left corner of the screen), text is
10120           yellow with a red box around it. Both the text and the box have an
10121           opacity of 20%.
10122
10123                   drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
10124                             x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2"
10125
10126           Note that the double quotes are not necessary if spaces are not
10127           used within the parameter list.
10128
10129       •   Show the text at the center of the video frame:
10130
10131                   drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2"
10132
10133       •   Show the text at a random position, switching to a new position
10134           every 30 seconds:
10135
10136                   drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=if(eq(mod(t\,30)\,0)\,rand(0\,(w-text_w))\,x):y=if(eq(mod(t\,30)\,0)\,rand(0\,(h-text_h))\,y)"
10137
10138       •   Show a text line sliding from right to left in the last row of the
10139           video frame. The file LONG_LINE is assumed to contain a single line
10140           with no newlines.
10141
10142                   drawtext="fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t"
10143
10144       •   Show the content of file CREDITS off the bottom of the frame and
10145           scroll up.
10146
10147                   drawtext="fontsize=20:fontfile=FreeSerif.ttf:textfile=CREDITS:y=h-20*t"
10148
10149       •   Draw a single green letter "g", at the center of the input video.
10150           The glyph baseline is placed at half screen height.
10151
10152                   drawtext="fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_glyph_w)/2:y=h/2-ascent"
10153
10154       •   Show text for 1 second every 3 seconds:
10155
10156                   drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:enable=lt(mod(t\,3)\,1):text='blink'"
10157
10158       •   Use fontconfig to set the font. Note that the colons need to be
10159           escaped.
10160
10161                   drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
10162
10163       •   Draw "Test Text" with font size dependent on height of the video.
10164
10165                   drawtext="text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)"
10166
10167       •   Print the date of a real-time encoding (see strftime(3)):
10168
10169                   drawtext='fontfile=FreeSans.ttf:text=%{localtime\:%a %b %d %Y}'
10170
10171       •   Show text fading in and out (appearing/disappearing):
10172
10173                   #!/bin/sh
10174                   DS=1.0 # display start
10175                   DE=10.0 # display end
10176                   FID=1.5 # fade in duration
10177                   FOD=5 # fade out duration
10178                   ffplay -f lavfi "color,drawtext=text=TEST:fontsize=50:fontfile=FreeSerif.ttf:fontcolor_expr=ff0000%{eif\\\\: clip(255*(1*between(t\\, $DS + $FID\\, $DE - $FOD) + ((t - $DS)/$FID)*between(t\\, $DS\\, $DS + $FID) + (-(t - $DE)/$FOD)*between(t\\, $DE - $FOD\\, $DE) )\\, 0\\, 255) \\\\: x\\\\: 2 }"
10179
10180       •   Horizontally align multiple separate texts. Note that max_glyph_a
10181           and the fontsize value are included in the y offset.
10182
10183                   drawtext=fontfile=FreeSans.ttf:text=DOG:fontsize=24:x=10:y=20+24-max_glyph_a,
10184                   drawtext=fontfile=FreeSans.ttf:text=cow:fontsize=24:x=80:y=20+24-max_glyph_a
10185
10186       •   Plot special lavf.image2dec.source_basename metadata onto each
10187           frame if such metadata exists. Otherwise, plot the string "NA".
10188           Note that image2 demuxer must have option -export_path_metadata 1
10189           for the special metadata fields to be available for filters.
10190
10191                   drawtext="fontsize=20:fontcolor=white:fontfile=FreeSans.ttf:text='%{metadata\:lavf.image2dec.source_basename\:NA}':x=10:y=10"
10192
10193       For more information about libfreetype, check:
10194       <http://www.freetype.org/>.
10195
10196       For more information about fontconfig, check:
10197       <http://freedesktop.org/software/fontconfig/fontconfig-user.html>.
10198
10199       For more information about libfribidi, check: <http://fribidi.org/>.
10200
10201   edgedetect
10202       Detect and draw edges. The filter uses the Canny Edge Detection
10203       algorithm.
10204
10205       The filter accepts the following options:
10206
10207       low
10208       high
10209           Set low and high threshold values used by the Canny thresholding
10210           algorithm.
10211
10212           The high threshold selects the "strong" edge pixels, which are then
10213           connected through 8-connectivity with the "weak" edge pixels
10214           selected by the low threshold.
10215
10216           low and high threshold values must be chosen in the range [0,1],
10217           and low should be lesser or equal to high.
10218
10219           Default value for low is "20/255", and default value for high is
10220           "50/255".
10221
10222       mode
10223           Define the drawing mode.
10224
10225           wires
10226               Draw white/gray wires on black background.
10227
10228           colormix
10229               Mix the colors to create a paint/cartoon effect.
10230
10231           canny
10232               Apply Canny edge detector on all selected planes.
10233
10234           Default value is wires.
10235
10236       planes
10237           Select planes for filtering. By default all available planes are
10238           filtered.
10239
10240       Examples
10241
10242       •   Standard edge detection with custom values for the hysteresis
10243           thresholding:
10244
10245                   edgedetect=low=0.1:high=0.4
10246
10247       •   Painting effect without thresholding:
10248
10249                   edgedetect=mode=colormix:high=0
10250
10251   elbg
10252       Apply a posterize effect using the ELBG (Enhanced LBG) algorithm.
10253
10254       For each input image, the filter will compute the optimal mapping from
10255       the input to the output given the codebook length, that is the number
10256       of distinct output colors.
10257
10258       This filter accepts the following options.
10259
10260       codebook_length, l
10261           Set codebook length. The value must be a positive integer, and
10262           represents the number of distinct output colors. Default value is
10263           256.
10264
10265       nb_steps, n
10266           Set the maximum number of iterations to apply for computing the
10267           optimal mapping. The higher the value the better the result and the
10268           higher the computation time. Default value is 1.
10269
10270       seed, s
10271           Set a random seed, must be an integer included between 0 and
10272           UINT32_MAX. If not specified, or if explicitly set to -1, the
10273           filter will try to use a good random seed on a best effort basis.
10274
10275       pal8
10276           Set pal8 output pixel format. This option does not work with
10277           codebook length greater than 256. Default is disabled.
10278
10279       use_alpha
10280           Include alpha values in the quantization calculation. Allows
10281           creating palettized output images (e.g. PNG8) with multiple alpha
10282           smooth blending.
10283
10284   entropy
10285       Measure graylevel entropy in histogram of color channels of video
10286       frames.
10287
10288       It accepts the following parameters:
10289
10290       mode
10291           Can be either normal or diff. Default is normal.
10292
10293           diff mode measures entropy of histogram delta values, absolute
10294           differences between neighbour histogram values.
10295
10296   epx
10297       Apply the EPX magnification filter which is designed for pixel art.
10298
10299       It accepts the following option:
10300
10301       n   Set the scaling dimension: 2 for "2xEPX", 3 for "3xEPX".  Default
10302           is 3.
10303
10304   eq
10305       Set brightness, contrast, saturation and approximate gamma adjustment.
10306
10307       The filter accepts the following options:
10308
10309       contrast
10310           Set the contrast expression. The value must be a float value in
10311           range "-1000.0" to 1000.0. The default value is "1".
10312
10313       brightness
10314           Set the brightness expression. The value must be a float value in
10315           range "-1.0" to 1.0. The default value is "0".
10316
10317       saturation
10318           Set the saturation expression. The value must be a float in range
10319           0.0 to 3.0. The default value is "1".
10320
10321       gamma
10322           Set the gamma expression. The value must be a float in range 0.1 to
10323           10.0.  The default value is "1".
10324
10325       gamma_r
10326           Set the gamma expression for red. The value must be a float in
10327           range 0.1 to 10.0. The default value is "1".
10328
10329       gamma_g
10330           Set the gamma expression for green. The value must be a float in
10331           range 0.1 to 10.0. The default value is "1".
10332
10333       gamma_b
10334           Set the gamma expression for blue. The value must be a float in
10335           range 0.1 to 10.0. The default value is "1".
10336
10337       gamma_weight
10338           Set the gamma weight expression. It can be used to reduce the
10339           effect of a high gamma value on bright image areas, e.g. keep them
10340           from getting overamplified and just plain white. The value must be
10341           a float in range 0.0 to 1.0. A value of 0.0 turns the gamma
10342           correction all the way down while 1.0 leaves it at its full
10343           strength. Default is "1".
10344
10345       eval
10346           Set when the expressions for brightness, contrast, saturation and
10347           gamma expressions are evaluated.
10348
10349           It accepts the following values:
10350
10351           init
10352               only evaluate expressions once during the filter initialization
10353               or when a command is processed
10354
10355           frame
10356               evaluate expressions for each incoming frame
10357
10358           Default value is init.
10359
10360       The expressions accept the following parameters:
10361
10362       n   frame count of the input frame starting from 0
10363
10364       pos byte position of the corresponding packet in the input file, NAN if
10365           unspecified
10366
10367       r   frame rate of the input video, NAN if the input frame rate is
10368           unknown
10369
10370       t   timestamp expressed in seconds, NAN if the input timestamp is
10371           unknown
10372
10373       Commands
10374
10375       The filter supports the following commands:
10376
10377       contrast
10378           Set the contrast expression.
10379
10380       brightness
10381           Set the brightness expression.
10382
10383       saturation
10384           Set the saturation expression.
10385
10386       gamma
10387           Set the gamma expression.
10388
10389       gamma_r
10390           Set the gamma_r expression.
10391
10392       gamma_g
10393           Set gamma_g expression.
10394
10395       gamma_b
10396           Set gamma_b expression.
10397
10398       gamma_weight
10399           Set gamma_weight expression.
10400
10401           The command accepts the same syntax of the corresponding option.
10402
10403           If the specified expression is not valid, it is kept at its current
10404           value.
10405
10406   erosion
10407       Apply erosion effect to the video.
10408
10409       This filter replaces the pixel by the local(3x3) minimum.
10410
10411       It accepts the following options:
10412
10413       threshold0
10414       threshold1
10415       threshold2
10416       threshold3
10417           Limit the maximum change for each plane, default is 65535.  If 0,
10418           plane will remain unchanged.
10419
10420       coordinates
10421           Flag which specifies the pixel to refer to. Default is 255 i.e. all
10422           eight pixels are used.
10423
10424           Flags to local 3x3 coordinates maps like this:
10425
10426               1 2 3
10427               4   5
10428               6 7 8
10429
10430       Commands
10431
10432       This filter supports the all above options as commands.
10433
10434   estdif
10435       Deinterlace the input video ("estdif" stands for "Edge Slope Tracing
10436       Deinterlacing Filter").
10437
10438       Spatial only filter that uses edge slope tracing algorithm to
10439       interpolate missing lines.  It accepts the following parameters:
10440
10441       mode
10442           The interlacing mode to adopt. It accepts one of the following
10443           values:
10444
10445           frame
10446               Output one frame for each frame.
10447
10448           field
10449               Output one frame for each field.
10450
10451           The default value is "field".
10452
10453       parity
10454           The picture field parity assumed for the input interlaced video. It
10455           accepts one of the following values:
10456
10457           tff Assume the top field is first.
10458
10459           bff Assume the bottom field is first.
10460
10461           auto
10462               Enable automatic detection of field parity.
10463
10464           The default value is "auto".  If the interlacing is unknown or the
10465           decoder does not export this information, top field first will be
10466           assumed.
10467
10468       deint
10469           Specify which frames to deinterlace. Accepts one of the following
10470           values:
10471
10472           all Deinterlace all frames.
10473
10474           interlaced
10475               Only deinterlace frames marked as interlaced.
10476
10477           The default value is "all".
10478
10479       rslope
10480           Specify the search radius for edge slope tracing. Default value is
10481           1.  Allowed range is from 1 to 15.
10482
10483       redge
10484           Specify the search radius for best edge matching. Default value is
10485           2.  Allowed range is from 0 to 15.
10486
10487       ecost
10488           Specify the edge cost for edge matching. Default value is 0.03125.
10489           Allowed range is from 0 to 1.
10490
10491       mcost
10492           Specify the middle cost for edge matching. Default value is 0.5.
10493           Allowed range is from 0 to 1.
10494
10495       dcost
10496           Specify the distance cost for edge matching. Default value is 0.5.
10497           Allowed range is from 0 to 1.
10498
10499       interp
10500           Specify the interpolation used. Default is 4-point interpolation.
10501           It accepts one of the following values:
10502
10503           2p  Two-point interpolation.
10504
10505           4p  Four-point interpolation.
10506
10507           6p  Six-point interpolation.
10508
10509       Commands
10510
10511       This filter supports same commands as options.
10512
10513   exposure
10514       Adjust exposure of the video stream.
10515
10516       The filter accepts the following options:
10517
10518       exposure
10519           Set the exposure correction in EV. Allowed range is from -3.0 to
10520           3.0 EV Default value is 0 EV.
10521
10522       black
10523           Set the black level correction. Allowed range is from -1.0 to 1.0.
10524           Default value is 0.
10525
10526       Commands
10527
10528       This filter supports same commands as options.
10529
10530   extractplanes
10531       Extract color channel components from input video stream into separate
10532       grayscale video streams.
10533
10534       The filter accepts the following option:
10535
10536       planes
10537           Set plane(s) to extract.
10538
10539           Available values for planes are:
10540
10541           y
10542           u
10543           v
10544           a
10545           r
10546           g
10547           b
10548
10549           Choosing planes not available in the input will result in an error.
10550           That means you cannot select "r", "g", "b" planes with "y", "u",
10551           "v" planes at same time.
10552
10553       Examples
10554
10555       •   Extract luma, u and v color channel component from input video
10556           frame into 3 grayscale outputs:
10557
10558                   ffmpeg -i video.avi -filter_complex 'extractplanes=y+u+v[y][u][v]' -map '[y]' y.avi -map '[u]' u.avi -map '[v]' v.avi
10559
10560   fade
10561       Apply a fade-in/out effect to the input video.
10562
10563       It accepts the following parameters:
10564
10565       type, t
10566           The effect type can be either "in" for a fade-in, or "out" for a
10567           fade-out effect.  Default is "in".
10568
10569       start_frame, s
10570           Specify the number of the frame to start applying the fade effect
10571           at. Default is 0.
10572
10573       nb_frames, n
10574           The number of frames that the fade effect lasts. At the end of the
10575           fade-in effect, the output video will have the same intensity as
10576           the input video.  At the end of the fade-out transition, the output
10577           video will be filled with the selected color.  Default is 25.
10578
10579       alpha
10580           If set to 1, fade only alpha channel, if one exists on the input.
10581           Default value is 0.
10582
10583       start_time, st
10584           Specify the timestamp (in seconds) of the frame to start to apply
10585           the fade effect. If both start_frame and start_time are specified,
10586           the fade will start at whichever comes last.  Default is 0.
10587
10588       duration, d
10589           The number of seconds for which the fade effect has to last. At the
10590           end of the fade-in effect the output video will have the same
10591           intensity as the input video, at the end of the fade-out transition
10592           the output video will be filled with the selected color.  If both
10593           duration and nb_frames are specified, duration is used. Default is
10594           0 (nb_frames is used by default).
10595
10596       color, c
10597           Specify the color of the fade. Default is "black".
10598
10599       Examples
10600
10601       •   Fade in the first 30 frames of video:
10602
10603                   fade=in:0:30
10604
10605           The command above is equivalent to:
10606
10607                   fade=t=in:s=0:n=30
10608
10609       •   Fade out the last 45 frames of a 200-frame video:
10610
10611                   fade=out:155:45
10612                   fade=type=out:start_frame=155:nb_frames=45
10613
10614       •   Fade in the first 25 frames and fade out the last 25 frames of a
10615           1000-frame video:
10616
10617                   fade=in:0:25, fade=out:975:25
10618
10619       •   Make the first 5 frames yellow, then fade in from frame 5-24:
10620
10621                   fade=in:5:20:color=yellow
10622
10623       •   Fade in alpha over first 25 frames of video:
10624
10625                   fade=in:0:25:alpha=1
10626
10627       •   Make the first 5.5 seconds black, then fade in for 0.5 seconds:
10628
10629                   fade=t=in:st=5.5:d=0.5
10630
10631   fftdnoiz
10632       Denoise frames using 3D FFT (frequency domain filtering).
10633
10634       The filter accepts the following options:
10635
10636       sigma
10637           Set the noise sigma constant. This sets denoising strength.
10638           Default value is 1. Allowed range is from 0 to 30.  Using very high
10639           sigma with low overlap may give blocking artifacts.
10640
10641       amount
10642           Set amount of denoising. By default all detected noise is reduced.
10643           Default value is 1. Allowed range is from 0 to 1.
10644
10645       block
10646           Set size of block, Default is 4, can be 3, 4, 5 or 6.  Actual size
10647           of block in pixels is 2 to power of block, so by default block size
10648           in pixels is 2^4 which is 16.
10649
10650       overlap
10651           Set block overlap. Default is 0.5. Allowed range is from 0.2 to
10652           0.8.
10653
10654       prev
10655           Set number of previous frames to use for denoising. By default is
10656           set to 0.
10657
10658       next
10659           Set number of next frames to to use for denoising. By default is
10660           set to 0.
10661
10662       planes
10663           Set planes which will be filtered, by default are all available
10664           filtered except alpha.
10665
10666   fftfilt
10667       Apply arbitrary expressions to samples in frequency domain
10668
10669       dc_Y
10670           Adjust the dc value (gain) of the luma plane of the image. The
10671           filter accepts an integer value in range 0 to 1000. The default
10672           value is set to 0.
10673
10674       dc_U
10675           Adjust the dc value (gain) of the 1st chroma plane of the image.
10676           The filter accepts an integer value in range 0 to 1000. The default
10677           value is set to 0.
10678
10679       dc_V
10680           Adjust the dc value (gain) of the 2nd chroma plane of the image.
10681           The filter accepts an integer value in range 0 to 1000. The default
10682           value is set to 0.
10683
10684       weight_Y
10685           Set the frequency domain weight expression for the luma plane.
10686
10687       weight_U
10688           Set the frequency domain weight expression for the 1st chroma
10689           plane.
10690
10691       weight_V
10692           Set the frequency domain weight expression for the 2nd chroma
10693           plane.
10694
10695       eval
10696           Set when the expressions are evaluated.
10697
10698           It accepts the following values:
10699
10700           init
10701               Only evaluate expressions once during the filter
10702               initialization.
10703
10704           frame
10705               Evaluate expressions for each incoming frame.
10706
10707           Default value is init.
10708
10709           The filter accepts the following variables:
10710
10711       X
10712       Y   The coordinates of the current sample.
10713
10714       W
10715       H   The width and height of the image.
10716
10717       N   The number of input frame, starting from 0.
10718
10719       WS
10720       HS  The size of FFT array for horizontal and vertical processing.
10721
10722       Examples
10723
10724       •   High-pass:
10725
10726                   fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
10727
10728       •   Low-pass:
10729
10730                   fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
10731
10732       •   Sharpen:
10733
10734                   fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
10735
10736       •   Blur:
10737
10738                   fftfilt=dc_Y=0:weight_Y='exp(-4 * ((Y+X)/(W+H)))'
10739
10740   field
10741       Extract a single field from an interlaced image using stride arithmetic
10742       to avoid wasting CPU time. The output frames are marked as non-
10743       interlaced.
10744
10745       The filter accepts the following options:
10746
10747       type
10748           Specify whether to extract the top (if the value is 0 or "top") or
10749           the bottom field (if the value is 1 or "bottom").
10750
10751   fieldhint
10752       Create new frames by copying the top and bottom fields from surrounding
10753       frames supplied as numbers by the hint file.
10754
10755       hint
10756           Set file containing hints: absolute/relative frame numbers.
10757
10758           There must be one line for each frame in a clip. Each line must
10759           contain two numbers separated by the comma, optionally followed by
10760           "-" or "+".  Numbers supplied on each line of file can not be out
10761           of [N-1,N+1] where N is current frame number for "absolute" mode or
10762           out of [-1, 1] range for "relative" mode. First number tells from
10763           which frame to pick up top field and second number tells from which
10764           frame to pick up bottom field.
10765
10766           If optionally followed by "+" output frame will be marked as
10767           interlaced, else if followed by "-" output frame will be marked as
10768           progressive, else it will be marked same as input frame.  If
10769           optionally followed by "t" output frame will use only top field, or
10770           in case of "b" it will use only bottom field.  If line starts with
10771           "#" or ";" that line is skipped.
10772
10773       mode
10774           Can be item "absolute" or "relative". Default is "absolute".
10775
10776       Example of first several lines of "hint" file for "relative" mode:
10777
10778               0,0 - # first frame
10779               1,0 - # second frame, use third's frame top field and second's frame bottom field
10780               1,0 - # third frame, use fourth's frame top field and third's frame bottom field
10781               1,0 -
10782               0,0 -
10783               0,0 -
10784               1,0 -
10785               1,0 -
10786               1,0 -
10787               0,0 -
10788               0,0 -
10789               1,0 -
10790               1,0 -
10791               1,0 -
10792               0,0 -
10793
10794   fieldmatch
10795       Field matching filter for inverse telecine. It is meant to reconstruct
10796       the progressive frames from a telecined stream. The filter does not
10797       drop duplicated frames, so to achieve a complete inverse telecine
10798       "fieldmatch" needs to be followed by a decimation filter such as
10799       decimate in the filtergraph.
10800
10801       The separation of the field matching and the decimation is notably
10802       motivated by the possibility of inserting a de-interlacing filter
10803       fallback between the two.  If the source has mixed telecined and real
10804       interlaced content, "fieldmatch" will not be able to match fields for
10805       the interlaced parts.  But these remaining combed frames will be marked
10806       as interlaced, and thus can be de-interlaced by a later filter such as
10807       yadif before decimation.
10808
10809       In addition to the various configuration options, "fieldmatch" can take
10810       an optional second stream, activated through the ppsrc option. If
10811       enabled, the frames reconstruction will be based on the fields and
10812       frames from this second stream. This allows the first input to be pre-
10813       processed in order to help the various algorithms of the filter, while
10814       keeping the output lossless (assuming the fields are matched properly).
10815       Typically, a field-aware denoiser, or brightness/contrast adjustments
10816       can help.
10817
10818       Note that this filter uses the same algorithms as TIVTC/TFM (AviSynth
10819       project) and VIVTC/VFM (VapourSynth project). The later is a light
10820       clone of TFM from which "fieldmatch" is based on. While the semantic
10821       and usage are very close, some behaviour and options names can differ.
10822
10823       The decimate filter currently only works for constant frame rate input.
10824       If your input has mixed telecined (30fps) and progressive content with
10825       a lower framerate like 24fps use the following filterchain to produce
10826       the necessary cfr stream:
10827       "dejudder,fps=30000/1001,fieldmatch,decimate".
10828
10829       The filter accepts the following options:
10830
10831       order
10832           Specify the assumed field order of the input stream. Available
10833           values are:
10834
10835           auto
10836               Auto detect parity (use FFmpeg's internal parity value).
10837
10838           bff Assume bottom field first.
10839
10840           tff Assume top field first.
10841
10842           Note that it is sometimes recommended not to trust the parity
10843           announced by the stream.
10844
10845           Default value is auto.
10846
10847       mode
10848           Set the matching mode or strategy to use. pc mode is the safest in
10849           the sense that it won't risk creating jerkiness due to duplicate
10850           frames when possible, but if there are bad edits or blended fields
10851           it will end up outputting combed frames when a good match might
10852           actually exist. On the other hand, pcn_ub mode is the most risky in
10853           terms of creating jerkiness, but will almost always find a good
10854           frame if there is one. The other values are all somewhere in
10855           between pc and pcn_ub in terms of risking jerkiness and creating
10856           duplicate frames versus finding good matches in sections with bad
10857           edits, orphaned fields, blended fields, etc.
10858
10859           More details about p/c/n/u/b are available in p/c/n/u/b meaning
10860           section.
10861
10862           Available values are:
10863
10864           pc  2-way matching (p/c)
10865
10866           pc_n
10867               2-way matching, and trying 3rd match if still combed (p/c + n)
10868
10869           pc_u
10870               2-way matching, and trying 3rd match (same order) if still
10871               combed (p/c + u)
10872
10873           pc_n_ub
10874               2-way matching, trying 3rd match if still combed, and trying
10875               4th/5th matches if still combed (p/c + n + u/b)
10876
10877           pcn 3-way matching (p/c/n)
10878
10879           pcn_ub
10880               3-way matching, and trying 4th/5th matches if all 3 of the
10881               original matches are detected as combed (p/c/n + u/b)
10882
10883           The parenthesis at the end indicate the matches that would be used
10884           for that mode assuming order=tff (and field on auto or top).
10885
10886           In terms of speed pc mode is by far the fastest and pcn_ub is the
10887           slowest.
10888
10889           Default value is pc_n.
10890
10891       ppsrc
10892           Mark the main input stream as a pre-processed input, and enable the
10893           secondary input stream as the clean source to pick the fields from.
10894           See the filter introduction for more details. It is similar to the
10895           clip2 feature from VFM/TFM.
10896
10897           Default value is 0 (disabled).
10898
10899       field
10900           Set the field to match from. It is recommended to set this to the
10901           same value as order unless you experience matching failures with
10902           that setting. In certain circumstances changing the field that is
10903           used to match from can have a large impact on matching performance.
10904           Available values are:
10905
10906           auto
10907               Automatic (same value as order).
10908
10909           bottom
10910               Match from the bottom field.
10911
10912           top Match from the top field.
10913
10914           Default value is auto.
10915
10916       mchroma
10917           Set whether or not chroma is included during the match comparisons.
10918           In most cases it is recommended to leave this enabled. You should
10919           set this to 0 only if your clip has bad chroma problems such as
10920           heavy rainbowing or other artifacts. Setting this to 0 could also
10921           be used to speed things up at the cost of some accuracy.
10922
10923           Default value is 1.
10924
10925       y0
10926       y1  These define an exclusion band which excludes the lines between y0
10927           and y1 from being included in the field matching decision. An
10928           exclusion band can be used to ignore subtitles, a logo, or other
10929           things that may interfere with the matching. y0 sets the starting
10930           scan line and y1 sets the ending line; all lines in between y0 and
10931           y1 (including y0 and y1) will be ignored. Setting y0 and y1 to the
10932           same value will disable the feature.  y0 and y1 defaults to 0.
10933
10934       scthresh
10935           Set the scene change detection threshold as a percentage of maximum
10936           change on the luma plane. Good values are in the "[8.0, 14.0]"
10937           range. Scene change detection is only relevant in case
10938           combmatch=sc.  The range for scthresh is "[0.0, 100.0]".
10939
10940           Default value is 12.0.
10941
10942       combmatch
10943           When combatch is not none, "fieldmatch" will take into account the
10944           combed scores of matches when deciding what match to use as the
10945           final match. Available values are:
10946
10947           none
10948               No final matching based on combed scores.
10949
10950           sc  Combed scores are only used when a scene change is detected.
10951
10952           full
10953               Use combed scores all the time.
10954
10955           Default is sc.
10956
10957       combdbg
10958           Force "fieldmatch" to calculate the combed metrics for certain
10959           matches and print them. This setting is known as micout in TFM/VFM
10960           vocabulary.  Available values are:
10961
10962           none
10963               No forced calculation.
10964
10965           pcn Force p/c/n calculations.
10966
10967           pcnub
10968               Force p/c/n/u/b calculations.
10969
10970           Default value is none.
10971
10972       cthresh
10973           This is the area combing threshold used for combed frame detection.
10974           This essentially controls how "strong" or "visible" combing must be
10975           to be detected.  Larger values mean combing must be more visible
10976           and smaller values mean combing can be less visible or strong and
10977           still be detected. Valid settings are from "-1" (every pixel will
10978           be detected as combed) to 255 (no pixel will be detected as
10979           combed). This is basically a pixel difference value. A good range
10980           is "[8, 12]".
10981
10982           Default value is 9.
10983
10984       chroma
10985           Sets whether or not chroma is considered in the combed frame
10986           decision.  Only disable this if your source has chroma problems
10987           (rainbowing, etc.) that are causing problems for the combed frame
10988           detection with chroma enabled. Actually, using chroma=0 is usually
10989           more reliable, except for the case where there is chroma only
10990           combing in the source.
10991
10992           Default value is 0.
10993
10994       blockx
10995       blocky
10996           Respectively set the x-axis and y-axis size of the window used
10997           during combed frame detection. This has to do with the size of the
10998           area in which combpel pixels are required to be detected as combed
10999           for a frame to be declared combed. See the combpel parameter
11000           description for more info.  Possible values are any number that is
11001           a power of 2 starting at 4 and going up to 512.
11002
11003           Default value is 16.
11004
11005       combpel
11006           The number of combed pixels inside any of the blocky by blockx size
11007           blocks on the frame for the frame to be detected as combed. While
11008           cthresh controls how "visible" the combing must be, this setting
11009           controls "how much" combing there must be in any localized area (a
11010           window defined by the blockx and blocky settings) on the frame.
11011           Minimum value is 0 and maximum is "blocky x blockx" (at which point
11012           no frames will ever be detected as combed). This setting is known
11013           as MI in TFM/VFM vocabulary.
11014
11015           Default value is 80.
11016
11017       p/c/n/u/b meaning
11018
11019       p/c/n
11020
11021       We assume the following telecined stream:
11022
11023               Top fields:     1 2 2 3 4
11024               Bottom fields:  1 2 3 4 4
11025
11026       The numbers correspond to the progressive frame the fields relate to.
11027       Here, the first two frames are progressive, the 3rd and 4th are combed,
11028       and so on.
11029
11030       When "fieldmatch" is configured to run a matching from bottom
11031       (field=bottom) this is how this input stream get transformed:
11032
11033               Input stream:
11034                               T     1 2 2 3 4
11035                               B     1 2 3 4 4   <-- matching reference
11036
11037               Matches:              c c n n c
11038
11039               Output stream:
11040                               T     1 2 3 4 4
11041                               B     1 2 3 4 4
11042
11043       As a result of the field matching, we can see that some frames get
11044       duplicated.  To perform a complete inverse telecine, you need to rely
11045       on a decimation filter after this operation. See for instance the
11046       decimate filter.
11047
11048       The same operation now matching from top fields (field=top) looks like
11049       this:
11050
11051               Input stream:
11052                               T     1 2 2 3 4   <-- matching reference
11053                               B     1 2 3 4 4
11054
11055               Matches:              c c p p c
11056
11057               Output stream:
11058                               T     1 2 2 3 4
11059                               B     1 2 2 3 4
11060
11061       In these examples, we can see what p, c and n mean; basically, they
11062       refer to the frame and field of the opposite parity:
11063
11064       *<p matches the field of the opposite parity in the previous frame>
11065       *<c matches the field of the opposite parity in the current frame>
11066       *<n matches the field of the opposite parity in the next frame>
11067
11068       u/b
11069
11070       The u and b matching are a bit special in the sense that they match
11071       from the opposite parity flag. In the following examples, we assume
11072       that we are currently matching the 2nd frame (Top:2, bottom:2).
11073       According to the match, a 'x' is placed above and below each matched
11074       fields.
11075
11076       With bottom matching (field=bottom):
11077
11078               Match:           c         p           n          b          u
11079
11080                                x       x               x        x          x
11081                 Top          1 2 2     1 2 2       1 2 2      1 2 2      1 2 2
11082                 Bottom       1 2 3     1 2 3       1 2 3      1 2 3      1 2 3
11083                                x         x           x        x              x
11084
11085               Output frames:
11086                                2          1          2          2          2
11087                                2          2          2          1          3
11088
11089       With top matching (field=top):
11090
11091               Match:           c         p           n          b          u
11092
11093                                x         x           x        x              x
11094                 Top          1 2 2     1 2 2       1 2 2      1 2 2      1 2 2
11095                 Bottom       1 2 3     1 2 3       1 2 3      1 2 3      1 2 3
11096                                x       x               x        x          x
11097
11098               Output frames:
11099                                2          2          2          1          2
11100                                2          1          3          2          2
11101
11102       Examples
11103
11104       Simple IVTC of a top field first telecined stream:
11105
11106               fieldmatch=order=tff:combmatch=none, decimate
11107
11108       Advanced IVTC, with fallback on yadif for still combed frames:
11109
11110               fieldmatch=order=tff:combmatch=full, yadif=deint=interlaced, decimate
11111
11112   fieldorder
11113       Transform the field order of the input video.
11114
11115       It accepts the following parameters:
11116
11117       order
11118           The output field order. Valid values are tff for top field first or
11119           bff for bottom field first.
11120
11121       The default value is tff.
11122
11123       The transformation is done by shifting the picture content up or down
11124       by one line, and filling the remaining line with appropriate picture
11125       content.  This method is consistent with most broadcast field order
11126       converters.
11127
11128       If the input video is not flagged as being interlaced, or it is already
11129       flagged as being of the required output field order, then this filter
11130       does not alter the incoming video.
11131
11132       It is very useful when converting to or from PAL DV material, which is
11133       bottom field first.
11134
11135       For example:
11136
11137               ffmpeg -i in.vob -vf "fieldorder=bff" out.dv
11138
11139   fifo, afifo
11140       Buffer input images and send them when they are requested.
11141
11142       It is mainly useful when auto-inserted by the libavfilter framework.
11143
11144       It does not take parameters.
11145
11146   fillborders
11147       Fill borders of the input video, without changing video stream
11148       dimensions.  Sometimes video can have garbage at the four edges and you
11149       may not want to crop video input to keep size multiple of some number.
11150
11151       This filter accepts the following options:
11152
11153       left
11154           Number of pixels to fill from left border.
11155
11156       right
11157           Number of pixels to fill from right border.
11158
11159       top Number of pixels to fill from top border.
11160
11161       bottom
11162           Number of pixels to fill from bottom border.
11163
11164       mode
11165           Set fill mode.
11166
11167           It accepts the following values:
11168
11169           smear
11170               fill pixels using outermost pixels
11171
11172           mirror
11173               fill pixels using mirroring (half sample symmetric)
11174
11175           fixed
11176               fill pixels with constant value
11177
11178           reflect
11179               fill pixels using reflecting (whole sample symmetric)
11180
11181           wrap
11182               fill pixels using wrapping
11183
11184           fade
11185               fade pixels to constant value
11186
11187           margins
11188               fill pixels at top and bottom with weighted averages pixels
11189               near borders
11190
11191           Default is smear.
11192
11193       color
11194           Set color for pixels in fixed or fade mode. Default is black.
11195
11196       Commands
11197
11198       This filter supports same commands as options.  The command accepts the
11199       same syntax of the corresponding option.
11200
11201       If the specified expression is not valid, it is kept at its current
11202       value.
11203
11204   find_rect
11205       Find a rectangular object
11206
11207       It accepts the following options:
11208
11209       object
11210           Filepath of the object image, needs to be in gray8.
11211
11212       threshold
11213           Detection threshold, default is 0.5.
11214
11215       mipmaps
11216           Number of mipmaps, default is 3.
11217
11218       xmin, ymin, xmax, ymax
11219           Specifies the rectangle in which to search.
11220
11221       discard
11222           Discard frames where object is not detected. Default is disabled.
11223
11224       Examples
11225
11226       •   Cover a rectangular object by the supplied image of a given video
11227           using ffmpeg:
11228
11229                   ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
11230
11231   floodfill
11232       Flood area with values of same pixel components with another values.
11233
11234       It accepts the following options:
11235
11236       x   Set pixel x coordinate.
11237
11238       y   Set pixel y coordinate.
11239
11240       s0  Set source #0 component value.
11241
11242       s1  Set source #1 component value.
11243
11244       s2  Set source #2 component value.
11245
11246       s3  Set source #3 component value.
11247
11248       d0  Set destination #0 component value.
11249
11250       d1  Set destination #1 component value.
11251
11252       d2  Set destination #2 component value.
11253
11254       d3  Set destination #3 component value.
11255
11256   format
11257       Convert the input video to one of the specified pixel formats.
11258       Libavfilter will try to pick one that is suitable as input to the next
11259       filter.
11260
11261       It accepts the following parameters:
11262
11263       pix_fmts
11264           A '|'-separated list of pixel format names, such as
11265           "pix_fmts=yuv420p|monow|rgb24".
11266
11267       Examples
11268
11269       •   Convert the input video to the yuv420p format
11270
11271                   format=pix_fmts=yuv420p
11272
11273           Convert the input video to any of the formats in the list
11274
11275                   format=pix_fmts=yuv420p|yuv444p|yuv410p
11276
11277   fps
11278       Convert the video to specified constant frame rate by duplicating or
11279       dropping frames as necessary.
11280
11281       It accepts the following parameters:
11282
11283       fps The desired output frame rate. It accepts expressions containing
11284           the following constants:
11285
11286           source_fps
11287               The input's frame rate
11288
11289           ntsc
11290               NTSC frame rate of "30000/1001"
11291
11292           pal PAL frame rate of 25.0
11293
11294           film
11295               Film frame rate of 24.0
11296
11297           ntsc_film
11298               NTSC-film frame rate of "24000/1001"
11299
11300           The default is 25.
11301
11302       start_time
11303           Assume the first PTS should be the given value, in seconds. This
11304           allows for padding/trimming at the start of stream. By default, no
11305           assumption is made about the first frame's expected PTS, so no
11306           padding or trimming is done.  For example, this could be set to 0
11307           to pad the beginning with duplicates of the first frame if a video
11308           stream starts after the audio stream or to trim any frames with a
11309           negative PTS.
11310
11311       round
11312           Timestamp (PTS) rounding method.
11313
11314           Possible values are:
11315
11316           zero
11317               round towards 0
11318
11319           inf round away from 0
11320
11321           down
11322               round towards -infinity
11323
11324           up  round towards +infinity
11325
11326           near
11327               round to nearest
11328
11329           The default is "near".
11330
11331       eof_action
11332           Action performed when reading the last frame.
11333
11334           Possible values are:
11335
11336           round
11337               Use same timestamp rounding method as used for other frames.
11338
11339           pass
11340               Pass through last frame if input duration has not been reached
11341               yet.
11342
11343           The default is "round".
11344
11345       Alternatively, the options can be specified as a flat string:
11346       fps[:start_time[:round]].
11347
11348       See also the setpts filter.
11349
11350       Examples
11351
11352       •   A typical usage in order to set the fps to 25:
11353
11354                   fps=fps=25
11355
11356       •   Sets the fps to 24, using abbreviation and rounding method to round
11357           to nearest:
11358
11359                   fps=fps=film:round=near
11360
11361   framepack
11362       Pack two different video streams into a stereoscopic video, setting
11363       proper metadata on supported codecs. The two views should have the same
11364       size and framerate and processing will stop when the shorter video
11365       ends. Please note that you may conveniently adjust view properties with
11366       the scale and fps filters.
11367
11368       It accepts the following parameters:
11369
11370       format
11371           The desired packing format. Supported values are:
11372
11373           sbs The views are next to each other (default).
11374
11375           tab The views are on top of each other.
11376
11377           lines
11378               The views are packed by line.
11379
11380           columns
11381               The views are packed by column.
11382
11383           frameseq
11384               The views are temporally interleaved.
11385
11386       Some examples:
11387
11388               # Convert left and right views into a frame-sequential video
11389               ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
11390
11391               # Convert views into a side-by-side video with the same output resolution as the input
11392               ffmpeg -i LEFT -i RIGHT -filter_complex [0:v]scale=w=iw/2[left],[1:v]scale=w=iw/2[right],[left][right]framepack=sbs OUTPUT
11393
11394   framerate
11395       Change the frame rate by interpolating new video output frames from the
11396       source frames.
11397
11398       This filter is not designed to function correctly with interlaced
11399       media. If you wish to change the frame rate of interlaced media then
11400       you are required to deinterlace before this filter and re-interlace
11401       after this filter.
11402
11403       A description of the accepted options follows.
11404
11405       fps Specify the output frames per second. This option can also be
11406           specified as a value alone. The default is 50.
11407
11408       interp_start
11409           Specify the start of a range where the output frame will be created
11410           as a linear interpolation of two frames. The range is [0-255], the
11411           default is 15.
11412
11413       interp_end
11414           Specify the end of a range where the output frame will be created
11415           as a linear interpolation of two frames. The range is [0-255], the
11416           default is 240.
11417
11418       scene
11419           Specify the level at which a scene change is detected as a value
11420           between 0 and 100 to indicate a new scene; a low value reflects a
11421           low probability for the current frame to introduce a new scene,
11422           while a higher value means the current frame is more likely to be
11423           one.  The default is 8.2.
11424
11425       flags
11426           Specify flags influencing the filter process.
11427
11428           Available value for flags is:
11429
11430           scene_change_detect, scd
11431               Enable scene change detection using the value of the option
11432               scene.  This flag is enabled by default.
11433
11434   framestep
11435       Select one frame every N-th frame.
11436
11437       This filter accepts the following option:
11438
11439       step
11440           Select frame after every "step" frames.  Allowed values are
11441           positive integers higher than 0. Default value is 1.
11442
11443   freezedetect
11444       Detect frozen video.
11445
11446       This filter logs a message and sets frame metadata when it detects that
11447       the input video has no significant change in content during a specified
11448       duration.  Video freeze detection calculates the mean average absolute
11449       difference of all the components of video frames and compares it to a
11450       noise floor.
11451
11452       The printed times and duration are expressed in seconds. The
11453       "lavfi.freezedetect.freeze_start" metadata key is set on the first
11454       frame whose timestamp equals or exceeds the detection duration and it
11455       contains the timestamp of the first frame of the freeze. The
11456       "lavfi.freezedetect.freeze_duration" and
11457       "lavfi.freezedetect.freeze_end" metadata keys are set on the first
11458       frame after the freeze.
11459
11460       The filter accepts the following options:
11461
11462       noise, n
11463           Set noise tolerance. Can be specified in dB (in case "dB" is
11464           appended to the specified value) or as a difference ratio between 0
11465           and 1. Default is -60dB, or 0.001.
11466
11467       duration, d
11468           Set freeze duration until notification (default is 2 seconds).
11469
11470   freezeframes
11471       Freeze video frames.
11472
11473       This filter freezes video frames using frame from 2nd input.
11474
11475       The filter accepts the following options:
11476
11477       first
11478           Set number of first frame from which to start freeze.
11479
11480       last
11481           Set number of last frame from which to end freeze.
11482
11483       replace
11484           Set number of frame from 2nd input which will be used instead of
11485           replaced frames.
11486
11487   frei0r
11488       Apply a frei0r effect to the input video.
11489
11490       To enable the compilation of this filter, you need to install the
11491       frei0r header and configure FFmpeg with "--enable-frei0r".
11492
11493       It accepts the following parameters:
11494
11495       filter_name
11496           The name of the frei0r effect to load. If the environment variable
11497           FREI0R_PATH is defined, the frei0r effect is searched for in each
11498           of the directories specified by the colon-separated list in
11499           FREI0R_PATH.  Otherwise, the standard frei0r paths are searched, in
11500           this order: HOME/.frei0r-1/lib/, /usr/local/lib/frei0r-1/,
11501           /usr/lib/frei0r-1/.
11502
11503       filter_params
11504           A '|'-separated list of parameters to pass to the frei0r effect.
11505
11506       A frei0r effect parameter can be a boolean (its value is either "y" or
11507       "n"), a double, a color (specified as R/G/B, where R, G, and B are
11508       floating point numbers between 0.0 and 1.0, inclusive) or a color
11509       description as specified in the "Color" section in the ffmpeg-utils
11510       manual, a position (specified as X/Y, where X and Y are floating point
11511       numbers) and/or a string.
11512
11513       The number and types of parameters depend on the loaded effect. If an
11514       effect parameter is not specified, the default value is set.
11515
11516       Examples
11517
11518       •   Apply the distort0r effect, setting the first two double
11519           parameters:
11520
11521                   frei0r=filter_name=distort0r:filter_params=0.5|0.01
11522
11523       •   Apply the colordistance effect, taking a color as the first
11524           parameter:
11525
11526                   frei0r=colordistance:0.2/0.3/0.4
11527                   frei0r=colordistance:violet
11528                   frei0r=colordistance:0x112233
11529
11530       •   Apply the perspective effect, specifying the top left and top right
11531           image positions:
11532
11533                   frei0r=perspective:0.2/0.2|0.8/0.2
11534
11535       For more information, see <http://frei0r.dyne.org>
11536
11537       Commands
11538
11539       This filter supports the filter_params option as commands.
11540
11541   fspp
11542       Apply fast and simple postprocessing. It is a faster version of spp.
11543
11544       It splits (I)DCT into horizontal/vertical passes. Unlike the simple
11545       post- processing filter, one of them is performed once per block, not
11546       per pixel.  This allows for much higher speed.
11547
11548       The filter accepts the following options:
11549
11550       quality
11551           Set quality. This option defines the number of levels for
11552           averaging. It accepts an integer in the range 4-5. Default value is
11553           4.
11554
11555       qp  Force a constant quantization parameter. It accepts an integer in
11556           range 0-63.  If not set, the filter will use the QP from the video
11557           stream (if available).
11558
11559       strength
11560           Set filter strength. It accepts an integer in range -15 to 32.
11561           Lower values mean more details but also more artifacts, while
11562           higher values make the image smoother but also blurrier. Default
11563           value is 0 X PSNR optimal.
11564
11565       use_bframe_qp
11566           Enable the use of the QP from the B-Frames if set to 1. Using this
11567           option may cause flicker since the B-Frames have often larger QP.
11568           Default is 0 (not enabled).
11569
11570   gblur
11571       Apply Gaussian blur filter.
11572
11573       The filter accepts the following options:
11574
11575       sigma
11576           Set horizontal sigma, standard deviation of Gaussian blur. Default
11577           is 0.5.
11578
11579       steps
11580           Set number of steps for Gaussian approximation. Default is 1.
11581
11582       planes
11583           Set which planes to filter. By default all planes are filtered.
11584
11585       sigmaV
11586           Set vertical sigma, if negative it will be same as "sigma".
11587           Default is "-1".
11588
11589       Commands
11590
11591       This filter supports same commands as options.  The command accepts the
11592       same syntax of the corresponding option.
11593
11594       If the specified expression is not valid, it is kept at its current
11595       value.
11596
11597   geq
11598       Apply generic equation to each pixel.
11599
11600       The filter accepts the following options:
11601
11602       lum_expr, lum
11603           Set the luminance expression.
11604
11605       cb_expr, cb
11606           Set the chrominance blue expression.
11607
11608       cr_expr, cr
11609           Set the chrominance red expression.
11610
11611       alpha_expr, a
11612           Set the alpha expression.
11613
11614       red_expr, r
11615           Set the red expression.
11616
11617       green_expr, g
11618           Set the green expression.
11619
11620       blue_expr, b
11621           Set the blue expression.
11622
11623       The colorspace is selected according to the specified options. If one
11624       of the lum_expr, cb_expr, or cr_expr options is specified, the filter
11625       will automatically select a YCbCr colorspace. If one of the red_expr,
11626       green_expr, or blue_expr options is specified, it will select an RGB
11627       colorspace.
11628
11629       If one of the chrominance expression is not defined, it falls back on
11630       the other one. If no alpha expression is specified it will evaluate to
11631       opaque value.  If none of chrominance expressions are specified, they
11632       will evaluate to the luminance expression.
11633
11634       The expressions can use the following variables and functions:
11635
11636       N   The sequential number of the filtered frame, starting from 0.
11637
11638       X
11639       Y   The coordinates of the current sample.
11640
11641       W
11642       H   The width and height of the image.
11643
11644       SW
11645       SH  Width and height scale depending on the currently filtered plane.
11646           It is the ratio between the corresponding luma plane number of
11647           pixels and the current plane ones. E.g. for YUV4:2:0 the values are
11648           "1,1" for the luma plane, and "0.5,0.5" for chroma planes.
11649
11650       T   Time of the current frame, expressed in seconds.
11651
11652       p(x, y)
11653           Return the value of the pixel at location (x,y) of the current
11654           plane.
11655
11656       lum(x, y)
11657           Return the value of the pixel at location (x,y) of the luminance
11658           plane.
11659
11660       cb(x, y)
11661           Return the value of the pixel at location (x,y) of the blue-
11662           difference chroma plane. Return 0 if there is no such plane.
11663
11664       cr(x, y)
11665           Return the value of the pixel at location (x,y) of the red-
11666           difference chroma plane. Return 0 if there is no such plane.
11667
11668       r(x, y)
11669       g(x, y)
11670       b(x, y)
11671           Return the value of the pixel at location (x,y) of the
11672           red/green/blue component. Return 0 if there is no such component.
11673
11674       alpha(x, y)
11675           Return the value of the pixel at location (x,y) of the alpha plane.
11676           Return 0 if there is no such plane.
11677
11678       psum(x,y), lumsum(x, y), cbsum(x,y), crsum(x,y), rsum(x,y), gsum(x,y),
11679       bsum(x,y), alphasum(x,y)
11680           Sum of sample values in the rectangle from (0,0) to (x,y), this
11681           allows obtaining sums of samples within a rectangle. See the
11682           functions without the sum postfix.
11683
11684       interpolation
11685           Set one of interpolation methods:
11686
11687           nearest, n
11688           bilinear, b
11689
11690           Default is bilinear.
11691
11692       For functions, if x and y are outside the area, the value will be
11693       automatically clipped to the closer edge.
11694
11695       Please note that this filter can use multiple threads in which case
11696       each slice will have its own expression state. If you want to use only
11697       a single expression state because your expressions depend on previous
11698       state then you should limit the number of filter threads to 1.
11699
11700       Examples
11701
11702       •   Flip the image horizontally:
11703
11704                   geq=p(W-X\,Y)
11705
11706       •   Generate a bidimensional sine wave, with angle "PI/3" and a
11707           wavelength of 100 pixels:
11708
11709                   geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X-50*T) + sin(PI/3)*Y)):128:128
11710
11711       •   Generate a fancy enigmatic moving light:
11712
11713                   nullsrc=s=256x256,geq=random(1)/hypot(X-cos(N*0.07)*W/2-W/2\,Y-sin(N*0.09)*H/2-H/2)^2*1000000*sin(N*0.02):128:128
11714
11715       •   Generate a quick emboss effect:
11716
11717                   format=gray,geq=lum_expr='(p(X,Y)+(256-p(X-4,Y-4)))/2'
11718
11719       •   Modify RGB components depending on pixel position:
11720
11721                   geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)'
11722
11723       •   Create a radial gradient that is the same size as the input (also
11724           see the vignette filter):
11725
11726                   geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
11727
11728   gradfun
11729       Fix the banding artifacts that are sometimes introduced into nearly
11730       flat regions by truncation to 8-bit color depth.  Interpolate the
11731       gradients that should go where the bands are, and dither them.
11732
11733       It is designed for playback only.  Do not use it prior to lossy
11734       compression, because compression tends to lose the dither and bring
11735       back the bands.
11736
11737       It accepts the following parameters:
11738
11739       strength
11740           The maximum amount by which the filter will change any one pixel.
11741           This is also the threshold for detecting nearly flat regions.
11742           Acceptable values range from .51 to 64; the default value is 1.2.
11743           Out-of-range values will be clipped to the valid range.
11744
11745       radius
11746           The neighborhood to fit the gradient to. A larger radius makes for
11747           smoother gradients, but also prevents the filter from modifying the
11748           pixels near detailed regions. Acceptable values are 8-32; the
11749           default value is 16. Out-of-range values will be clipped to the
11750           valid range.
11751
11752       Alternatively, the options can be specified as a flat string:
11753       strength[:radius]
11754
11755       Examples
11756
11757       •   Apply the filter with a 3.5 strength and radius of 8:
11758
11759                   gradfun=3.5:8
11760
11761       •   Specify radius, omitting the strength (which will fall-back to the
11762           default value):
11763
11764                   gradfun=radius=8
11765
11766   graphmonitor
11767       Show various filtergraph stats.
11768
11769       With this filter one can debug complete filtergraph.  Especially issues
11770       with links filling with queued frames.
11771
11772       The filter accepts the following options:
11773
11774       size, s
11775           Set video output size. Default is hd720.
11776
11777       opacity, o
11778           Set video opacity. Default is 0.9. Allowed range is from 0 to 1.
11779
11780       mode, m
11781           Set output mode, can be fulll or compact.  In compact mode only
11782           filters with some queued frames have displayed stats.
11783
11784       flags, f
11785           Set flags which enable which stats are shown in video.
11786
11787           Available values for flags are:
11788
11789           queue
11790               Display number of queued frames in each link.
11791
11792           frame_count_in
11793               Display number of frames taken from filter.
11794
11795           frame_count_out
11796               Display number of frames given out from filter.
11797
11798           pts Display current filtered frame pts.
11799
11800           time
11801               Display current filtered frame time.
11802
11803           timebase
11804               Display time base for filter link.
11805
11806           format
11807               Display used format for filter link.
11808
11809           size
11810               Display video size or number of audio channels in case of audio
11811               used by filter link.
11812
11813           rate
11814               Display video frame rate or sample rate in case of audio used
11815               by filter link.
11816
11817           eof Display link output status.
11818
11819           sample_count_in
11820               Display number of samples taken from filter.
11821
11822           sample_count_out
11823               Display number of samples given out from filter.
11824
11825       rate, r
11826           Set upper limit for video rate of output stream, Default value is
11827           25.  This guarantee that output video frame rate will not be higher
11828           than this value.
11829
11830   grayworld
11831       A color constancy filter that applies color correction based on the
11832       grayworld assumption
11833
11834       See:
11835       <https://www.researchgate.net/publication/275213614_A_New_Color_Correction_Method_for_Underwater_Imaging>
11836
11837       The algorithm  uses linear light, so input data should be linearized
11838       beforehand (and possibly correctly tagged).
11839
11840               ffmpeg -i INPUT -vf zscale=transfer=linear,grayworld,zscale=transfer=bt709,format=yuv420p OUTPUT
11841
11842   greyedge
11843       A color constancy variation filter which estimates scene illumination
11844       via grey edge algorithm and corrects the scene colors accordingly.
11845
11846       See: <https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf>
11847
11848       The filter accepts the following options:
11849
11850       difford
11851           The order of differentiation to be applied on the scene. Must be
11852           chosen in the range [0,2] and default value is 1.
11853
11854       minknorm
11855           The Minkowski parameter to be used for calculating the Minkowski
11856           distance. Must be chosen in the range [0,20] and default value is
11857           1. Set to 0 for getting max value instead of calculating Minkowski
11858           distance.
11859
11860       sigma
11861           The standard deviation of Gaussian blur to be applied on the scene.
11862           Must be chosen in the range [0,1024.0] and default value = 1.
11863           floor( sigma * break_off_sigma(3) ) can't be equal to 0 if difford
11864           is greater than 0.
11865
11866       Examples
11867
11868       •   Grey Edge:
11869
11870                   greyedge=difford=1:minknorm=5:sigma=2
11871
11872       •   Max Edge:
11873
11874                   greyedge=difford=1:minknorm=0:sigma=2
11875
11876   guided
11877       Apply guided filter for edge-preserving smoothing, dehazing and so on.
11878
11879       The filter accepts the following options:
11880
11881       radius
11882           Set the box radius in pixels.  Allowed range is 1 to 20. Default is
11883           3.
11884
11885       eps Set regularization parameter (with square).  Allowed range is 0 to
11886           1. Default is 0.01.
11887
11888       mode
11889           Set filter mode. Can be "basic" or "fast".  Default is "basic".
11890
11891       sub Set subsampling ratio for "fast" mode.  Range is 2 to 64. Default
11892           is 4.  No subsampling occurs in "basic" mode.
11893
11894       guidance
11895           Set guidance mode. Can be "off" or "on". Default is "off".  If
11896           "off", single input is required.  If "on", two inputs of the same
11897           resolution and pixel format are required.  The second input serves
11898           as the guidance.
11899
11900       planes
11901           Set planes to filter. Default is first only.
11902
11903       Commands
11904
11905       This filter supports the all above options as commands.
11906
11907       Examples
11908
11909       •   Edge-preserving smoothing with guided filter:
11910
11911                   ffmpeg -i in.png -vf guided out.png
11912
11913       •   Dehazing, structure-transferring filtering, detail enhancement with
11914           guided filter.  For the generation of guidance image, refer to
11915           paper "Guided Image Filtering".  See:
11916           <http://kaiminghe.com/publications/pami12guidedfilter.pdf>.
11917
11918                   ffmpeg -i in.png -i guidance.png -filter_complex guided=guidance=on out.png
11919
11920   haldclut
11921       Apply a Hald CLUT to a video stream.
11922
11923       First input is the video stream to process, and second one is the Hald
11924       CLUT.  The Hald CLUT input can be a simple picture or a complete video
11925       stream.
11926
11927       The filter accepts the following options:
11928
11929       shortest
11930           Force termination when the shortest input terminates. Default is 0.
11931
11932       repeatlast
11933           Continue applying the last CLUT after the end of the stream. A
11934           value of 0 disable the filter after the last frame of the CLUT is
11935           reached.  Default is 1.
11936
11937       "haldclut" also has the same interpolation options as lut3d (both
11938       filters share the same internals).
11939
11940       This filter also supports the framesync options.
11941
11942       More information about the Hald CLUT can be found on Eskil Steenberg's
11943       website (Hald CLUT author) at
11944       <http://www.quelsolaar.com/technology/clut.html>.
11945
11946       Commands
11947
11948       This filter supports the "interp" option as commands.
11949
11950       Workflow examples
11951
11952       Hald CLUT video stream
11953
11954       Generate an identity Hald CLUT stream altered with various effects:
11955
11956               ffmpeg -f lavfi -i B<haldclutsrc>=8 -vf "hue=H=2*PI*t:s=sin(2*PI*t)+1, curves=cross_process" -t 10 -c:v ffv1 clut.nut
11957
11958       Note: make sure you use a lossless codec.
11959
11960       Then use it with "haldclut" to apply it on some random stream:
11961
11962               ffmpeg -f lavfi -i mandelbrot -i clut.nut -filter_complex '[0][1] haldclut' -t 20 mandelclut.mkv
11963
11964       The Hald CLUT will be applied to the 10 first seconds (duration of
11965       clut.nut), then the latest picture of that CLUT stream will be applied
11966       to the remaining frames of the "mandelbrot" stream.
11967
11968       Hald CLUT with preview
11969
11970       A Hald CLUT is supposed to be a squared image of "Level*Level*Level" by
11971       "Level*Level*Level" pixels. For a given Hald CLUT, FFmpeg will select
11972       the biggest possible square starting at the top left of the picture.
11973       The remaining padding pixels (bottom or right) will be ignored. This
11974       area can be used to add a preview of the Hald CLUT.
11975
11976       Typically, the following generated Hald CLUT will be supported by the
11977       "haldclut" filter:
11978
11979               ffmpeg -f lavfi -i B<haldclutsrc>=8 -vf "
11980                  pad=iw+320 [padded_clut];
11981                  smptebars=s=320x256, split [a][b];
11982                  [padded_clut][a] overlay=W-320:h, curves=color_negative [main];
11983                  [main][b] overlay=W-320" -frames:v 1 clut.png
11984
11985       It contains the original and a preview of the effect of the CLUT: SMPTE
11986       color bars are displayed on the right-top, and below the same color
11987       bars processed by the color changes.
11988
11989       Then, the effect of this Hald CLUT can be visualized with:
11990
11991               ffplay input.mkv -vf "movie=clut.png, [in] haldclut"
11992
11993   hflip
11994       Flip the input video horizontally.
11995
11996       For example, to horizontally flip the input video with ffmpeg:
11997
11998               ffmpeg -i in.avi -vf "hflip" out.avi
11999
12000   histeq
12001       This filter applies a global color histogram equalization on a per-
12002       frame basis.
12003
12004       It can be used to correct video that has a compressed range of pixel
12005       intensities.  The filter redistributes the pixel intensities to
12006       equalize their distribution across the intensity range. It may be
12007       viewed as an "automatically adjusting contrast filter". This filter is
12008       useful only for correcting degraded or poorly captured source video.
12009
12010       The filter accepts the following options:
12011
12012       strength
12013           Determine the amount of equalization to be applied.  As the
12014           strength is reduced, the distribution of pixel intensities more-
12015           and-more approaches that of the input frame. The value must be a
12016           float number in the range [0,1] and defaults to 0.200.
12017
12018       intensity
12019           Set the maximum intensity that can generated and scale the output
12020           values appropriately.  The strength should be set as desired and
12021           then the intensity can be limited if needed to avoid washing-out.
12022           The value must be a float number in the range [0,1] and defaults to
12023           0.210.
12024
12025       antibanding
12026           Set the antibanding level. If enabled the filter will randomly vary
12027           the luminance of output pixels by a small amount to avoid banding
12028           of the histogram. Possible values are "none", "weak" or "strong".
12029           It defaults to "none".
12030
12031   histogram
12032       Compute and draw a color distribution histogram for the input video.
12033
12034       The computed histogram is a representation of the color component
12035       distribution in an image.
12036
12037       Standard histogram displays the color components distribution in an
12038       image.  Displays color graph for each color component. Shows
12039       distribution of the Y, U, V, A or R, G, B components, depending on
12040       input format, in the current frame. Below each graph a color component
12041       scale meter is shown.
12042
12043       The filter accepts the following options:
12044
12045       level_height
12046           Set height of level. Default value is 200.  Allowed range is [50,
12047           2048].
12048
12049       scale_height
12050           Set height of color scale. Default value is 12.  Allowed range is
12051           [0, 40].
12052
12053       display_mode
12054           Set display mode.  It accepts the following values:
12055
12056           stack
12057               Per color component graphs are placed below each other.
12058
12059           parade
12060               Per color component graphs are placed side by side.
12061
12062           overlay
12063               Presents information identical to that in the "parade", except
12064               that the graphs representing color components are superimposed
12065               directly over one another.
12066
12067           Default is "stack".
12068
12069       levels_mode
12070           Set mode. Can be either "linear", or "logarithmic".  Default is
12071           "linear".
12072
12073       components
12074           Set what color components to display.  Default is 7.
12075
12076       fgopacity
12077           Set foreground opacity. Default is 0.7.
12078
12079       bgopacity
12080           Set background opacity. Default is 0.5.
12081
12082       colors_mode
12083           Set colors mode.  It accepts the following values:
12084
12085           whiteonblack
12086           blackonwhite
12087           whiteongray
12088           blackongray
12089           coloronblack
12090           coloronwhite
12091           colorongray
12092           blackoncolor
12093           whiteoncolor
12094           grayoncolor
12095
12096           Default is "whiteonblack".
12097
12098       Examples
12099
12100       •   Calculate and draw histogram:
12101
12102                   ffplay -i input -vf histogram
12103
12104   hqdn3d
12105       This is a high precision/quality 3d denoise filter. It aims to reduce
12106       image noise, producing smooth images and making still images really
12107       still. It should enhance compressibility.
12108
12109       It accepts the following optional parameters:
12110
12111       luma_spatial
12112           A non-negative floating point number which specifies spatial luma
12113           strength.  It defaults to 4.0.
12114
12115       chroma_spatial
12116           A non-negative floating point number which specifies spatial chroma
12117           strength.  It defaults to 3.0*luma_spatial/4.0.
12118
12119       luma_tmp
12120           A floating point number which specifies luma temporal strength. It
12121           defaults to 6.0*luma_spatial/4.0.
12122
12123       chroma_tmp
12124           A floating point number which specifies chroma temporal strength.
12125           It defaults to luma_tmp*chroma_spatial/luma_spatial.
12126
12127       Commands
12128
12129       This filter supports same commands as options.  The command accepts the
12130       same syntax of the corresponding option.
12131
12132       If the specified expression is not valid, it is kept at its current
12133       value.
12134
12135   hwdownload
12136       Download hardware frames to system memory.
12137
12138       The input must be in hardware frames, and the output a non-hardware
12139       format.  Not all formats will be supported on the output - it may be
12140       necessary to insert an additional format filter immediately following
12141       in the graph to get the output in a supported format.
12142
12143   hwmap
12144       Map hardware frames to system memory or to another device.
12145
12146       This filter has several different modes of operation; which one is used
12147       depends on the input and output formats:
12148
12149       •   Hardware frame input, normal frame output
12150
12151           Map the input frames to system memory and pass them to the output.
12152           If the original hardware frame is later required (for example,
12153           after overlaying something else on part of it), the hwmap filter
12154           can be used again in the next mode to retrieve it.
12155
12156       •   Normal frame input, hardware frame output
12157
12158           If the input is actually a software-mapped hardware frame, then
12159           unmap it - that is, return the original hardware frame.
12160
12161           Otherwise, a device must be provided.  Create new hardware surfaces
12162           on that device for the output, then map them back to the software
12163           format at the input and give those frames to the preceding filter.
12164           This will then act like the hwupload filter, but may be able to
12165           avoid an additional copy when the input is already in a compatible
12166           format.
12167
12168       •   Hardware frame input and output
12169
12170           A device must be supplied for the output, either directly or with
12171           the derive_device option.  The input and output devices must be of
12172           different types and compatible - the exact meaning of this is
12173           system-dependent, but typically it means that they must refer to
12174           the same underlying hardware context (for example, refer to the
12175           same graphics card).
12176
12177           If the input frames were originally created on the output device,
12178           then unmap to retrieve the original frames.
12179
12180           Otherwise, map the frames to the output device - create new
12181           hardware frames on the output corresponding to the frames on the
12182           input.
12183
12184       The following additional parameters are accepted:
12185
12186       mode
12187           Set the frame mapping mode.  Some combination of:
12188
12189           read
12190               The mapped frame should be readable.
12191
12192           write
12193               The mapped frame should be writeable.
12194
12195           overwrite
12196               The mapping will always overwrite the entire frame.
12197
12198               This may improve performance in some cases, as the original
12199               contents of the frame need not be loaded.
12200
12201           direct
12202               The mapping must not involve any copying.
12203
12204               Indirect mappings to copies of frames are created in some cases
12205               where either direct mapping is not possible or it would have
12206               unexpected properties.  Setting this flag ensures that the
12207               mapping is direct and will fail if that is not possible.
12208
12209           Defaults to read+write if not specified.
12210
12211       derive_device type
12212           Rather than using the device supplied at initialisation, instead
12213           derive a new device of type type from the device the input frames
12214           exist on.
12215
12216       reverse
12217           In a hardware to hardware mapping, map in reverse - create frames
12218           in the sink and map them back to the source.  This may be necessary
12219           in some cases where a mapping in one direction is required but only
12220           the opposite direction is supported by the devices being used.
12221
12222           This option is dangerous - it may break the preceding filter in
12223           undefined ways if there are any additional constraints on that
12224           filter's output.  Do not use it without fully understanding the
12225           implications of its use.
12226
12227   hwupload
12228       Upload system memory frames to hardware surfaces.
12229
12230       The device to upload to must be supplied when the filter is
12231       initialised.  If using ffmpeg, select the appropriate device with the
12232       -filter_hw_device option or with the derive_device option.  The input
12233       and output devices must be of different types and compatible - the
12234       exact meaning of this is system-dependent, but typically it means that
12235       they must refer to the same underlying hardware context (for example,
12236       refer to the same graphics card).
12237
12238       The following additional parameters are accepted:
12239
12240       derive_device type
12241           Rather than using the device supplied at initialisation, instead
12242           derive a new device of type type from the device the input frames
12243           exist on.
12244
12245   hwupload_cuda
12246       Upload system memory frames to a CUDA device.
12247
12248       It accepts the following optional parameters:
12249
12250       device
12251           The number of the CUDA device to use
12252
12253   hqx
12254       Apply a high-quality magnification filter designed for pixel art. This
12255       filter was originally created by Maxim Stepin.
12256
12257       It accepts the following option:
12258
12259       n   Set the scaling dimension: 2 for "hq2x", 3 for "hq3x" and 4 for
12260           "hq4x".  Default is 3.
12261
12262   hstack
12263       Stack input videos horizontally.
12264
12265       All streams must be of same pixel format and of same height.
12266
12267       Note that this filter is faster than using overlay and pad filter to
12268       create same output.
12269
12270       The filter accepts the following option:
12271
12272       inputs
12273           Set number of input streams. Default is 2.
12274
12275       shortest
12276           If set to 1, force the output to terminate when the shortest input
12277           terminates. Default value is 0.
12278
12279   hsvhold
12280       Turns a certain HSV range into gray values.
12281
12282       This filter measures color difference between set HSV color in options
12283       and ones measured in video stream. Depending on options, output colors
12284       can be changed to be gray or not.
12285
12286       The filter accepts the following options:
12287
12288       hue Set the hue value which will be used in color difference
12289           calculation.  Allowed range is from -360 to 360. Default value is
12290           0.
12291
12292       sat Set the saturation value which will be used in color difference
12293           calculation.  Allowed range is from -1 to 1. Default value is 0.
12294
12295       val Set the value which will be used in color difference calculation.
12296           Allowed range is from -1 to 1. Default value is 0.
12297
12298       similarity
12299           Set similarity percentage with the key color.  Allowed range is
12300           from 0 to 1. Default value is 0.01.
12301
12302           0.00001 matches only the exact key color, while 1.0 matches
12303           everything.
12304
12305       blend
12306           Blend percentage.  Allowed range is from 0 to 1. Default value is
12307           0.
12308
12309           0.0 makes pixels either fully gray, or not gray at all.
12310
12311           Higher values result in more gray pixels, with a higher gray pixel
12312           the more similar the pixels color is to the key color.
12313
12314   hsvkey
12315       Turns a certain HSV range into transparency.
12316
12317       This filter measures color difference between set HSV color in options
12318       and ones measured in video stream. Depending on options, output colors
12319       can be changed to transparent by adding alpha channel.
12320
12321       The filter accepts the following options:
12322
12323       hue Set the hue value which will be used in color difference
12324           calculation.  Allowed range is from -360 to 360. Default value is
12325           0.
12326
12327       sat Set the saturation value which will be used in color difference
12328           calculation.  Allowed range is from -1 to 1. Default value is 0.
12329
12330       val Set the value which will be used in color difference calculation.
12331           Allowed range is from -1 to 1. Default value is 0.
12332
12333       similarity
12334           Set similarity percentage with the key color.  Allowed range is
12335           from 0 to 1. Default value is 0.01.
12336
12337           0.00001 matches only the exact key color, while 1.0 matches
12338           everything.
12339
12340       blend
12341           Blend percentage.  Allowed range is from 0 to 1. Default value is
12342           0.
12343
12344           0.0 makes pixels either fully transparent, or not transparent at
12345           all.
12346
12347           Higher values result in semi-transparent pixels, with a higher
12348           transparency the more similar the pixels color is to the key color.
12349
12350   hue
12351       Modify the hue and/or the saturation of the input.
12352
12353       It accepts the following parameters:
12354
12355       h   Specify the hue angle as a number of degrees. It accepts an
12356           expression, and defaults to "0".
12357
12358       s   Specify the saturation in the [-10,10] range. It accepts an
12359           expression and defaults to "1".
12360
12361       H   Specify the hue angle as a number of radians. It accepts an
12362           expression, and defaults to "0".
12363
12364       b   Specify the brightness in the [-10,10] range. It accepts an
12365           expression and defaults to "0".
12366
12367       h and H are mutually exclusive, and can't be specified at the same
12368       time.
12369
12370       The b, h, H and s option values are expressions containing the
12371       following constants:
12372
12373       n   frame count of the input frame starting from 0
12374
12375       pts presentation timestamp of the input frame expressed in time base
12376           units
12377
12378       r   frame rate of the input video, NAN if the input frame rate is
12379           unknown
12380
12381       t   timestamp expressed in seconds, NAN if the input timestamp is
12382           unknown
12383
12384       tb  time base of the input video
12385
12386       Examples
12387
12388       •   Set the hue to 90 degrees and the saturation to 1.0:
12389
12390                   hue=h=90:s=1
12391
12392       •   Same command but expressing the hue in radians:
12393
12394                   hue=H=PI/2:s=1
12395
12396       •   Rotate hue and make the saturation swing between 0 and 2 over a
12397           period of 1 second:
12398
12399                   hue="H=2*PI*t: s=sin(2*PI*t)+1"
12400
12401       •   Apply a 3 seconds saturation fade-in effect starting at 0:
12402
12403                   hue="s=min(t/3\,1)"
12404
12405           The general fade-in expression can be written as:
12406
12407                   hue="s=min(0\, max((t-START)/DURATION\, 1))"
12408
12409       •   Apply a 3 seconds saturation fade-out effect starting at 5 seconds:
12410
12411                   hue="s=max(0\, min(1\, (8-t)/3))"
12412
12413           The general fade-out expression can be written as:
12414
12415                   hue="s=max(0\, min(1\, (START+DURATION-t)/DURATION))"
12416
12417       Commands
12418
12419       This filter supports the following commands:
12420
12421       b
12422       s
12423       h
12424       H   Modify the hue and/or the saturation and/or brightness of the input
12425           video.  The command accepts the same syntax of the corresponding
12426           option.
12427
12428           If the specified expression is not valid, it is kept at its current
12429           value.
12430
12431   huesaturation
12432       Apply hue-saturation-intensity adjustments to input video stream.
12433
12434       This filter operates in RGB colorspace.
12435
12436       This filter accepts the following options:
12437
12438       hue Set the hue shift in degrees to apply. Default is 0.  Allowed range
12439           is from -180 to 180.
12440
12441       saturation
12442           Set the saturation shift. Default is 0.  Allowed range is from -1
12443           to 1.
12444
12445       intensity
12446           Set the intensity shift. Default is 0.  Allowed range is from -1 to
12447           1.
12448
12449       colors
12450           Set which primary and complementary colors are going to be
12451           adjusted.  This options is set by providing one or multiple values.
12452           This can select multiple colors at once. By default all colors are
12453           selected.
12454
12455           r   Adjust reds.
12456
12457           y   Adjust yellows.
12458
12459           g   Adjust greens.
12460
12461           c   Adjust cyans.
12462
12463           b   Adjust blues.
12464
12465           m   Adjust magentas.
12466
12467           a   Adjust all colors.
12468
12469       strength
12470           Set strength of filtering. Allowed range is from 0 to 100.  Default
12471           value is 1.
12472
12473       rw, gw, bw
12474           Set weight for each RGB component. Allowed range is from 0 to 1.
12475           By default is set to 0.333, 0.334, 0.333.  Those options are used
12476           in saturation and lightess processing.
12477
12478       lightness
12479           Set preserving lightness, by default is disabled.  Adjusting hues
12480           can change lightness from original RGB triplet, with this option
12481           enabled lightness is kept at same value.
12482
12483   hysteresis
12484       Grow first stream into second stream by connecting components.  This
12485       makes it possible to build more robust edge masks.
12486
12487       This filter accepts the following options:
12488
12489       planes
12490           Set which planes will be processed as bitmap, unprocessed planes
12491           will be copied from first stream.  By default value 0xf, all planes
12492           will be processed.
12493
12494       threshold
12495           Set threshold which is used in filtering. If pixel component value
12496           is higher than this value filter algorithm for connecting
12497           components is activated.  By default value is 0.
12498
12499       The "hysteresis" filter also supports the framesync options.
12500
12501   identity
12502       Obtain the identity score between two input videos.
12503
12504       This filter takes two input videos.
12505
12506       Both input videos must have the same resolution and pixel format for
12507       this filter to work correctly. Also it assumes that both inputs have
12508       the same number of frames, which are compared one by one.
12509
12510       The obtained per component, average, min and max identity score is
12511       printed through the logging system.
12512
12513       The filter stores the calculated identity scores of each frame in frame
12514       metadata.
12515
12516       In the below example the input file main.mpg being processed is
12517       compared with the reference file ref.mpg.
12518
12519               ffmpeg -i main.mpg -i ref.mpg -lavfi identity -f null -
12520
12521   idet
12522       Detect video interlacing type.
12523
12524       This filter tries to detect if the input frames are interlaced,
12525       progressive, top or bottom field first. It will also try to detect
12526       fields that are repeated between adjacent frames (a sign of telecine).
12527
12528       Single frame detection considers only immediately adjacent frames when
12529       classifying each frame.  Multiple frame detection incorporates the
12530       classification history of previous frames.
12531
12532       The filter will log these metadata values:
12533
12534       single.current_frame
12535           Detected type of current frame using single-frame detection. One
12536           of: ``tff'' (top field first), ``bff'' (bottom field first),
12537           ``progressive'', or ``undetermined''
12538
12539       single.tff
12540           Cumulative number of frames detected as top field first using
12541           single-frame detection.
12542
12543       multiple.tff
12544           Cumulative number of frames detected as top field first using
12545           multiple-frame detection.
12546
12547       single.bff
12548           Cumulative number of frames detected as bottom field first using
12549           single-frame detection.
12550
12551       multiple.current_frame
12552           Detected type of current frame using multiple-frame detection. One
12553           of: ``tff'' (top field first), ``bff'' (bottom field first),
12554           ``progressive'', or ``undetermined''
12555
12556       multiple.bff
12557           Cumulative number of frames detected as bottom field first using
12558           multiple-frame detection.
12559
12560       single.progressive
12561           Cumulative number of frames detected as progressive using single-
12562           frame detection.
12563
12564       multiple.progressive
12565           Cumulative number of frames detected as progressive using multiple-
12566           frame detection.
12567
12568       single.undetermined
12569           Cumulative number of frames that could not be classified using
12570           single-frame detection.
12571
12572       multiple.undetermined
12573           Cumulative number of frames that could not be classified using
12574           multiple-frame detection.
12575
12576       repeated.current_frame
12577           Which field in the current frame is repeated from the last. One of
12578           ``neither'', ``top'', or ``bottom''.
12579
12580       repeated.neither
12581           Cumulative number of frames with no repeated field.
12582
12583       repeated.top
12584           Cumulative number of frames with the top field repeated from the
12585           previous frame's top field.
12586
12587       repeated.bottom
12588           Cumulative number of frames with the bottom field repeated from the
12589           previous frame's bottom field.
12590
12591       The filter accepts the following options:
12592
12593       intl_thres
12594           Set interlacing threshold.
12595
12596       prog_thres
12597           Set progressive threshold.
12598
12599       rep_thres
12600           Threshold for repeated field detection.
12601
12602       half_life
12603           Number of frames after which a given frame's contribution to the
12604           statistics is halved (i.e., it contributes only 0.5 to its
12605           classification). The default of 0 means that all frames seen are
12606           given full weight of 1.0 forever.
12607
12608       analyze_interlaced_flag
12609           When this is not 0 then idet will use the specified number of
12610           frames to determine if the interlaced flag is accurate, it will not
12611           count undetermined frames.  If the flag is found to be accurate it
12612           will be used without any further computations, if it is found to be
12613           inaccurate it will be cleared without any further computations.
12614           This allows inserting the idet filter as a low computational method
12615           to clean up the interlaced flag
12616
12617   il
12618       Deinterleave or interleave fields.
12619
12620       This filter allows one to process interlaced images fields without
12621       deinterlacing them. Deinterleaving splits the input frame into 2 fields
12622       (so called half pictures). Odd lines are moved to the top half of the
12623       output image, even lines to the bottom half.  You can process (filter)
12624       them independently and then re-interleave them.
12625
12626       The filter accepts the following options:
12627
12628       luma_mode, l
12629       chroma_mode, c
12630       alpha_mode, a
12631           Available values for luma_mode, chroma_mode and alpha_mode are:
12632
12633           none
12634               Do nothing.
12635
12636           deinterleave, d
12637               Deinterleave fields, placing one above the other.
12638
12639           interleave, i
12640               Interleave fields. Reverse the effect of deinterleaving.
12641
12642           Default value is "none".
12643
12644       luma_swap, ls
12645       chroma_swap, cs
12646       alpha_swap, as
12647           Swap luma/chroma/alpha fields. Exchange even & odd lines. Default
12648           value is 0.
12649
12650       Commands
12651
12652       This filter supports the all above options as commands.
12653
12654   inflate
12655       Apply inflate effect to the video.
12656
12657       This filter replaces the pixel by the local(3x3) average by taking into
12658       account only values higher than the pixel.
12659
12660       It accepts the following options:
12661
12662       threshold0
12663       threshold1
12664       threshold2
12665       threshold3
12666           Limit the maximum change for each plane, default is 65535.  If 0,
12667           plane will remain unchanged.
12668
12669       Commands
12670
12671       This filter supports the all above options as commands.
12672
12673   interlace
12674       Simple interlacing filter from progressive contents. This interleaves
12675       upper (or lower) lines from odd frames with lower (or upper) lines from
12676       even frames, halving the frame rate and preserving image height.
12677
12678                  Original        Original             New Frame
12679                  Frame 'j'      Frame 'j+1'             (tff)
12680                 ==========      ===========       ==================
12681                   Line 0  -------------------->    Frame 'j' Line 0
12682                   Line 1          Line 1  ---->   Frame 'j+1' Line 1
12683                   Line 2 --------------------->    Frame 'j' Line 2
12684                   Line 3          Line 3  ---->   Frame 'j+1' Line 3
12685                    ...             ...                   ...
12686               New Frame + 1 will be generated by Frame 'j+2' and Frame 'j+3' and so on
12687
12688       It accepts the following optional parameters:
12689
12690       scan
12691           This determines whether the interlaced frame is taken from the even
12692           (tff - default) or odd (bff) lines of the progressive frame.
12693
12694       lowpass
12695           Vertical lowpass filter to avoid twitter interlacing and reduce
12696           moire patterns.
12697
12698           0, off
12699               Disable vertical lowpass filter
12700
12701           1, linear
12702               Enable linear filter (default)
12703
12704           2, complex
12705               Enable complex filter. This will slightly less reduce twitter
12706               and moire but better retain detail and subjective sharpness
12707               impression.
12708
12709   kerndeint
12710       Deinterlace input video by applying Donald Graft's adaptive kernel
12711       deinterling. Work on interlaced parts of a video to produce progressive
12712       frames.
12713
12714       The description of the accepted parameters follows.
12715
12716       thresh
12717           Set the threshold which affects the filter's tolerance when
12718           determining if a pixel line must be processed. It must be an
12719           integer in the range [0,255] and defaults to 10. A value of 0 will
12720           result in applying the process on every pixels.
12721
12722       map Paint pixels exceeding the threshold value to white if set to 1.
12723           Default is 0.
12724
12725       order
12726           Set the fields order. Swap fields if set to 1, leave fields alone
12727           if 0. Default is 0.
12728
12729       sharp
12730           Enable additional sharpening if set to 1. Default is 0.
12731
12732       twoway
12733           Enable twoway sharpening if set to 1. Default is 0.
12734
12735       Examples
12736
12737       •   Apply default values:
12738
12739                   kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
12740
12741       •   Enable additional sharpening:
12742
12743                   kerndeint=sharp=1
12744
12745       •   Paint processed pixels in white:
12746
12747                   kerndeint=map=1
12748
12749   kirsch
12750       Apply kirsch operator to input video stream.
12751
12752       The filter accepts the following option:
12753
12754       planes
12755           Set which planes will be processed, unprocessed planes will be
12756           copied.  By default value 0xf, all planes will be processed.
12757
12758       scale
12759           Set value which will be multiplied with filtered result.
12760
12761       delta
12762           Set value which will be added to filtered result.
12763
12764       Commands
12765
12766       This filter supports the all above options as commands.
12767
12768   lagfun
12769       Slowly update darker pixels.
12770
12771       This filter makes short flashes of light appear longer.  This filter
12772       accepts the following options:
12773
12774       decay
12775           Set factor for decaying. Default is .95. Allowed range is from 0 to
12776           1.
12777
12778       planes
12779           Set which planes to filter. Default is all. Allowed range is from 0
12780           to 15.
12781
12782       Commands
12783
12784       This filter supports the all above options as commands.
12785
12786   lenscorrection
12787       Correct radial lens distortion
12788
12789       This filter can be used to correct for radial distortion as can result
12790       from the use of wide angle lenses, and thereby re-rectify the image. To
12791       find the right parameters one can use tools available for example as
12792       part of opencv or simply trial-and-error.  To use opencv use the
12793       calibration sample (under samples/cpp) from the opencv sources and
12794       extract the k1 and k2 coefficients from the resulting matrix.
12795
12796       Note that effectively the same filter is available in the open-source
12797       tools Krita and Digikam from the KDE project.
12798
12799       In contrast to the vignette filter, which can also be used to
12800       compensate lens errors, this filter corrects the distortion of the
12801       image, whereas vignette corrects the brightness distribution, so you
12802       may want to use both filters together in certain cases, though you will
12803       have to take care of ordering, i.e. whether vignetting should be
12804       applied before or after lens correction.
12805
12806       Options
12807
12808       The filter accepts the following options:
12809
12810       cx  Relative x-coordinate of the focal point of the image, and thereby
12811           the center of the distortion. This value has a range [0,1] and is
12812           expressed as fractions of the image width. Default is 0.5.
12813
12814       cy  Relative y-coordinate of the focal point of the image, and thereby
12815           the center of the distortion. This value has a range [0,1] and is
12816           expressed as fractions of the image height. Default is 0.5.
12817
12818       k1  Coefficient of the quadratic correction term. This value has a
12819           range [-1,1]. 0 means no correction. Default is 0.
12820
12821       k2  Coefficient of the double quadratic correction term. This value has
12822           a range [-1,1].  0 means no correction. Default is 0.
12823
12824       i   Set interpolation type. Can be "nearest" or "bilinear".  Default is
12825           "nearest".
12826
12827       fc  Specify the color of the unmapped pixels. For the syntax of this
12828           option, check the "Color" section in the ffmpeg-utils manual.
12829           Default color is "black@0".
12830
12831       The formula that generates the correction is:
12832
12833       r_src = r_tgt * (1 + k1 * (r_tgt / r_0)^2 + k2 * (r_tgt / r_0)^4)
12834
12835       where r_0 is halve of the image diagonal and r_src and r_tgt are the
12836       distances from the focal point in the source and target images,
12837       respectively.
12838
12839       Commands
12840
12841       This filter supports the all above options as commands.
12842
12843   lensfun
12844       Apply lens correction via the lensfun library
12845       (<http://lensfun.sourceforge.net/>).
12846
12847       The "lensfun" filter requires the camera make, camera model, and lens
12848       model to apply the lens correction. The filter will load the lensfun
12849       database and query it to find the corresponding camera and lens entries
12850       in the database. As long as these entries can be found with the given
12851       options, the filter can perform corrections on frames. Note that
12852       incomplete strings will result in the filter choosing the best match
12853       with the given options, and the filter will output the chosen camera
12854       and lens models (logged with level "info"). You must provide the make,
12855       camera model, and lens model as they are required.
12856
12857       The filter accepts the following options:
12858
12859       make
12860           The make of the camera (for example, "Canon"). This option is
12861           required.
12862
12863       model
12864           The model of the camera (for example, "Canon EOS 100D"). This
12865           option is required.
12866
12867       lens_model
12868           The model of the lens (for example, "Canon EF-S 18-55mm f/3.5-5.6
12869           IS STM"). This option is required.
12870
12871       mode
12872           The type of correction to apply. The following values are valid
12873           options:
12874
12875           vignetting
12876               Enables fixing lens vignetting.
12877
12878           geometry
12879               Enables fixing lens geometry. This is the default.
12880
12881           subpixel
12882               Enables fixing chromatic aberrations.
12883
12884           vig_geo
12885               Enables fixing lens vignetting and lens geometry.
12886
12887           vig_subpixel
12888               Enables fixing lens vignetting and chromatic aberrations.
12889
12890           distortion
12891               Enables fixing both lens geometry and chromatic aberrations.
12892
12893           all Enables all possible corrections.
12894
12895       focal_length
12896           The focal length of the image/video (zoom; expected constant for
12897           video). For example, a 18--55mm lens has focal length range of
12898           [18--55], so a value in that range should be chosen when using that
12899           lens. Default 18.
12900
12901       aperture
12902           The aperture of the image/video (expected constant for video). Note
12903           that aperture is only used for vignetting correction. Default 3.5.
12904
12905       focus_distance
12906           The focus distance of the image/video (expected constant for
12907           video). Note that focus distance is only used for vignetting and
12908           only slightly affects the vignetting correction process. If
12909           unknown, leave it at the default value (which is 1000).
12910
12911       scale
12912           The scale factor which is applied after transformation. After
12913           correction the video is no longer necessarily rectangular. This
12914           parameter controls how much of the resulting image is visible. The
12915           value 0 means that a value will be chosen automatically such that
12916           there is little or no unmapped area in the output image. 1.0 means
12917           that no additional scaling is done. Lower values may result in more
12918           of the corrected image being visible, while higher values may avoid
12919           unmapped areas in the output.
12920
12921       target_geometry
12922           The target geometry of the output image/video. The following values
12923           are valid options:
12924
12925           rectilinear (default)
12926           fisheye
12927           panoramic
12928           equirectangular
12929           fisheye_orthographic
12930           fisheye_stereographic
12931           fisheye_equisolid
12932           fisheye_thoby
12933       reverse
12934           Apply the reverse of image correction (instead of correcting
12935           distortion, apply it).
12936
12937       interpolation
12938           The type of interpolation used when correcting distortion. The
12939           following values are valid options:
12940
12941           nearest
12942           linear (default)
12943           lanczos
12944
12945       Examples
12946
12947       •   Apply lens correction with make "Canon", camera model "Canon EOS
12948           100D", and lens model "Canon EF-S 18-55mm f/3.5-5.6 IS STM" with
12949           focal length of "18" and aperture of "8.0".
12950
12951                   ffmpeg -i input.mov -vf lensfun=make=Canon:model="Canon EOS 100D":lens_model="Canon EF-S 18-55mm f/3.5-5.6 IS STM":focal_length=18:aperture=8 -c:v h264 -b:v 8000k output.mov
12952
12953       •   Apply the same as before, but only for the first 5 seconds of
12954           video.
12955
12956                   ffmpeg -i input.mov -vf lensfun=make=Canon:model="Canon EOS 100D":lens_model="Canon EF-S 18-55mm f/3.5-5.6 IS STM":focal_length=18:aperture=8:enable='lte(t\,5)' -c:v h264 -b:v 8000k output.mov
12957
12958   libvmaf
12959       Obtain the VMAF (Video Multi-Method Assessment Fusion) score between
12960       two input videos.
12961
12962       The first input is the encoded video, and the second input is the
12963       reference video.
12964
12965       The obtained VMAF score is printed through the logging system.
12966
12967       It requires Netflix's vmaf library (libvmaf) as a pre-requisite.  After
12968       installing the library it can be enabled using: "./configure
12969       --enable-libvmaf".  If no model path is specified it uses the default
12970       model: "vmaf_v0.6.1.pkl".
12971
12972       The filter has following options:
12973
12974       model_path
12975           Set the model path which is to be used for SVM.  Default value:
12976           "/usr/local/share/model/vmaf_v0.6.1.pkl"
12977
12978       log_path
12979           Set the file path to be used to store logs.
12980
12981       log_fmt
12982           Set the format of the log file (csv, json or xml).
12983
12984       enable_transform
12985           This option can enable/disable the "score_transform" applied to the
12986           final predicted VMAF score, if you have specified score_transform
12987           option in the input parameter file passed to "run_vmaf_training.py"
12988           Default value: "false"
12989
12990       phone_model
12991           Invokes the phone model which will generate VMAF scores higher than
12992           in the regular model, which is more suitable for laptop, TV, etc.
12993           viewing conditions.  Default value: "false"
12994
12995       psnr
12996           Enables computing psnr along with vmaf.  Default value: "false"
12997
12998       ssim
12999           Enables computing ssim along with vmaf.  Default value: "false"
13000
13001       ms_ssim
13002           Enables computing ms_ssim along with vmaf.  Default value: "false"
13003
13004       pool
13005           Set the pool method to be used for computing vmaf.  Options are
13006           "min", "harmonic_mean" or "mean" (default).
13007
13008       n_threads
13009           Set number of threads to be used when computing vmaf.  Default
13010           value: 0, which makes use of all available logical processors.
13011
13012       n_subsample
13013           Set interval for frame subsampling used when computing vmaf.
13014           Default value: 1
13015
13016       enable_conf_interval
13017           Enables confidence interval.  Default value: "false"
13018
13019       This filter also supports the framesync options.
13020
13021       Examples
13022
13023       •   On the below examples the input file main.mpg being processed is
13024           compared with the reference file ref.mpg.
13025
13026                   ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf -f null -
13027
13028       •   Example with options:
13029
13030                   ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf="psnr=1:log_fmt=json" -f null -
13031
13032       •   Example with options and different containers:
13033
13034                   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 -
13035
13036   limitdiff
13037       Apply limited difference filter using second and optionally third video
13038       stream.
13039
13040       The filter accepts the following options:
13041
13042       threshold
13043           Set the threshold to use when allowing certain differences between
13044           video streams.  Any absolute difference value lower or exact than
13045           this threshold will pick pixel components from first video stream.
13046
13047       elasticity
13048           Set the elasticity of soft thresholding when processing video
13049           streams.  This value multiplied with first one sets second
13050           threshold.  Any absolute difference value greater or exact than
13051           second threshold will pick pixel components from second video
13052           stream. For values between those two threshold linear interpolation
13053           between first and second video stream will be used.
13054
13055       reference
13056           Enable the reference (third) video stream processing. By default is
13057           disabled.  If set, this video stream will be used for calculating
13058           absolute difference with first video stream.
13059
13060       planes
13061           Specify which planes will be processed. Defaults to all available.
13062
13063       Commands
13064
13065       This filter supports the all above options as commands except option
13066       reference.
13067
13068   limiter
13069       Limits the pixel components values to the specified range [min, max].
13070
13071       The filter accepts the following options:
13072
13073       min Lower bound. Defaults to the lowest allowed value for the input.
13074
13075       max Upper bound. Defaults to the highest allowed value for the input.
13076
13077       planes
13078           Specify which planes will be processed. Defaults to all available.
13079
13080       Commands
13081
13082       This filter supports the all above options as commands.
13083
13084   loop
13085       Loop video frames.
13086
13087       The filter accepts the following options:
13088
13089       loop
13090           Set the number of loops. Setting this value to -1 will result in
13091           infinite loops.  Default is 0.
13092
13093       size
13094           Set maximal size in number of frames. Default is 0.
13095
13096       start
13097           Set first frame of loop. Default is 0.
13098
13099       Examples
13100
13101       •   Loop single first frame infinitely:
13102
13103                   loop=loop=-1:size=1:start=0
13104
13105       •   Loop single first frame 10 times:
13106
13107                   loop=loop=10:size=1:start=0
13108
13109       •   Loop 10 first frames 5 times:
13110
13111                   loop=loop=5:size=10:start=0
13112
13113   lut1d
13114       Apply a 1D LUT to an input video.
13115
13116       The filter accepts the following options:
13117
13118       file
13119           Set the 1D LUT file name.
13120
13121           Currently supported formats:
13122
13123           cube
13124               Iridas
13125
13126           csp cineSpace
13127
13128       interp
13129           Select interpolation mode.
13130
13131           Available values are:
13132
13133           nearest
13134               Use values from the nearest defined point.
13135
13136           linear
13137               Interpolate values using the linear interpolation.
13138
13139           cosine
13140               Interpolate values using the cosine interpolation.
13141
13142           cubic
13143               Interpolate values using the cubic interpolation.
13144
13145           spline
13146               Interpolate values using the spline interpolation.
13147
13148       Commands
13149
13150       This filter supports the all above options as commands.
13151
13152   lut3d
13153       Apply a 3D LUT to an input video.
13154
13155       The filter accepts the following options:
13156
13157       file
13158           Set the 3D LUT file name.
13159
13160           Currently supported formats:
13161
13162           3dl AfterEffects
13163
13164           cube
13165               Iridas
13166
13167           dat DaVinci
13168
13169           m3d Pandora
13170
13171           csp cineSpace
13172
13173       interp
13174           Select interpolation mode.
13175
13176           Available values are:
13177
13178           nearest
13179               Use values from the nearest defined point.
13180
13181           trilinear
13182               Interpolate values using the 8 points defining a cube.
13183
13184           tetrahedral
13185               Interpolate values using a tetrahedron.
13186
13187           pyramid
13188               Interpolate values using a pyramid.
13189
13190           prism
13191               Interpolate values using a prism.
13192
13193       Commands
13194
13195       This filter supports the "interp" option as commands.
13196
13197   lumakey
13198       Turn certain luma values into transparency.
13199
13200       The filter accepts the following options:
13201
13202       threshold
13203           Set the luma which will be used as base for transparency.  Default
13204           value is 0.
13205
13206       tolerance
13207           Set the range of luma values to be keyed out.  Default value is
13208           0.01.
13209
13210       softness
13211           Set the range of softness. Default value is 0.  Use this to control
13212           gradual transition from zero to full transparency.
13213
13214       Commands
13215
13216       This filter supports same commands as options.  The command accepts the
13217       same syntax of the corresponding option.
13218
13219       If the specified expression is not valid, it is kept at its current
13220       value.
13221
13222   lut, lutrgb, lutyuv
13223       Compute a look-up table for binding each pixel component input value to
13224       an output value, and apply it to the input video.
13225
13226       lutyuv applies a lookup table to a YUV input video, lutrgb to an RGB
13227       input video.
13228
13229       These filters accept the following parameters:
13230
13231       c0  set first pixel component expression
13232
13233       c1  set second pixel component expression
13234
13235       c2  set third pixel component expression
13236
13237       c3  set fourth pixel component expression, corresponds to the alpha
13238           component
13239
13240       r   set red component expression
13241
13242       g   set green component expression
13243
13244       b   set blue component expression
13245
13246       a   alpha component expression
13247
13248       y   set Y/luminance component expression
13249
13250       u   set U/Cb component expression
13251
13252       v   set V/Cr component expression
13253
13254       Each of them specifies the expression to use for computing the lookup
13255       table for the corresponding pixel component values.
13256
13257       The exact component associated to each of the c* options depends on the
13258       format in input.
13259
13260       The lut filter requires either YUV or RGB pixel formats in input,
13261       lutrgb requires RGB pixel formats in input, and lutyuv requires YUV.
13262
13263       The expressions can contain the following constants and functions:
13264
13265       w
13266       h   The input width and height.
13267
13268       val The input value for the pixel component.
13269
13270       clipval
13271           The input value, clipped to the minval-maxval range.
13272
13273       maxval
13274           The maximum value for the pixel component.
13275
13276       minval
13277           The minimum value for the pixel component.
13278
13279       negval
13280           The negated value for the pixel component value, clipped to the
13281           minval-maxval range; it corresponds to the expression
13282           "maxval-clipval+minval".
13283
13284       clip(val)
13285           The computed value in val, clipped to the minval-maxval range.
13286
13287       gammaval(gamma)
13288           The computed gamma correction value of the pixel component value,
13289           clipped to the minval-maxval range. It corresponds to the
13290           expression
13291           "pow((clipval-minval)/(maxval-minval)\,gamma)*(maxval-minval)+minval"
13292
13293       All expressions default to "val".
13294
13295       Commands
13296
13297       This filter supports same commands as options.
13298
13299       Examples
13300
13301       •   Negate input video:
13302
13303                   lutrgb="r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val"
13304                   lutyuv="y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val"
13305
13306           The above is the same as:
13307
13308                   lutrgb="r=negval:g=negval:b=negval"
13309                   lutyuv="y=negval:u=negval:v=negval"
13310
13311       •   Negate luminance:
13312
13313                   lutyuv=y=negval
13314
13315       •   Remove chroma components, turning the video into a graytone image:
13316
13317                   lutyuv="u=128:v=128"
13318
13319       •   Apply a luma burning effect:
13320
13321                   lutyuv="y=2*val"
13322
13323       •   Remove green and blue components:
13324
13325                   lutrgb="g=0:b=0"
13326
13327       •   Set a constant alpha channel value on input:
13328
13329                   format=rgba,lutrgb=a="maxval-minval/2"
13330
13331       •   Correct luminance gamma by a factor of 0.5:
13332
13333                   lutyuv=y=gammaval(0.5)
13334
13335       •   Discard least significant bits of luma:
13336
13337                   lutyuv=y='bitand(val, 128+64+32)'
13338
13339       •   Technicolor like effect:
13340
13341                   lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2'
13342
13343   lut2, tlut2
13344       The "lut2" filter takes two input streams and outputs one stream.
13345
13346       The "tlut2" (time lut2) filter takes two consecutive frames from one
13347       single stream.
13348
13349       This filter accepts the following parameters:
13350
13351       c0  set first pixel component expression
13352
13353       c1  set second pixel component expression
13354
13355       c2  set third pixel component expression
13356
13357       c3  set fourth pixel component expression, corresponds to the alpha
13358           component
13359
13360       d   set output bit depth, only available for "lut2" filter. By default
13361           is 0, which means bit depth is automatically picked from first
13362           input format.
13363
13364       The "lut2" filter also supports the framesync options.
13365
13366       Each of them specifies the expression to use for computing the lookup
13367       table for the corresponding pixel component values.
13368
13369       The exact component associated to each of the c* options depends on the
13370       format in inputs.
13371
13372       The expressions can contain the following constants:
13373
13374       w
13375       h   The input width and height.
13376
13377       x   The first input value for the pixel component.
13378
13379       y   The second input value for the pixel component.
13380
13381       bdx The first input video bit depth.
13382
13383       bdy The second input video bit depth.
13384
13385       All expressions default to "x".
13386
13387       Commands
13388
13389       This filter supports the all above options as commands except option
13390       "d".
13391
13392       Examples
13393
13394       •   Highlight differences between two RGB video streams:
13395
13396                   lut2='ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,0,pow(2,bdx)-1)'
13397
13398       •   Highlight differences between two YUV video streams:
13399
13400                   lut2='ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,pow(2,bdx-1),pow(2,bdx)-1):ifnot(x-y,pow(2,bdx-1),pow(2,bdx)-1)'
13401
13402       •   Show max difference between two video streams:
13403
13404                   lut2='if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1))):if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1))):if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1)))'
13405
13406   maskedclamp
13407       Clamp the first input stream with the second input and third input
13408       stream.
13409
13410       Returns the value of first stream to be between second input stream -
13411       "undershoot" and third input stream + "overshoot".
13412
13413       This filter accepts the following options:
13414
13415       undershoot
13416           Default value is 0.
13417
13418       overshoot
13419           Default value is 0.
13420
13421       planes
13422           Set which planes will be processed as bitmap, unprocessed planes
13423           will be copied from first stream.  By default value 0xf, all planes
13424           will be processed.
13425
13426       Commands
13427
13428       This filter supports the all above options as commands.
13429
13430   maskedmax
13431       Merge the second and third input stream into output stream using
13432       absolute differences between second input stream and first input stream
13433       and absolute difference between third input stream and first input
13434       stream. The picked value will be from second input stream if second
13435       absolute difference is greater than first one or from third input
13436       stream otherwise.
13437
13438       This filter accepts the following options:
13439
13440       planes
13441           Set which planes will be processed as bitmap, unprocessed planes
13442           will be copied from first stream.  By default value 0xf, all planes
13443           will be processed.
13444
13445       Commands
13446
13447       This filter supports the all above options as commands.
13448
13449   maskedmerge
13450       Merge the first input stream with the second input stream using per
13451       pixel weights in the third input stream.
13452
13453       A value of 0 in the third stream pixel component means that pixel
13454       component from first stream is returned unchanged, while maximum value
13455       (eg. 255 for 8-bit videos) means that pixel component from second
13456       stream is returned unchanged. Intermediate values define the amount of
13457       merging between both input stream's pixel components.
13458
13459       This filter accepts the following options:
13460
13461       planes
13462           Set which planes will be processed as bitmap, unprocessed planes
13463           will be copied from first stream.  By default value 0xf, all planes
13464           will be processed.
13465
13466       Commands
13467
13468       This filter supports the all above options as commands.
13469
13470   maskedmin
13471       Merge the second and third input stream into output stream using
13472       absolute differences between second input stream and first input stream
13473       and absolute difference between third input stream and first input
13474       stream. The picked value will be from second input stream if second
13475       absolute difference is less than first one or from third input stream
13476       otherwise.
13477
13478       This filter accepts the following options:
13479
13480       planes
13481           Set which planes will be processed as bitmap, unprocessed planes
13482           will be copied from first stream.  By default value 0xf, all planes
13483           will be processed.
13484
13485       Commands
13486
13487       This filter supports the all above options as commands.
13488
13489   maskedthreshold
13490       Pick pixels comparing absolute difference of two video streams with
13491       fixed threshold.
13492
13493       If absolute difference between pixel component of first and second
13494       video stream is equal or lower than user supplied threshold than pixel
13495       component from first video stream is picked, otherwise pixel component
13496       from second video stream is picked.
13497
13498       This filter accepts the following options:
13499
13500       threshold
13501           Set threshold used when picking pixels from absolute difference
13502           from two input video streams.
13503
13504       planes
13505           Set which planes will be processed as bitmap, unprocessed planes
13506           will be copied from second stream.  By default value 0xf, all
13507           planes will be processed.
13508
13509       Commands
13510
13511       This filter supports the all above options as commands.
13512
13513   maskfun
13514       Create mask from input video.
13515
13516       For example it is useful to create motion masks after "tblend" filter.
13517
13518       This filter accepts the following options:
13519
13520       low Set low threshold. Any pixel component lower or exact than this
13521           value will be set to 0.
13522
13523       high
13524           Set high threshold. Any pixel component higher than this value will
13525           be set to max value allowed for current pixel format.
13526
13527       planes
13528           Set planes to filter, by default all available planes are filtered.
13529
13530       fill
13531           Fill all frame pixels with this value.
13532
13533       sum Set max average pixel value for frame. If sum of all pixel
13534           components is higher that this average, output frame will be
13535           completely filled with value set by fill option.  Typically useful
13536           for scene changes when used in combination with "tblend" filter.
13537
13538       Commands
13539
13540       This filter supports the all above options as commands.
13541
13542   mcdeint
13543       Apply motion-compensation deinterlacing.
13544
13545       It needs one field per frame as input and must thus be used together
13546       with yadif=1/3 or equivalent.
13547
13548       This filter is only available in ffmpeg version 4.4 or earlier.
13549
13550       This filter accepts the following options:
13551
13552       mode
13553           Set the deinterlacing mode.
13554
13555           It accepts one of the following values:
13556
13557           fast
13558           medium
13559           slow
13560               use iterative motion estimation
13561
13562           extra_slow
13563               like slow, but use multiple reference frames.
13564
13565           Default value is fast.
13566
13567       parity
13568           Set the picture field parity assumed for the input video. It must
13569           be one of the following values:
13570
13571           0, tff
13572               assume top field first
13573
13574           1, bff
13575               assume bottom field first
13576
13577           Default value is bff.
13578
13579       qp  Set per-block quantization parameter (QP) used by the internal
13580           encoder.
13581
13582           Higher values should result in a smoother motion vector field but
13583           less optimal individual vectors. Default value is 1.
13584
13585   median
13586       Pick median pixel from certain rectangle defined by radius.
13587
13588       This filter accepts the following options:
13589
13590       radius
13591           Set horizontal radius size. Default value is 1.  Allowed range is
13592           integer from 1 to 127.
13593
13594       planes
13595           Set which planes to process. Default is 15, which is all available
13596           planes.
13597
13598       radiusV
13599           Set vertical radius size. Default value is 0.  Allowed range is
13600           integer from 0 to 127.  If it is 0, value will be picked from
13601           horizontal "radius" option.
13602
13603       percentile
13604           Set median percentile. Default value is 0.5.  Default value of 0.5
13605           will pick always median values, while 0 will pick minimum values,
13606           and 1 maximum values.
13607
13608       Commands
13609
13610       This filter supports same commands as options.  The command accepts the
13611       same syntax of the corresponding option.
13612
13613       If the specified expression is not valid, it is kept at its current
13614       value.
13615
13616   mergeplanes
13617       Merge color channel components from several video streams.
13618
13619       The filter accepts up to 4 input streams, and merge selected input
13620       planes to the output video.
13621
13622       This filter accepts the following options:
13623
13624       mapping
13625           Set input to output plane mapping. Default is 0.
13626
13627           The mappings is specified as a bitmap. It should be specified as a
13628           hexadecimal number in the form 0xAa[Bb[Cc[Dd]]]. 'Aa' describes the
13629           mapping for the first plane of the output stream. 'A' sets the
13630           number of the input stream to use (from 0 to 3), and 'a' the plane
13631           number of the corresponding input to use (from 0 to 3). The rest of
13632           the mappings is similar, 'Bb' describes the mapping for the output
13633           stream second plane, 'Cc' describes the mapping for the output
13634           stream third plane and 'Dd' describes the mapping for the output
13635           stream fourth plane.
13636
13637       format
13638           Set output pixel format. Default is "yuva444p".
13639
13640       Examples
13641
13642       •   Merge three gray video streams of same width and height into single
13643           video stream:
13644
13645                   [a0][a1][a2]mergeplanes=0x001020:yuv444p
13646
13647       •   Merge 1st yuv444p stream and 2nd gray video stream into yuva444p
13648           video stream:
13649
13650                   [a0][a1]mergeplanes=0x00010210:yuva444p
13651
13652       •   Swap Y and A plane in yuva444p stream:
13653
13654                   format=yuva444p,mergeplanes=0x03010200:yuva444p
13655
13656       •   Swap U and V plane in yuv420p stream:
13657
13658                   format=yuv420p,mergeplanes=0x000201:yuv420p
13659
13660       •   Cast a rgb24 clip to yuv444p:
13661
13662                   format=rgb24,mergeplanes=0x000102:yuv444p
13663
13664   mestimate
13665       Estimate and export motion vectors using block matching algorithms.
13666       Motion vectors are stored in frame side data to be used by other
13667       filters.
13668
13669       This filter accepts the following options:
13670
13671       method
13672           Specify the motion estimation method. Accepts one of the following
13673           values:
13674
13675           esa Exhaustive search algorithm.
13676
13677           tss Three step search algorithm.
13678
13679           tdls
13680               Two dimensional logarithmic search algorithm.
13681
13682           ntss
13683               New three step search algorithm.
13684
13685           fss Four step search algorithm.
13686
13687           ds  Diamond search algorithm.
13688
13689           hexbs
13690               Hexagon-based search algorithm.
13691
13692           epzs
13693               Enhanced predictive zonal search algorithm.
13694
13695           umh Uneven multi-hexagon search algorithm.
13696
13697           Default value is esa.
13698
13699       mb_size
13700           Macroblock size. Default 16.
13701
13702       search_param
13703           Search parameter. Default 7.
13704
13705   midequalizer
13706       Apply Midway Image Equalization effect using two video streams.
13707
13708       Midway Image Equalization adjusts a pair of images to have the same
13709       histogram, while maintaining their dynamics as much as possible. It's
13710       useful for e.g. matching exposures from a pair of stereo cameras.
13711
13712       This filter has two inputs and one output, which must be of same pixel
13713       format, but may be of different sizes. The output of filter is first
13714       input adjusted with midway histogram of both inputs.
13715
13716       This filter accepts the following option:
13717
13718       planes
13719           Set which planes to process. Default is 15, which is all available
13720           planes.
13721
13722   minterpolate
13723       Convert the video to specified frame rate using motion interpolation.
13724
13725       This filter accepts the following options:
13726
13727       fps Specify the output frame rate. This can be rational e.g.
13728           "60000/1001". Frames are dropped if fps is lower than source fps.
13729           Default 60.
13730
13731       mi_mode
13732           Motion interpolation mode. Following values are accepted:
13733
13734           dup Duplicate previous or next frame for interpolating new ones.
13735
13736           blend
13737               Blend source frames. Interpolated frame is mean of previous and
13738               next frames.
13739
13740           mci Motion compensated interpolation. Following options are
13741               effective when this mode is selected:
13742
13743               mc_mode
13744                   Motion compensation mode. Following values are accepted:
13745
13746                   obmc
13747                       Overlapped block motion compensation.
13748
13749                   aobmc
13750                       Adaptive overlapped block motion compensation. Window
13751                       weighting coefficients are controlled adaptively
13752                       according to the reliabilities of the neighboring
13753                       motion vectors to reduce oversmoothing.
13754
13755                   Default mode is obmc.
13756
13757               me_mode
13758                   Motion estimation mode. Following values are accepted:
13759
13760                   bidir
13761                       Bidirectional motion estimation. Motion vectors are
13762                       estimated for each source frame in both forward and
13763                       backward directions.
13764
13765                   bilat
13766                       Bilateral motion estimation. Motion vectors are
13767                       estimated directly for interpolated frame.
13768
13769                   Default mode is bilat.
13770
13771               me  The algorithm to be used for motion estimation. Following
13772                   values are accepted:
13773
13774                   esa Exhaustive search algorithm.
13775
13776                   tss Three step search algorithm.
13777
13778                   tdls
13779                       Two dimensional logarithmic search algorithm.
13780
13781                   ntss
13782                       New three step search algorithm.
13783
13784                   fss Four step search algorithm.
13785
13786                   ds  Diamond search algorithm.
13787
13788                   hexbs
13789                       Hexagon-based search algorithm.
13790
13791                   epzs
13792                       Enhanced predictive zonal search algorithm.
13793
13794                   umh Uneven multi-hexagon search algorithm.
13795
13796                   Default algorithm is epzs.
13797
13798               mb_size
13799                   Macroblock size. Default 16.
13800
13801               search_param
13802                   Motion estimation search parameter. Default 32.
13803
13804               vsbmc
13805                   Enable variable-size block motion compensation. Motion
13806                   estimation is applied with smaller block sizes at object
13807                   boundaries in order to make the them less blur. Default is
13808                   0 (disabled).
13809
13810       scd Scene change detection method. Scene change leads motion vectors to
13811           be in random direction. Scene change detection replace interpolated
13812           frames by duplicate ones. May not be needed for other modes.
13813           Following values are accepted:
13814
13815           none
13816               Disable scene change detection.
13817
13818           fdiff
13819               Frame difference. Corresponding pixel values are compared and
13820               if it satisfies scd_threshold scene change is detected.
13821
13822           Default method is fdiff.
13823
13824       scd_threshold
13825           Scene change detection threshold. Default is 10..
13826
13827   mix
13828       Mix several video input streams into one video stream.
13829
13830       A description of the accepted options follows.
13831
13832       inputs
13833           The number of inputs. If unspecified, it defaults to 2.
13834
13835       weights
13836           Specify weight of each input video stream as sequence.  Each weight
13837           is separated by space. If number of weights is smaller than number
13838           of frames last specified weight will be used for all remaining
13839           unset weights.
13840
13841       scale
13842           Specify scale, if it is set it will be multiplied with sum of each
13843           weight multiplied with pixel values to give final destination pixel
13844           value. By default scale is auto scaled to sum of weights.
13845
13846       duration
13847           Specify how end of stream is determined.
13848
13849           longest
13850               The duration of the longest input. (default)
13851
13852           shortest
13853               The duration of the shortest input.
13854
13855           first
13856               The duration of the first input.
13857
13858       Commands
13859
13860       This filter supports the following commands:
13861
13862       weights
13863       scale
13864           Syntax is same as option with same name.
13865
13866   monochrome
13867       Convert video to gray using custom color filter.
13868
13869       A description of the accepted options follows.
13870
13871       cb  Set the chroma blue spot. Allowed range is from -1 to 1.  Default
13872           value is 0.
13873
13874       cr  Set the chroma red spot. Allowed range is from -1 to 1.  Default
13875           value is 0.
13876
13877       size
13878           Set the color filter size. Allowed range is from .1 to 10.  Default
13879           value is 1.
13880
13881       high
13882           Set the highlights strength. Allowed range is from 0 to 1.  Default
13883           value is 0.
13884
13885       Commands
13886
13887       This filter supports the all above options as commands.
13888
13889   morpho
13890       This filter allows to apply main morphological grayscale transforms,
13891       erode and dilate with arbitrary structures set in second input stream.
13892
13893       Unlike naive implementation and much slower performance in erosion and
13894       dilation filters, when speed is critical "morpho" filter should be used
13895       instead.
13896
13897       A description of accepted options follows,
13898
13899       mode
13900           Set morphological transform to apply, can be:
13901
13902           erode
13903           dilate
13904           open
13905           close
13906           gradient
13907           tophat
13908           blackhat
13909
13910           Default is "erode".
13911
13912       planes
13913           Set planes to filter, by default all planes except alpha are
13914           filtered.
13915
13916       structure
13917           Set which structure video frames will be processed from second
13918           input stream, can be first or all. Default is all.
13919
13920       The "morpho" filter also supports the framesync options.
13921
13922       Commands
13923
13924       This filter supports same commands as options.
13925
13926   mpdecimate
13927       Drop frames that do not differ greatly from the previous frame in order
13928       to reduce frame rate.
13929
13930       The main use of this filter is for very-low-bitrate encoding (e.g.
13931       streaming over dialup modem), but it could in theory be used for fixing
13932       movies that were inverse-telecined incorrectly.
13933
13934       A description of the accepted options follows.
13935
13936       max Set the maximum number of consecutive frames which can be dropped
13937           (if positive), or the minimum interval between dropped frames (if
13938           negative). If the value is 0, the frame is dropped disregarding the
13939           number of previous sequentially dropped frames.
13940
13941           Default value is 0.
13942
13943       hi
13944       lo
13945       frac
13946           Set the dropping threshold values.
13947
13948           Values for hi and lo are for 8x8 pixel blocks and represent actual
13949           pixel value differences, so a threshold of 64 corresponds to 1 unit
13950           of difference for each pixel, or the same spread out differently
13951           over the block.
13952
13953           A frame is a candidate for dropping if no 8x8 blocks differ by more
13954           than a threshold of hi, and if no more than frac blocks (1 meaning
13955           the whole image) differ by more than a threshold of lo.
13956
13957           Default value for hi is 64*12, default value for lo is 64*5, and
13958           default value for frac is 0.33.
13959
13960   msad
13961       Obtain the MSAD (Mean Sum of Absolute Differences) between two input
13962       videos.
13963
13964       This filter takes two input videos.
13965
13966       Both input videos must have the same resolution and pixel format for
13967       this filter to work correctly. Also it assumes that both inputs have
13968       the same number of frames, which are compared one by one.
13969
13970       The obtained per component, average, min and max MSAD is printed
13971       through the logging system.
13972
13973       The filter stores the calculated MSAD of each frame in frame metadata.
13974
13975       In the below example the input file main.mpg being processed is
13976       compared with the reference file ref.mpg.
13977
13978               ffmpeg -i main.mpg -i ref.mpg -lavfi msad -f null -
13979
13980   negate
13981       Negate (invert) the input video.
13982
13983       It accepts the following option:
13984
13985       components
13986           Set components to negate.
13987
13988           Available values for components are:
13989
13990           y
13991           u
13992           v
13993           a
13994           r
13995           g
13996           b
13997       negate_alpha
13998           With value 1, it negates the alpha component, if present. Default
13999           value is 0.
14000
14001       Commands
14002
14003       This filter supports same commands as options.
14004
14005   nlmeans
14006       Denoise frames using Non-Local Means algorithm.
14007
14008       Each pixel is adjusted by looking for other pixels with similar
14009       contexts. This context similarity is defined by comparing their
14010       surrounding patches of size pxp. Patches are searched in an area of rxr
14011       around the pixel.
14012
14013       Note that the research area defines centers for patches, which means
14014       some patches will be made of pixels outside that research area.
14015
14016       The filter accepts the following options.
14017
14018       s   Set denoising strength. Default is 1.0. Must be in range [1.0,
14019           30.0].
14020
14021       p   Set patch size. Default is 7. Must be odd number in range [0, 99].
14022
14023       pc  Same as p but for chroma planes.
14024
14025           The default value is 0 and means automatic.
14026
14027       r   Set research size. Default is 15. Must be odd number in range [0,
14028           99].
14029
14030       rc  Same as r but for chroma planes.
14031
14032           The default value is 0 and means automatic.
14033
14034   nnedi
14035       Deinterlace video using neural network edge directed interpolation.
14036
14037       This filter accepts the following options:
14038
14039       weights
14040           Mandatory option, without binary file filter can not work.
14041           Currently file can be found here:
14042           https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
14043
14044       deint
14045           Set which frames to deinterlace, by default it is "all".  Can be
14046           "all" or "interlaced".
14047
14048       field
14049           Set mode of operation.
14050
14051           Can be one of the following:
14052
14053           af  Use frame flags, both fields.
14054
14055           a   Use frame flags, single field.
14056
14057           t   Use top field only.
14058
14059           b   Use bottom field only.
14060
14061           tf  Use both fields, top first.
14062
14063           bf  Use both fields, bottom first.
14064
14065       planes
14066           Set which planes to process, by default filter process all frames.
14067
14068       nsize
14069           Set size of local neighborhood around each pixel, used by the
14070           predictor neural network.
14071
14072           Can be one of the following:
14073
14074           s8x6
14075           s16x6
14076           s32x6
14077           s48x6
14078           s8x4
14079           s16x4
14080           s32x4
14081       nns Set the number of neurons in predictor neural network.  Can be one
14082           of the following:
14083
14084           n16
14085           n32
14086           n64
14087           n128
14088           n256
14089       qual
14090           Controls the number of different neural network predictions that
14091           are blended together to compute the final output value. Can be
14092           "fast", default or "slow".
14093
14094       etype
14095           Set which set of weights to use in the predictor.  Can be one of
14096           the following:
14097
14098           a, abs
14099               weights trained to minimize absolute error
14100
14101           s, mse
14102               weights trained to minimize squared error
14103
14104       pscrn
14105           Controls whether or not the prescreener neural network is used to
14106           decide which pixels should be processed by the predictor neural
14107           network and which can be handled by simple cubic interpolation.
14108           The prescreener is trained to know whether cubic interpolation will
14109           be sufficient for a pixel or whether it should be predicted by the
14110           predictor nn.  The computational complexity of the prescreener nn
14111           is much less than that of the predictor nn. Since most pixels can
14112           be handled by cubic interpolation, using the prescreener generally
14113           results in much faster processing.  The prescreener is pretty
14114           accurate, so the difference between using it and not using it is
14115           almost always unnoticeable.
14116
14117           Can be one of the following:
14118
14119           none
14120           original
14121           new
14122           new2
14123           new3
14124
14125           Default is "new".
14126
14127       Commands
14128
14129       This filter supports same commands as options, excluding weights
14130       option.
14131
14132   noformat
14133       Force libavfilter not to use any of the specified pixel formats for the
14134       input to the next filter.
14135
14136       It accepts the following parameters:
14137
14138       pix_fmts
14139           A '|'-separated list of pixel format names, such as
14140           pix_fmts=yuv420p|monow|rgb24".
14141
14142       Examples
14143
14144       •   Force libavfilter to use a format different from yuv420p for the
14145           input to the vflip filter:
14146
14147                   noformat=pix_fmts=yuv420p,vflip
14148
14149       •   Convert the input video to any of the formats not contained in the
14150           list:
14151
14152                   noformat=yuv420p|yuv444p|yuv410p
14153
14154   noise
14155       Add noise on video input frame.
14156
14157       The filter accepts the following options:
14158
14159       all_seed
14160       c0_seed
14161       c1_seed
14162       c2_seed
14163       c3_seed
14164           Set noise seed for specific pixel component or all pixel components
14165           in case of all_seed. Default value is 123457.
14166
14167       all_strength, alls
14168       c0_strength, c0s
14169       c1_strength, c1s
14170       c2_strength, c2s
14171       c3_strength, c3s
14172           Set noise strength for specific pixel component or all pixel
14173           components in case all_strength. Default value is 0. Allowed range
14174           is [0, 100].
14175
14176       all_flags, allf
14177       c0_flags, c0f
14178       c1_flags, c1f
14179       c2_flags, c2f
14180       c3_flags, c3f
14181           Set pixel component flags or set flags for all components if
14182           all_flags.  Available values for component flags are:
14183
14184           a   averaged temporal noise (smoother)
14185
14186           p   mix random noise with a (semi)regular pattern
14187
14188           t   temporal noise (noise pattern changes between frames)
14189
14190           u   uniform noise (gaussian otherwise)
14191
14192       Examples
14193
14194       Add temporal and uniform noise to input video:
14195
14196               noise=alls=20:allf=t+u
14197
14198   normalize
14199       Normalize RGB video (aka histogram stretching, contrast stretching).
14200       See: https://en.wikipedia.org/wiki/Normalization_(image_processing)
14201
14202       For each channel of each frame, the filter computes the input range and
14203       maps it linearly to the user-specified output range. The output range
14204       defaults to the full dynamic range from pure black to pure white.
14205
14206       Temporal smoothing can be used on the input range to reduce flickering
14207       (rapid changes in brightness) caused when small dark or bright objects
14208       enter or leave the scene. This is similar to the auto-exposure
14209       (automatic gain control) on a video camera, and, like a video camera,
14210       it may cause a period of over- or under-exposure of the video.
14211
14212       The R,G,B channels can be normalized independently, which may cause
14213       some color shifting, or linked together as a single channel, which
14214       prevents color shifting. Linked normalization preserves hue.
14215       Independent normalization does not, so it can be used to remove some
14216       color casts. Independent and linked normalization can be combined in
14217       any ratio.
14218
14219       The normalize filter accepts the following options:
14220
14221       blackpt
14222       whitept
14223           Colors which define the output range. The minimum input value is
14224           mapped to the blackpt. The maximum input value is mapped to the
14225           whitept.  The defaults are black and white respectively. Specifying
14226           white for blackpt and black for whitept will give color-inverted,
14227           normalized video. Shades of grey can be used to reduce the dynamic
14228           range (contrast). Specifying saturated colors here can create some
14229           interesting effects.
14230
14231       smoothing
14232           The number of previous frames to use for temporal smoothing. The
14233           input range of each channel is smoothed using a rolling average
14234           over the current frame and the smoothing previous frames. The
14235           default is 0 (no temporal smoothing).
14236
14237       independence
14238           Controls the ratio of independent (color shifting) channel
14239           normalization to linked (color preserving) normalization. 0.0 is
14240           fully linked, 1.0 is fully independent. Defaults to 1.0 (fully
14241           independent).
14242
14243       strength
14244           Overall strength of the filter. 1.0 is full strength. 0.0 is a
14245           rather expensive no-op. Defaults to 1.0 (full strength).
14246
14247       Commands
14248
14249       This filter supports same commands as options, excluding smoothing
14250       option.  The command accepts the same syntax of the corresponding
14251       option.
14252
14253       If the specified expression is not valid, it is kept at its current
14254       value.
14255
14256       Examples
14257
14258       Stretch video contrast to use the full dynamic range, with no temporal
14259       smoothing; may flicker depending on the source content:
14260
14261               normalize=blackpt=black:whitept=white:smoothing=0
14262
14263       As above, but with 50 frames of temporal smoothing; flicker should be
14264       reduced, depending on the source content:
14265
14266               normalize=blackpt=black:whitept=white:smoothing=50
14267
14268       As above, but with hue-preserving linked channel normalization:
14269
14270               normalize=blackpt=black:whitept=white:smoothing=50:independence=0
14271
14272       As above, but with half strength:
14273
14274               normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5
14275
14276       Map the darkest input color to red, the brightest input color to cyan:
14277
14278               normalize=blackpt=red:whitept=cyan
14279
14280   null
14281       Pass the video source unchanged to the output.
14282
14283   ocr
14284       Optical Character Recognition
14285
14286       This filter uses Tesseract for optical character recognition. To enable
14287       compilation of this filter, you need to configure FFmpeg with
14288       "--enable-libtesseract".
14289
14290       It accepts the following options:
14291
14292       datapath
14293           Set datapath to tesseract data. Default is to use whatever was set
14294           at installation.
14295
14296       language
14297           Set language, default is "eng".
14298
14299       whitelist
14300           Set character whitelist.
14301
14302       blacklist
14303           Set character blacklist.
14304
14305       The filter exports recognized text as the frame metadata
14306       "lavfi.ocr.text".  The filter exports confidence of recognized words as
14307       the frame metadata "lavfi.ocr.confidence".
14308
14309   ocv
14310       Apply a video transform using libopencv.
14311
14312       To enable this filter, install the libopencv library and headers and
14313       configure FFmpeg with "--enable-libopencv".
14314
14315       It accepts the following parameters:
14316
14317       filter_name
14318           The name of the libopencv filter to apply.
14319
14320       filter_params
14321           The parameters to pass to the libopencv filter. If not specified,
14322           the default values are assumed.
14323
14324       Refer to the official libopencv documentation for more precise
14325       information:
14326       <http://docs.opencv.org/master/modules/imgproc/doc/filtering.html>
14327
14328       Several libopencv filters are supported; see the following subsections.
14329
14330       dilate
14331
14332       Dilate an image by using a specific structuring element.  It
14333       corresponds to the libopencv function "cvDilate".
14334
14335       It accepts the parameters: struct_el|nb_iterations.
14336
14337       struct_el represents a structuring element, and has the syntax:
14338       colsxrows+anchor_xxanchor_y/shape
14339
14340       cols and rows represent the number of columns and rows of the
14341       structuring element, anchor_x and anchor_y the anchor point, and shape
14342       the shape for the structuring element. shape must be "rect", "cross",
14343       "ellipse", or "custom".
14344
14345       If the value for shape is "custom", it must be followed by a string of
14346       the form "=filename". The file with name filename is assumed to
14347       represent a binary image, with each printable character corresponding
14348       to a bright pixel. When a custom shape is used, cols and rows are
14349       ignored, the number or columns and rows of the read file are assumed
14350       instead.
14351
14352       The default value for struct_el is "3x3+0x0/rect".
14353
14354       nb_iterations specifies the number of times the transform is applied to
14355       the image, and defaults to 1.
14356
14357       Some examples:
14358
14359               # Use the default values
14360               ocv=dilate
14361
14362               # Dilate using a structuring element with a 5x5 cross, iterating two times
14363               ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2
14364
14365               # Read the shape from the file diamond.shape, iterating two times.
14366               # The file diamond.shape may contain a pattern of characters like this
14367               #   *
14368               #  ***
14369               # *****
14370               #  ***
14371               #   *
14372               # The specified columns and rows are ignored
14373               # but the anchor point coordinates are not
14374               ocv=dilate:0x0+2x2/custom=diamond.shape|2
14375
14376       erode
14377
14378       Erode an image by using a specific structuring element.  It corresponds
14379       to the libopencv function "cvErode".
14380
14381       It accepts the parameters: struct_el:nb_iterations, with the same
14382       syntax and semantics as the dilate filter.
14383
14384       smooth
14385
14386       Smooth the input video.
14387
14388       The filter takes the following parameters:
14389       type|param1|param2|param3|param4.
14390
14391       type is the type of smooth filter to apply, and must be one of the
14392       following values: "blur", "blur_no_scale", "median", "gaussian", or
14393       "bilateral". The default value is "gaussian".
14394
14395       The meaning of param1, param2, param3, and param4 depends on the smooth
14396       type. param1 and param2 accept integer positive values or 0. param3 and
14397       param4 accept floating point values.
14398
14399       The default value for param1 is 3. The default value for the other
14400       parameters is 0.
14401
14402       These parameters correspond to the parameters assigned to the libopencv
14403       function "cvSmooth".
14404
14405   oscilloscope
14406       2D Video Oscilloscope.
14407
14408       Useful to measure spatial impulse, step responses, chroma delays, etc.
14409
14410       It accepts the following parameters:
14411
14412       x   Set scope center x position.
14413
14414       y   Set scope center y position.
14415
14416       s   Set scope size, relative to frame diagonal.
14417
14418       t   Set scope tilt/rotation.
14419
14420       o   Set trace opacity.
14421
14422       tx  Set trace center x position.
14423
14424       ty  Set trace center y position.
14425
14426       tw  Set trace width, relative to width of frame.
14427
14428       th  Set trace height, relative to height of frame.
14429
14430       c   Set which components to trace. By default it traces first three
14431           components.
14432
14433       g   Draw trace grid. By default is enabled.
14434
14435       st  Draw some statistics. By default is enabled.
14436
14437       sc  Draw scope. By default is enabled.
14438
14439       Commands
14440
14441       This filter supports same commands as options.  The command accepts the
14442       same syntax of the corresponding option.
14443
14444       If the specified expression is not valid, it is kept at its current
14445       value.
14446
14447       Examples
14448
14449       •   Inspect full first row of video frame.
14450
14451                   oscilloscope=x=0.5:y=0:s=1
14452
14453       •   Inspect full last row of video frame.
14454
14455                   oscilloscope=x=0.5:y=1:s=1
14456
14457       •   Inspect full 5th line of video frame of height 1080.
14458
14459                   oscilloscope=x=0.5:y=5/1080:s=1
14460
14461       •   Inspect full last column of video frame.
14462
14463                   oscilloscope=x=1:y=0.5:s=1:t=1
14464
14465   overlay
14466       Overlay one video on top of another.
14467
14468       It takes two inputs and has one output. The first input is the "main"
14469       video on which the second input is overlaid.
14470
14471       It accepts the following parameters:
14472
14473       A description of the accepted options follows.
14474
14475       x
14476       y   Set the expression for the x and y coordinates of the overlaid
14477           video on the main video. Default value is "0" for both expressions.
14478           In case the expression is invalid, it is set to a huge value
14479           (meaning that the overlay will not be displayed within the output
14480           visible area).
14481
14482       eof_action
14483           See framesync.
14484
14485       eval
14486           Set when the expressions for x, and y are evaluated.
14487
14488           It accepts the following values:
14489
14490           init
14491               only evaluate expressions once during the filter initialization
14492               or when a command is processed
14493
14494           frame
14495               evaluate expressions for each incoming frame
14496
14497           Default value is frame.
14498
14499       shortest
14500           See framesync.
14501
14502       format
14503           Set the format for the output video.
14504
14505           It accepts the following values:
14506
14507           yuv420
14508               force YUV420 output
14509
14510           yuv420p10
14511               force YUV420p10 output
14512
14513           yuv422
14514               force YUV422 output
14515
14516           yuv422p10
14517               force YUV422p10 output
14518
14519           yuv444
14520               force YUV444 output
14521
14522           rgb force packed RGB output
14523
14524           gbrp
14525               force planar RGB output
14526
14527           auto
14528               automatically pick format
14529
14530           Default value is yuv420.
14531
14532       repeatlast
14533           See framesync.
14534
14535       alpha
14536           Set format of alpha of the overlaid video, it can be straight or
14537           premultiplied. Default is straight.
14538
14539       The x, and y expressions can contain the following parameters.
14540
14541       main_w, W
14542       main_h, H
14543           The main input width and height.
14544
14545       overlay_w, w
14546       overlay_h, h
14547           The overlay input width and height.
14548
14549       x
14550       y   The computed values for x and y. They are evaluated for each new
14551           frame.
14552
14553       hsub
14554       vsub
14555           horizontal and vertical chroma subsample values of the output
14556           format. For example for the pixel format "yuv422p" hsub is 2 and
14557           vsub is 1.
14558
14559       n   the number of input frame, starting from 0
14560
14561       pos the position in the file of the input frame, NAN if unknown
14562
14563       t   The timestamp, expressed in seconds. It's NAN if the input
14564           timestamp is unknown.
14565
14566       This filter also supports the framesync options.
14567
14568       Note that the n, pos, t variables are available only when evaluation is
14569       done per frame, and will evaluate to NAN when eval is set to init.
14570
14571       Be aware that frames are taken from each input video in timestamp
14572       order, hence, if their initial timestamps differ, it is a good idea to
14573       pass the two inputs through a setpts=PTS-STARTPTS filter to have them
14574       begin in the same zero timestamp, as the example for the movie filter
14575       does.
14576
14577       You can chain together more overlays but you should test the efficiency
14578       of such approach.
14579
14580       Commands
14581
14582       This filter supports the following commands:
14583
14584       x
14585       y   Modify the x and y of the overlay input.  The command accepts the
14586           same syntax of the corresponding option.
14587
14588           If the specified expression is not valid, it is kept at its current
14589           value.
14590
14591       Examples
14592
14593       •   Draw the overlay at 10 pixels from the bottom right corner of the
14594           main video:
14595
14596                   overlay=main_w-overlay_w-10:main_h-overlay_h-10
14597
14598           Using named options the example above becomes:
14599
14600                   overlay=x=main_w-overlay_w-10:y=main_h-overlay_h-10
14601
14602       •   Insert a transparent PNG logo in the bottom left corner of the
14603           input, using the ffmpeg tool with the "-filter_complex" option:
14604
14605                   ffmpeg -i input -i logo -filter_complex 'overlay=10:main_h-overlay_h-10' output
14606
14607       •   Insert 2 different transparent PNG logos (second logo on bottom
14608           right corner) using the ffmpeg tool:
14609
14610                   ffmpeg -i input -i logo1 -i logo2 -filter_complex 'overlay=x=10:y=H-h-10,overlay=x=W-w-10:y=H-h-10' output
14611
14612       •   Add a transparent color layer on top of the main video; "WxH" must
14613           specify the size of the main input to the overlay filter:
14614
14615                   color=color=red@.3:size=WxH [over]; [in][over] overlay [out]
14616
14617       •   Play an original video and a filtered version (here with the
14618           deshake filter) side by side using the ffplay tool:
14619
14620                   ffplay input.avi -vf 'split[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w'
14621
14622           The above command is the same as:
14623
14624                   ffplay input.avi -vf 'split[b], pad=iw*2[src], [b]deshake, [src]overlay=w'
14625
14626       •   Make a sliding overlay appearing from the left to the right top
14627           part of the screen starting since time 2:
14628
14629                   overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0
14630
14631       •   Compose output by putting two input videos side to side:
14632
14633                   ffmpeg -i left.avi -i right.avi -filter_complex "
14634                   nullsrc=size=200x100 [background];
14635                   [0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
14636                   [1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
14637                   [background][left]       overlay=shortest=1       [background+left];
14638                   [background+left][right] overlay=shortest=1:x=100 [left+right]
14639                   "
14640
14641       •   Mask 10-20 seconds of a video by applying the delogo filter to a
14642           section
14643
14644                   ffmpeg -i test.avi -codec:v:0 wmv2 -ar 11025 -b:v 9000k
14645                   -vf '[in]split[split_main][split_delogo];[split_delogo]trim=start=360:end=371,delogo=0:0:640:480[delogoed];[split_main][delogoed]overlay=eof_action=pass[out]'
14646                   masked.avi
14647
14648       •   Chain several overlays in cascade:
14649
14650                   nullsrc=s=200x200 [bg];
14651                   testsrc=s=100x100, split=4 [in0][in1][in2][in3];
14652                   [in0] lutrgb=r=0, [bg]   overlay=0:0     [mid0];
14653                   [in1] lutrgb=g=0, [mid0] overlay=100:0   [mid1];
14654                   [in2] lutrgb=b=0, [mid1] overlay=0:100   [mid2];
14655                   [in3] null,       [mid2] overlay=100:100 [out0]
14656
14657   overlay_cuda
14658       Overlay one video on top of another.
14659
14660       This is the CUDA variant of the overlay filter.  It only accepts CUDA
14661       frames. The underlying input pixel formats have to match.
14662
14663       It takes two inputs and has one output. The first input is the "main"
14664       video on which the second input is overlaid.
14665
14666       It accepts the following parameters:
14667
14668       x
14669       y   Set expressions for the x and y coordinates of the overlaid video
14670           on the main video.
14671
14672           They can contain the following parameters:
14673
14674           main_w, W
14675           main_h, H
14676               The main input width and height.
14677
14678           overlay_w, w
14679           overlay_h, h
14680               The overlay input width and height.
14681
14682           x
14683           y   The computed values for x and y. They are evaluated for each
14684               new frame.
14685
14686           n   The ordinal index of the main input frame, starting from 0.
14687
14688           pos The byte offset position in the file of the main input frame,
14689               NAN if unknown.
14690
14691           t   The timestamp of the main input frame, expressed in seconds,
14692               NAN if unknown.
14693
14694           Default value is "0" for both expressions.
14695
14696       eval
14697           Set when the expressions for x and y are evaluated.
14698
14699           It accepts the following values:
14700
14701           init
14702               Evaluate expressions once during filter initialization or when
14703               a command is processed.
14704
14705           frame
14706               Evaluate expressions for each incoming frame
14707
14708           Default value is frame.
14709
14710       eof_action
14711           See framesync.
14712
14713       shortest
14714           See framesync.
14715
14716       repeatlast
14717           See framesync.
14718
14719       This filter also supports the framesync options.
14720
14721   owdenoise
14722       Apply Overcomplete Wavelet denoiser.
14723
14724       The filter accepts the following options:
14725
14726       depth
14727           Set depth.
14728
14729           Larger depth values will denoise lower frequency components more,
14730           but slow down filtering.
14731
14732           Must be an int in the range 8-16, default is 8.
14733
14734       luma_strength, ls
14735           Set luma strength.
14736
14737           Must be a double value in the range 0-1000, default is 1.0.
14738
14739       chroma_strength, cs
14740           Set chroma strength.
14741
14742           Must be a double value in the range 0-1000, default is 1.0.
14743
14744   pad
14745       Add paddings to the input image, and place the original input at the
14746       provided x, y coordinates.
14747
14748       It accepts the following parameters:
14749
14750       width, w
14751       height, h
14752           Specify an expression for the size of the output image with the
14753           paddings added. If the value for width or height is 0, the
14754           corresponding input size is used for the output.
14755
14756           The width expression can reference the value set by the height
14757           expression, and vice versa.
14758
14759           The default value of width and height is 0.
14760
14761       x
14762       y   Specify the offsets to place the input image at within the padded
14763           area, with respect to the top/left border of the output image.
14764
14765           The x expression can reference the value set by the y expression,
14766           and vice versa.
14767
14768           The default value of x and y is 0.
14769
14770           If x or y evaluate to a negative number, they'll be changed so the
14771           input image is centered on the padded area.
14772
14773       color
14774           Specify the color of the padded area. For the syntax of this
14775           option, check the "Color" section in the ffmpeg-utils manual.
14776
14777           The default value of color is "black".
14778
14779       eval
14780           Specify when to evaluate  width, height, x and y expression.
14781
14782           It accepts the following values:
14783
14784           init
14785               Only evaluate expressions once during the filter initialization
14786               or when a command is processed.
14787
14788           frame
14789               Evaluate expressions for each incoming frame.
14790
14791           Default value is init.
14792
14793       aspect
14794           Pad to aspect instead to a resolution.
14795
14796       The value for the width, height, x, and y options are expressions
14797       containing the following constants:
14798
14799       in_w
14800       in_h
14801           The input video width and height.
14802
14803       iw
14804       ih  These are the same as in_w and in_h.
14805
14806       out_w
14807       out_h
14808           The output width and height (the size of the padded area), as
14809           specified by the width and height expressions.
14810
14811       ow
14812       oh  These are the same as out_w and out_h.
14813
14814       x
14815       y   The x and y offsets as specified by the x and y expressions, or NAN
14816           if not yet specified.
14817
14818       a   same as iw / ih
14819
14820       sar input sample aspect ratio
14821
14822       dar input display aspect ratio, it is the same as (iw / ih) * sar
14823
14824       hsub
14825       vsub
14826           The horizontal and vertical chroma subsample values. For example
14827           for the pixel format "yuv422p" hsub is 2 and vsub is 1.
14828
14829       Examples
14830
14831       •   Add paddings with the color "violet" to the input video. The output
14832           video size is 640x480, and the top-left corner of the input video
14833           is placed at column 0, row 40
14834
14835                   pad=640:480:0:40:violet
14836
14837           The example above is equivalent to the following command:
14838
14839                   pad=width=640:height=480:x=0:y=40:color=violet
14840
14841       •   Pad the input to get an output with dimensions increased by 3/2,
14842           and put the input video at the center of the padded area:
14843
14844                   pad="3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2"
14845
14846       •   Pad the input to get a squared output with size equal to the
14847           maximum value between the input width and height, and put the input
14848           video at the center of the padded area:
14849
14850                   pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
14851
14852       •   Pad the input to get a final w/h ratio of 16:9:
14853
14854                   pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
14855
14856       •   In case of anamorphic video, in order to set the output display
14857           aspect correctly, it is necessary to use sar in the expression,
14858           according to the relation:
14859
14860                   (ih * X / ih) * sar = output_dar
14861                   X = output_dar / sar
14862
14863           Thus the previous example needs to be modified to:
14864
14865                   pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
14866
14867       •   Double the output size and put the input video in the bottom-right
14868           corner of the output padded area:
14869
14870                   pad="2*iw:2*ih:ow-iw:oh-ih"
14871
14872   palettegen
14873       Generate one palette for a whole video stream.
14874
14875       It accepts the following options:
14876
14877       max_colors
14878           Set the maximum number of colors to quantize in the palette.  Note:
14879           the palette will still contain 256 colors; the unused palette
14880           entries will be black.
14881
14882       reserve_transparent
14883           Create a palette of 255 colors maximum and reserve the last one for
14884           transparency. Reserving the transparency color is useful for GIF
14885           optimization.  If not set, the maximum of colors in the palette
14886           will be 256. You probably want to disable this option for a
14887           standalone image.  Set by default.
14888
14889       transparency_color
14890           Set the color that will be used as background for transparency.
14891
14892       stats_mode
14893           Set statistics mode.
14894
14895           It accepts the following values:
14896
14897           full
14898               Compute full frame histograms.
14899
14900           diff
14901               Compute histograms only for the part that differs from previous
14902               frame. This might be relevant to give more importance to the
14903               moving part of your input if the background is static.
14904
14905           single
14906               Compute new histogram for each frame.
14907
14908           Default value is full.
14909
14910       use_alpha
14911           Create a palette of colors with alpha components.  Setting this,
14912           will automatically disable 'reserve_transparent'.
14913
14914       The filter also exports the frame metadata "lavfi.color_quant_ratio"
14915       ("nb_color_in / nb_color_out") which you can use to evaluate the degree
14916       of color quantization of the palette. This information is also visible
14917       at info logging level.
14918
14919       Examples
14920
14921       •   Generate a representative palette of a given video using ffmpeg:
14922
14923                   ffmpeg -i input.mkv -vf palettegen palette.png
14924
14925   paletteuse
14926       Use a palette to downsample an input video stream.
14927
14928       The filter takes two inputs: one video stream and a palette. The
14929       palette must be a 256 pixels image.
14930
14931       It accepts the following options:
14932
14933       dither
14934           Select dithering mode. Available algorithms are:
14935
14936           bayer
14937               Ordered 8x8 bayer dithering (deterministic)
14938
14939           heckbert
14940               Dithering as defined by Paul Heckbert in 1982 (simple error
14941               diffusion).  Note: this dithering is sometimes considered
14942               "wrong" and is included as a reference.
14943
14944           floyd_steinberg
14945               Floyd and Steingberg dithering (error diffusion)
14946
14947           sierra2
14948               Frankie Sierra dithering v2 (error diffusion)
14949
14950           sierra2_4a
14951               Frankie Sierra dithering v2 "Lite" (error diffusion)
14952
14953           Default is sierra2_4a.
14954
14955       bayer_scale
14956           When bayer dithering is selected, this option defines the scale of
14957           the pattern (how much the crosshatch pattern is visible). A low
14958           value means more visible pattern for less banding, and higher value
14959           means less visible pattern at the cost of more banding.
14960
14961           The option must be an integer value in the range [0,5]. Default is
14962           2.
14963
14964       diff_mode
14965           If set, define the zone to process
14966
14967           rectangle
14968               Only the changing rectangle will be reprocessed. This is
14969               similar to GIF cropping/offsetting compression mechanism. This
14970               option can be useful for speed if only a part of the image is
14971               changing, and has use cases such as limiting the scope of the
14972               error diffusal dither to the rectangle that bounds the moving
14973               scene (it leads to more deterministic output if the scene
14974               doesn't change much, and as a result less moving noise and
14975               better GIF compression).
14976
14977           Default is none.
14978
14979       new Take new palette for each output frame.
14980
14981       alpha_threshold
14982           Sets the alpha threshold for transparency. Alpha values above this
14983           threshold will be treated as completely opaque, and values below
14984           this threshold will be treated as completely transparent.
14985
14986           The option must be an integer value in the range [0,255]. Default
14987           is 128.
14988
14989       use_alpha
14990           Apply the palette by taking alpha values into account. Only useful
14991           with palettes that are containing multiple colors with alpha
14992           components.  Setting this will automatically disable
14993           'alpha_treshold'.
14994
14995       Examples
14996
14997       •   Use a palette (generated for example with palettegen) to encode a
14998           GIF using ffmpeg:
14999
15000                   ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
15001
15002   perspective
15003       Correct perspective of video not recorded perpendicular to the screen.
15004
15005       A description of the accepted parameters follows.
15006
15007       x0
15008       y0
15009       x1
15010       y1
15011       x2
15012       y2
15013       x3
15014       y3  Set coordinates expression for top left, top right, bottom left and
15015           bottom right corners.  Default values are "0:0:W:0:0:H:W:H" with
15016           which perspective will remain unchanged.  If the "sense" option is
15017           set to "source", then the specified points will be sent to the
15018           corners of the destination. If the "sense" option is set to
15019           "destination", then the corners of the source will be sent to the
15020           specified coordinates.
15021
15022           The expressions can use the following variables:
15023
15024           W
15025           H   the width and height of video frame.
15026
15027           in  Input frame count.
15028
15029           on  Output frame count.
15030
15031       interpolation
15032           Set interpolation for perspective correction.
15033
15034           It accepts the following values:
15035
15036           linear
15037           cubic
15038
15039           Default value is linear.
15040
15041       sense
15042           Set interpretation of coordinate options.
15043
15044           It accepts the following values:
15045
15046           0, source
15047               Send point in the source specified by the given coordinates to
15048               the corners of the destination.
15049
15050           1, destination
15051               Send the corners of the source to the point in the destination
15052               specified by the given coordinates.
15053
15054               Default value is source.
15055
15056       eval
15057           Set when the expressions for coordinates x0,y0,...x3,y3 are
15058           evaluated.
15059
15060           It accepts the following values:
15061
15062           init
15063               only evaluate expressions once during the filter initialization
15064               or when a command is processed
15065
15066           frame
15067               evaluate expressions for each incoming frame
15068
15069           Default value is init.
15070
15071   phase
15072       Delay interlaced video by one field time so that the field order
15073       changes.
15074
15075       The intended use is to fix PAL movies that have been captured with the
15076       opposite field order to the film-to-video transfer.
15077
15078       A description of the accepted parameters follows.
15079
15080       mode
15081           Set phase mode.
15082
15083           It accepts the following values:
15084
15085           t   Capture field order top-first, transfer bottom-first.  Filter
15086               will delay the bottom field.
15087
15088           b   Capture field order bottom-first, transfer top-first.  Filter
15089               will delay the top field.
15090
15091           p   Capture and transfer with the same field order. This mode only
15092               exists for the documentation of the other options to refer to,
15093               but if you actually select it, the filter will faithfully do
15094               nothing.
15095
15096           a   Capture field order determined automatically by field flags,
15097               transfer opposite.  Filter selects among t and b modes on a
15098               frame by frame basis using field flags. If no field information
15099               is available, then this works just like u.
15100
15101           u   Capture unknown or varying, transfer opposite.  Filter selects
15102               among t and b on a frame by frame basis by analyzing the images
15103               and selecting the alternative that produces best match between
15104               the fields.
15105
15106           T   Capture top-first, transfer unknown or varying.  Filter selects
15107               among t and p using image analysis.
15108
15109           B   Capture bottom-first, transfer unknown or varying.  Filter
15110               selects among b and p using image analysis.
15111
15112           A   Capture determined by field flags, transfer unknown or varying.
15113               Filter selects among t, b and p using field flags and image
15114               analysis. If no field information is available, then this works
15115               just like U. This is the default mode.
15116
15117           U   Both capture and transfer unknown or varying.  Filter selects
15118               among t, b and p using image analysis only.
15119
15120       Commands
15121
15122       This filter supports the all above options as commands.
15123
15124   photosensitivity
15125       Reduce various flashes in video, so to help users with epilepsy.
15126
15127       It accepts the following options:
15128
15129       frames, f
15130           Set how many frames to use when filtering. Default is 30.
15131
15132       threshold, t
15133           Set detection threshold factor. Default is 1.  Lower is stricter.
15134
15135       skip
15136           Set how many pixels to skip when sampling frames. Default is 1.
15137           Allowed range is from 1 to 1024.
15138
15139       bypass
15140           Leave frames unchanged. Default is disabled.
15141
15142   pixdesctest
15143       Pixel format descriptor test filter, mainly useful for internal
15144       testing. The output video should be equal to the input video.
15145
15146       For example:
15147
15148               format=monow, pixdesctest
15149
15150       can be used to test the monowhite pixel format descriptor definition.
15151
15152   pixscope
15153       Display sample values of color channels. Mainly useful for checking
15154       color and levels. Minimum supported resolution is 640x480.
15155
15156       The filters accept the following options:
15157
15158       x   Set scope X position, relative offset on X axis.
15159
15160       y   Set scope Y position, relative offset on Y axis.
15161
15162       w   Set scope width.
15163
15164       h   Set scope height.
15165
15166       o   Set window opacity. This window also holds statistics about pixel
15167           area.
15168
15169       wx  Set window X position, relative offset on X axis.
15170
15171       wy  Set window Y position, relative offset on Y axis.
15172
15173       Commands
15174
15175       This filter supports same commands as options.
15176
15177   pp
15178       Enable the specified chain of postprocessing subfilters using
15179       libpostproc. This library should be automatically selected with a GPL
15180       build ("--enable-gpl").  Subfilters must be separated by '/' and can be
15181       disabled by prepending a '-'.  Each subfilter and some options have a
15182       short and a long name that can be used interchangeably, i.e. dr/dering
15183       are the same.
15184
15185       The filters accept the following options:
15186
15187       subfilters
15188           Set postprocessing subfilters string.
15189
15190       All subfilters share common options to determine their scope:
15191
15192       a/autoq
15193           Honor the quality commands for this subfilter.
15194
15195       c/chrom
15196           Do chrominance filtering, too (default).
15197
15198       y/nochrom
15199           Do luminance filtering only (no chrominance).
15200
15201       n/noluma
15202           Do chrominance filtering only (no luminance).
15203
15204       These options can be appended after the subfilter name, separated by a
15205       '|'.
15206
15207       Available subfilters are:
15208
15209       hb/hdeblock[|difference[|flatness]]
15210           Horizontal deblocking filter
15211
15212           difference
15213               Difference factor where higher values mean more deblocking
15214               (default: 32).
15215
15216           flatness
15217               Flatness threshold where lower values mean more deblocking
15218               (default: 39).
15219
15220       vb/vdeblock[|difference[|flatness]]
15221           Vertical deblocking filter
15222
15223           difference
15224               Difference factor where higher values mean more deblocking
15225               (default: 32).
15226
15227           flatness
15228               Flatness threshold where lower values mean more deblocking
15229               (default: 39).
15230
15231       ha/hadeblock[|difference[|flatness]]
15232           Accurate horizontal deblocking filter
15233
15234           difference
15235               Difference factor where higher values mean more deblocking
15236               (default: 32).
15237
15238           flatness
15239               Flatness threshold where lower values mean more deblocking
15240               (default: 39).
15241
15242       va/vadeblock[|difference[|flatness]]
15243           Accurate vertical deblocking filter
15244
15245           difference
15246               Difference factor where higher values mean more deblocking
15247               (default: 32).
15248
15249           flatness
15250               Flatness threshold where lower values mean more deblocking
15251               (default: 39).
15252
15253       The horizontal and vertical deblocking filters share the difference and
15254       flatness values so you cannot set different horizontal and vertical
15255       thresholds.
15256
15257       h1/x1hdeblock
15258           Experimental horizontal deblocking filter
15259
15260       v1/x1vdeblock
15261           Experimental vertical deblocking filter
15262
15263       dr/dering
15264           Deringing filter
15265
15266       tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise
15267       reducer
15268           threshold1
15269               larger -> stronger filtering
15270
15271           threshold2
15272               larger -> stronger filtering
15273
15274           threshold3
15275               larger -> stronger filtering
15276
15277       al/autolevels[:f/fullyrange], automatic brightness / contrast
15278       correction
15279           f/fullyrange
15280               Stretch luminance to "0-255".
15281
15282       lb/linblenddeint
15283           Linear blend deinterlacing filter that deinterlaces the given block
15284           by filtering all lines with a "(1 2 1)" filter.
15285
15286       li/linipoldeint
15287           Linear interpolating deinterlacing filter that deinterlaces the
15288           given block by linearly interpolating every second line.
15289
15290       ci/cubicipoldeint
15291           Cubic interpolating deinterlacing filter deinterlaces the given
15292           block by cubically interpolating every second line.
15293
15294       md/mediandeint
15295           Median deinterlacing filter that deinterlaces the given block by
15296           applying a median filter to every second line.
15297
15298       fd/ffmpegdeint
15299           FFmpeg deinterlacing filter that deinterlaces the given block by
15300           filtering every second line with a "(-1 4 2 4 -1)" filter.
15301
15302       l5/lowpass5
15303           Vertically applied FIR lowpass deinterlacing filter that
15304           deinterlaces the given block by filtering all lines with a "(-1 2 6
15305           2 -1)" filter.
15306
15307       fq/forceQuant[|quantizer]
15308           Overrides the quantizer table from the input with the constant
15309           quantizer you specify.
15310
15311           quantizer
15312               Quantizer to use
15313
15314       de/default
15315           Default pp filter combination ("hb|a,vb|a,dr|a")
15316
15317       fa/fast
15318           Fast pp filter combination ("h1|a,v1|a,dr|a")
15319
15320       ac  High quality pp filter combination ("ha|a|128|7,va|a,dr|a")
15321
15322       Examples
15323
15324       •   Apply horizontal and vertical deblocking, deringing and automatic
15325           brightness/contrast:
15326
15327                   pp=hb/vb/dr/al
15328
15329       •   Apply default filters without brightness/contrast correction:
15330
15331                   pp=de/-al
15332
15333       •   Apply default filters and temporal denoiser:
15334
15335                   pp=default/tmpnoise|1|2|3
15336
15337       •   Apply deblocking on luminance only, and switch vertical deblocking
15338           on or off automatically depending on available CPU time:
15339
15340                   pp=hb|y/vb|a
15341
15342   pp7
15343       Apply Postprocessing filter 7. It is variant of the spp filter, similar
15344       to spp = 6 with 7 point DCT, where only the center sample is used after
15345       IDCT.
15346
15347       The filter accepts the following options:
15348
15349       qp  Force a constant quantization parameter. It accepts an integer in
15350           range 0 to 63. If not set, the filter will use the QP from the
15351           video stream (if available).
15352
15353       mode
15354           Set thresholding mode. Available modes are:
15355
15356           hard
15357               Set hard thresholding.
15358
15359           soft
15360               Set soft thresholding (better de-ringing effect, but likely
15361               blurrier).
15362
15363           medium
15364               Set medium thresholding (good results, default).
15365
15366   premultiply
15367       Apply alpha premultiply effect to input video stream using first plane
15368       of second stream as alpha.
15369
15370       Both streams must have same dimensions and same pixel format.
15371
15372       The filter accepts the following option:
15373
15374       planes
15375           Set which planes will be processed, unprocessed planes will be
15376           copied.  By default value 0xf, all planes will be processed.
15377
15378       inplace
15379           Do not require 2nd input for processing, instead use alpha plane
15380           from input stream.
15381
15382   prewitt
15383       Apply prewitt operator to input video stream.
15384
15385       The filter accepts the following option:
15386
15387       planes
15388           Set which planes will be processed, unprocessed planes will be
15389           copied.  By default value 0xf, all planes will be processed.
15390
15391       scale
15392           Set value which will be multiplied with filtered result.
15393
15394       delta
15395           Set value which will be added to filtered result.
15396
15397       Commands
15398
15399       This filter supports the all above options as commands.
15400
15401   pseudocolor
15402       Alter frame colors in video with pseudocolors.
15403
15404       This filter accepts the following options:
15405
15406       c0  set pixel first component expression
15407
15408       c1  set pixel second component expression
15409
15410       c2  set pixel third component expression
15411
15412       c3  set pixel fourth component expression, corresponds to the alpha
15413           component
15414
15415       index, i
15416           set component to use as base for altering colors
15417
15418       preset, p
15419           Pick one of built-in LUTs. By default is set to none.
15420
15421           Available LUTs:
15422
15423           magma
15424           inferno
15425           plasma
15426           viridis
15427           turbo
15428           cividis
15429           range1
15430           range2
15431           shadows
15432           highlights
15433           solar
15434           nominal
15435           preferred
15436           total
15437       opacity
15438           Set opacity of output colors. Allowed range is from 0 to 1.
15439           Default value is set to 1.
15440
15441       Each of the expression options specifies the expression to use for
15442       computing the lookup table for the corresponding pixel component
15443       values.
15444
15445       The expressions can contain the following constants and functions:
15446
15447       w
15448       h   The input width and height.
15449
15450       val The input value for the pixel component.
15451
15452       ymin, umin, vmin, amin
15453           The minimum allowed component value.
15454
15455       ymax, umax, vmax, amax
15456           The maximum allowed component value.
15457
15458       All expressions default to "val".
15459
15460       Commands
15461
15462       This filter supports the all above options as commands.
15463
15464       Examples
15465
15466       •   Change too high luma values to gradient:
15467
15468                   pseudocolor="'if(between(val,ymax,amax),lerp(ymin,ymax,(val-ymax)/(amax-ymax)),-1):if(between(val,ymax,amax),lerp(umax,umin,(val-ymax)/(amax-ymax)),-1):if(between(val,ymax,amax),lerp(vmin,vmax,(val-ymax)/(amax-ymax)),-1):-1'"
15469
15470   psnr
15471       Obtain the average, maximum and minimum PSNR (Peak Signal to Noise
15472       Ratio) between two input videos.
15473
15474       This filter takes in input two input videos, the first input is
15475       considered the "main" source and is passed unchanged to the output. The
15476       second input is used as a "reference" video for computing the PSNR.
15477
15478       Both video inputs must have the same resolution and pixel format for
15479       this filter to work correctly. Also it assumes that both inputs have
15480       the same number of frames, which are compared one by one.
15481
15482       The obtained average PSNR is printed through the logging system.
15483
15484       The filter stores the accumulated MSE (mean squared error) of each
15485       frame, and at the end of the processing it is averaged across all
15486       frames equally, and the following formula is applied to obtain the
15487       PSNR:
15488
15489               PSNR = 10*log10(MAX^2/MSE)
15490
15491       Where MAX is the average of the maximum values of each component of the
15492       image.
15493
15494       The description of the accepted parameters follows.
15495
15496       stats_file, f
15497           If specified the filter will use the named file to save the PSNR of
15498           each individual frame. When filename equals "-" the data is sent to
15499           standard output.
15500
15501       stats_version
15502           Specifies which version of the stats file format to use. Details of
15503           each format are written below.  Default value is 1.
15504
15505       stats_add_max
15506           Determines whether the max value is output to the stats log.
15507           Default value is 0.  Requires stats_version >= 2. If this is set
15508           and stats_version < 2, the filter will return an error.
15509
15510       This filter also supports the framesync options.
15511
15512       The file printed if stats_file is selected, contains a sequence of
15513       key/value pairs of the form key:value for each compared couple of
15514       frames.
15515
15516       If a stats_version greater than 1 is specified, a header line precedes
15517       the list of per-frame-pair stats, with key value pairs following the
15518       frame format with the following parameters:
15519
15520       psnr_log_version
15521           The version of the log file format. Will match stats_version.
15522
15523       fields
15524           A comma separated list of the per-frame-pair parameters included in
15525           the log.
15526
15527       A description of each shown per-frame-pair parameter follows:
15528
15529       n   sequential number of the input frame, starting from 1
15530
15531       mse_avg
15532           Mean Square Error pixel-by-pixel average difference of the compared
15533           frames, averaged over all the image components.
15534
15535       mse_y, mse_u, mse_v, mse_r, mse_g, mse_b, mse_a
15536           Mean Square Error pixel-by-pixel average difference of the compared
15537           frames for the component specified by the suffix.
15538
15539       psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a
15540           Peak Signal to Noise ratio of the compared frames for the component
15541           specified by the suffix.
15542
15543       max_avg, max_y, max_u, max_v
15544           Maximum allowed value for each channel, and average over all
15545           channels.
15546
15547       Examples
15548
15549       •   For example:
15550
15551                   movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
15552                   [main][ref] psnr="stats_file=stats.log" [out]
15553
15554           On this example the input file being processed is compared with the
15555           reference file ref_movie.mpg. The PSNR of each individual frame is
15556           stored in stats.log.
15557
15558       •   Another example with different containers:
15559
15560                   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 -
15561
15562   pullup
15563       Pulldown reversal (inverse telecine) filter, capable of handling mixed
15564       hard-telecine, 24000/1001 fps progressive, and 30000/1001 fps
15565       progressive content.
15566
15567       The pullup filter is designed to take advantage of future context in
15568       making its decisions. This filter is stateless in the sense that it
15569       does not lock onto a pattern to follow, but it instead looks forward to
15570       the following fields in order to identify matches and rebuild
15571       progressive frames.
15572
15573       To produce content with an even framerate, insert the fps filter after
15574       pullup, use "fps=24000/1001" if the input frame rate is 29.97fps,
15575       "fps=24" for 30fps and the (rare) telecined 25fps input.
15576
15577       The filter accepts the following options:
15578
15579       jl
15580       jr
15581       jt
15582       jb  These options set the amount of "junk" to ignore at the left,
15583           right, top, and bottom of the image, respectively. Left and right
15584           are in units of 8 pixels, while top and bottom are in units of 2
15585           lines.  The default is 8 pixels on each side.
15586
15587       sb  Set the strict breaks. Setting this option to 1 will reduce the
15588           chances of filter generating an occasional mismatched frame, but it
15589           may also cause an excessive number of frames to be dropped during
15590           high motion sequences.  Conversely, setting it to -1 will make
15591           filter match fields more easily.  This may help processing of video
15592           where there is slight blurring between the fields, but may also
15593           cause there to be interlaced frames in the output.  Default value
15594           is 0.
15595
15596       mp  Set the metric plane to use. It accepts the following values:
15597
15598           l   Use luma plane.
15599
15600           u   Use chroma blue plane.
15601
15602           v   Use chroma red plane.
15603
15604           This option may be set to use chroma plane instead of the default
15605           luma plane for doing filter's computations. This may improve
15606           accuracy on very clean source material, but more likely will
15607           decrease accuracy, especially if there is chroma noise (rainbow
15608           effect) or any grayscale video.  The main purpose of setting mp to
15609           a chroma plane is to reduce CPU load and make pullup usable in
15610           realtime on slow machines.
15611
15612       For best results (without duplicated frames in the output file) it is
15613       necessary to change the output frame rate. For example, to inverse
15614       telecine NTSC input:
15615
15616               ffmpeg -i input -vf pullup -r 24000/1001 ...
15617
15618   qp
15619       Change video quantization parameters (QP).
15620
15621       The filter accepts the following option:
15622
15623       qp  Set expression for quantization parameter.
15624
15625       The expression is evaluated through the eval API and can contain, among
15626       others, the following constants:
15627
15628       known
15629           1 if index is not 129, 0 otherwise.
15630
15631       qp  Sequential index starting from -129 to 128.
15632
15633       Examples
15634
15635       •   Some equation like:
15636
15637                   qp=2+2*sin(PI*qp)
15638
15639   random
15640       Flush video frames from internal cache of frames into a random order.
15641       No frame is discarded.  Inspired by frei0r nervous filter.
15642
15643       frames
15644           Set size in number of frames of internal cache, in range from 2 to
15645           512. Default is 30.
15646
15647       seed
15648           Set seed for random number generator, must be an integer included
15649           between 0 and "UINT32_MAX". If not specified, or if explicitly set
15650           to less than 0, the filter will try to use a good random seed on a
15651           best effort basis.
15652
15653   readeia608
15654       Read closed captioning (EIA-608) information from the top lines of a
15655       video frame.
15656
15657       This filter adds frame metadata for "lavfi.readeia608.X.cc" and
15658       "lavfi.readeia608.X.line", where "X" is the number of the identified
15659       line with EIA-608 data (starting from 0). A description of each
15660       metadata value follows:
15661
15662       lavfi.readeia608.X.cc
15663           The two bytes stored as EIA-608 data (printed in hexadecimal).
15664
15665       lavfi.readeia608.X.line
15666           The number of the line on which the EIA-608 data was identified and
15667           read.
15668
15669       This filter accepts the following options:
15670
15671       scan_min
15672           Set the line to start scanning for EIA-608 data. Default is 0.
15673
15674       scan_max
15675           Set the line to end scanning for EIA-608 data. Default is 29.
15676
15677       spw Set the ratio of width reserved for sync code detection.  Default
15678           is 0.27. Allowed range is "[0.1 - 0.7]".
15679
15680       chp Enable checking the parity bit. In the event of a parity error, the
15681           filter will output 0x00 for that character. Default is false.
15682
15683       lp  Lowpass lines prior to further processing. Default is enabled.
15684
15685       Commands
15686
15687       This filter supports the all above options as commands.
15688
15689       Examples
15690
15691       •   Output a csv with presentation time and the first two lines of
15692           identified EIA-608 captioning data.
15693
15694                   ffprobe -f lavfi -i movie=captioned_video.mov,readeia608 -show_entries frame=pts_time:frame_tags=lavfi.readeia608.0.cc,lavfi.readeia608.1.cc -of csv
15695
15696   readvitc
15697       Read vertical interval timecode (VITC) information from the top lines
15698       of a video frame.
15699
15700       The filter adds frame metadata key "lavfi.readvitc.tc_str" with the
15701       timecode value, if a valid timecode has been detected. Further metadata
15702       key "lavfi.readvitc.found" is set to 0/1 depending on whether timecode
15703       data has been found or not.
15704
15705       This filter accepts the following options:
15706
15707       scan_max
15708           Set the maximum number of lines to scan for VITC data. If the value
15709           is set to "-1" the full video frame is scanned. Default is 45.
15710
15711       thr_b
15712           Set the luma threshold for black. Accepts float numbers in the
15713           range [0.0,1.0], default value is 0.2. The value must be equal or
15714           less than "thr_w".
15715
15716       thr_w
15717           Set the luma threshold for white. Accepts float numbers in the
15718           range [0.0,1.0], default value is 0.6. The value must be equal or
15719           greater than "thr_b".
15720
15721       Examples
15722
15723       •   Detect and draw VITC data onto the video frame; if no valid VITC is
15724           detected, draw "--:--:--:--" as a placeholder:
15725
15726                   ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%{metadata\\:lavfi.readvitc.tc_str\\:--\\\\\\:--\\\\\\:--\\\\\\:--}:x=(w-tw)/2:y=400-ascent'
15727
15728   remap
15729       Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
15730
15731       Destination pixel at position (X, Y) will be picked from source (x, y)
15732       position where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are
15733       out of range, zero value for pixel will be used for destination pixel.
15734
15735       Xmap and Ymap input video streams must be of same dimensions. Output
15736       video stream will have Xmap/Ymap video stream dimensions.  Xmap and
15737       Ymap input video streams are 16bit depth, single channel.
15738
15739       format
15740           Specify pixel format of output from this filter. Can be "color" or
15741           "gray".  Default is "color".
15742
15743       fill
15744           Specify the color of the unmapped pixels. For the syntax of this
15745           option, check the "Color" section in the ffmpeg-utils manual.
15746           Default color is "black".
15747
15748   removegrain
15749       The removegrain filter is a spatial denoiser for progressive video.
15750
15751       m0  Set mode for the first plane.
15752
15753       m1  Set mode for the second plane.
15754
15755       m2  Set mode for the third plane.
15756
15757       m3  Set mode for the fourth plane.
15758
15759       Range of mode is from 0 to 24. Description of each mode follows:
15760
15761       0   Leave input plane unchanged. Default.
15762
15763       1   Clips the pixel with the minimum and maximum of the 8 neighbour
15764           pixels.
15765
15766       2   Clips the pixel with the second minimum and maximum of the 8
15767           neighbour pixels.
15768
15769       3   Clips the pixel with the third minimum and maximum of the 8
15770           neighbour pixels.
15771
15772       4   Clips the pixel with the fourth minimum and maximum of the 8
15773           neighbour pixels.  This is equivalent to a median filter.
15774
15775       5   Line-sensitive clipping giving the minimal change.
15776
15777       6   Line-sensitive clipping, intermediate.
15778
15779       7   Line-sensitive clipping, intermediate.
15780
15781       8   Line-sensitive clipping, intermediate.
15782
15783       9   Line-sensitive clipping on a line where the neighbours pixels are
15784           the closest.
15785
15786       10  Replaces the target pixel with the closest neighbour.
15787
15788       11  [1 2 1] horizontal and vertical kernel blur.
15789
15790       12  Same as mode 11.
15791
15792       13  Bob mode, interpolates top field from the line where the neighbours
15793           pixels are the closest.
15794
15795       14  Bob mode, interpolates bottom field from the line where the
15796           neighbours pixels are the closest.
15797
15798       15  Bob mode, interpolates top field. Same as 13 but with a more
15799           complicated interpolation formula.
15800
15801       16  Bob mode, interpolates bottom field. Same as 14 but with a more
15802           complicated interpolation formula.
15803
15804       17  Clips the pixel with the minimum and maximum of respectively the
15805           maximum and minimum of each pair of opposite neighbour pixels.
15806
15807       18  Line-sensitive clipping using opposite neighbours whose greatest
15808           distance from the current pixel is minimal.
15809
15810       19  Replaces the pixel with the average of its 8 neighbours.
15811
15812       20  Averages the 9 pixels ([1 1 1] horizontal and vertical blur).
15813
15814       21  Clips pixels using the averages of opposite neighbour.
15815
15816       22  Same as mode 21 but simpler and faster.
15817
15818       23  Small edge and halo removal, but reputed useless.
15819
15820       24  Similar as 23.
15821
15822   removelogo
15823       Suppress a TV station logo, using an image file to determine which
15824       pixels comprise the logo. It works by filling in the pixels that
15825       comprise the logo with neighboring pixels.
15826
15827       The filter accepts the following options:
15828
15829       filename, f
15830           Set the filter bitmap file, which can be any image format supported
15831           by libavformat. The width and height of the image file must match
15832           those of the video stream being processed.
15833
15834       Pixels in the provided bitmap image with a value of zero are not
15835       considered part of the logo, non-zero pixels are considered part of the
15836       logo. If you use white (255) for the logo and black (0) for the rest,
15837       you will be safe. For making the filter bitmap, it is recommended to
15838       take a screen capture of a black frame with the logo visible, and then
15839       using a threshold filter followed by the erode filter once or twice.
15840
15841       If needed, little splotches can be fixed manually. Remember that if
15842       logo pixels are not covered, the filter quality will be much reduced.
15843       Marking too many pixels as part of the logo does not hurt as much, but
15844       it will increase the amount of blurring needed to cover over the image
15845       and will destroy more information than necessary, and extra pixels will
15846       slow things down on a large logo.
15847
15848   repeatfields
15849       This filter uses the repeat_field flag from the Video ES headers and
15850       hard repeats fields based on its value.
15851
15852   reverse
15853       Reverse a video clip.
15854
15855       Warning: This filter requires memory to buffer the entire clip, so
15856       trimming is suggested.
15857
15858       Examples
15859
15860       •   Take the first 5 seconds of a clip, and reverse it.
15861
15862                   trim=end=5,reverse
15863
15864   rgbashift
15865       Shift R/G/B/A pixels horizontally and/or vertically.
15866
15867       The filter accepts the following options:
15868
15869       rh  Set amount to shift red horizontally.
15870
15871       rv  Set amount to shift red vertically.
15872
15873       gh  Set amount to shift green horizontally.
15874
15875       gv  Set amount to shift green vertically.
15876
15877       bh  Set amount to shift blue horizontally.
15878
15879       bv  Set amount to shift blue vertically.
15880
15881       ah  Set amount to shift alpha horizontally.
15882
15883       av  Set amount to shift alpha vertically.
15884
15885       edge
15886           Set edge mode, can be smear, default, or warp.
15887
15888       Commands
15889
15890       This filter supports the all above options as commands.
15891
15892   roberts
15893       Apply roberts cross operator to input video stream.
15894
15895       The filter accepts the following option:
15896
15897       planes
15898           Set which planes will be processed, unprocessed planes will be
15899           copied.  By default value 0xf, all planes will be processed.
15900
15901       scale
15902           Set value which will be multiplied with filtered result.
15903
15904       delta
15905           Set value which will be added to filtered result.
15906
15907       Commands
15908
15909       This filter supports the all above options as commands.
15910
15911   rotate
15912       Rotate video by an arbitrary angle expressed in radians.
15913
15914       The filter accepts the following options:
15915
15916       A description of the optional parameters follows.
15917
15918       angle, a
15919           Set an expression for the angle by which to rotate the input video
15920           clockwise, expressed as a number of radians. A negative value will
15921           result in a counter-clockwise rotation. By default it is set to
15922           "0".
15923
15924           This expression is evaluated for each frame.
15925
15926       out_w, ow
15927           Set the output width expression, default value is "iw".  This
15928           expression is evaluated just once during configuration.
15929
15930       out_h, oh
15931           Set the output height expression, default value is "ih".  This
15932           expression is evaluated just once during configuration.
15933
15934       bilinear
15935           Enable bilinear interpolation if set to 1, a value of 0 disables
15936           it. Default value is 1.
15937
15938       fillcolor, c
15939           Set the color used to fill the output area not covered by the
15940           rotated image. For the general syntax of this option, check the
15941           "Color" section in the ffmpeg-utils manual.  If the special value
15942           "none" is selected then no background is printed (useful for
15943           example if the background is never shown).
15944
15945           Default value is "black".
15946
15947       The expressions for the angle and the output size can contain the
15948       following constants and functions:
15949
15950       n   sequential number of the input frame, starting from 0. It is always
15951           NAN before the first frame is filtered.
15952
15953       t   time in seconds of the input frame, it is set to 0 when the filter
15954           is configured. It is always NAN before the first frame is filtered.
15955
15956       hsub
15957       vsub
15958           horizontal and vertical chroma subsample values. For example for
15959           the pixel format "yuv422p" hsub is 2 and vsub is 1.
15960
15961       in_w, iw
15962       in_h, ih
15963           the input video width and height
15964
15965       out_w, ow
15966       out_h, oh
15967           the output width and height, that is the size of the padded area as
15968           specified by the width and height expressions
15969
15970       rotw(a)
15971       roth(a)
15972           the minimal width/height required for completely containing the
15973           input video rotated by a radians.
15974
15975           These are only available when computing the out_w and out_h
15976           expressions.
15977
15978       Examples
15979
15980       •   Rotate the input by PI/6 radians clockwise:
15981
15982                   rotate=PI/6
15983
15984       •   Rotate the input by PI/6 radians counter-clockwise:
15985
15986                   rotate=-PI/6
15987
15988       •   Rotate the input by 45 degrees clockwise:
15989
15990                   rotate=45*PI/180
15991
15992       •   Apply a constant rotation with period T, starting from an angle of
15993           PI/3:
15994
15995                   rotate=PI/3+2*PI*t/T
15996
15997       •   Make the input video rotation oscillating with a period of T
15998           seconds and an amplitude of A radians:
15999
16000                   rotate=A*sin(2*PI/T*t)
16001
16002       •   Rotate the video, output size is chosen so that the whole rotating
16003           input video is always completely contained in the output:
16004
16005                   rotate='2*PI*t:ow=hypot(iw,ih):oh=ow'
16006
16007       •   Rotate the video, reduce the output size so that no background is
16008           ever shown:
16009
16010                   rotate=2*PI*t:ow='min(iw,ih)/sqrt(2)':oh=ow:c=none
16011
16012       Commands
16013
16014       The filter supports the following commands:
16015
16016       a, angle
16017           Set the angle expression.  The command accepts the same syntax of
16018           the corresponding option.
16019
16020           If the specified expression is not valid, it is kept at its current
16021           value.
16022
16023   sab
16024       Apply Shape Adaptive Blur.
16025
16026       The filter accepts the following options:
16027
16028       luma_radius, lr
16029           Set luma blur filter strength, must be a value in range 0.1-4.0,
16030           default value is 1.0. A greater value will result in a more blurred
16031           image, and in slower processing.
16032
16033       luma_pre_filter_radius, lpfr
16034           Set luma pre-filter radius, must be a value in the 0.1-2.0 range,
16035           default value is 1.0.
16036
16037       luma_strength, ls
16038           Set luma maximum difference between pixels to still be considered,
16039           must be a value in the 0.1-100.0 range, default value is 1.0.
16040
16041       chroma_radius, cr
16042           Set chroma blur filter strength, must be a value in range -0.9-4.0.
16043           A greater value will result in a more blurred image, and in slower
16044           processing.
16045
16046       chroma_pre_filter_radius, cpfr
16047           Set chroma pre-filter radius, must be a value in the -0.9-2.0
16048           range.
16049
16050       chroma_strength, cs
16051           Set chroma maximum difference between pixels to still be
16052           considered, must be a value in the -0.9-100.0 range.
16053
16054       Each chroma option value, if not explicitly specified, is set to the
16055       corresponding luma option value.
16056
16057   scale
16058       Scale (resize) the input video, using the libswscale library.
16059
16060       The scale filter forces the output display aspect ratio to be the same
16061       of the input, by changing the output sample aspect ratio.
16062
16063       If the input image format is different from the format requested by the
16064       next filter, the scale filter will convert the input to the requested
16065       format.
16066
16067       Options
16068
16069       The filter accepts the following options, or any of the options
16070       supported by the libswscale scaler.
16071
16072       See the ffmpeg-scaler manual for the complete list of scaler options.
16073
16074       width, w
16075       height, h
16076           Set the output video dimension expression. Default value is the
16077           input dimension.
16078
16079           If the width or w value is 0, the input width is used for the
16080           output. If the height or h value is 0, the input height is used for
16081           the output.
16082
16083           If one and only one of the values is -n with n >= 1, the scale
16084           filter will use a value that maintains the aspect ratio of the
16085           input image, calculated from the other specified dimension. After
16086           that it will, however, make sure that the calculated dimension is
16087           divisible by n and adjust the value if necessary.
16088
16089           If both values are -n with n >= 1, the behavior will be identical
16090           to both values being set to 0 as previously detailed.
16091
16092           See below for the list of accepted constants for use in the
16093           dimension expression.
16094
16095       eval
16096           Specify when to evaluate width and height expression. It accepts
16097           the following values:
16098
16099           init
16100               Only evaluate expressions once during the filter initialization
16101               or when a command is processed.
16102
16103           frame
16104               Evaluate expressions for each incoming frame.
16105
16106           Default value is init.
16107
16108       interl
16109           Set the interlacing mode. It accepts the following values:
16110
16111           1   Force interlaced aware scaling.
16112
16113           0   Do not apply interlaced scaling.
16114
16115           -1  Select interlaced aware scaling depending on whether the source
16116               frames are flagged as interlaced or not.
16117
16118           Default value is 0.
16119
16120       flags
16121           Set libswscale scaling flags. See the ffmpeg-scaler manual for the
16122           complete list of values. If not explicitly specified the filter
16123           applies the default flags.
16124
16125       param0, param1
16126           Set libswscale input parameters for scaling algorithms that need
16127           them. See the ffmpeg-scaler manual for the complete documentation.
16128           If not explicitly specified the filter applies empty parameters.
16129
16130       size, s
16131           Set the video size. For the syntax of this option, check the "Video
16132           size" section in the ffmpeg-utils manual.
16133
16134       in_color_matrix
16135       out_color_matrix
16136           Set in/output YCbCr color space type.
16137
16138           This allows the autodetected value to be overridden as well as
16139           allows forcing a specific value used for the output and encoder.
16140
16141           If not specified, the color space type depends on the pixel format.
16142
16143           Possible values:
16144
16145           auto
16146               Choose automatically.
16147
16148           bt709
16149               Format conforming to International Telecommunication Union
16150               (ITU) Recommendation BT.709.
16151
16152           fcc Set color space conforming to the United States Federal
16153               Communications Commission (FCC) Code of Federal Regulations
16154               (CFR) Title 47 (2003) 73.682 (a).
16155
16156           bt601
16157           bt470
16158           smpte170m
16159               Set color space conforming to:
16160
16161               •   ITU Radiocommunication Sector (ITU-R) Recommendation BT.601
16162
16163               •   ITU-R Rec. BT.470-6 (1998) Systems B, B1, and G
16164
16165               •   Society of Motion Picture and Television Engineers (SMPTE)
16166                   ST 170:2004
16167
16168           smpte240m
16169               Set color space conforming to SMPTE ST 240:1999.
16170
16171           bt2020
16172               Set color space conforming to ITU-R BT.2020 non-constant
16173               luminance system.
16174
16175       in_range
16176       out_range
16177           Set in/output YCbCr sample range.
16178
16179           This allows the autodetected value to be overridden as well as
16180           allows forcing a specific value used for the output and encoder. If
16181           not specified, the range depends on the pixel format. Possible
16182           values:
16183
16184           auto/unknown
16185               Choose automatically.
16186
16187           jpeg/full/pc
16188               Set full range (0-255 in case of 8-bit luma).
16189
16190           mpeg/limited/tv
16191               Set "MPEG" range (16-235 in case of 8-bit luma).
16192
16193       force_original_aspect_ratio
16194           Enable decreasing or increasing output video width or height if
16195           necessary to keep the original aspect ratio. Possible values:
16196
16197           disable
16198               Scale the video as specified and disable this feature.
16199
16200           decrease
16201               The output video dimensions will automatically be decreased if
16202               needed.
16203
16204           increase
16205               The output video dimensions will automatically be increased if
16206               needed.
16207
16208           One useful instance of this option is that when you know a specific
16209           device's maximum allowed resolution, you can use this to limit the
16210           output video to that, while retaining the aspect ratio. For
16211           example, device A allows 1280x720 playback, and your video is
16212           1920x800. Using this option (set it to decrease) and specifying
16213           1280x720 to the command line makes the output 1280x533.
16214
16215           Please note that this is a different thing than specifying -1 for w
16216           or h, you still need to specify the output resolution for this
16217           option to work.
16218
16219       force_divisible_by
16220           Ensures that both the output dimensions, width and height, are
16221           divisible by the given integer when used together with
16222           force_original_aspect_ratio. This works similar to using "-n" in
16223           the w and h options.
16224
16225           This option respects the value set for force_original_aspect_ratio,
16226           increasing or decreasing the resolution accordingly. The video's
16227           aspect ratio may be slightly modified.
16228
16229           This option can be handy if you need to have a video fit within or
16230           exceed a defined resolution using force_original_aspect_ratio but
16231           also have encoder restrictions on width or height divisibility.
16232
16233       The values of the w and h options are expressions containing the
16234       following constants:
16235
16236       in_w
16237       in_h
16238           The input width and height
16239
16240       iw
16241       ih  These are the same as in_w and in_h.
16242
16243       out_w
16244       out_h
16245           The output (scaled) width and height
16246
16247       ow
16248       oh  These are the same as out_w and out_h
16249
16250       a   The same as iw / ih
16251
16252       sar input sample aspect ratio
16253
16254       dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
16255
16256       hsub
16257       vsub
16258           horizontal and vertical input chroma subsample values. For example
16259           for the pixel format "yuv422p" hsub is 2 and vsub is 1.
16260
16261       ohsub
16262       ovsub
16263           horizontal and vertical output chroma subsample values. For example
16264           for the pixel format "yuv422p" hsub is 2 and vsub is 1.
16265
16266       n   The (sequential) number of the input frame, starting from 0.  Only
16267           available with "eval=frame".
16268
16269       t   The presentation timestamp of the input frame, expressed as a
16270           number of seconds. Only available with "eval=frame".
16271
16272       pos The position (byte offset) of the frame in the input stream, or NaN
16273           if this information is unavailable and/or meaningless (for example
16274           in case of synthetic video).  Only available with "eval=frame".
16275
16276       Examples
16277
16278       •   Scale the input video to a size of 200x100
16279
16280                   scale=w=200:h=100
16281
16282           This is equivalent to:
16283
16284                   scale=200:100
16285
16286           or:
16287
16288                   scale=200x100
16289
16290       •   Specify a size abbreviation for the output size:
16291
16292                   scale=qcif
16293
16294           which can also be written as:
16295
16296                   scale=size=qcif
16297
16298       •   Scale the input to 2x:
16299
16300                   scale=w=2*iw:h=2*ih
16301
16302       •   The above is the same as:
16303
16304                   scale=2*in_w:2*in_h
16305
16306       •   Scale the input to 2x with forced interlaced scaling:
16307
16308                   scale=2*iw:2*ih:interl=1
16309
16310       •   Scale the input to half size:
16311
16312                   scale=w=iw/2:h=ih/2
16313
16314       •   Increase the width, and set the height to the same size:
16315
16316                   scale=3/2*iw:ow
16317
16318       •   Seek Greek harmony:
16319
16320                   scale=iw:1/PHI*iw
16321                   scale=ih*PHI:ih
16322
16323       •   Increase the height, and set the width to 3/2 of the height:
16324
16325                   scale=w=3/2*oh:h=3/5*ih
16326
16327       •   Increase the size, making the size a multiple of the chroma
16328           subsample values:
16329
16330                   scale="trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub"
16331
16332       •   Increase the width to a maximum of 500 pixels, keeping the same
16333           aspect ratio as the input:
16334
16335                   scale=w='min(500\, iw*3/2):h=-1'
16336
16337       •   Make pixels square by combining scale and setsar:
16338
16339                   scale='trunc(ih*dar):ih',setsar=1/1
16340
16341       •   Make pixels square by combining scale and setsar, making sure the
16342           resulting resolution is even (required by some codecs):
16343
16344                   scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1
16345
16346       Commands
16347
16348       This filter supports the following commands:
16349
16350       width, w
16351       height, h
16352           Set the output video dimension expression.  The command accepts the
16353           same syntax of the corresponding option.
16354
16355           If the specified expression is not valid, it is kept at its current
16356           value.
16357
16358   scale_cuda
16359       Scale (resize) and convert (pixel format) the input video, using
16360       accelerated CUDA kernels.  Setting the output width and height works in
16361       the same way as for the scale filter.
16362
16363       The filter accepts the following options:
16364
16365       w
16366       h   Set the output video dimension expression. Default value is the
16367           input dimension.
16368
16369           Allows for the same expressions as the scale filter.
16370
16371       interp_algo
16372           Sets the algorithm used for scaling:
16373
16374           nearest
16375               Nearest neighbour
16376
16377               Used by default if input parameters match the desired output.
16378
16379           bilinear
16380               Bilinear
16381
16382           bicubic
16383               Bicubic
16384
16385               This is the default.
16386
16387           lanczos
16388               Lanczos
16389
16390       format
16391           Controls the output pixel format. By default, or if none is
16392           specified, the input pixel format is used.
16393
16394           The filter does not support converting between YUV and RGB pixel
16395           formats.
16396
16397       passthrough
16398           If set to 0, every frame is processed, even if no conversion is
16399           neccesary.  This mode can be useful to use the filter as a buffer
16400           for a downstream frame-consumer that exhausts the limited decoder
16401           frame pool.
16402
16403           If set to 1, frames are passed through as-is if they match the
16404           desired output parameters. This is the default behaviour.
16405
16406       param
16407           Algorithm-Specific parameter.
16408
16409           Affects the curves of the bicubic algorithm.
16410
16411       force_original_aspect_ratio
16412       force_divisible_by
16413           Work the same as the identical scale filter options.
16414
16415       Examples
16416
16417       •   Scale input to 720p, keeping aspect ratio and ensuring the output
16418           is yuv420p.
16419
16420                   scale_cuda=-2:720:format=yuv420p
16421
16422       •   Upscale to 4K using nearest neighbour algorithm.
16423
16424                   scale_cuda=4096:2160:interp_algo=nearest
16425
16426       •   Don't do any conversion or scaling, but copy all input frames into
16427           newly allocated ones.  This can be useful to deal with a filter and
16428           encode chain that otherwise exhausts the decoders frame pool.
16429
16430                   scale_cuda=passthrough=0
16431
16432   scale_npp
16433       Use the NVIDIA Performance Primitives (libnpp) to perform scaling
16434       and/or pixel format conversion on CUDA video frames. Setting the output
16435       width and height works in the same way as for the scale filter.
16436
16437       The following additional options are accepted:
16438
16439       format
16440           The pixel format of the output CUDA frames. If set to the string
16441           "same" (the default), the input format will be kept. Note that
16442           automatic format negotiation and conversion is not yet supported
16443           for hardware frames
16444
16445       interp_algo
16446           The interpolation algorithm used for resizing. One of the
16447           following:
16448
16449           nn  Nearest neighbour.
16450
16451           linear
16452           cubic
16453           cubic2p_bspline
16454               2-parameter cubic (B=1, C=0)
16455
16456           cubic2p_catmullrom
16457               2-parameter cubic (B=0, C=1/2)
16458
16459           cubic2p_b05c03
16460               2-parameter cubic (B=1/2, C=3/10)
16461
16462           super
16463               Supersampling
16464
16465           lanczos
16466       force_original_aspect_ratio
16467           Enable decreasing or increasing output video width or height if
16468           necessary to keep the original aspect ratio. Possible values:
16469
16470           disable
16471               Scale the video as specified and disable this feature.
16472
16473           decrease
16474               The output video dimensions will automatically be decreased if
16475               needed.
16476
16477           increase
16478               The output video dimensions will automatically be increased if
16479               needed.
16480
16481           One useful instance of this option is that when you know a specific
16482           device's maximum allowed resolution, you can use this to limit the
16483           output video to that, while retaining the aspect ratio. For
16484           example, device A allows 1280x720 playback, and your video is
16485           1920x800. Using this option (set it to decrease) and specifying
16486           1280x720 to the command line makes the output 1280x533.
16487
16488           Please note that this is a different thing than specifying -1 for w
16489           or h, you still need to specify the output resolution for this
16490           option to work.
16491
16492       force_divisible_by
16493           Ensures that both the output dimensions, width and height, are
16494           divisible by the given integer when used together with
16495           force_original_aspect_ratio. This works similar to using "-n" in
16496           the w and h options.
16497
16498           This option respects the value set for force_original_aspect_ratio,
16499           increasing or decreasing the resolution accordingly. The video's
16500           aspect ratio may be slightly modified.
16501
16502           This option can be handy if you need to have a video fit within or
16503           exceed a defined resolution using force_original_aspect_ratio but
16504           also have encoder restrictions on width or height divisibility.
16505
16506       eval
16507           Specify when to evaluate width and height expression. It accepts
16508           the following values:
16509
16510           init
16511               Only evaluate expressions once during the filter initialization
16512               or when a command is processed.
16513
16514           frame
16515               Evaluate expressions for each incoming frame.
16516
16517       The values of the w and h options are expressions containing the
16518       following constants:
16519
16520       in_w
16521       in_h
16522           The input width and height
16523
16524       iw
16525       ih  These are the same as in_w and in_h.
16526
16527       out_w
16528       out_h
16529           The output (scaled) width and height
16530
16531       ow
16532       oh  These are the same as out_w and out_h
16533
16534       a   The same as iw / ih
16535
16536       sar input sample aspect ratio
16537
16538       dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
16539
16540       n   The (sequential) number of the input frame, starting from 0.  Only
16541           available with "eval=frame".
16542
16543       t   The presentation timestamp of the input frame, expressed as a
16544           number of seconds. Only available with "eval=frame".
16545
16546       pos The position (byte offset) of the frame in the input stream, or NaN
16547           if this information is unavailable and/or meaningless (for example
16548           in case of synthetic video).  Only available with "eval=frame".
16549
16550   scale2ref
16551       Scale (resize) the input video, based on a reference video.
16552
16553       See the scale filter for available options, scale2ref supports the same
16554       but uses the reference video instead of the main input as basis.
16555       scale2ref also supports the following additional constants for the w
16556       and h options:
16557
16558       main_w
16559       main_h
16560           The main input video's width and height
16561
16562       main_a
16563           The same as main_w / main_h
16564
16565       main_sar
16566           The main input video's sample aspect ratio
16567
16568       main_dar, mdar
16569           The main input video's display aspect ratio. Calculated from
16570           "(main_w / main_h) * main_sar".
16571
16572       main_hsub
16573       main_vsub
16574           The main input video's horizontal and vertical chroma subsample
16575           values.  For example for the pixel format "yuv422p" hsub is 2 and
16576           vsub is 1.
16577
16578       main_n
16579           The (sequential) number of the main input frame, starting from 0.
16580           Only available with "eval=frame".
16581
16582       main_t
16583           The presentation timestamp of the main input frame, expressed as a
16584           number of seconds. Only available with "eval=frame".
16585
16586       main_pos
16587           The position (byte offset) of the frame in the main input stream,
16588           or NaN if this information is unavailable and/or meaningless (for
16589           example in case of synthetic video).  Only available with
16590           "eval=frame".
16591
16592       Examples
16593
16594       •   Scale a subtitle stream (b) to match the main video (a) in size
16595           before overlaying
16596
16597                   'scale2ref[b][a];[a][b]overlay'
16598
16599       •   Scale a logo to 1/10th the height of a video, while preserving its
16600           display aspect ratio.
16601
16602                   [logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
16603
16604       Commands
16605
16606       This filter supports the following commands:
16607
16608       width, w
16609       height, h
16610           Set the output video dimension expression.  The command accepts the
16611           same syntax of the corresponding option.
16612
16613           If the specified expression is not valid, it is kept at its current
16614           value.
16615
16616   scale2ref_npp
16617       Use the NVIDIA Performance Primitives (libnpp) to scale (resize) the
16618       input video, based on a reference video.
16619
16620       See the scale_npp filter for available options, scale2ref_npp supports
16621       the same but uses the reference video instead of the main input as
16622       basis. scale2ref_npp also supports the following additional constants
16623       for the w and h options:
16624
16625       main_w
16626       main_h
16627           The main input video's width and height
16628
16629       main_a
16630           The same as main_w / main_h
16631
16632       main_sar
16633           The main input video's sample aspect ratio
16634
16635       main_dar, mdar
16636           The main input video's display aspect ratio. Calculated from
16637           "(main_w / main_h) * main_sar".
16638
16639       main_n
16640           The (sequential) number of the main input frame, starting from 0.
16641           Only available with "eval=frame".
16642
16643       main_t
16644           The presentation timestamp of the main input frame, expressed as a
16645           number of seconds. Only available with "eval=frame".
16646
16647       main_pos
16648           The position (byte offset) of the frame in the main input stream,
16649           or NaN if this information is unavailable and/or meaningless (for
16650           example in case of synthetic video).  Only available with
16651           "eval=frame".
16652
16653       Examples
16654
16655       •   Scale a subtitle stream (b) to match the main video (a) in size
16656           before overlaying
16657
16658                   'scale2ref_npp[b][a];[a][b]overlay_cuda'
16659
16660       •   Scale a logo to 1/10th the height of a video, while preserving its
16661           display aspect ratio.
16662
16663                   [logo-in][video-in]scale2ref_npp=w=oh*mdar:h=ih/10[logo-out][video-out]
16664
16665   scharr
16666       Apply scharr operator to input video stream.
16667
16668       The filter accepts the following option:
16669
16670       planes
16671           Set which planes will be processed, unprocessed planes will be
16672           copied.  By default value 0xf, all planes will be processed.
16673
16674       scale
16675           Set value which will be multiplied with filtered result.
16676
16677       delta
16678           Set value which will be added to filtered result.
16679
16680       Commands
16681
16682       This filter supports the all above options as commands.
16683
16684   scroll
16685       Scroll input video horizontally and/or vertically by constant speed.
16686
16687       The filter accepts the following options:
16688
16689       horizontal, h
16690           Set the horizontal scrolling speed. Default is 0. Allowed range is
16691           from -1 to 1.  Negative values changes scrolling direction.
16692
16693       vertical, v
16694           Set the vertical scrolling speed. Default is 0. Allowed range is
16695           from -1 to 1.  Negative values changes scrolling direction.
16696
16697       hpos
16698           Set the initial horizontal scrolling position. Default is 0.
16699           Allowed range is from 0 to 1.
16700
16701       vpos
16702           Set the initial vertical scrolling position. Default is 0. Allowed
16703           range is from 0 to 1.
16704
16705       Commands
16706
16707       This filter supports the following commands:
16708
16709       horizontal, h
16710           Set the horizontal scrolling speed.
16711
16712       vertical, v
16713           Set the vertical scrolling speed.
16714
16715   scdet
16716       Detect video scene change.
16717
16718       This filter sets frame metadata with mafd between frame, the scene
16719       score, and forward the frame to the next filter, so they can use these
16720       metadata to detect scene change or others.
16721
16722       In addition, this filter logs a message and sets frame metadata when it
16723       detects a scene change by threshold.
16724
16725       "lavfi.scd.mafd" metadata keys are set with mafd for every frame.
16726
16727       "lavfi.scd.score" metadata keys are set with scene change score for
16728       every frame to detect scene change.
16729
16730       "lavfi.scd.time" metadata keys are set with current filtered frame time
16731       which detect scene change with threshold.
16732
16733       The filter accepts the following options:
16734
16735       threshold, t
16736           Set the scene change detection threshold as a percentage of maximum
16737           change. Good values are in the "[8.0, 14.0]" range. The range for
16738           threshold is "[0., 100.]".
16739
16740           Default value is 10..
16741
16742       sc_pass, s
16743           Set the flag to pass scene change frames to the next filter.
16744           Default value is 0 You can enable it if you want to get snapshot of
16745           scene change frames only.
16746
16747   selectivecolor
16748       Adjust cyan, magenta, yellow and black (CMYK) to certain ranges of
16749       colors (such as "reds", "yellows", "greens", "cyans", ...). The
16750       adjustment range is defined by the "purity" of the color (that is, how
16751       saturated it already is).
16752
16753       This filter is similar to the Adobe Photoshop Selective Color tool.
16754
16755       The filter accepts the following options:
16756
16757       correction_method
16758           Select color correction method.
16759
16760           Available values are:
16761
16762           absolute
16763               Specified adjustments are applied "as-is" (added/subtracted to
16764               original pixel component value).
16765
16766           relative
16767               Specified adjustments are relative to the original component
16768               value.
16769
16770           Default is "absolute".
16771
16772       reds
16773           Adjustments for red pixels (pixels where the red component is the
16774           maximum)
16775
16776       yellows
16777           Adjustments for yellow pixels (pixels where the blue component is
16778           the minimum)
16779
16780       greens
16781           Adjustments for green pixels (pixels where the green component is
16782           the maximum)
16783
16784       cyans
16785           Adjustments for cyan pixels (pixels where the red component is the
16786           minimum)
16787
16788       blues
16789           Adjustments for blue pixels (pixels where the blue component is the
16790           maximum)
16791
16792       magentas
16793           Adjustments for magenta pixels (pixels where the green component is
16794           the minimum)
16795
16796       whites
16797           Adjustments for white pixels (pixels where all components are
16798           greater than 128)
16799
16800       neutrals
16801           Adjustments for all pixels except pure black and pure white
16802
16803       blacks
16804           Adjustments for black pixels (pixels where all components are
16805           lesser than 128)
16806
16807       psfile
16808           Specify a Photoshop selective color file (".asv") to import the
16809           settings from.
16810
16811       All the adjustment settings (reds, yellows, ...) accept up to 4 space
16812       separated floating point adjustment values in the [-1,1] range,
16813       respectively to adjust the amount of cyan, magenta, yellow and black
16814       for the pixels of its range.
16815
16816       Examples
16817
16818       •   Increase cyan by 50% and reduce yellow by 33% in every green areas,
16819           and increase magenta by 27% in blue areas:
16820
16821                   selectivecolor=greens=.5 0 -.33 0:blues=0 .27
16822
16823       •   Use a Photoshop selective color preset:
16824
16825                   selectivecolor=psfile=MySelectiveColorPresets/Misty.asv
16826
16827   separatefields
16828       The "separatefields" takes a frame-based video input and splits each
16829       frame into its components fields, producing a new half height clip with
16830       twice the frame rate and twice the frame count.
16831
16832       This filter use field-dominance information in frame to decide which of
16833       each pair of fields to place first in the output.  If it gets it wrong
16834       use setfield filter before "separatefields" filter.
16835
16836   setdar, setsar
16837       The "setdar" filter sets the Display Aspect Ratio for the filter output
16838       video.
16839
16840       This is done by changing the specified Sample (aka Pixel) Aspect Ratio,
16841       according to the following equation:
16842
16843               <DAR> = <HORIZONTAL_RESOLUTION> / <VERTICAL_RESOLUTION> * <SAR>
16844
16845       Keep in mind that the "setdar" filter does not modify the pixel
16846       dimensions of the video frame. Also, the display aspect ratio set by
16847       this filter may be changed by later filters in the filterchain, e.g. in
16848       case of scaling or if another "setdar" or a "setsar" filter is applied.
16849
16850       The "setsar" filter sets the Sample (aka Pixel) Aspect Ratio for the
16851       filter output video.
16852
16853       Note that as a consequence of the application of this filter, the
16854       output display aspect ratio will change according to the equation
16855       above.
16856
16857       Keep in mind that the sample aspect ratio set by the "setsar" filter
16858       may be changed by later filters in the filterchain, e.g. if another
16859       "setsar" or a "setdar" filter is applied.
16860
16861       It accepts the following parameters:
16862
16863       r, ratio, dar ("setdar" only), sar ("setsar" only)
16864           Set the aspect ratio used by the filter.
16865
16866           The parameter can be a floating point number string, an expression,
16867           or a string of the form num:den, where num and den are the
16868           numerator and denominator of the aspect ratio. If the parameter is
16869           not specified, it is assumed the value "0".  In case the form
16870           "num:den" is used, the ":" character should be escaped.
16871
16872       max Set the maximum integer value to use for expressing numerator and
16873           denominator when reducing the expressed aspect ratio to a rational.
16874           Default value is 100.
16875
16876       The parameter sar is an expression containing the following constants:
16877
16878       E, PI, PHI
16879           These are approximated values for the mathematical constants e
16880           (Euler's number), pi (Greek pi), and phi (the golden ratio).
16881
16882       w, h
16883           The input width and height.
16884
16885       a   These are the same as w / h.
16886
16887       sar The input sample aspect ratio.
16888
16889       dar The input display aspect ratio. It is the same as (w / h) * sar.
16890
16891       hsub, vsub
16892           Horizontal and vertical chroma subsample values. For example, for
16893           the pixel format "yuv422p" hsub is 2 and vsub is 1.
16894
16895       Examples
16896
16897       •   To change the display aspect ratio to 16:9, specify one of the
16898           following:
16899
16900                   setdar=dar=1.77777
16901                   setdar=dar=16/9
16902
16903       •   To change the sample aspect ratio to 10:11, specify:
16904
16905                   setsar=sar=10/11
16906
16907       •   To set a display aspect ratio of 16:9, and specify a maximum
16908           integer value of 1000 in the aspect ratio reduction, use the
16909           command:
16910
16911                   setdar=ratio=16/9:max=1000
16912
16913   setfield
16914       Force field for the output video frame.
16915
16916       The "setfield" filter marks the interlace type field for the output
16917       frames. It does not change the input frame, but only sets the
16918       corresponding property, which affects how the frame is treated by
16919       following filters (e.g. "fieldorder" or "yadif").
16920
16921       The filter accepts the following options:
16922
16923       mode
16924           Available values are:
16925
16926           auto
16927               Keep the same field property.
16928
16929           bff Mark the frame as bottom-field-first.
16930
16931           tff Mark the frame as top-field-first.
16932
16933           prog
16934               Mark the frame as progressive.
16935
16936   setparams
16937       Force frame parameter for the output video frame.
16938
16939       The "setparams" filter marks interlace and color range for the output
16940       frames. It does not change the input frame, but only sets the
16941       corresponding property, which affects how the frame is treated by
16942       filters/encoders.
16943
16944       field_mode
16945           Available values are:
16946
16947           auto
16948               Keep the same field property (default).
16949
16950           bff Mark the frame as bottom-field-first.
16951
16952           tff Mark the frame as top-field-first.
16953
16954           prog
16955               Mark the frame as progressive.
16956
16957       range
16958           Available values are:
16959
16960           auto
16961               Keep the same color range property (default).
16962
16963           unspecified, unknown
16964               Mark the frame as unspecified color range.
16965
16966           limited, tv, mpeg
16967               Mark the frame as limited range.
16968
16969           full, pc, jpeg
16970               Mark the frame as full range.
16971
16972       color_primaries
16973           Set the color primaries.  Available values are:
16974
16975           auto
16976               Keep the same color primaries property (default).
16977
16978           bt709
16979           unknown
16980           bt470m
16981           bt470bg
16982           smpte170m
16983           smpte240m
16984           film
16985           bt2020
16986           smpte428
16987           smpte431
16988           smpte432
16989           jedec-p22
16990       color_trc
16991           Set the color transfer.  Available values are:
16992
16993           auto
16994               Keep the same color trc property (default).
16995
16996           bt709
16997           unknown
16998           bt470m
16999           bt470bg
17000           smpte170m
17001           smpte240m
17002           linear
17003           log100
17004           log316
17005           iec61966-2-4
17006           bt1361e
17007           iec61966-2-1
17008           bt2020-10
17009           bt2020-12
17010           smpte2084
17011           smpte428
17012           arib-std-b67
17013       colorspace
17014           Set the colorspace.  Available values are:
17015
17016           auto
17017               Keep the same colorspace property (default).
17018
17019           gbr
17020           bt709
17021           unknown
17022           fcc
17023           bt470bg
17024           smpte170m
17025           smpte240m
17026           ycgco
17027           bt2020nc
17028           bt2020c
17029           smpte2085
17030           chroma-derived-nc
17031           chroma-derived-c
17032           ictcp
17033
17034   sharpen_npp
17035       Use the NVIDIA Performance Primitives (libnpp) to perform image
17036       sharpening with border control.
17037
17038       The following additional options are accepted:
17039
17040       border_type
17041           Type of sampling to be used ad frame borders. One of the following:
17042
17043           replicate
17044               Replicate pixel values.
17045
17046   shear
17047       Apply shear transform to input video.
17048
17049       This filter supports the following options:
17050
17051       shx Shear factor in X-direction. Default value is 0.  Allowed range is
17052           from -2 to 2.
17053
17054       shy Shear factor in Y-direction. Default value is 0.  Allowed range is
17055           from -2 to 2.
17056
17057       fillcolor, c
17058           Set the color used to fill the output area not covered by the
17059           transformed video. For the general syntax of this option, check the
17060           "Color" section in the ffmpeg-utils manual.  If the special value
17061           "none" is selected then no background is printed (useful for
17062           example if the background is never shown).
17063
17064           Default value is "black".
17065
17066       interp
17067           Set interpolation type. Can be "bilinear" or "nearest". Default is
17068           "bilinear".
17069
17070       Commands
17071
17072       This filter supports the all above options as commands.
17073
17074   showinfo
17075       Show a line containing various information for each input video frame.
17076       The input video is not modified.
17077
17078       This filter supports the following options:
17079
17080       checksum
17081           Calculate checksums of each plane. By default enabled.
17082
17083       The shown line contains a sequence of key/value pairs of the form
17084       key:value.
17085
17086       The following values are shown in the output:
17087
17088       n   The (sequential) number of the input frame, starting from 0.
17089
17090       pts The Presentation TimeStamp of the input frame, expressed as a
17091           number of time base units. The time base unit depends on the filter
17092           input pad.
17093
17094       pts_time
17095           The Presentation TimeStamp of the input frame, expressed as a
17096           number of seconds.
17097
17098       pos The position of the frame in the input stream, or -1 if this
17099           information is unavailable and/or meaningless (for example in case
17100           of synthetic video).
17101
17102       fmt The pixel format name.
17103
17104       sar The sample aspect ratio of the input frame, expressed in the form
17105           num/den.
17106
17107       s   The size of the input frame. For the syntax of this option, check
17108           the "Video size" section in the ffmpeg-utils manual.
17109
17110       i   The type of interlaced mode ("P" for "progressive", "T" for top
17111           field first, "B" for bottom field first).
17112
17113       iskey
17114           This is 1 if the frame is a key frame, 0 otherwise.
17115
17116       type
17117           The picture type of the input frame ("I" for an I-frame, "P" for a
17118           P-frame, "B" for a B-frame, or "?" for an unknown type).  Also
17119           refer to the documentation of the "AVPictureType" enum and of the
17120           "av_get_picture_type_char" function defined in libavutil/avutil.h.
17121
17122       checksum
17123           The Adler-32 checksum (printed in hexadecimal) of all the planes of
17124           the input frame.
17125
17126       plane_checksum
17127           The Adler-32 checksum (printed in hexadecimal) of each plane of the
17128           input frame, expressed in the form "[c0 c1 c2 c3]".
17129
17130       mean
17131           The mean value of pixels in each plane of the input frame,
17132           expressed in the form "[mean0 mean1 mean2 mean3]".
17133
17134       stdev
17135           The standard deviation of pixel values in each plane of the input
17136           frame, expressed in the form "[stdev0 stdev1 stdev2 stdev3]".
17137
17138   showpalette
17139       Displays the 256 colors palette of each frame. This filter is only
17140       relevant for pal8 pixel format frames.
17141
17142       It accepts the following option:
17143
17144       s   Set the size of the box used to represent one palette color entry.
17145           Default is 30 (for a "30x30" pixel box).
17146
17147   shuffleframes
17148       Reorder and/or duplicate and/or drop video frames.
17149
17150       It accepts the following parameters:
17151
17152       mapping
17153           Set the destination indexes of input frames.  This is space or '|'
17154           separated list of indexes that maps input frames to output frames.
17155           Number of indexes also sets maximal value that each index may have.
17156           '-1' index have special meaning and that is to drop frame.
17157
17158       The first frame has the index 0. The default is to keep the input
17159       unchanged.
17160
17161       Examples
17162
17163       •   Swap second and third frame of every three frames of the input:
17164
17165                   ffmpeg -i INPUT -vf "shuffleframes=0 2 1" OUTPUT
17166
17167       •   Swap 10th and 1st frame of every ten frames of the input:
17168
17169                   ffmpeg -i INPUT -vf "shuffleframes=9 1 2 3 4 5 6 7 8 0" OUTPUT
17170
17171   shufflepixels
17172       Reorder pixels in video frames.
17173
17174       This filter accepts the following options:
17175
17176       direction, d
17177           Set shuffle direction. Can be forward or inverse direction.
17178           Default direction is forward.
17179
17180       mode, m
17181           Set shuffle mode. Can be horizontal, vertical or block mode.
17182
17183       width, w
17184       height, h
17185           Set shuffle block_size. In case of horizontal shuffle mode only
17186           width part of size is used, and in case of vertical shuffle mode
17187           only height part of size is used.
17188
17189       seed, s
17190           Set random seed used with shuffling pixels. Mainly useful to set to
17191           be able to reverse filtering process to get original input.  For
17192           example, to reverse forward shuffle you need to use same parameters
17193           and exact same seed and to set direction to inverse.
17194
17195   shuffleplanes
17196       Reorder and/or duplicate video planes.
17197
17198       It accepts the following parameters:
17199
17200       map0
17201           The index of the input plane to be used as the first output plane.
17202
17203       map1
17204           The index of the input plane to be used as the second output plane.
17205
17206       map2
17207           The index of the input plane to be used as the third output plane.
17208
17209       map3
17210           The index of the input plane to be used as the fourth output plane.
17211
17212       The first plane has the index 0. The default is to keep the input
17213       unchanged.
17214
17215       Examples
17216
17217       •   Swap the second and third planes of the input:
17218
17219                   ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
17220
17221   signalstats
17222       Evaluate various visual metrics that assist in determining issues
17223       associated with the digitization of analog video media.
17224
17225       By default the filter will log these metadata values:
17226
17227       YMIN
17228           Display the minimal Y value contained within the input frame.
17229           Expressed in range of [0-255].
17230
17231       YLOW
17232           Display the Y value at the 10% percentile within the input frame.
17233           Expressed in range of [0-255].
17234
17235       YAVG
17236           Display the average Y value within the input frame. Expressed in
17237           range of [0-255].
17238
17239       YHIGH
17240           Display the Y value at the 90% percentile within the input frame.
17241           Expressed in range of [0-255].
17242
17243       YMAX
17244           Display the maximum Y value contained within the input frame.
17245           Expressed in range of [0-255].
17246
17247       UMIN
17248           Display the minimal U value contained within the input frame.
17249           Expressed in range of [0-255].
17250
17251       ULOW
17252           Display the U value at the 10% percentile within the input frame.
17253           Expressed in range of [0-255].
17254
17255       UAVG
17256           Display the average U value within the input frame. Expressed in
17257           range of [0-255].
17258
17259       UHIGH
17260           Display the U value at the 90% percentile within the input frame.
17261           Expressed in range of [0-255].
17262
17263       UMAX
17264           Display the maximum U value contained within the input frame.
17265           Expressed in range of [0-255].
17266
17267       VMIN
17268           Display the minimal V value contained within the input frame.
17269           Expressed in range of [0-255].
17270
17271       VLOW
17272           Display the V value at the 10% percentile within the input frame.
17273           Expressed in range of [0-255].
17274
17275       VAVG
17276           Display the average V value within the input frame. Expressed in
17277           range of [0-255].
17278
17279       VHIGH
17280           Display the V value at the 90% percentile within the input frame.
17281           Expressed in range of [0-255].
17282
17283       VMAX
17284           Display the maximum V value contained within the input frame.
17285           Expressed in range of [0-255].
17286
17287       SATMIN
17288           Display the minimal saturation value contained within the input
17289           frame.  Expressed in range of [0-~181.02].
17290
17291       SATLOW
17292           Display the saturation value at the 10% percentile within the input
17293           frame.  Expressed in range of [0-~181.02].
17294
17295       SATAVG
17296           Display the average saturation value within the input frame.
17297           Expressed in range of [0-~181.02].
17298
17299       SATHIGH
17300           Display the saturation value at the 90% percentile within the input
17301           frame.  Expressed in range of [0-~181.02].
17302
17303       SATMAX
17304           Display the maximum saturation value contained within the input
17305           frame.  Expressed in range of [0-~181.02].
17306
17307       HUEMED
17308           Display the median value for hue within the input frame. Expressed
17309           in range of [0-360].
17310
17311       HUEAVG
17312           Display the average value for hue within the input frame. Expressed
17313           in range of [0-360].
17314
17315       YDIF
17316           Display the average of sample value difference between all values
17317           of the Y plane in the current frame and corresponding values of the
17318           previous input frame.  Expressed in range of [0-255].
17319
17320       UDIF
17321           Display the average of sample value difference between all values
17322           of the U plane in the current frame and corresponding values of the
17323           previous input frame.  Expressed in range of [0-255].
17324
17325       VDIF
17326           Display the average of sample value difference between all values
17327           of the V plane in the current frame and corresponding values of the
17328           previous input frame.  Expressed in range of [0-255].
17329
17330       YBITDEPTH
17331           Display bit depth of Y plane in current frame.  Expressed in range
17332           of [0-16].
17333
17334       UBITDEPTH
17335           Display bit depth of U plane in current frame.  Expressed in range
17336           of [0-16].
17337
17338       VBITDEPTH
17339           Display bit depth of V plane in current frame.  Expressed in range
17340           of [0-16].
17341
17342       The filter accepts the following options:
17343
17344       stat
17345       out stat specify an additional form of image analysis.  out output
17346           video with the specified type of pixel highlighted.
17347
17348           Both options accept the following values:
17349
17350           tout
17351               Identify temporal outliers pixels. A temporal outlier is a
17352               pixel unlike the neighboring pixels of the same field. Examples
17353               of temporal outliers include the results of video dropouts,
17354               head clogs, or tape tracking issues.
17355
17356           vrep
17357               Identify vertical line repetition. Vertical line repetition
17358               includes similar rows of pixels within a frame. In born-digital
17359               video vertical line repetition is common, but this pattern is
17360               uncommon in video digitized from an analog source. When it
17361               occurs in video that results from the digitization of an analog
17362               source it can indicate concealment from a dropout compensator.
17363
17364           brng
17365               Identify pixels that fall outside of legal broadcast range.
17366
17367       color, c
17368           Set the highlight color for the out option. The default color is
17369           yellow.
17370
17371       Examples
17372
17373       •   Output data of various video metrics:
17374
17375                   ffprobe -f lavfi movie=example.mov,signalstats="stat=tout+vrep+brng" -show_frames
17376
17377       •   Output specific data about the minimum and maximum values of the Y
17378           plane per frame:
17379
17380                   ffprobe -f lavfi movie=example.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN
17381
17382       •   Playback video while highlighting pixels that are outside of
17383           broadcast range in red.
17384
17385                   ffplay example.mov -vf signalstats="out=brng:color=red"
17386
17387       •   Playback video with signalstats metadata drawn over the frame.
17388
17389                   ffplay example.mov -vf signalstats=stat=brng+vrep+tout,drawtext=fontfile=FreeSerif.ttf:textfile=signalstat_drawtext.txt
17390
17391           The contents of signalstat_drawtext.txt used in the command are:
17392
17393                   time %{pts:hms}
17394                   Y (%{metadata:lavfi.signalstats.YMIN}-%{metadata:lavfi.signalstats.YMAX})
17395                   U (%{metadata:lavfi.signalstats.UMIN}-%{metadata:lavfi.signalstats.UMAX})
17396                   V (%{metadata:lavfi.signalstats.VMIN}-%{metadata:lavfi.signalstats.VMAX})
17397                   saturation maximum: %{metadata:lavfi.signalstats.SATMAX}
17398
17399   signature
17400       Calculates the MPEG-7 Video Signature. The filter can handle more than
17401       one input. In this case the matching between the inputs can be
17402       calculated additionally.  The filter always passes through the first
17403       input. The signature of each stream can be written into a file.
17404
17405       It accepts the following options:
17406
17407       detectmode
17408           Enable or disable the matching process.
17409
17410           Available values are:
17411
17412           off Disable the calculation of a matching (default).
17413
17414           full
17415               Calculate the matching for the whole video and output whether
17416               the whole video matches or only parts.
17417
17418           fast
17419               Calculate only until a matching is found or the video ends.
17420               Should be faster in some cases.
17421
17422       nb_inputs
17423           Set the number of inputs. The option value must be a non negative
17424           integer.  Default value is 1.
17425
17426       filename
17427           Set the path to which the output is written. If there is more than
17428           one input, the path must be a prototype, i.e. must contain %d or
17429           %0nd (where n is a positive integer), that will be replaced with
17430           the input number. If no filename is specified, no output will be
17431           written. This is the default.
17432
17433       format
17434           Choose the output format.
17435
17436           Available values are:
17437
17438           binary
17439               Use the specified binary representation (default).
17440
17441           xml Use the specified xml representation.
17442
17443       th_d
17444           Set threshold to detect one word as similar. The option value must
17445           be an integer greater than zero. The default value is 9000.
17446
17447       th_dc
17448           Set threshold to detect all words as similar. The option value must
17449           be an integer greater than zero. The default value is 60000.
17450
17451       th_xh
17452           Set threshold to detect frames as similar. The option value must be
17453           an integer greater than zero. The default value is 116.
17454
17455       th_di
17456           Set the minimum length of a sequence in frames to recognize it as
17457           matching sequence. The option value must be a non negative integer
17458           value.  The default value is 0.
17459
17460       th_it
17461           Set the minimum relation, that matching frames to all frames must
17462           have.  The option value must be a double value between 0 and 1. The
17463           default value is 0.5.
17464
17465       Examples
17466
17467       •   To calculate the signature of an input video and store it in
17468           signature.bin:
17469
17470                   ffmpeg -i input.mkv -vf signature=filename=signature.bin -map 0:v -f null -
17471
17472       •   To detect whether two videos match and store the signatures in XML
17473           format in signature0.xml and signature1.xml:
17474
17475                   ffmpeg -i input1.mkv -i input2.mkv -filter_complex "[0:v][1:v] signature=nb_inputs=2:detectmode=full:format=xml:filename=signature%d.xml" -map :v -f null -
17476
17477   smartblur
17478       Blur the input video without impacting the outlines.
17479
17480       It accepts the following options:
17481
17482       luma_radius, lr
17483           Set the luma radius. The option value must be a float number in the
17484           range [0.1,5.0] that specifies the variance of the gaussian filter
17485           used to blur the image (slower if larger). Default value is 1.0.
17486
17487       luma_strength, ls
17488           Set the luma strength. The option value must be a float number in
17489           the range [-1.0,1.0] that configures the blurring. A value included
17490           in [0.0,1.0] will blur the image whereas a value included in
17491           [-1.0,0.0] will sharpen the image. Default value is 1.0.
17492
17493       luma_threshold, lt
17494           Set the luma threshold used as a coefficient to determine whether a
17495           pixel should be blurred or not. The option value must be an integer
17496           in the range [-30,30]. A value of 0 will filter all the image, a
17497           value included in [0,30] will filter flat areas and a value
17498           included in [-30,0] will filter edges. Default value is 0.
17499
17500       chroma_radius, cr
17501           Set the chroma radius. The option value must be a float number in
17502           the range [0.1,5.0] that specifies the variance of the gaussian
17503           filter used to blur the image (slower if larger). Default value is
17504           luma_radius.
17505
17506       chroma_strength, cs
17507           Set the chroma strength. The option value must be a float number in
17508           the range [-1.0,1.0] that configures the blurring. A value included
17509           in [0.0,1.0] will blur the image whereas a value included in
17510           [-1.0,0.0] will sharpen the image. Default value is luma_strength.
17511
17512       chroma_threshold, ct
17513           Set the chroma threshold used as a coefficient to determine whether
17514           a pixel should be blurred or not. The option value must be an
17515           integer in the range [-30,30]. A value of 0 will filter all the
17516           image, a value included in [0,30] will filter flat areas and a
17517           value included in [-30,0] will filter edges. Default value is
17518           luma_threshold.
17519
17520       If a chroma option is not explicitly set, the corresponding luma value
17521       is set.
17522
17523   sobel
17524       Apply sobel operator to input video stream.
17525
17526       The filter accepts the following option:
17527
17528       planes
17529           Set which planes will be processed, unprocessed planes will be
17530           copied.  By default value 0xf, all planes will be processed.
17531
17532       scale
17533           Set value which will be multiplied with filtered result.
17534
17535       delta
17536           Set value which will be added to filtered result.
17537
17538       Commands
17539
17540       This filter supports the all above options as commands.
17541
17542   spp
17543       Apply a simple postprocessing filter that compresses and decompresses
17544       the image at several (or - in the case of quality level 6 - all) shifts
17545       and average the results.
17546
17547       The filter accepts the following options:
17548
17549       quality
17550           Set quality. This option defines the number of levels for
17551           averaging. It accepts an integer in the range 0-6. If set to 0, the
17552           filter will have no effect. A value of 6 means the higher quality.
17553           For each increment of that value the speed drops by a factor of
17554           approximately 2.  Default value is 3.
17555
17556       qp  Force a constant quantization parameter. If not set, the filter
17557           will use the QP from the video stream (if available).
17558
17559       mode
17560           Set thresholding mode. Available modes are:
17561
17562           hard
17563               Set hard thresholding (default).
17564
17565           soft
17566               Set soft thresholding (better de-ringing effect, but likely
17567               blurrier).
17568
17569       use_bframe_qp
17570           Enable the use of the QP from the B-Frames if set to 1. Using this
17571           option may cause flicker since the B-Frames have often larger QP.
17572           Default is 0 (not enabled).
17573
17574       Commands
17575
17576       This filter supports the following commands:
17577
17578       quality, level
17579           Set quality level. The value "max" can be used to set the maximum
17580           level, currently 6.
17581
17582   sr
17583       Scale the input by applying one of the super-resolution methods based
17584       on convolutional neural networks. Supported models:
17585
17586       •   Super-Resolution Convolutional Neural Network model (SRCNN).  See
17587           <https://arxiv.org/abs/1501.00092>.
17588
17589       •   Efficient Sub-Pixel Convolutional Neural Network model (ESPCN).
17590           See <https://arxiv.org/abs/1609.05158>.
17591
17592       Training scripts as well as scripts for model file (.pb) saving can be
17593       found at <https://github.com/XueweiMeng/sr/tree/sr_dnn_native>.
17594       Original repository is at
17595       <https://github.com/HighVoltageRocknRoll/sr.git>.
17596
17597       Native model files (.model) can be generated from TensorFlow model
17598       files (.pb) by using tools/python/convert.py
17599
17600       The filter accepts the following options:
17601
17602       dnn_backend
17603           Specify which DNN backend to use for model loading and execution.
17604           This option accepts the following values:
17605
17606           native
17607               Native implementation of DNN loading and execution.
17608
17609           tensorflow
17610               TensorFlow backend. To enable this backend you need to install
17611               the TensorFlow for C library (see
17612               <https://www.tensorflow.org/install/lang_c>) and configure
17613               FFmpeg with "--enable-libtensorflow"
17614
17615           Default value is native.
17616
17617       model
17618           Set path to model file specifying network architecture and its
17619           parameters.  Note that different backends use different file
17620           formats. TensorFlow backend can load files for both formats, while
17621           native backend can load files for only its format.
17622
17623       scale_factor
17624           Set scale factor for SRCNN model. Allowed values are 2, 3 and 4.
17625           Default value is 2. Scale factor is necessary for SRCNN model,
17626           because it accepts input upscaled using bicubic upscaling with
17627           proper scale factor.
17628
17629       To get full functionality (such as async execution), please use the
17630       dnn_processing filter.
17631
17632   ssim
17633       Obtain the SSIM (Structural SImilarity Metric) between two input
17634       videos.
17635
17636       This filter takes in input two input videos, the first input is
17637       considered the "main" source and is passed unchanged to the output. The
17638       second input is used as a "reference" video for computing the SSIM.
17639
17640       Both video inputs must have the same resolution and pixel format for
17641       this filter to work correctly. Also it assumes that both inputs have
17642       the same number of frames, which are compared one by one.
17643
17644       The filter stores the calculated SSIM of each frame.
17645
17646       The description of the accepted parameters follows.
17647
17648       stats_file, f
17649           If specified the filter will use the named file to save the SSIM of
17650           each individual frame. When filename equals "-" the data is sent to
17651           standard output.
17652
17653       The file printed if stats_file is selected, contains a sequence of
17654       key/value pairs of the form key:value for each compared couple of
17655       frames.
17656
17657       A description of each shown parameter follows:
17658
17659       n   sequential number of the input frame, starting from 1
17660
17661       Y, U, V, R, G, B
17662           SSIM of the compared frames for the component specified by the
17663           suffix.
17664
17665       All SSIM of the compared frames for the whole frame.
17666
17667       dB  Same as above but in dB representation.
17668
17669       This filter also supports the framesync options.
17670
17671       Examples
17672
17673       •   For example:
17674
17675                   movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
17676                   [main][ref] ssim="stats_file=stats.log" [out]
17677
17678           On this example the input file being processed is compared with the
17679           reference file ref_movie.mpg. The SSIM of each individual frame is
17680           stored in stats.log.
17681
17682       •   Another example with both psnr and ssim at same time:
17683
17684                   ffmpeg -i main.mpg -i ref.mpg -lavfi  "ssim;[0:v][1:v]psnr" -f null -
17685
17686       •   Another example with different containers:
17687
17688                   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 -
17689
17690   stereo3d
17691       Convert between different stereoscopic image formats.
17692
17693       The filters accept the following options:
17694
17695       in  Set stereoscopic image format of input.
17696
17697           Available values for input image formats are:
17698
17699           sbsl
17700               side by side parallel (left eye left, right eye right)
17701
17702           sbsr
17703               side by side crosseye (right eye left, left eye right)
17704
17705           sbs2l
17706               side by side parallel with half width resolution (left eye
17707               left, right eye right)
17708
17709           sbs2r
17710               side by side crosseye with half width resolution (right eye
17711               left, left eye right)
17712
17713           abl
17714           tbl above-below (left eye above, right eye below)
17715
17716           abr
17717           tbr above-below (right eye above, left eye below)
17718
17719           ab2l
17720           tb2l
17721               above-below with half height resolution (left eye above, right
17722               eye below)
17723
17724           ab2r
17725           tb2r
17726               above-below with half height resolution (right eye above, left
17727               eye below)
17728
17729           al  alternating frames (left eye first, right eye second)
17730
17731           ar  alternating frames (right eye first, left eye second)
17732
17733           irl interleaved rows (left eye has top row, right eye starts on
17734               next row)
17735
17736           irr interleaved rows (right eye has top row, left eye starts on
17737               next row)
17738
17739           icl interleaved columns, left eye first
17740
17741           icr interleaved columns, right eye first
17742
17743               Default value is sbsl.
17744
17745       out Set stereoscopic image format of output.
17746
17747           sbsl
17748               side by side parallel (left eye left, right eye right)
17749
17750           sbsr
17751               side by side crosseye (right eye left, left eye right)
17752
17753           sbs2l
17754               side by side parallel with half width resolution (left eye
17755               left, right eye right)
17756
17757           sbs2r
17758               side by side crosseye with half width resolution (right eye
17759               left, left eye right)
17760
17761           abl
17762           tbl above-below (left eye above, right eye below)
17763
17764           abr
17765           tbr above-below (right eye above, left eye below)
17766
17767           ab2l
17768           tb2l
17769               above-below with half height resolution (left eye above, right
17770               eye below)
17771
17772           ab2r
17773           tb2r
17774               above-below with half height resolution (right eye above, left
17775               eye below)
17776
17777           al  alternating frames (left eye first, right eye second)
17778
17779           ar  alternating frames (right eye first, left eye second)
17780
17781           irl interleaved rows (left eye has top row, right eye starts on
17782               next row)
17783
17784           irr interleaved rows (right eye has top row, left eye starts on
17785               next row)
17786
17787           arbg
17788               anaglyph red/blue gray (red filter on left eye, blue filter on
17789               right eye)
17790
17791           argg
17792               anaglyph red/green gray (red filter on left eye, green filter
17793               on right eye)
17794
17795           arcg
17796               anaglyph red/cyan gray (red filter on left eye, cyan filter on
17797               right eye)
17798
17799           arch
17800               anaglyph red/cyan half colored (red filter on left eye, cyan
17801               filter on right eye)
17802
17803           arcc
17804               anaglyph red/cyan color (red filter on left eye, cyan filter on
17805               right eye)
17806
17807           arcd
17808               anaglyph red/cyan color optimized with the least squares
17809               projection of dubois (red filter on left eye, cyan filter on
17810               right eye)
17811
17812           agmg
17813               anaglyph green/magenta gray (green filter on left eye, magenta
17814               filter on right eye)
17815
17816           agmh
17817               anaglyph green/magenta half colored (green filter on left eye,
17818               magenta filter on right eye)
17819
17820           agmc
17821               anaglyph green/magenta colored (green filter on left eye,
17822               magenta filter on right eye)
17823
17824           agmd
17825               anaglyph green/magenta color optimized with the least squares
17826               projection of dubois (green filter on left eye, magenta filter
17827               on right eye)
17828
17829           aybg
17830               anaglyph yellow/blue gray (yellow filter on left eye, blue
17831               filter on right eye)
17832
17833           aybh
17834               anaglyph yellow/blue half colored (yellow filter on left eye,
17835               blue filter on right eye)
17836
17837           aybc
17838               anaglyph yellow/blue colored (yellow filter on left eye, blue
17839               filter on right eye)
17840
17841           aybd
17842               anaglyph yellow/blue color optimized with the least squares
17843               projection of dubois (yellow filter on left eye, blue filter on
17844               right eye)
17845
17846           ml  mono output (left eye only)
17847
17848           mr  mono output (right eye only)
17849
17850           chl checkerboard, left eye first
17851
17852           chr checkerboard, right eye first
17853
17854           icl interleaved columns, left eye first
17855
17856           icr interleaved columns, right eye first
17857
17858           hdmi
17859               HDMI frame pack
17860
17861           Default value is arcd.
17862
17863       Examples
17864
17865       •   Convert input video from side by side parallel to anaglyph
17866           yellow/blue dubois:
17867
17868                   stereo3d=sbsl:aybd
17869
17870       •   Convert input video from above below (left eye above, right eye
17871           below) to side by side crosseye.
17872
17873                   stereo3d=abl:sbsr
17874
17875   streamselect, astreamselect
17876       Select video or audio streams.
17877
17878       The filter accepts the following options:
17879
17880       inputs
17881           Set number of inputs. Default is 2.
17882
17883       map Set input indexes to remap to outputs.
17884
17885       Commands
17886
17887       The "streamselect" and "astreamselect" filter supports the following
17888       commands:
17889
17890       map Set input indexes to remap to outputs.
17891
17892       Examples
17893
17894       •   Select first 5 seconds 1st stream and rest of time 2nd stream:
17895
17896                   sendcmd='5.0 streamselect map 1',streamselect=inputs=2:map=0
17897
17898       •   Same as above, but for audio:
17899
17900                   asendcmd='5.0 astreamselect map 1',astreamselect=inputs=2:map=0
17901
17902   subtitles
17903       Draw subtitles on top of input video using the libass library.
17904
17905       To enable compilation of this filter you need to configure FFmpeg with
17906       "--enable-libass". This filter also requires a build with libavcodec
17907       and libavformat to convert the passed subtitles file to ASS (Advanced
17908       Substation Alpha) subtitles format.
17909
17910       The filter accepts the following options:
17911
17912       filename, f
17913           Set the filename of the subtitle file to read. It must be
17914           specified.
17915
17916       original_size
17917           Specify the size of the original video, the video for which the ASS
17918           file was composed. For the syntax of this option, check the "Video
17919           size" section in the ffmpeg-utils manual.  Due to a misdesign in
17920           ASS aspect ratio arithmetic, this is necessary to correctly scale
17921           the fonts if the aspect ratio has been changed.
17922
17923       fontsdir
17924           Set a directory path containing fonts that can be used by the
17925           filter.  These fonts will be used in addition to whatever the font
17926           provider uses.
17927
17928       alpha
17929           Process alpha channel, by default alpha channel is untouched.
17930
17931       charenc
17932           Set subtitles input character encoding. "subtitles" filter only.
17933           Only useful if not UTF-8.
17934
17935       stream_index, si
17936           Set subtitles stream index. "subtitles" filter only.
17937
17938       force_style
17939           Override default style or script info parameters of the subtitles.
17940           It accepts a string containing ASS style format "KEY=VALUE" couples
17941           separated by ",".
17942
17943       If the first key is not specified, it is assumed that the first value
17944       specifies the filename.
17945
17946       For example, to render the file sub.srt on top of the input video, use
17947       the command:
17948
17949               subtitles=sub.srt
17950
17951       which is equivalent to:
17952
17953               subtitles=filename=sub.srt
17954
17955       To render the default subtitles stream from file video.mkv, use:
17956
17957               subtitles=video.mkv
17958
17959       To render the second subtitles stream from that file, use:
17960
17961               subtitles=video.mkv:si=1
17962
17963       To make the subtitles stream from sub.srt appear in 80% transparent
17964       blue "DejaVu Serif", use:
17965
17966               subtitles=sub.srt:force_style='Fontname=DejaVu Serif,PrimaryColour=&HCCFF0000'
17967
17968   super2xsai
17969       Scale the input by 2x and smooth using the Super2xSaI (Scale and
17970       Interpolate) pixel art scaling algorithm.
17971
17972       Useful for enlarging pixel art images without reducing sharpness.
17973
17974   swaprect
17975       Swap two rectangular objects in video.
17976
17977       This filter accepts the following options:
17978
17979       w   Set object width.
17980
17981       h   Set object height.
17982
17983       x1  Set 1st rect x coordinate.
17984
17985       y1  Set 1st rect y coordinate.
17986
17987       x2  Set 2nd rect x coordinate.
17988
17989       y2  Set 2nd rect y coordinate.
17990
17991           All expressions are evaluated once for each frame.
17992
17993       The all options are expressions containing the following constants:
17994
17995       w
17996       h   The input width and height.
17997
17998       a   same as w / h
17999
18000       sar input sample aspect ratio
18001
18002       dar input display aspect ratio, it is the same as (w / h) * sar
18003
18004       n   The number of the input frame, starting from 0.
18005
18006       t   The timestamp expressed in seconds. It's NAN if the input timestamp
18007           is unknown.
18008
18009       pos the position in the file of the input frame, NAN if unknown
18010
18011       Commands
18012
18013       This filter supports the all above options as commands.
18014
18015   swapuv
18016       Swap U & V plane.
18017
18018   tblend
18019       Blend successive video frames.
18020
18021       See blend
18022
18023   telecine
18024       Apply telecine process to the video.
18025
18026       This filter accepts the following options:
18027
18028       first_field
18029           top, t
18030               top field first
18031
18032           bottom, b
18033               bottom field first The default value is "top".
18034
18035       pattern
18036           A string of numbers representing the pulldown pattern you wish to
18037           apply.  The default value is 23.
18038
18039               Some typical patterns:
18040
18041               NTSC output (30i):
18042               27.5p: 32222
18043               24p: 23 (classic)
18044               24p: 2332 (preferred)
18045               20p: 33
18046               18p: 334
18047               16p: 3444
18048
18049               PAL output (25i):
18050               27.5p: 12222
18051               24p: 222222222223 ("Euro pulldown")
18052               16.67p: 33
18053               16p: 33333334
18054
18055   thistogram
18056       Compute and draw a color distribution histogram for the input video
18057       across time.
18058
18059       Unlike histogram video filter which only shows histogram of single
18060       input frame at certain time, this filter shows also past histograms of
18061       number of frames defined by "width" option.
18062
18063       The computed histogram is a representation of the color component
18064       distribution in an image.
18065
18066       The filter accepts the following options:
18067
18068       width, w
18069           Set width of single color component output. Default value is 0.
18070           Value of 0 means width will be picked from input video.  This also
18071           set number of passed histograms to keep.  Allowed range is [0,
18072           8192].
18073
18074       display_mode, d
18075           Set display mode.  It accepts the following values:
18076
18077           stack
18078               Per color component graphs are placed below each other.
18079
18080           parade
18081               Per color component graphs are placed side by side.
18082
18083           overlay
18084               Presents information identical to that in the "parade", except
18085               that the graphs representing color components are superimposed
18086               directly over one another.
18087
18088           Default is "stack".
18089
18090       levels_mode, m
18091           Set mode. Can be either "linear", or "logarithmic".  Default is
18092           "linear".
18093
18094       components, c
18095           Set what color components to display.  Default is 7.
18096
18097       bgopacity, b
18098           Set background opacity. Default is 0.9.
18099
18100       envelope, e
18101           Show envelope. Default is disabled.
18102
18103       ecolor, ec
18104           Set envelope color. Default is "gold".
18105
18106       slide
18107           Set slide mode.
18108
18109           Available values for slide is:
18110
18111           frame
18112               Draw new frame when right border is reached.
18113
18114           replace
18115               Replace old columns with new ones.
18116
18117           scroll
18118               Scroll from right to left.
18119
18120           rscroll
18121               Scroll from left to right.
18122
18123           picture
18124               Draw single picture.
18125
18126           Default is "replace".
18127
18128   threshold
18129       Apply threshold effect to video stream.
18130
18131       This filter needs four video streams to perform thresholding.  First
18132       stream is stream we are filtering.  Second stream is holding threshold
18133       values, third stream is holding min values, and last, fourth stream is
18134       holding max values.
18135
18136       The filter accepts the following option:
18137
18138       planes
18139           Set which planes will be processed, unprocessed planes will be
18140           copied.  By default value 0xf, all planes will be processed.
18141
18142       For example if first stream pixel's component value is less then
18143       threshold value of pixel component from 2nd threshold stream, third
18144       stream value will picked, otherwise fourth stream pixel component value
18145       will be picked.
18146
18147       Using color source filter one can perform various types of
18148       thresholding:
18149
18150       Commands
18151
18152       This filter supports the all options as commands.
18153
18154       Examples
18155
18156       •   Binary threshold, using gray color as threshold:
18157
18158                   ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=black -f lavfi -i color=white -lavfi threshold output.avi
18159
18160       •   Inverted binary threshold, using gray color as threshold:
18161
18162                   ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -f lavfi -i color=black -lavfi threshold output.avi
18163
18164       •   Truncate binary threshold, using gray color as threshold:
18165
18166                   ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=gray -lavfi threshold output.avi
18167
18168       •   Threshold to zero, using gray color as threshold:
18169
18170                   ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -i 320x240.avi -lavfi threshold output.avi
18171
18172       •   Inverted threshold to zero, using gray color as threshold:
18173
18174                   ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=white -lavfi threshold output.avi
18175
18176   thumbnail
18177       Select the most representative frame in a given sequence of consecutive
18178       frames.
18179
18180       The filter accepts the following options:
18181
18182       n   Set the frames batch size to analyze; in a set of n frames, the
18183           filter will pick one of them, and then handle the next batch of n
18184           frames until the end. Default is 100.
18185
18186       Since the filter keeps track of the whole frames sequence, a bigger n
18187       value will result in a higher memory usage, so a high value is not
18188       recommended.
18189
18190       Examples
18191
18192       •   Extract one picture each 50 frames:
18193
18194                   thumbnail=50
18195
18196       •   Complete example of a thumbnail creation with ffmpeg:
18197
18198                   ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png
18199
18200   tile
18201       Tile several successive frames together.
18202
18203       The untile filter can do the reverse.
18204
18205       The filter accepts the following options:
18206
18207       layout
18208           Set the grid size (i.e. the number of lines and columns). For the
18209           syntax of this option, check the "Video size" section in the
18210           ffmpeg-utils manual.
18211
18212       nb_frames
18213           Set the maximum number of frames to render in the given area. It
18214           must be less than or equal to wxh. The default value is 0, meaning
18215           all the area will be used.
18216
18217       margin
18218           Set the outer border margin in pixels.
18219
18220       padding
18221           Set the inner border thickness (i.e. the number of pixels between
18222           frames). For more advanced padding options (such as having
18223           different values for the edges), refer to the pad video filter.
18224
18225       color
18226           Specify the color of the unused area. For the syntax of this
18227           option, check the "Color" section in the ffmpeg-utils manual.  The
18228           default value of color is "black".
18229
18230       overlap
18231           Set the number of frames to overlap when tiling several successive
18232           frames together.  The value must be between 0 and nb_frames - 1.
18233
18234       init_padding
18235           Set the number of frames to initially be empty before displaying
18236           first output frame.  This controls how soon will one get first
18237           output frame.  The value must be between 0 and nb_frames - 1.
18238
18239       Examples
18240
18241       •   Produce 8x8 PNG tiles of all keyframes (-skip_frame nokey) in a
18242           movie:
18243
18244                   ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
18245
18246           The -vsync 0 is necessary to prevent ffmpeg from duplicating each
18247           output frame to accommodate the originally detected frame rate.
18248
18249       •   Display 5 pictures in an area of "3x2" frames, with 7 pixels
18250           between them, and 2 pixels of initial margin, using mixed flat and
18251           named options:
18252
18253                   tile=3x2:nb_frames=5:padding=7:margin=2
18254
18255   tinterlace
18256       Perform various types of temporal field interlacing.
18257
18258       Frames are counted starting from 1, so the first input frame is
18259       considered odd.
18260
18261       The filter accepts the following options:
18262
18263       mode
18264           Specify the mode of the interlacing. This option can also be
18265           specified as a value alone. See below for a list of values for this
18266           option.
18267
18268           Available values are:
18269
18270           merge, 0
18271               Move odd frames into the upper field, even into the lower
18272               field, generating a double height frame at half frame rate.
18273
18274                        ------> time
18275                       Input:
18276                       Frame 1         Frame 2         Frame 3         Frame 4
18277
18278                       11111           22222           33333           44444
18279                       11111           22222           33333           44444
18280                       11111           22222           33333           44444
18281                       11111           22222           33333           44444
18282
18283                       Output:
18284                       11111                           33333
18285                       22222                           44444
18286                       11111                           33333
18287                       22222                           44444
18288                       11111                           33333
18289                       22222                           44444
18290                       11111                           33333
18291                       22222                           44444
18292
18293           drop_even, 1
18294               Only output odd frames, even frames are dropped, generating a
18295               frame with unchanged height at half frame rate.
18296
18297                        ------> time
18298                       Input:
18299                       Frame 1         Frame 2         Frame 3         Frame 4
18300
18301                       11111           22222           33333           44444
18302                       11111           22222           33333           44444
18303                       11111           22222           33333           44444
18304                       11111           22222           33333           44444
18305
18306                       Output:
18307                       11111                           33333
18308                       11111                           33333
18309                       11111                           33333
18310                       11111                           33333
18311
18312           drop_odd, 2
18313               Only output even frames, odd frames are dropped, generating a
18314               frame with unchanged height at half frame rate.
18315
18316                        ------> time
18317                       Input:
18318                       Frame 1         Frame 2         Frame 3         Frame 4
18319
18320                       11111           22222           33333           44444
18321                       11111           22222           33333           44444
18322                       11111           22222           33333           44444
18323                       11111           22222           33333           44444
18324
18325                       Output:
18326                                       22222                           44444
18327                                       22222                           44444
18328                                       22222                           44444
18329                                       22222                           44444
18330
18331           pad, 3
18332               Expand each frame to full height, but pad alternate lines with
18333               black, generating a frame with double height at the same input
18334               frame rate.
18335
18336                        ------> time
18337                       Input:
18338                       Frame 1         Frame 2         Frame 3         Frame 4
18339
18340                       11111           22222           33333           44444
18341                       11111           22222           33333           44444
18342                       11111           22222           33333           44444
18343                       11111           22222           33333           44444
18344
18345                       Output:
18346                       11111           .....           33333           .....
18347                       .....           22222           .....           44444
18348                       11111           .....           33333           .....
18349                       .....           22222           .....           44444
18350                       11111           .....           33333           .....
18351                       .....           22222           .....           44444
18352                       11111           .....           33333           .....
18353                       .....           22222           .....           44444
18354
18355           interleave_top, 4
18356               Interleave the upper field from odd frames with the lower field
18357               from even frames, generating a frame with unchanged height at
18358               half frame rate.
18359
18360                        ------> time
18361                       Input:
18362                       Frame 1         Frame 2         Frame 3         Frame 4
18363
18364                       11111<-         22222           33333<-         44444
18365                       11111           22222<-         33333           44444<-
18366                       11111<-         22222           33333<-         44444
18367                       11111           22222<-         33333           44444<-
18368
18369                       Output:
18370                       11111                           33333
18371                       22222                           44444
18372                       11111                           33333
18373                       22222                           44444
18374
18375           interleave_bottom, 5
18376               Interleave the lower field from odd frames with the upper field
18377               from even frames, generating a frame with unchanged height at
18378               half frame rate.
18379
18380                        ------> time
18381                       Input:
18382                       Frame 1         Frame 2         Frame 3         Frame 4
18383
18384                       11111           22222<-         33333           44444<-
18385                       11111<-         22222           33333<-         44444
18386                       11111           22222<-         33333           44444<-
18387                       11111<-         22222           33333<-         44444
18388
18389                       Output:
18390                       22222                           44444
18391                       11111                           33333
18392                       22222                           44444
18393                       11111                           33333
18394
18395           interlacex2, 6
18396               Double frame rate with unchanged height. Frames are inserted
18397               each containing the second temporal field from the previous
18398               input frame and the first temporal field from the next input
18399               frame. This mode relies on the top_field_first flag. Useful for
18400               interlaced video displays with no field synchronisation.
18401
18402                        ------> time
18403                       Input:
18404                       Frame 1         Frame 2         Frame 3         Frame 4
18405
18406                       11111           22222           33333           44444
18407                        11111           22222           33333           44444
18408                       11111           22222           33333           44444
18409                        11111           22222           33333           44444
18410
18411                       Output:
18412                       11111   22222   22222   33333   33333   44444   44444
18413                        11111   11111   22222   22222   33333   33333   44444
18414                       11111   22222   22222   33333   33333   44444   44444
18415                        11111   11111   22222   22222   33333   33333   44444
18416
18417           mergex2, 7
18418               Move odd frames into the upper field, even into the lower
18419               field, generating a double height frame at same frame rate.
18420
18421                        ------> time
18422                       Input:
18423                       Frame 1         Frame 2         Frame 3         Frame 4
18424
18425                       11111           22222           33333           44444
18426                       11111           22222           33333           44444
18427                       11111           22222           33333           44444
18428                       11111           22222           33333           44444
18429
18430                       Output:
18431                       11111           33333           33333           55555
18432                       22222           22222           44444           44444
18433                       11111           33333           33333           55555
18434                       22222           22222           44444           44444
18435                       11111           33333           33333           55555
18436                       22222           22222           44444           44444
18437                       11111           33333           33333           55555
18438                       22222           22222           44444           44444
18439
18440           Numeric values are deprecated but are accepted for backward
18441           compatibility reasons.
18442
18443           Default mode is "merge".
18444
18445       flags
18446           Specify flags influencing the filter process.
18447
18448           Available value for flags is:
18449
18450           low_pass_filter, vlpf
18451               Enable linear vertical low-pass filtering in the filter.
18452               Vertical low-pass filtering is required when creating an
18453               interlaced destination from a progressive source which contains
18454               high-frequency vertical detail. Filtering will reduce interlace
18455               'twitter' and Moire patterning.
18456
18457           complex_filter, cvlpf
18458               Enable complex vertical low-pass filtering.  This will slightly
18459               less reduce interlace 'twitter' and Moire patterning but better
18460               retain detail and subjective sharpness impression.
18461
18462           bypass_il
18463               Bypass already interlaced frames, only adjust the frame rate.
18464
18465           Vertical low-pass filtering and bypassing already interlaced frames
18466           can only be enabled for mode interleave_top and interleave_bottom.
18467
18468   tmedian
18469       Pick median pixels from several successive input video frames.
18470
18471       The filter accepts the following options:
18472
18473       radius
18474           Set radius of median filter.  Default is 1. Allowed range is from 1
18475           to 127.
18476
18477       planes
18478           Set which planes to filter. Default value is 15, by which all
18479           planes are processed.
18480
18481       percentile
18482           Set median percentile. Default value is 0.5.  Default value of 0.5
18483           will pick always median values, while 0 will pick minimum values,
18484           and 1 maximum values.
18485
18486       Commands
18487
18488       This filter supports all above options as commands, excluding option
18489       "radius".
18490
18491   tmidequalizer
18492       Apply Temporal Midway Video Equalization effect.
18493
18494       Midway Video Equalization adjusts a sequence of video frames to have
18495       the same histograms, while maintaining their dynamics as much as
18496       possible. It's useful for e.g. matching exposures from a video frames
18497       sequence.
18498
18499       This filter accepts the following option:
18500
18501       radius
18502           Set filtering radius. Default is 5. Allowed range is from 1 to 127.
18503
18504       sigma
18505           Set filtering sigma. Default is 0.5. This controls strength of
18506           filtering.  Setting this option to 0 effectively does nothing.
18507
18508       planes
18509           Set which planes to process. Default is 15, which is all available
18510           planes.
18511
18512   tmix
18513       Mix successive video frames.
18514
18515       A description of the accepted options follows.
18516
18517       frames
18518           The number of successive frames to mix. If unspecified, it defaults
18519           to 3.
18520
18521       weights
18522           Specify weight of each input video frame.  Each weight is separated
18523           by space. If number of weights is smaller than number of frames
18524           last specified weight will be used for all remaining unset weights.
18525
18526       scale
18527           Specify scale, if it is set it will be multiplied with sum of each
18528           weight multiplied with pixel values to give final destination pixel
18529           value. By default scale is auto scaled to sum of weights.
18530
18531       Examples
18532
18533       •   Average 7 successive frames:
18534
18535                   tmix=frames=7:weights="1 1 1 1 1 1 1"
18536
18537       •   Apply simple temporal convolution:
18538
18539                   tmix=frames=3:weights="-1 3 -1"
18540
18541       •   Similar as above but only showing temporal differences:
18542
18543                   tmix=frames=3:weights="-1 2 -1":scale=1
18544
18545       Commands
18546
18547       This filter supports the following commands:
18548
18549       weights
18550       scale
18551           Syntax is same as option with same name.
18552
18553   tonemap
18554       Tone map colors from different dynamic ranges.
18555
18556       This filter expects data in single precision floating point, as it
18557       needs to operate on (and can output) out-of-range values. Another
18558       filter, such as zscale, is needed to convert the resulting frame to a
18559       usable format.
18560
18561       The tonemapping algorithms implemented only work on linear light, so
18562       input data should be linearized beforehand (and possibly correctly
18563       tagged).
18564
18565               ffmpeg -i INPUT -vf zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p OUTPUT
18566
18567       Options
18568
18569       The filter accepts the following options.
18570
18571       tonemap
18572           Set the tone map algorithm to use.
18573
18574           Possible values are:
18575
18576           none
18577               Do not apply any tone map, only desaturate overbright pixels.
18578
18579           clip
18580               Hard-clip any out-of-range values. Use it for perfect color
18581               accuracy for in-range values, while distorting out-of-range
18582               values.
18583
18584           linear
18585               Stretch the entire reference gamut to a linear multiple of the
18586               display.
18587
18588           gamma
18589               Fit a logarithmic transfer between the tone curves.
18590
18591           reinhard
18592               Preserve overall image brightness with a simple curve, using
18593               nonlinear contrast, which results in flattening details and
18594               degrading color accuracy.
18595
18596           hable
18597               Preserve both dark and bright details better than reinhard, at
18598               the cost of slightly darkening everything. Use it when detail
18599               preservation is more important than color and brightness
18600               accuracy.
18601
18602           mobius
18603               Smoothly map out-of-range values, while retaining contrast and
18604               colors for in-range material as much as possible. Use it when
18605               color accuracy is more important than detail preservation.
18606
18607           Default is none.
18608
18609       param
18610           Tune the tone mapping algorithm.
18611
18612           This affects the following algorithms:
18613
18614           none
18615               Ignored.
18616
18617           linear
18618               Specifies the scale factor to use while stretching.  Default to
18619               1.0.
18620
18621           gamma
18622               Specifies the exponent of the function.  Default to 1.8.
18623
18624           clip
18625               Specify an extra linear coefficient to multiply into the signal
18626               before clipping.  Default to 1.0.
18627
18628           reinhard
18629               Specify the local contrast coefficient at the display peak.
18630               Default to 0.5, which means that in-gamut values will be about
18631               half as bright as when clipping.
18632
18633           hable
18634               Ignored.
18635
18636           mobius
18637               Specify the transition point from linear to mobius transform.
18638               Every value below this point is guaranteed to be mapped 1:1.
18639               The higher the value, the more accurate the result will be, at
18640               the cost of losing bright details.  Default to 0.3, which due
18641               to the steep initial slope still preserves in-range colors
18642               fairly accurately.
18643
18644       desat
18645           Apply desaturation for highlights that exceed this level of
18646           brightness. The higher the parameter, the more color information
18647           will be preserved. This setting helps prevent unnaturally blown-out
18648           colors for super-highlights, by (smoothly) turning into white
18649           instead. This makes images feel more natural, at the cost of
18650           reducing information about out-of-range colors.
18651
18652           The default of 2.0 is somewhat conservative and will mostly just
18653           apply to skies or directly sunlit surfaces. A setting of 0.0
18654           disables this option.
18655
18656           This option works only if the input frame has a supported color
18657           tag.
18658
18659       peak
18660           Override signal/nominal/reference peak with this value. Useful when
18661           the embedded peak information in display metadata is not reliable
18662           or when tone mapping from a lower range to a higher range.
18663
18664   tpad
18665       Temporarily pad video frames.
18666
18667       The filter accepts the following options:
18668
18669       start
18670           Specify number of delay frames before input video stream. Default
18671           is 0.
18672
18673       stop
18674           Specify number of padding frames after input video stream.  Set to
18675           -1 to pad indefinitely. Default is 0.
18676
18677       start_mode
18678           Set kind of frames added to beginning of stream.  Can be either add
18679           or clone.  With add frames of solid-color are added.  With clone
18680           frames are clones of first frame.  Default is add.
18681
18682       stop_mode
18683           Set kind of frames added to end of stream.  Can be either add or
18684           clone.  With add frames of solid-color are added.  With clone
18685           frames are clones of last frame.  Default is add.
18686
18687       start_duration, stop_duration
18688           Specify the duration of the start/stop delay. See the Time duration
18689           section in the ffmpeg-utils(1) manual for the accepted syntax.
18690           These options override start and stop. Default is 0.
18691
18692       color
18693           Specify the color of the padded area. For the syntax of this
18694           option, check the "Color" section in the ffmpeg-utils manual.
18695
18696           The default value of color is "black".
18697
18698   transpose
18699       Transpose rows with columns in the input video and optionally flip it.
18700
18701       It accepts the following parameters:
18702
18703       dir Specify the transposition direction.
18704
18705           Can assume the following values:
18706
18707           0, 4, cclock_flip
18708               Rotate by 90 degrees counterclockwise and vertically flip
18709               (default), that is:
18710
18711                       L.R     L.l
18712                       . . ->  . .
18713                       l.r     R.r
18714
18715           1, 5, clock
18716               Rotate by 90 degrees clockwise, that is:
18717
18718                       L.R     l.L
18719                       . . ->  . .
18720                       l.r     r.R
18721
18722           2, 6, cclock
18723               Rotate by 90 degrees counterclockwise, that is:
18724
18725                       L.R     R.r
18726                       . . ->  . .
18727                       l.r     L.l
18728
18729           3, 7, clock_flip
18730               Rotate by 90 degrees clockwise and vertically flip, that is:
18731
18732                       L.R     r.R
18733                       . . ->  . .
18734                       l.r     l.L
18735
18736           For values between 4-7, the transposition is only done if the input
18737           video geometry is portrait and not landscape. These values are
18738           deprecated, the "passthrough" option should be used instead.
18739
18740           Numerical values are deprecated, and should be dropped in favor of
18741           symbolic constants.
18742
18743       passthrough
18744           Do not apply the transposition if the input geometry matches the
18745           one specified by the specified value. It accepts the following
18746           values:
18747
18748           none
18749               Always apply transposition.
18750
18751           portrait
18752               Preserve portrait geometry (when height >= width).
18753
18754           landscape
18755               Preserve landscape geometry (when width >= height).
18756
18757           Default value is "none".
18758
18759       For example to rotate by 90 degrees clockwise and preserve portrait
18760       layout:
18761
18762               transpose=dir=1:passthrough=portrait
18763
18764       The command above can also be specified as:
18765
18766               transpose=1:portrait
18767
18768   transpose_npp
18769       Transpose rows with columns in the input video and optionally flip it.
18770       For more in depth examples see the transpose video filter, which shares
18771       mostly the same options.
18772
18773       It accepts the following parameters:
18774
18775       dir Specify the transposition direction.
18776
18777           Can assume the following values:
18778
18779           cclock_flip
18780               Rotate by 90 degrees counterclockwise and vertically flip.
18781               (default)
18782
18783           clock
18784               Rotate by 90 degrees clockwise.
18785
18786           cclock
18787               Rotate by 90 degrees counterclockwise.
18788
18789           clock_flip
18790               Rotate by 90 degrees clockwise and vertically flip.
18791
18792       passthrough
18793           Do not apply the transposition if the input geometry matches the
18794           one specified by the specified value. It accepts the following
18795           values:
18796
18797           none
18798               Always apply transposition. (default)
18799
18800           portrait
18801               Preserve portrait geometry (when height >= width).
18802
18803           landscape
18804               Preserve landscape geometry (when width >= height).
18805
18806   trim
18807       Trim the input so that the output contains one continuous subpart of
18808       the input.
18809
18810       It accepts the following parameters:
18811
18812       start
18813           Specify the time of the start of the kept section, i.e. the frame
18814           with the timestamp start will be the first frame in the output.
18815
18816       end Specify the time of the first frame that will be dropped, i.e. the
18817           frame immediately preceding the one with the timestamp end will be
18818           the last frame in the output.
18819
18820       start_pts
18821           This is the same as start, except this option sets the start
18822           timestamp in timebase units instead of seconds.
18823
18824       end_pts
18825           This is the same as end, except this option sets the end timestamp
18826           in timebase units instead of seconds.
18827
18828       duration
18829           The maximum duration of the output in seconds.
18830
18831       start_frame
18832           The number of the first frame that should be passed to the output.
18833
18834       end_frame
18835           The number of the first frame that should be dropped.
18836
18837       start, end, and duration are expressed as time duration specifications;
18838       see the Time duration section in the ffmpeg-utils(1) manual for the
18839       accepted syntax.
18840
18841       Note that the first two sets of the start/end options and the duration
18842       option look at the frame timestamp, while the _frame variants simply
18843       count the frames that pass through the filter. Also note that this
18844       filter does not modify the timestamps. If you wish for the output
18845       timestamps to start at zero, insert a setpts filter after the trim
18846       filter.
18847
18848       If multiple start or end options are set, this filter tries to be
18849       greedy and keep all the frames that match at least one of the specified
18850       constraints. To keep only the part that matches all the constraints at
18851       once, chain multiple trim filters.
18852
18853       The defaults are such that all the input is kept. So it is possible to
18854       set e.g.  just the end values to keep everything before the specified
18855       time.
18856
18857       Examples:
18858
18859       •   Drop everything except the second minute of input:
18860
18861                   ffmpeg -i INPUT -vf trim=60:120
18862
18863       •   Keep only the first second:
18864
18865                   ffmpeg -i INPUT -vf trim=duration=1
18866
18867   unpremultiply
18868       Apply alpha unpremultiply effect to input video stream using first
18869       plane of second stream as alpha.
18870
18871       Both streams must have same dimensions and same pixel format.
18872
18873       The filter accepts the following option:
18874
18875       planes
18876           Set which planes will be processed, unprocessed planes will be
18877           copied.  By default value 0xf, all planes will be processed.
18878
18879           If the format has 1 or 2 components, then luma is bit 0.  If the
18880           format has 3 or 4 components: for RGB formats bit 0 is green, bit 1
18881           is blue and bit 2 is red; for YUV formats bit 0 is luma, bit 1 is
18882           chroma-U and bit 2 is chroma-V.  If present, the alpha channel is
18883           always the last bit.
18884
18885       inplace
18886           Do not require 2nd input for processing, instead use alpha plane
18887           from input stream.
18888
18889   unsharp
18890       Sharpen or blur the input video.
18891
18892       It accepts the following parameters:
18893
18894       luma_msize_x, lx
18895           Set the luma matrix horizontal size. It must be an odd integer
18896           between 3 and 23. The default value is 5.
18897
18898       luma_msize_y, ly
18899           Set the luma matrix vertical size. It must be an odd integer
18900           between 3 and 23. The default value is 5.
18901
18902       luma_amount, la
18903           Set the luma effect strength. It must be a floating point number,
18904           reasonable values lay between -1.5 and 1.5.
18905
18906           Negative values will blur the input video, while positive values
18907           will sharpen it, a value of zero will disable the effect.
18908
18909           Default value is 1.0.
18910
18911       chroma_msize_x, cx
18912           Set the chroma matrix horizontal size. It must be an odd integer
18913           between 3 and 23. The default value is 5.
18914
18915       chroma_msize_y, cy
18916           Set the chroma matrix vertical size. It must be an odd integer
18917           between 3 and 23. The default value is 5.
18918
18919       chroma_amount, ca
18920           Set the chroma effect strength. It must be a floating point number,
18921           reasonable values lay between -1.5 and 1.5.
18922
18923           Negative values will blur the input video, while positive values
18924           will sharpen it, a value of zero will disable the effect.
18925
18926           Default value is 0.0.
18927
18928       All parameters are optional and default to the equivalent of the string
18929       '5:5:1.0:5:5:0.0'.
18930
18931       Examples
18932
18933       •   Apply strong luma sharpen effect:
18934
18935                   unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5
18936
18937       •   Apply a strong blur of both luma and chroma parameters:
18938
18939                   unsharp=7:7:-2:7:7:-2
18940
18941   untile
18942       Decompose a video made of tiled images into the individual images.
18943
18944       The frame rate of the output video is the frame rate of the input video
18945       multiplied by the number of tiles.
18946
18947       This filter does the reverse of tile.
18948
18949       The filter accepts the following options:
18950
18951       layout
18952           Set the grid size (i.e. the number of lines and columns). For the
18953           syntax of this option, check the "Video size" section in the
18954           ffmpeg-utils manual.
18955
18956       Examples
18957
18958       •   Produce a 1-second video from a still image file made of 25 frames
18959           stacked vertically, like an analogic film reel:
18960
18961                   ffmpeg -r 1 -i image.jpg -vf untile=1x25 movie.mkv
18962
18963   uspp
18964       Apply ultra slow/simple postprocessing filter that compresses and
18965       decompresses the image at several (or - in the case of quality level 8
18966       - all) shifts and average the results.
18967
18968       The way this differs from the behavior of spp is that uspp actually
18969       encodes & decodes each case with libavcodec Snow, whereas spp uses a
18970       simplified intra only 8x8 DCT similar to MJPEG.
18971
18972       This filter is only available in ffmpeg version 4.4 or earlier.
18973
18974       The filter accepts the following options:
18975
18976       quality
18977           Set quality. This option defines the number of levels for
18978           averaging. It accepts an integer in the range 0-8. If set to 0, the
18979           filter will have no effect. A value of 8 means the higher quality.
18980           For each increment of that value the speed drops by a factor of
18981           approximately 2.  Default value is 3.
18982
18983       qp  Force a constant quantization parameter. If not set, the filter
18984           will use the QP from the video stream (if available).
18985
18986   v360
18987       Convert 360 videos between various formats.
18988
18989       The filter accepts the following options:
18990
18991       input
18992       output
18993           Set format of the input/output video.
18994
18995           Available formats:
18996
18997           e
18998           equirect
18999               Equirectangular projection.
19000
19001           c3x2
19002           c6x1
19003           c1x6
19004               Cubemap with 3x2/6x1/1x6 layout.
19005
19006               Format specific options:
19007
19008               in_pad
19009               out_pad
19010                   Set padding proportion for the input/output cubemap. Values
19011                   in decimals.
19012
19013                   Example values:
19014
19015                   0   No padding.
19016
19017                   0.01
19018                       1% of face is padding. For example, with 1920x1280
19019                       resolution face size would be 640x640 and padding would
19020                       be 3 pixels from each side. (640 * 0.01 = 6 pixels)
19021
19022                   Default value is @samp{0}.  Maximum value is @samp{0.1}.
19023
19024               fin_pad
19025               fout_pad
19026                   Set fixed padding for the input/output cubemap. Values in
19027                   pixels.
19028
19029                   Default value is @samp{0}. If greater than zero it
19030                   overrides other padding options.
19031
19032               in_forder
19033               out_forder
19034                   Set order of faces for the input/output cubemap. Choose one
19035                   direction for each position.
19036
19037                   Designation of directions:
19038
19039                   r   right
19040
19041                   l   left
19042
19043                   u   up
19044
19045                   d   down
19046
19047                   f   forward
19048
19049                   b   back
19050
19051                   Default value is @samp{rludfb}.
19052
19053               in_frot
19054               out_frot
19055                   Set rotation of faces for the input/output cubemap. Choose
19056                   one angle for each position.
19057
19058                   Designation of angles:
19059
19060                   0   0 degrees clockwise
19061
19062                   1   90 degrees clockwise
19063
19064                   2   180 degrees clockwise
19065
19066                   3   270 degrees clockwise
19067
19068                   Default value is @samp{000000}.
19069
19070           eac Equi-Angular Cubemap.
19071
19072           flat
19073           gnomonic
19074           rectilinear
19075               Regular video.
19076
19077               Format specific options:
19078
19079               h_fov
19080               v_fov
19081               d_fov
19082                   Set output horizontal/vertical/diagonal field of view.
19083                   Values in degrees.
19084
19085                   If diagonal field of view is set it overrides horizontal
19086                   and vertical field of view.
19087
19088               ih_fov
19089               iv_fov
19090               id_fov
19091                   Set input horizontal/vertical/diagonal field of view.
19092                   Values in degrees.
19093
19094                   If diagonal field of view is set it overrides horizontal
19095                   and vertical field of view.
19096
19097           dfisheye
19098               Dual fisheye.
19099
19100               Format specific options:
19101
19102               h_fov
19103               v_fov
19104               d_fov
19105                   Set output horizontal/vertical/diagonal field of view.
19106                   Values in degrees.
19107
19108                   If diagonal field of view is set it overrides horizontal
19109                   and vertical field of view.
19110
19111               ih_fov
19112               iv_fov
19113               id_fov
19114                   Set input horizontal/vertical/diagonal field of view.
19115                   Values in degrees.
19116
19117                   If diagonal field of view is set it overrides horizontal
19118                   and vertical field of view.
19119
19120           barrel
19121           fb
19122           barrelsplit
19123               Facebook's 360 formats.
19124
19125           sg  Stereographic format.
19126
19127               Format specific options:
19128
19129               h_fov
19130               v_fov
19131               d_fov
19132                   Set output horizontal/vertical/diagonal field of view.
19133                   Values in degrees.
19134
19135                   If diagonal field of view is set it overrides horizontal
19136                   and vertical field of view.
19137
19138               ih_fov
19139               iv_fov
19140               id_fov
19141                   Set input horizontal/vertical/diagonal field of view.
19142                   Values in degrees.
19143
19144                   If diagonal field of view is set it overrides horizontal
19145                   and vertical field of view.
19146
19147           mercator
19148               Mercator format.
19149
19150           ball
19151               Ball format, gives significant distortion toward the back.
19152
19153           hammer
19154               Hammer-Aitoff map projection format.
19155
19156           sinusoidal
19157               Sinusoidal map projection format.
19158
19159           fisheye
19160               Fisheye projection.
19161
19162               Format specific options:
19163
19164               h_fov
19165               v_fov
19166               d_fov
19167                   Set output horizontal/vertical/diagonal field of view.
19168                   Values in degrees.
19169
19170                   If diagonal field of view is set it overrides horizontal
19171                   and vertical field of view.
19172
19173               ih_fov
19174               iv_fov
19175               id_fov
19176                   Set input horizontal/vertical/diagonal field of view.
19177                   Values in degrees.
19178
19179                   If diagonal field of view is set it overrides horizontal
19180                   and vertical field of view.
19181
19182           pannini
19183               Pannini projection.
19184
19185               Format specific options:
19186
19187               h_fov
19188                   Set output pannini parameter.
19189
19190               ih_fov
19191                   Set input pannini parameter.
19192
19193           cylindrical
19194               Cylindrical projection.
19195
19196               Format specific options:
19197
19198               h_fov
19199               v_fov
19200               d_fov
19201                   Set output horizontal/vertical/diagonal field of view.
19202                   Values in degrees.
19203
19204                   If diagonal field of view is set it overrides horizontal
19205                   and vertical field of view.
19206
19207               ih_fov
19208               iv_fov
19209               id_fov
19210                   Set input horizontal/vertical/diagonal field of view.
19211                   Values in degrees.
19212
19213                   If diagonal field of view is set it overrides horizontal
19214                   and vertical field of view.
19215
19216           perspective
19217               Perspective projection. (output only)
19218
19219               Format specific options:
19220
19221               v_fov
19222                   Set perspective parameter.
19223
19224           tetrahedron
19225               Tetrahedron projection.
19226
19227           tsp Truncated square pyramid projection.
19228
19229           he
19230           hequirect
19231               Half equirectangular projection.
19232
19233           equisolid
19234               Equisolid format.
19235
19236               Format specific options:
19237
19238               h_fov
19239               v_fov
19240               d_fov
19241                   Set output horizontal/vertical/diagonal field of view.
19242                   Values in degrees.
19243
19244                   If diagonal field of view is set it overrides horizontal
19245                   and vertical field of view.
19246
19247               ih_fov
19248               iv_fov
19249               id_fov
19250                   Set input horizontal/vertical/diagonal field of view.
19251                   Values in degrees.
19252
19253                   If diagonal field of view is set it overrides horizontal
19254                   and vertical field of view.
19255
19256           og  Orthographic format.
19257
19258               Format specific options:
19259
19260               h_fov
19261               v_fov
19262               d_fov
19263                   Set output horizontal/vertical/diagonal field of view.
19264                   Values in degrees.
19265
19266                   If diagonal field of view is set it overrides horizontal
19267                   and vertical field of view.
19268
19269               ih_fov
19270               iv_fov
19271               id_fov
19272                   Set input horizontal/vertical/diagonal field of view.
19273                   Values in degrees.
19274
19275                   If diagonal field of view is set it overrides horizontal
19276                   and vertical field of view.
19277
19278           octahedron
19279               Octahedron projection.
19280
19281           cylindricalea
19282               Cylindrical Equal Area projection.
19283
19284       interp
19285           Set interpolation method.Note: more complex interpolation methods
19286           require much more memory to run.
19287
19288           Available methods:
19289
19290           near
19291           nearest
19292               Nearest neighbour.
19293
19294           line
19295           linear
19296               Bilinear interpolation.
19297
19298           lagrange9
19299               Lagrange9 interpolation.
19300
19301           cube
19302           cubic
19303               Bicubic interpolation.
19304
19305           lanc
19306           lanczos
19307               Lanczos interpolation.
19308
19309           sp16
19310           spline16
19311               Spline16 interpolation.
19312
19313           gauss
19314           gaussian
19315               Gaussian interpolation.
19316
19317           mitchell
19318               Mitchell interpolation.
19319
19320           Default value is @samp{line}.
19321
19322       w
19323       h   Set the output video resolution.
19324
19325           Default resolution depends on formats.
19326
19327       in_stereo
19328       out_stereo
19329           Set the input/output stereo format.
19330
19331           2d  2D mono
19332
19333           sbs Side by side
19334
19335           tb  Top bottom
19336
19337           Default value is @samp{2d} for input and output format.
19338
19339       yaw
19340       pitch
19341       roll
19342           Set rotation for the output video. Values in degrees.
19343
19344       rorder
19345           Set rotation order for the output video. Choose one item for each
19346           position.
19347
19348           y, Y
19349               yaw
19350
19351           p, P
19352               pitch
19353
19354           r, R
19355               roll
19356
19357           Default value is @samp{ypr}.
19358
19359       h_flip
19360       v_flip
19361       d_flip
19362           Flip the output video horizontally(swaps
19363           left-right)/vertically(swaps up-down)/in-depth(swaps back-forward).
19364           Boolean values.
19365
19366       ih_flip
19367       iv_flip
19368           Set if input video is flipped horizontally/vertically. Boolean
19369           values.
19370
19371       in_trans
19372           Set if input video is transposed. Boolean value, by default
19373           disabled.
19374
19375       out_trans
19376           Set if output video needs to be transposed. Boolean value, by
19377           default disabled.
19378
19379       h_offset
19380       v_offset
19381           Set output horizontal/vertical off-axis offset. Default is set to
19382           0.  Allowed range is from -1 to 1.
19383
19384       alpha_mask
19385           Build mask in alpha plane for all unmapped pixels by marking them
19386           fully transparent. Boolean value, by default disabled.
19387
19388       reset_rot
19389           Reset rotation of output video. Boolean value, by default disabled.
19390
19391       Examples
19392
19393       •   Convert equirectangular video to cubemap with 3x2 layout and 1%
19394           padding using bicubic interpolation:
19395
19396                   ffmpeg -i input.mkv -vf v360=e:c3x2:cubic:out_pad=0.01 output.mkv
19397
19398       •   Extract back view of Equi-Angular Cubemap:
19399
19400                   ffmpeg -i input.mkv -vf v360=eac:flat:yaw=180 output.mkv
19401
19402       •   Convert transposed and horizontally flipped Equi-Angular Cubemap in
19403           side-by-side stereo format to equirectangular top-bottom stereo
19404           format:
19405
19406                   v360=eac:equirect:in_stereo=sbs:in_trans=1:ih_flip=1:out_stereo=tb
19407
19408       Commands
19409
19410       This filter supports subset of above options as commands.
19411
19412   vaguedenoiser
19413       Apply a wavelet based denoiser.
19414
19415       It transforms each frame from the video input into the wavelet domain,
19416       using Cohen-Daubechies-Feauveau 9/7. Then it applies some filtering to
19417       the obtained coefficients. It does an inverse wavelet transform after.
19418       Due to wavelet properties, it should give a nice smoothed result, and
19419       reduced noise, without blurring picture features.
19420
19421       This filter accepts the following options:
19422
19423       threshold
19424           The filtering strength. The higher, the more filtered the video
19425           will be.  Hard thresholding can use a higher threshold than soft
19426           thresholding before the video looks overfiltered. Default value is
19427           2.
19428
19429       method
19430           The filtering method the filter will use.
19431
19432           It accepts the following values:
19433
19434           hard
19435               All values under the threshold will be zeroed.
19436
19437           soft
19438               All values under the threshold will be zeroed. All values above
19439               will be reduced by the threshold.
19440
19441           garrote
19442               Scales or nullifies coefficients - intermediary between (more)
19443               soft and (less) hard thresholding.
19444
19445           Default is garrote.
19446
19447       nsteps
19448           Number of times, the wavelet will decompose the picture. Picture
19449           can't be decomposed beyond a particular point (typically, 8 for a
19450           640x480 frame - as 2^9 = 512 > 480). Valid values are integers
19451           between 1 and 32. Default value is 6.
19452
19453       percent
19454           Partial of full denoising (limited coefficients shrinking), from 0
19455           to 100. Default value is 85.
19456
19457       planes
19458           A list of the planes to process. By default all planes are
19459           processed.
19460
19461       type
19462           The threshold type the filter will use.
19463
19464           It accepts the following values:
19465
19466           universal
19467               Threshold used is same for all decompositions.
19468
19469           bayes
19470               Threshold used depends also on each decomposition coefficients.
19471
19472           Default is universal.
19473
19474   varblur
19475       Apply variable blur filter by using 2nd video stream to set blur
19476       radius.  The 2nd stream must have the same dimensions.
19477
19478       This filter accepts the following options:
19479
19480       min_r
19481           Set min allowed radius. Allowed range is from 0 to 254. Default is
19482           0.
19483
19484       max_r
19485           Set max allowed radius. Allowed range is from 1 to 255. Default is
19486           8.
19487
19488       planes
19489           Set which planes to process. By default, all are used.
19490
19491       The "varblur" filter also supports the framesync options.
19492
19493       Commands
19494
19495       This filter supports all the above options as commands.
19496
19497   vectorscope
19498       Display 2 color component values in the two dimensional graph (which is
19499       called a vectorscope).
19500
19501       This filter accepts the following options:
19502
19503       mode, m
19504           Set vectorscope mode.
19505
19506           It accepts the following values:
19507
19508           gray
19509           tint
19510               Gray values are displayed on graph, higher brightness means
19511               more pixels have same component color value on location in
19512               graph. This is the default mode.
19513
19514           color
19515               Gray values are displayed on graph. Surrounding pixels values
19516               which are not present in video frame are drawn in gradient of 2
19517               color components which are set by option "x" and "y". The 3rd
19518               color component is static.
19519
19520           color2
19521               Actual color components values present in video frame are
19522               displayed on graph.
19523
19524           color3
19525               Similar as color2 but higher frequency of same values "x" and
19526               "y" on graph increases value of another color component, which
19527               is luminance by default values of "x" and "y".
19528
19529           color4
19530               Actual colors present in video frame are displayed on graph. If
19531               two different colors map to same position on graph then color
19532               with higher value of component not present in graph is picked.
19533
19534           color5
19535               Gray values are displayed on graph. Similar to "color" but with
19536               3rd color component picked from radial gradient.
19537
19538       x   Set which color component will be represented on X-axis. Default is
19539           1.
19540
19541       y   Set which color component will be represented on Y-axis. Default is
19542           2.
19543
19544       intensity, i
19545           Set intensity, used by modes: gray, color, color3 and color5 for
19546           increasing brightness of color component which represents frequency
19547           of (X, Y) location in graph.
19548
19549       envelope, e
19550           none
19551               No envelope, this is default.
19552
19553           instant
19554               Instant envelope, even darkest single pixel will be clearly
19555               highlighted.
19556
19557           peak
19558               Hold maximum and minimum values presented in graph over time.
19559               This way you can still spot out of range values without
19560               constantly looking at vectorscope.
19561
19562           peak+instant
19563               Peak and instant envelope combined together.
19564
19565       graticule, g
19566           Set what kind of graticule to draw.
19567
19568           none
19569           green
19570           color
19571           invert
19572       opacity, o
19573           Set graticule opacity.
19574
19575       flags, f
19576           Set graticule flags.
19577
19578           white
19579               Draw graticule for white point.
19580
19581           black
19582               Draw graticule for black point.
19583
19584           name
19585               Draw color points short names.
19586
19587       bgopacity, b
19588           Set background opacity.
19589
19590       lthreshold, l
19591           Set low threshold for color component not represented on X or Y
19592           axis.  Values lower than this value will be ignored. Default is 0.
19593           Note this value is multiplied with actual max possible value one
19594           pixel component can have. So for 8-bit input and low threshold
19595           value of 0.1 actual threshold is 0.1 * 255 = 25.
19596
19597       hthreshold, h
19598           Set high threshold for color component not represented on X or Y
19599           axis.  Values higher than this value will be ignored. Default is 1.
19600           Note this value is multiplied with actual max possible value one
19601           pixel component can have. So for 8-bit input and high threshold
19602           value of 0.9 actual threshold is 0.9 * 255 = 230.
19603
19604       colorspace, c
19605           Set what kind of colorspace to use when drawing graticule.
19606
19607           auto
19608           601
19609           709
19610
19611           Default is auto.
19612
19613       tint0, t0
19614       tint1, t1
19615           Set color tint for gray/tint vectorscope mode. By default both
19616           options are zero.  This means no tint, and output will remain gray.
19617
19618   vidstabdetect
19619       Analyze video stabilization/deshaking. Perform pass 1 of 2, see
19620       vidstabtransform for pass 2.
19621
19622       This filter generates a file with relative translation and rotation
19623       transform information about subsequent frames, which is then used by
19624       the vidstabtransform filter.
19625
19626       To enable compilation of this filter you need to configure FFmpeg with
19627       "--enable-libvidstab".
19628
19629       This filter accepts the following options:
19630
19631       result
19632           Set the path to the file used to write the transforms information.
19633           Default value is transforms.trf.
19634
19635       shakiness
19636           Set how shaky the video is and how quick the camera is. It accepts
19637           an integer in the range 1-10, a value of 1 means little shakiness,
19638           a value of 10 means strong shakiness. Default value is 5.
19639
19640       accuracy
19641           Set the accuracy of the detection process. It must be a value in
19642           the range 1-15. A value of 1 means low accuracy, a value of 15
19643           means high accuracy. Default value is 15.
19644
19645       stepsize
19646           Set stepsize of the search process. The region around minimum is
19647           scanned with 1 pixel resolution. Default value is 6.
19648
19649       mincontrast
19650           Set minimum contrast. Below this value a local measurement field is
19651           discarded. Must be a floating point value in the range 0-1. Default
19652           value is 0.3.
19653
19654       tripod
19655           Set reference frame number for tripod mode.
19656
19657           If enabled, the motion of the frames is compared to a reference
19658           frame in the filtered stream, identified by the specified number.
19659           The idea is to compensate all movements in a more-or-less static
19660           scene and keep the camera view absolutely still.
19661
19662           If set to 0, it is disabled. The frames are counted starting from
19663           1.
19664
19665       show
19666           Show fields and transforms in the resulting frames. It accepts an
19667           integer in the range 0-2. Default value is 0, which disables any
19668           visualization.
19669
19670       Examples
19671
19672       •   Use default values:
19673
19674                   vidstabdetect
19675
19676       •   Analyze strongly shaky movie and put the results in file
19677           mytransforms.trf:
19678
19679                   vidstabdetect=shakiness=10:accuracy=15:result="mytransforms.trf"
19680
19681       •   Visualize the result of internal transformations in the resulting
19682           video:
19683
19684                   vidstabdetect=show=1
19685
19686       •   Analyze a video with medium shakiness using ffmpeg:
19687
19688                   ffmpeg -i input -vf vidstabdetect=shakiness=5:show=1 dummy.avi
19689
19690   vidstabtransform
19691       Video stabilization/deshaking: pass 2 of 2, see vidstabdetect for pass
19692       1.
19693
19694       Read a file with transform information for each frame and
19695       apply/compensate them. Together with the vidstabdetect filter this can
19696       be used to deshake videos. See also
19697       <http://public.hronopik.de/vid.stab>. It is important to also use the
19698       unsharp filter, see below.
19699
19700       To enable compilation of this filter you need to configure FFmpeg with
19701       "--enable-libvidstab".
19702
19703       Options
19704
19705       input
19706           Set path to the file used to read the transforms. Default value is
19707           transforms.trf.
19708
19709       smoothing
19710           Set the number of frames (value*2 + 1) used for lowpass filtering
19711           the camera movements. Default value is 10.
19712
19713           For example a number of 10 means that 21 frames are used (10 in the
19714           past and 10 in the future) to smoothen the motion in the video. A
19715           larger value leads to a smoother video, but limits the acceleration
19716           of the camera (pan/tilt movements). 0 is a special case where a
19717           static camera is simulated.
19718
19719       optalgo
19720           Set the camera path optimization algorithm.
19721
19722           Accepted values are:
19723
19724           gauss
19725               gaussian kernel low-pass filter on camera motion (default)
19726
19727           avg averaging on transformations
19728
19729       maxshift
19730           Set maximal number of pixels to translate frames. Default value is
19731           -1, meaning no limit.
19732
19733       maxangle
19734           Set maximal angle in radians (degree*PI/180) to rotate frames.
19735           Default value is -1, meaning no limit.
19736
19737       crop
19738           Specify how to deal with borders that may be visible due to
19739           movement compensation.
19740
19741           Available values are:
19742
19743           keep
19744               keep image information from previous frame (default)
19745
19746           black
19747               fill the border black
19748
19749       invert
19750           Invert transforms if set to 1. Default value is 0.
19751
19752       relative
19753           Consider transforms as relative to previous frame if set to 1,
19754           absolute if set to 0. Default value is 0.
19755
19756       zoom
19757           Set percentage to zoom. A positive value will result in a zoom-in
19758           effect, a negative value in a zoom-out effect. Default value is 0
19759           (no zoom).
19760
19761       optzoom
19762           Set optimal zooming to avoid borders.
19763
19764           Accepted values are:
19765
19766           0   disabled
19767
19768           1   optimal static zoom value is determined (only very strong
19769               movements will lead to visible borders) (default)
19770
19771           2   optimal adaptive zoom value is determined (no borders will be
19772               visible), see zoomspeed
19773
19774           Note that the value given at zoom is added to the one calculated
19775           here.
19776
19777       zoomspeed
19778           Set percent to zoom maximally each frame (enabled when optzoom is
19779           set to 2). Range is from 0 to 5, default value is 0.25.
19780
19781       interpol
19782           Specify type of interpolation.
19783
19784           Available values are:
19785
19786           no  no interpolation
19787
19788           linear
19789               linear only horizontal
19790
19791           bilinear
19792               linear in both directions (default)
19793
19794           bicubic
19795               cubic in both directions (slow)
19796
19797       tripod
19798           Enable virtual tripod mode if set to 1, which is equivalent to
19799           "relative=0:smoothing=0". Default value is 0.
19800
19801           Use also "tripod" option of vidstabdetect.
19802
19803       debug
19804           Increase log verbosity if set to 1. Also the detected global
19805           motions are written to the temporary file global_motions.trf.
19806           Default value is 0.
19807
19808       Examples
19809
19810       •   Use ffmpeg for a typical stabilization with default values:
19811
19812                   ffmpeg -i inp.mpeg -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 inp_stabilized.mpeg
19813
19814           Note the use of the unsharp filter which is always recommended.
19815
19816       •   Zoom in a bit more and load transform data from a given file:
19817
19818                   vidstabtransform=zoom=5:input="mytransforms.trf"
19819
19820       •   Smoothen the video even more:
19821
19822                   vidstabtransform=smoothing=30
19823
19824   vflip
19825       Flip the input video vertically.
19826
19827       For example, to vertically flip a video with ffmpeg:
19828
19829               ffmpeg -i in.avi -vf "vflip" out.avi
19830
19831   vfrdet
19832       Detect variable frame rate video.
19833
19834       This filter tries to detect if the input is variable or constant frame
19835       rate.
19836
19837       At end it will output number of frames detected as having variable
19838       delta pts, and ones with constant delta pts.  If there was frames with
19839       variable delta, than it will also show min, max and average delta
19840       encountered.
19841
19842   vibrance
19843       Boost or alter saturation.
19844
19845       The filter accepts the following options:
19846
19847       intensity
19848           Set strength of boost if positive value or strength of alter if
19849           negative value.  Default is 0. Allowed range is from -2 to 2.
19850
19851       rbal
19852           Set the red balance. Default is 1. Allowed range is from -10 to 10.
19853
19854       gbal
19855           Set the green balance. Default is 1. Allowed range is from -10 to
19856           10.
19857
19858       bbal
19859           Set the blue balance. Default is 1. Allowed range is from -10 to
19860           10.
19861
19862       rlum
19863           Set the red luma coefficient.
19864
19865       glum
19866           Set the green luma coefficient.
19867
19868       blum
19869           Set the blue luma coefficient.
19870
19871       alternate
19872           If "intensity" is negative and this is set to 1, colors will
19873           change, otherwise colors will be less saturated, more towards gray.
19874
19875       Commands
19876
19877       This filter supports the all above options as commands.
19878
19879   vif
19880       Obtain the average VIF (Visual Information Fidelity) between two input
19881       videos.
19882
19883       This filter takes two input videos.
19884
19885       Both input videos must have the same resolution and pixel format for
19886       this filter to work correctly. Also it assumes that both inputs have
19887       the same number of frames, which are compared one by one.
19888
19889       The obtained average VIF score is printed through the logging system.
19890
19891       The filter stores the calculated VIF score of each frame.
19892
19893       In the below example the input file main.mpg being processed is
19894       compared with the reference file ref.mpg.
19895
19896               ffmpeg -i main.mpg -i ref.mpg -lavfi vif -f null -
19897
19898   vignette
19899       Make or reverse a natural vignetting effect.
19900
19901       The filter accepts the following options:
19902
19903       angle, a
19904           Set lens angle expression as a number of radians.
19905
19906           The value is clipped in the "[0,PI/2]" range.
19907
19908           Default value: "PI/5"
19909
19910       x0
19911       y0  Set center coordinates expressions. Respectively "w/2" and "h/2" by
19912           default.
19913
19914       mode
19915           Set forward/backward mode.
19916
19917           Available modes are:
19918
19919           forward
19920               The larger the distance from the central point, the darker the
19921               image becomes.
19922
19923           backward
19924               The larger the distance from the central point, the brighter
19925               the image becomes.  This can be used to reverse a vignette
19926               effect, though there is no automatic detection to extract the
19927               lens angle and other settings (yet). It can also be used to
19928               create a burning effect.
19929
19930           Default value is forward.
19931
19932       eval
19933           Set evaluation mode for the expressions (angle, x0, y0).
19934
19935           It accepts the following values:
19936
19937           init
19938               Evaluate expressions only once during the filter
19939               initialization.
19940
19941           frame
19942               Evaluate expressions for each incoming frame. This is way
19943               slower than the init mode since it requires all the scalers to
19944               be re-computed, but it allows advanced dynamic expressions.
19945
19946           Default value is init.
19947
19948       dither
19949           Set dithering to reduce the circular banding effects. Default is 1
19950           (enabled).
19951
19952       aspect
19953           Set vignette aspect. This setting allows one to adjust the shape of
19954           the vignette.  Setting this value to the SAR of the input will make
19955           a rectangular vignetting following the dimensions of the video.
19956
19957           Default is "1/1".
19958
19959       Expressions
19960
19961       The alpha, x0 and y0 expressions can contain the following parameters.
19962
19963       w
19964       h   input width and height
19965
19966       n   the number of input frame, starting from 0
19967
19968       pts the PTS (Presentation TimeStamp) time of the filtered video frame,
19969           expressed in TB units, NAN if undefined
19970
19971       r   frame rate of the input video, NAN if the input frame rate is
19972           unknown
19973
19974       t   the PTS (Presentation TimeStamp) of the filtered video frame,
19975           expressed in seconds, NAN if undefined
19976
19977       tb  time base of the input video
19978
19979       Examples
19980
19981       •   Apply simple strong vignetting effect:
19982
19983                   vignette=PI/4
19984
19985       •   Make a flickering vignetting:
19986
19987                   vignette='PI/4+random(1)*PI/50':eval=frame
19988
19989   vmafmotion
19990       Obtain the average VMAF motion score of a video.  It is one of the
19991       component metrics of VMAF.
19992
19993       The obtained average motion score is printed through the logging
19994       system.
19995
19996       The filter accepts the following options:
19997
19998       stats_file
19999           If specified, the filter will use the named file to save the motion
20000           score of each frame with respect to the previous frame.  When
20001           filename equals "-" the data is sent to standard output.
20002
20003       Example:
20004
20005               ffmpeg -i ref.mpg -vf vmafmotion -f null -
20006
20007   vstack
20008       Stack input videos vertically.
20009
20010       All streams must be of same pixel format and of same width.
20011
20012       Note that this filter is faster than using overlay and pad filter to
20013       create same output.
20014
20015       The filter accepts the following options:
20016
20017       inputs
20018           Set number of input streams. Default is 2.
20019
20020       shortest
20021           If set to 1, force the output to terminate when the shortest input
20022           terminates. Default value is 0.
20023
20024   w3fdif
20025       Deinterlace the input video ("w3fdif" stands for "Weston 3 Field
20026       Deinterlacing Filter").
20027
20028       Based on the process described by Martin Weston for BBC R&D, and
20029       implemented based on the de-interlace algorithm written by Jim
20030       Easterbrook for BBC R&D, the Weston 3 field deinterlacing filter uses
20031       filter coefficients calculated by BBC R&D.
20032
20033       This filter uses field-dominance information in frame to decide which
20034       of each pair of fields to place first in the output.  If it gets it
20035       wrong use setfield filter before "w3fdif" filter.
20036
20037       There are two sets of filter coefficients, so called "simple" and
20038       "complex". Which set of filter coefficients is used can be set by
20039       passing an optional parameter:
20040
20041       filter
20042           Set the interlacing filter coefficients. Accepts one of the
20043           following values:
20044
20045           simple
20046               Simple filter coefficient set.
20047
20048           complex
20049               More-complex filter coefficient set.
20050
20051           Default value is complex.
20052
20053       mode
20054           The interlacing mode to adopt. It accepts one of the following
20055           values:
20056
20057           frame
20058               Output one frame for each frame.
20059
20060           field
20061               Output one frame for each field.
20062
20063           The default value is "field".
20064
20065       parity
20066           The picture field parity assumed for the input interlaced video. It
20067           accepts one of the following values:
20068
20069           tff Assume the top field is first.
20070
20071           bff Assume the bottom field is first.
20072
20073           auto
20074               Enable automatic detection of field parity.
20075
20076           The default value is "auto".  If the interlacing is unknown or the
20077           decoder does not export this information, top field first will be
20078           assumed.
20079
20080       deint
20081           Specify which frames to deinterlace. Accepts one of the following
20082           values:
20083
20084           all Deinterlace all frames,
20085
20086           interlaced
20087               Only deinterlace frames marked as interlaced.
20088
20089           Default value is all.
20090
20091       Commands
20092
20093       This filter supports same commands as options.
20094
20095   waveform
20096       Video waveform monitor.
20097
20098       The waveform monitor plots color component intensity. By default
20099       luminance only. Each column of the waveform corresponds to a column of
20100       pixels in the source video.
20101
20102       It accepts the following options:
20103
20104       mode, m
20105           Can be either "row", or "column". Default is "column".  In row
20106           mode, the graph on the left side represents color component value 0
20107           and the right side represents value = 255. In column mode, the top
20108           side represents color component value = 0 and bottom side
20109           represents value = 255.
20110
20111       intensity, i
20112           Set intensity. Smaller values are useful to find out how many
20113           values of the same luminance are distributed across input
20114           rows/columns.  Default value is 0.04. Allowed range is [0, 1].
20115
20116       mirror, r
20117           Set mirroring mode. 0 means unmirrored, 1 means mirrored.  In
20118           mirrored mode, higher values will be represented on the left side
20119           for "row" mode and at the top for "column" mode. Default is 1
20120           (mirrored).
20121
20122       display, d
20123           Set display mode.  It accepts the following values:
20124
20125           overlay
20126               Presents information identical to that in the "parade", except
20127               that the graphs representing color components are superimposed
20128               directly over one another.
20129
20130               This display mode makes it easier to spot relative differences
20131               or similarities in overlapping areas of the color components
20132               that are supposed to be identical, such as neutral whites,
20133               grays, or blacks.
20134
20135           stack
20136               Display separate graph for the color components side by side in
20137               "row" mode or one below the other in "column" mode.
20138
20139           parade
20140               Display separate graph for the color components side by side in
20141               "column" mode or one below the other in "row" mode.
20142
20143               Using this display mode makes it easy to spot color casts in
20144               the highlights and shadows of an image, by comparing the
20145               contours of the top and the bottom graphs of each waveform.
20146               Since whites, grays, and blacks are characterized by exactly
20147               equal amounts of red, green, and blue, neutral areas of the
20148               picture should display three waveforms of roughly equal
20149               width/height. If not, the correction is easy to perform by
20150               making level adjustments the three waveforms.
20151
20152           Default is "stack".
20153
20154       components, c
20155           Set which color components to display. Default is 1, which means
20156           only luminance or red color component if input is in RGB
20157           colorspace. If is set for example to 7 it will display all 3 (if)
20158           available color components.
20159
20160       envelope, e
20161           none
20162               No envelope, this is default.
20163
20164           instant
20165               Instant envelope, minimum and maximum values presented in graph
20166               will be easily visible even with small "step" value.
20167
20168           peak
20169               Hold minimum and maximum values presented in graph across time.
20170               This way you can still spot out of range values without
20171               constantly looking at waveforms.
20172
20173           peak+instant
20174               Peak and instant envelope combined together.
20175
20176       filter, f
20177           lowpass
20178               No filtering, this is default.
20179
20180           flat
20181               Luma and chroma combined together.
20182
20183           aflat
20184               Similar as above, but shows difference between blue and red
20185               chroma.
20186
20187           xflat
20188               Similar as above, but use different colors.
20189
20190           yflat
20191               Similar as above, but again with different colors.
20192
20193           chroma
20194               Displays only chroma.
20195
20196           color
20197               Displays actual color value on waveform.
20198
20199           acolor
20200               Similar as above, but with luma showing frequency of chroma
20201               values.
20202
20203       graticule, g
20204           Set which graticule to display.
20205
20206           none
20207               Do not display graticule.
20208
20209           green
20210               Display green graticule showing legal broadcast ranges.
20211
20212           orange
20213               Display orange graticule showing legal broadcast ranges.
20214
20215           invert
20216               Display invert graticule showing legal broadcast ranges.
20217
20218       opacity, o
20219           Set graticule opacity.
20220
20221       flags, fl
20222           Set graticule flags.
20223
20224           numbers
20225               Draw numbers above lines. By default enabled.
20226
20227           dots
20228               Draw dots instead of lines.
20229
20230       scale, s
20231           Set scale used for displaying graticule.
20232
20233           digital
20234           millivolts
20235           ire
20236
20237           Default is digital.
20238
20239       bgopacity, b
20240           Set background opacity.
20241
20242       tint0, t0
20243       tint1, t1
20244           Set tint for output.  Only used with lowpass filter and when
20245           display is not overlay and input pixel formats are not RGB.
20246
20247       fitmode, fm
20248           Set sample aspect ratio of video output frames.  Can be used to
20249           configure waveform so it is not streched too much in one of
20250           directions.
20251
20252           none
20253               Set sample aspect ration to 1/1.
20254
20255           size
20256               Set sample aspect ratio to match input size of video
20257
20258           Default is none.
20259
20260   weave, doubleweave
20261       The "weave" takes a field-based video input and join each two
20262       sequential fields into single frame, producing a new double height clip
20263       with half the frame rate and half the frame count.
20264
20265       The "doubleweave" works same as "weave" but without halving frame rate
20266       and frame count.
20267
20268       It accepts the following option:
20269
20270       first_field
20271           Set first field. Available values are:
20272
20273           top, t
20274               Set the frame as top-field-first.
20275
20276           bottom, b
20277               Set the frame as bottom-field-first.
20278
20279       Examples
20280
20281       •   Interlace video using select and separatefields filter:
20282
20283                   separatefields,select=eq(mod(n,4),0)+eq(mod(n,4),3),weave
20284
20285   xbr
20286       Apply the xBR high-quality magnification filter which is designed for
20287       pixel art. It follows a set of edge-detection rules, see
20288       <https://forums.libretro.com/t/xbr-algorithm-tutorial/123>.
20289
20290       It accepts the following option:
20291
20292       n   Set the scaling dimension: 2 for "2xBR", 3 for "3xBR" and 4 for
20293           "4xBR".  Default is 3.
20294
20295   xcorrelate
20296       Apply normalized cross-correlation between first and second input video
20297       stream.
20298
20299       Second input video stream dimensions must be lower than first input
20300       video stream.
20301
20302       The filter accepts the following options:
20303
20304       planes
20305           Set which planes to process.
20306
20307       secondary
20308           Set which secondary video frames will be processed from second
20309           input video stream, can be first or all. Default is all.
20310
20311       The "xcorrelate" filter also supports the framesync options.
20312
20313   xfade
20314       Apply cross fade from one input video stream to another input video
20315       stream.  The cross fade is applied for specified duration.
20316
20317       Both inputs must be constant frame-rate and have the same resolution,
20318       pixel format, frame rate and timebase.
20319
20320       The filter accepts the following options:
20321
20322       transition
20323           Set one of available transition effects:
20324
20325           custom
20326           fade
20327           wipeleft
20328           wiperight
20329           wipeup
20330           wipedown
20331           slideleft
20332           slideright
20333           slideup
20334           slidedown
20335           circlecrop
20336           rectcrop
20337           distance
20338           fadeblack
20339           fadewhite
20340           radial
20341           smoothleft
20342           smoothright
20343           smoothup
20344           smoothdown
20345           circleopen
20346           circleclose
20347           vertopen
20348           vertclose
20349           horzopen
20350           horzclose
20351           dissolve
20352           pixelize
20353           diagtl
20354           diagtr
20355           diagbl
20356           diagbr
20357           hlslice
20358           hrslice
20359           vuslice
20360           vdslice
20361           hblur
20362           fadegrays
20363           wipetl
20364           wipetr
20365           wipebl
20366           wipebr
20367           squeezeh
20368           squeezev
20369           zoomin
20370
20371           Default transition effect is fade.
20372
20373       duration
20374           Set cross fade duration in seconds.  Range is 0 to 60 seconds.
20375           Default duration is 1 second.
20376
20377       offset
20378           Set cross fade start relative to first input stream in seconds.
20379           Default offset is 0.
20380
20381       expr
20382           Set expression for custom transition effect.
20383
20384           The expressions can use the following variables and functions:
20385
20386           X
20387           Y   The coordinates of the current sample.
20388
20389           W
20390           H   The width and height of the image.
20391
20392           P   Progress of transition effect.
20393
20394           PLANE
20395               Currently processed plane.
20396
20397           A   Return value of first input at current location and plane.
20398
20399           B   Return value of second input at current location and plane.
20400
20401           a0(x, y)
20402           a1(x, y)
20403           a2(x, y)
20404           a3(x, y)
20405               Return the value of the pixel at location (x,y) of the
20406               first/second/third/fourth component of first input.
20407
20408           b0(x, y)
20409           b1(x, y)
20410           b2(x, y)
20411           b3(x, y)
20412               Return the value of the pixel at location (x,y) of the
20413               first/second/third/fourth component of second input.
20414
20415       Examples
20416
20417       •   Cross fade from one input video to another input video, with fade
20418           transition and duration of transition of 2 seconds starting at
20419           offset of 5 seconds:
20420
20421                   ffmpeg -i first.mp4 -i second.mp4 -filter_complex xfade=transition=fade:duration=2:offset=5 output.mp4
20422
20423   xmedian
20424       Pick median pixels from several input videos.
20425
20426       The filter accepts the following options:
20427
20428       inputs
20429           Set number of inputs.  Default is 3. Allowed range is from 3 to
20430           255.  If number of inputs is even number, than result will be mean
20431           value between two median values.
20432
20433       planes
20434           Set which planes to filter. Default value is 15, by which all
20435           planes are processed.
20436
20437       percentile
20438           Set median percentile. Default value is 0.5.  Default value of 0.5
20439           will pick always median values, while 0 will pick minimum values,
20440           and 1 maximum values.
20441
20442       Commands
20443
20444       This filter supports all above options as commands, excluding option
20445       "inputs".
20446
20447   xstack
20448       Stack video inputs into custom layout.
20449
20450       All streams must be of same pixel format.
20451
20452       The filter accepts the following options:
20453
20454       inputs
20455           Set number of input streams. Default is 2.
20456
20457       layout
20458           Specify layout of inputs.  This option requires the desired layout
20459           configuration to be explicitly set by the user.  This sets position
20460           of each video input in output. Each input is separated by '|'.  The
20461           first number represents the column, and the second number
20462           represents the row.  Numbers start at 0 and are separated by '_'.
20463           Optionally one can use wX and hX, where X is video input from which
20464           to take width or height.  Multiple values can be used when
20465           separated by '+'. In such case values are summed together.
20466
20467           Note that if inputs are of different sizes gaps may appear, as not
20468           all of the output video frame will be filled. Similarly, videos can
20469           overlap each other if their position doesn't leave enough space for
20470           the full frame of adjoining videos.
20471
20472           For 2 inputs, a default layout of "0_0|w0_0" is set. In all other
20473           cases, a layout must be set by the user.
20474
20475       shortest
20476           If set to 1, force the output to terminate when the shortest input
20477           terminates. Default value is 0.
20478
20479       fill
20480           If set to valid color, all unused pixels will be filled with that
20481           color.  By default fill is set to none, so it is disabled.
20482
20483       Examples
20484
20485       •   Display 4 inputs into 2x2 grid.
20486
20487           Layout:
20488
20489                   input1(0, 0)  | input3(w0, 0)
20490                   input2(0, h0) | input4(w0, h0)
20491
20492
20493
20494                   xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
20495
20496           Note that if inputs are of different sizes, gaps or overlaps may
20497           occur.
20498
20499       •   Display 4 inputs into 1x4 grid.
20500
20501           Layout:
20502
20503                   input1(0, 0)
20504                   input2(0, h0)
20505                   input3(0, h0+h1)
20506                   input4(0, h0+h1+h2)
20507
20508
20509
20510                   xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
20511
20512           Note that if inputs are of different widths, unused space will
20513           appear.
20514
20515       •   Display 9 inputs into 3x3 grid.
20516
20517           Layout:
20518
20519                   input1(0, 0)       | input4(w0, 0)      | input7(w0+w3, 0)
20520                   input2(0, h0)      | input5(w0, h0)     | input8(w0+w3, h0)
20521                   input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w3, h0+h1)
20522
20523
20524
20525                   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
20526
20527           Note that if inputs are of different sizes, gaps or overlaps may
20528           occur.
20529
20530       •   Display 16 inputs into 4x4 grid.
20531
20532           Layout:
20533
20534                   input1(0, 0)       | input5(w0, 0)       | input9 (w0+w4, 0)       | input13(w0+w4+w8, 0)
20535                   input2(0, h0)      | input6(w0, h0)      | input10(w0+w4, h0)      | input14(w0+w4+w8, h0)
20536                   input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w4, h0+h1)   | input15(w0+w4+w8, h0+h1)
20537                   input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
20538
20539
20540
20541                   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|
20542                   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
20543
20544           Note that if inputs are of different sizes, gaps or overlaps may
20545           occur.
20546
20547   yadif
20548       Deinterlace the input video ("yadif" means "yet another deinterlacing
20549       filter").
20550
20551       It accepts the following parameters:
20552
20553       mode
20554           The interlacing mode to adopt. It accepts one of the following
20555           values:
20556
20557           0, send_frame
20558               Output one frame for each frame.
20559
20560           1, send_field
20561               Output one frame for each field.
20562
20563           2, send_frame_nospatial
20564               Like "send_frame", but it skips the spatial interlacing check.
20565
20566           3, send_field_nospatial
20567               Like "send_field", but it skips the spatial interlacing check.
20568
20569           The default value is "send_frame".
20570
20571       parity
20572           The picture field parity assumed for the input interlaced video. It
20573           accepts one of the following values:
20574
20575           0, tff
20576               Assume the top field is first.
20577
20578           1, bff
20579               Assume the bottom field is first.
20580
20581           -1, auto
20582               Enable automatic detection of field parity.
20583
20584           The default value is "auto".  If the interlacing is unknown or the
20585           decoder does not export this information, top field first will be
20586           assumed.
20587
20588       deint
20589           Specify which frames to deinterlace. Accepts one of the following
20590           values:
20591
20592           0, all
20593               Deinterlace all frames.
20594
20595           1, interlaced
20596               Only deinterlace frames marked as interlaced.
20597
20598           The default value is "all".
20599
20600   yadif_cuda
20601       Deinterlace the input video using the yadif algorithm, but implemented
20602       in CUDA so that it can work as part of a GPU accelerated pipeline with
20603       nvdec and/or nvenc.
20604
20605       It accepts the following parameters:
20606
20607       mode
20608           The interlacing mode to adopt. It accepts one of the following
20609           values:
20610
20611           0, send_frame
20612               Output one frame for each frame.
20613
20614           1, send_field
20615               Output one frame for each field.
20616
20617           2, send_frame_nospatial
20618               Like "send_frame", but it skips the spatial interlacing check.
20619
20620           3, send_field_nospatial
20621               Like "send_field", but it skips the spatial interlacing check.
20622
20623           The default value is "send_frame".
20624
20625       parity
20626           The picture field parity assumed for the input interlaced video. It
20627           accepts one of the following values:
20628
20629           0, tff
20630               Assume the top field is first.
20631
20632           1, bff
20633               Assume the bottom field is first.
20634
20635           -1, auto
20636               Enable automatic detection of field parity.
20637
20638           The default value is "auto".  If the interlacing is unknown or the
20639           decoder does not export this information, top field first will be
20640           assumed.
20641
20642       deint
20643           Specify which frames to deinterlace. Accepts one of the following
20644           values:
20645
20646           0, all
20647               Deinterlace all frames.
20648
20649           1, interlaced
20650               Only deinterlace frames marked as interlaced.
20651
20652           The default value is "all".
20653
20654   yaepblur
20655       Apply blur filter while preserving edges ("yaepblur" means "yet another
20656       edge preserving blur filter").  The algorithm is described in "J. S.
20657       Lee, Digital image enhancement and noise filtering by use of local
20658       statistics, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-2, 1980."
20659
20660       It accepts the following parameters:
20661
20662       radius, r
20663           Set the window radius. Default value is 3.
20664
20665       planes, p
20666           Set which planes to filter. Default is only the first plane.
20667
20668       sigma, s
20669           Set blur strength. Default value is 128.
20670
20671       Commands
20672
20673       This filter supports same commands as options.
20674
20675   zoompan
20676       Apply Zoom & Pan effect.
20677
20678       This filter accepts the following options:
20679
20680       zoom, z
20681           Set the zoom expression. Range is 1-10. Default is 1.
20682
20683       x
20684       y   Set the x and y expression. Default is 0.
20685
20686       d   Set the duration expression in number of frames.  This sets for how
20687           many number of frames effect will last for single input image.
20688           Default is 90.
20689
20690       s   Set the output image size, default is 'hd720'.
20691
20692       fps Set the output frame rate, default is '25'.
20693
20694       Each expression can contain the following constants:
20695
20696       in_w, iw
20697           Input width.
20698
20699       in_h, ih
20700           Input height.
20701
20702       out_w, ow
20703           Output width.
20704
20705       out_h, oh
20706           Output height.
20707
20708       in  Input frame count.
20709
20710       on  Output frame count.
20711
20712       in_time, it
20713           The input timestamp expressed in seconds. It's NAN if the input
20714           timestamp is unknown.
20715
20716       out_time, time, ot
20717           The output timestamp expressed in seconds.
20718
20719       x
20720       y   Last calculated 'x' and 'y' position from 'x' and 'y' expression
20721           for current input frame.
20722
20723       px
20724       py  'x' and 'y' of last output frame of previous input frame or 0 when
20725           there was not yet such frame (first input frame).
20726
20727       zoom
20728           Last calculated zoom from 'z' expression for current input frame.
20729
20730       pzoom
20731           Last calculated zoom of last output frame of previous input frame.
20732
20733       duration
20734           Number of output frames for current input frame. Calculated from
20735           'd' expression for each input frame.
20736
20737       pduration
20738           number of output frames created for previous input frame
20739
20740       a   Rational number: input width / input height
20741
20742       sar sample aspect ratio
20743
20744       dar display aspect ratio
20745
20746       Examples
20747
20748       •   Zoom in up to 1.5x and pan at same time to some spot near center of
20749           picture:
20750
20751                   zoompan=z='min(zoom+0.0015,1.5)':d=700:x='if(gte(zoom,1.5),x,x+1/a)':y='if(gte(zoom,1.5),y,y+1)':s=640x360
20752
20753       •   Zoom in up to 1.5x and pan always at center of picture:
20754
20755                   zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
20756
20757       •   Same as above but without pausing:
20758
20759                   zoompan=z='min(max(zoom,pzoom)+0.0015,1.5)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
20760
20761       •   Zoom in 2x into center of picture only for the first second of the
20762           input video:
20763
20764                   zoompan=z='if(between(in_time,0,1),2,1)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
20765
20766   zscale
20767       Scale (resize) the input video, using the z.lib library:
20768       <https://github.com/sekrit-twc/zimg>. To enable compilation of this
20769       filter, you need to configure FFmpeg with "--enable-libzimg".
20770
20771       The zscale filter forces the output display aspect ratio to be the same
20772       as the input, by changing the output sample aspect ratio.
20773
20774       If the input image format is different from the format requested by the
20775       next filter, the zscale filter will convert the input to the requested
20776       format.
20777
20778       Options
20779
20780       The filter accepts the following options.
20781
20782       width, w
20783       height, h
20784           Set the output video dimension expression. Default value is the
20785           input dimension.
20786
20787           If the width or w value is 0, the input width is used for the
20788           output. If the height or h value is 0, the input height is used for
20789           the output.
20790
20791           If one and only one of the values is -n with n >= 1, the zscale
20792           filter will use a value that maintains the aspect ratio of the
20793           input image, calculated from the other specified dimension. After
20794           that it will, however, make sure that the calculated dimension is
20795           divisible by n and adjust the value if necessary.
20796
20797           If both values are -n with n >= 1, the behavior will be identical
20798           to both values being set to 0 as previously detailed.
20799
20800           See below for the list of accepted constants for use in the
20801           dimension expression.
20802
20803       size, s
20804           Set the video size. For the syntax of this option, check the "Video
20805           size" section in the ffmpeg-utils manual.
20806
20807       dither, d
20808           Set the dither type.
20809
20810           Possible values are:
20811
20812           none
20813           ordered
20814           random
20815           error_diffusion
20816
20817           Default is none.
20818
20819       filter, f
20820           Set the resize filter type.
20821
20822           Possible values are:
20823
20824           point
20825           bilinear
20826           bicubic
20827           spline16
20828           spline36
20829           lanczos
20830
20831           Default is bilinear.
20832
20833       range, r
20834           Set the color range.
20835
20836           Possible values are:
20837
20838           input
20839           limited
20840           full
20841
20842           Default is same as input.
20843
20844       primaries, p
20845           Set the color primaries.
20846
20847           Possible values are:
20848
20849           input
20850           709
20851           unspecified
20852           170m
20853           240m
20854           2020
20855
20856           Default is same as input.
20857
20858       transfer, t
20859           Set the transfer characteristics.
20860
20861           Possible values are:
20862
20863           input
20864           709
20865           unspecified
20866           601
20867           linear
20868           2020_10
20869           2020_12
20870           smpte2084
20871           iec61966-2-1
20872           arib-std-b67
20873
20874           Default is same as input.
20875
20876       matrix, m
20877           Set the colorspace matrix.
20878
20879           Possible value are:
20880
20881           input
20882           709
20883           unspecified
20884           470bg
20885           170m
20886           2020_ncl
20887           2020_cl
20888
20889           Default is same as input.
20890
20891       rangein, rin
20892           Set the input color range.
20893
20894           Possible values are:
20895
20896           input
20897           limited
20898           full
20899
20900           Default is same as input.
20901
20902       primariesin, pin
20903           Set the input color primaries.
20904
20905           Possible values are:
20906
20907           input
20908           709
20909           unspecified
20910           170m
20911           240m
20912           2020
20913
20914           Default is same as input.
20915
20916       transferin, tin
20917           Set the input transfer characteristics.
20918
20919           Possible values are:
20920
20921           input
20922           709
20923           unspecified
20924           601
20925           linear
20926           2020_10
20927           2020_12
20928
20929           Default is same as input.
20930
20931       matrixin, min
20932           Set the input colorspace matrix.
20933
20934           Possible value are:
20935
20936           input
20937           709
20938           unspecified
20939           470bg
20940           170m
20941           2020_ncl
20942           2020_cl
20943       chromal, c
20944           Set the output chroma location.
20945
20946           Possible values are:
20947
20948           input
20949           left
20950           center
20951           topleft
20952           top
20953           bottomleft
20954           bottom
20955       chromalin, cin
20956           Set the input chroma location.
20957
20958           Possible values are:
20959
20960           input
20961           left
20962           center
20963           topleft
20964           top
20965           bottomleft
20966           bottom
20967       npl Set the nominal peak luminance.
20968
20969       param_a
20970           Parameter A for scaling filters. Parameter "b" for bicubic, and the
20971           number of filter taps for lanczos.
20972
20973       param_b
20974           Parameter B for scaling filters. Parameter "c" for bicubic.
20975
20976       The values of the w and h options are expressions containing the
20977       following constants:
20978
20979       in_w
20980       in_h
20981           The input width and height
20982
20983       iw
20984       ih  These are the same as in_w and in_h.
20985
20986       out_w
20987       out_h
20988           The output (scaled) width and height
20989
20990       ow
20991       oh  These are the same as out_w and out_h
20992
20993       a   The same as iw / ih
20994
20995       sar input sample aspect ratio
20996
20997       dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
20998
20999       hsub
21000       vsub
21001           horizontal and vertical input chroma subsample values. For example
21002           for the pixel format "yuv422p" hsub is 2 and vsub is 1.
21003
21004       ohsub
21005       ovsub
21006           horizontal and vertical output chroma subsample values. For example
21007           for the pixel format "yuv422p" hsub is 2 and vsub is 1.
21008
21009       Commands
21010
21011       This filter supports the following commands:
21012
21013       width, w
21014       height, h
21015           Set the output video dimension expression.  The command accepts the
21016           same syntax of the corresponding option.
21017
21018           If the specified expression is not valid, it is kept at its current
21019           value.
21020

OPENCL VIDEO FILTERS

21022       Below is a description of the currently available OpenCL video filters.
21023
21024       To enable compilation of these filters you need to configure FFmpeg
21025       with "--enable-opencl".
21026
21027       Running OpenCL filters requires you to initialize a hardware device and
21028       to pass that device to all filters in any filter graph.
21029
21030       -init_hw_device opencl[=name][:device[,key=value...]]
21031           Initialise a new hardware device of type opencl called name, using
21032           the given device parameters.
21033
21034       -filter_hw_device name
21035           Pass the hardware device called name to all filters in any filter
21036           graph.
21037
21038       For more detailed information see
21039       <https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options>
21040
21041       •   Example of choosing the first device on the second platform and
21042           running avgblur_opencl filter with default parameters on it.
21043
21044                   -init_hw_device opencl=gpu:1.0 -filter_hw_device gpu -i INPUT -vf "hwupload, avgblur_opencl, hwdownload" OUTPUT
21045
21046       Since OpenCL filters are not able to access frame data in normal
21047       memory, all frame data needs to be uploaded(hwupload) to hardware
21048       surfaces connected to the appropriate device before being used and then
21049       downloaded(hwdownload) back to normal memory. Note that hwupload will
21050       upload to a surface with the same layout as the software frame, so it
21051       may be necessary to add a format filter immediately before to get the
21052       input into the right format and hwdownload does not support all formats
21053       on the output - it may be necessary to insert an additional format
21054       filter immediately following in the graph to get the output in a
21055       supported format.
21056
21057   avgblur_opencl
21058       Apply average blur filter.
21059
21060       The filter accepts the following options:
21061
21062       sizeX
21063           Set horizontal radius size.  Range is "[1, 1024]" and default value
21064           is 1.
21065
21066       planes
21067           Set which planes to filter. Default value is 0xf, by which all
21068           planes are processed.
21069
21070       sizeY
21071           Set vertical radius size. Range is "[1, 1024]" and default value is
21072           0. If zero, "sizeX" value will be used.
21073
21074       Example
21075
21076       •   Apply average blur filter with horizontal and vertical size of 3,
21077           setting each pixel of the output to the average value of the 7x7
21078           region centered on it in the input. For pixels on the edges of the
21079           image, the region does not extend beyond the image boundaries, and
21080           so out-of-range coordinates are not used in the calculations.
21081
21082                   -i INPUT -vf "hwupload, avgblur_opencl=3, hwdownload" OUTPUT
21083
21084   boxblur_opencl
21085       Apply a boxblur algorithm to the input video.
21086
21087       It accepts the following parameters:
21088
21089       luma_radius, lr
21090       luma_power, lp
21091       chroma_radius, cr
21092       chroma_power, cp
21093       alpha_radius, ar
21094       alpha_power, ap
21095
21096       A description of the accepted options follows.
21097
21098       luma_radius, lr
21099       chroma_radius, cr
21100       alpha_radius, ar
21101           Set an expression for the box radius in pixels used for blurring
21102           the corresponding input plane.
21103
21104           The radius value must be a non-negative number, and must not be
21105           greater than the value of the expression "min(w,h)/2" for the luma
21106           and alpha planes, and of "min(cw,ch)/2" for the chroma planes.
21107
21108           Default value for luma_radius is "2". If not specified,
21109           chroma_radius and alpha_radius default to the corresponding value
21110           set for luma_radius.
21111
21112           The expressions can contain the following constants:
21113
21114           w
21115           h   The input width and height in pixels.
21116
21117           cw
21118           ch  The input chroma image width and height in pixels.
21119
21120           hsub
21121           vsub
21122               The horizontal and vertical chroma subsample values. For
21123               example, for the pixel format "yuv422p", hsub is 2 and vsub is
21124               1.
21125
21126       luma_power, lp
21127       chroma_power, cp
21128       alpha_power, ap
21129           Specify how many times the boxblur filter is applied to the
21130           corresponding plane.
21131
21132           Default value for luma_power is 2. If not specified, chroma_power
21133           and alpha_power default to the corresponding value set for
21134           luma_power.
21135
21136           A value of 0 will disable the effect.
21137
21138       Examples
21139
21140       Apply boxblur filter, setting each pixel of the output to the average
21141       value of box-radiuses luma_radius, chroma_radius, alpha_radius for each
21142       plane respectively. The filter will apply luma_power, chroma_power,
21143       alpha_power times onto the corresponding plane. For pixels on the edges
21144       of the image, the radius does not extend beyond the image boundaries,
21145       and so out-of-range coordinates are not used in the calculations.
21146
21147       •   Apply a boxblur filter with the luma, chroma, and alpha radius set
21148           to 2 and luma, chroma, and alpha power set to 3. The filter will
21149           run 3 times with box-radius set to 2 for every plane of the image.
21150
21151                   -i INPUT -vf "hwupload, boxblur_opencl=luma_radius=2:luma_power=3, hwdownload" OUTPUT
21152                   -i INPUT -vf "hwupload, boxblur_opencl=2:3, hwdownload" OUTPUT
21153
21154       •   Apply a boxblur filter with luma radius set to 2, luma_power to 1,
21155           chroma_radius to 4, chroma_power to 5, alpha_radius to 3 and
21156           alpha_power to 7.
21157
21158           For the luma plane, a 2x2 box radius will be run once.
21159
21160           For the chroma plane, a 4x4 box radius will be run 5 times.
21161
21162           For the alpha plane, a 3x3 box radius will be run 7 times.
21163
21164                   -i INPUT -vf "hwupload, boxblur_opencl=2:1:4:5:3:7, hwdownload" OUTPUT
21165
21166   colorkey_opencl
21167       RGB colorspace color keying.
21168
21169       The filter accepts the following options:
21170
21171       color
21172           The color which will be replaced with transparency.
21173
21174       similarity
21175           Similarity percentage with the key color.
21176
21177           0.01 matches only the exact key color, while 1.0 matches
21178           everything.
21179
21180       blend
21181           Blend percentage.
21182
21183           0.0 makes pixels either fully transparent, or not transparent at
21184           all.
21185
21186           Higher values result in semi-transparent pixels, with a higher
21187           transparency the more similar the pixels color is to the key color.
21188
21189       Examples
21190
21191       •   Make every semi-green pixel in the input transparent with some
21192           slight blending:
21193
21194                   -i INPUT -vf "hwupload, colorkey_opencl=green:0.3:0.1, hwdownload" OUTPUT
21195
21196   convolution_opencl
21197       Apply convolution of 3x3, 5x5, 7x7 matrix.
21198
21199       The filter accepts the following options:
21200
21201       0m
21202       1m
21203       2m
21204       3m  Set matrix for each plane.  Matrix is sequence of 9, 25 or 49
21205           signed numbers.  Default value for each plane is "0 0 0 0 1 0 0 0
21206           0".
21207
21208       0rdiv
21209       1rdiv
21210       2rdiv
21211       3rdiv
21212           Set multiplier for calculated value for each plane.  If unset or 0,
21213           it will be sum of all matrix elements.  The option value must be a
21214           float number greater or equal to 0.0. Default value is 1.0.
21215
21216       0bias
21217       1bias
21218       2bias
21219       3bias
21220           Set bias for each plane. This value is added to the result of the
21221           multiplication.  Useful for making the overall image brighter or
21222           darker.  The option value must be a float number greater or equal
21223           to 0.0. Default value is 0.0.
21224
21225       Examples
21226
21227       •   Apply sharpen:
21228
21229                   -i INPUT -vf "hwupload, convolution_opencl=0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0, hwdownload" OUTPUT
21230
21231       •   Apply blur:
21232
21233                   -i INPUT -vf "hwupload, convolution_opencl=1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1/9:1/9:1/9:1/9, hwdownload" OUTPUT
21234
21235       •   Apply edge enhance:
21236
21237                   -i INPUT -vf "hwupload, convolution_opencl=0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128, hwdownload" OUTPUT
21238
21239       •   Apply edge detect:
21240
21241                   -i INPUT -vf "hwupload, convolution_opencl=0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:5:5:5:1:0:128:128:128, hwdownload" OUTPUT
21242
21243       •   Apply laplacian edge detector which includes diagonals:
21244
21245                   -i INPUT -vf "hwupload, convolution_opencl=1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:5:5:5:1:0:128:128:0, hwdownload" OUTPUT
21246
21247       •   Apply emboss:
21248
21249                   -i INPUT -vf "hwupload, convolution_opencl=-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2, hwdownload" OUTPUT
21250
21251   erosion_opencl
21252       Apply erosion effect to the video.
21253
21254       This filter replaces the pixel by the local(3x3) minimum.
21255
21256       It accepts the following options:
21257
21258       threshold0
21259       threshold1
21260       threshold2
21261       threshold3
21262           Limit the maximum change for each plane. Range is "[0, 65535]" and
21263           default value is 65535.  If 0, plane will remain unchanged.
21264
21265       coordinates
21266           Flag which specifies the pixel to refer to.  Range is "[0, 255]"
21267           and default value is 255, i.e. all eight pixels are used.
21268
21269           Flags to local 3x3 coordinates region centered on "x":
21270
21271               1 2 3
21272
21273               4 x 5
21274
21275               6 7 8
21276
21277       Example
21278
21279       •   Apply erosion filter with threshold0 set to 30, threshold1 set 40,
21280           threshold2 set to 50 and coordinates set to 231, setting each pixel
21281           of the output to the local minimum between pixels: 1, 2, 3, 6, 7, 8
21282           of the 3x3 region centered on it in the input. If the difference
21283           between input pixel and local minimum is more then threshold of the
21284           corresponding plane, output pixel will be set to input pixel -
21285           threshold of corresponding plane.
21286
21287                   -i INPUT -vf "hwupload, erosion_opencl=30:40:50:coordinates=231, hwdownload" OUTPUT
21288
21289   deshake_opencl
21290       Feature-point based video stabilization filter.
21291
21292       The filter accepts the following options:
21293
21294       tripod
21295           Simulates a tripod by preventing any camera movement whatsoever
21296           from the original frame. Defaults to 0.
21297
21298       debug
21299           Whether or not additional debug info should be displayed, both in
21300           the processed output and in the console.
21301
21302           Note that in order to see console debug output you will also need
21303           to pass "-v verbose" to ffmpeg.
21304
21305           Viewing point matches in the output video is only supported for RGB
21306           input.
21307
21308           Defaults to 0.
21309
21310       adaptive_crop
21311           Whether or not to do a tiny bit of cropping at the borders to cut
21312           down on the amount of mirrored pixels.
21313
21314           Defaults to 1.
21315
21316       refine_features
21317           Whether or not feature points should be refined at a sub-pixel
21318           level.
21319
21320           This can be turned off for a slight performance gain at the cost of
21321           precision.
21322
21323           Defaults to 1.
21324
21325       smooth_strength
21326           The strength of the smoothing applied to the camera path from 0.0
21327           to 1.0.
21328
21329           1.0 is the maximum smoothing strength while values less than that
21330           result in less smoothing.
21331
21332           0.0 causes the filter to adaptively choose a smoothing strength on
21333           a per-frame basis.
21334
21335           Defaults to 0.0.
21336
21337       smooth_window_multiplier
21338           Controls the size of the smoothing window (the number of frames
21339           buffered to determine motion information from).
21340
21341           The size of the smoothing window is determined by multiplying the
21342           framerate of the video by this number.
21343
21344           Acceptable values range from 0.1 to 10.0.
21345
21346           Larger values increase the amount of motion data available for
21347           determining how to smooth the camera path, potentially improving
21348           smoothness, but also increase latency and memory usage.
21349
21350           Defaults to 2.0.
21351
21352       Examples
21353
21354       •   Stabilize a video with a fixed, medium smoothing strength:
21355
21356                   -i INPUT -vf "hwupload, deshake_opencl=smooth_strength=0.5, hwdownload" OUTPUT
21357
21358       •   Stabilize a video with debugging (both in console and in rendered
21359           video):
21360
21361                   -i INPUT -filter_complex "[0:v]format=rgba, hwupload, deshake_opencl=debug=1, hwdownload, format=rgba, format=yuv420p" -v verbose OUTPUT
21362
21363   dilation_opencl
21364       Apply dilation effect to the video.
21365
21366       This filter replaces the pixel by the local(3x3) maximum.
21367
21368       It accepts the following options:
21369
21370       threshold0
21371       threshold1
21372       threshold2
21373       threshold3
21374           Limit the maximum change for each plane. Range is "[0, 65535]" and
21375           default value is 65535.  If 0, plane will remain unchanged.
21376
21377       coordinates
21378           Flag which specifies the pixel to refer to.  Range is "[0, 255]"
21379           and default value is 255, i.e. all eight pixels are used.
21380
21381           Flags to local 3x3 coordinates region centered on "x":
21382
21383               1 2 3
21384
21385               4 x 5
21386
21387               6 7 8
21388
21389       Example
21390
21391       •   Apply dilation filter with threshold0 set to 30, threshold1 set 40,
21392           threshold2 set to 50 and coordinates set to 231, setting each pixel
21393           of the output to the local maximum between pixels: 1, 2, 3, 6, 7, 8
21394           of the 3x3 region centered on it in the input. If the difference
21395           between input pixel and local maximum is more then threshold of the
21396           corresponding plane, output pixel will be set to input pixel +
21397           threshold of corresponding plane.
21398
21399                   -i INPUT -vf "hwupload, dilation_opencl=30:40:50:coordinates=231, hwdownload" OUTPUT
21400
21401   nlmeans_opencl
21402       Non-local Means denoise filter through OpenCL, this filter accepts same
21403       options as nlmeans.
21404
21405   overlay_opencl
21406       Overlay one video on top of another.
21407
21408       It takes two inputs and has one output. The first input is the "main"
21409       video on which the second input is overlaid.  This filter requires same
21410       memory layout for all the inputs. So, format conversion may be needed.
21411
21412       The filter accepts the following options:
21413
21414       x   Set the x coordinate of the overlaid video on the main video.
21415           Default value is 0.
21416
21417       y   Set the y coordinate of the overlaid video on the main video.
21418           Default value is 0.
21419
21420       Examples
21421
21422       •   Overlay an image LOGO at the top-left corner of the INPUT video.
21423           Both inputs are yuv420p format.
21424
21425                   -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT
21426
21427       •   The inputs have same memory layout for color channels , the overlay
21428           has additional alpha plane, like INPUT is yuv420p, and the LOGO is
21429           yuva420p.
21430
21431                   -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT
21432
21433   pad_opencl
21434       Add paddings to the input image, and place the original input at the
21435       provided x, y coordinates.
21436
21437       It accepts the following options:
21438
21439       width, w
21440       height, h
21441           Specify an expression for the size of the output image with the
21442           paddings added. If the value for width or height is 0, the
21443           corresponding input size is used for the output.
21444
21445           The width expression can reference the value set by the height
21446           expression, and vice versa.
21447
21448           The default value of width and height is 0.
21449
21450       x
21451       y   Specify the offsets to place the input image at within the padded
21452           area, with respect to the top/left border of the output image.
21453
21454           The x expression can reference the value set by the y expression,
21455           and vice versa.
21456
21457           The default value of x and y is 0.
21458
21459           If x or y evaluate to a negative number, they'll be changed so the
21460           input image is centered on the padded area.
21461
21462       color
21463           Specify the color of the padded area. For the syntax of this
21464           option, check the "Color" section in the ffmpeg-utils manual.
21465
21466       aspect
21467           Pad to an aspect instead to a resolution.
21468
21469       The value for the width, height, x, and y options are expressions
21470       containing the following constants:
21471
21472       in_w
21473       in_h
21474           The input video width and height.
21475
21476       iw
21477       ih  These are the same as in_w and in_h.
21478
21479       out_w
21480       out_h
21481           The output width and height (the size of the padded area), as
21482           specified by the width and height expressions.
21483
21484       ow
21485       oh  These are the same as out_w and out_h.
21486
21487       x
21488       y   The x and y offsets as specified by the x and y expressions, or NAN
21489           if not yet specified.
21490
21491       a   same as iw / ih
21492
21493       sar input sample aspect ratio
21494
21495       dar input display aspect ratio, it is the same as (iw / ih) * sar
21496
21497   prewitt_opencl
21498       Apply the Prewitt operator
21499       (<https://en.wikipedia.org/wiki/Prewitt_operator>) to input video
21500       stream.
21501
21502       The filter accepts the following option:
21503
21504       planes
21505           Set which planes to filter. Default value is 0xf, by which all
21506           planes are processed.
21507
21508       scale
21509           Set value which will be multiplied with filtered result.  Range is
21510           "[0.0, 65535]" and default value is 1.0.
21511
21512       delta
21513           Set value which will be added to filtered result.  Range is
21514           "[-65535, 65535]" and default value is 0.0.
21515
21516       Example
21517
21518       •   Apply the Prewitt operator with scale set to 2 and delta set to 10.
21519
21520                   -i INPUT -vf "hwupload, prewitt_opencl=scale=2:delta=10, hwdownload" OUTPUT
21521
21522   program_opencl
21523       Filter video using an OpenCL program.
21524
21525       source
21526           OpenCL program source file.
21527
21528       kernel
21529           Kernel name in program.
21530
21531       inputs
21532           Number of inputs to the filter.  Defaults to 1.
21533
21534       size, s
21535           Size of output frames.  Defaults to the same as the first input.
21536
21537       The "program_opencl" filter also supports the framesync options.
21538
21539       The program source file must contain a kernel function with the given
21540       name, which will be run once for each plane of the output.  Each run on
21541       a plane gets enqueued as a separate 2D global NDRange with one work-
21542       item for each pixel to be generated.  The global ID offset for each
21543       work-item is therefore the coordinates of a pixel in the destination
21544       image.
21545
21546       The kernel function needs to take the following arguments:
21547
21548       •   Destination image, __write_only image2d_t.
21549
21550           This image will become the output; the kernel should write all of
21551           it.
21552
21553       •   Frame index, unsigned int.
21554
21555           This is a counter starting from zero and increasing by one for each
21556           frame.
21557
21558       •   Source images, __read_only image2d_t.
21559
21560           These are the most recent images on each input.  The kernel may
21561           read from them to generate the output, but they can't be written
21562           to.
21563
21564       Example programs:
21565
21566       •   Copy the input to the output (output must be the same size as the
21567           input).
21568
21569                   __kernel void copy(__write_only image2d_t destination,
21570                                      unsigned int index,
21571                                      __read_only  image2d_t source)
21572                   {
21573                       const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE;
21574
21575                       int2 location = (int2)(get_global_id(0), get_global_id(1));
21576
21577                       float4 value = read_imagef(source, sampler, location);
21578
21579                       write_imagef(destination, location, value);
21580                   }
21581
21582       •   Apply a simple transformation, rotating the input by an amount
21583           increasing with the index counter.  Pixel values are linearly
21584           interpolated by the sampler, and the output need not have the same
21585           dimensions as the input.
21586
21587                   __kernel void rotate_image(__write_only image2d_t dst,
21588                                              unsigned int index,
21589                                              __read_only  image2d_t src)
21590                   {
21591                       const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
21592                                                  CLK_FILTER_LINEAR);
21593
21594                       float angle = (float)index / 100.0f;
21595
21596                       float2 dst_dim = convert_float2(get_image_dim(dst));
21597                       float2 src_dim = convert_float2(get_image_dim(src));
21598
21599                       float2 dst_cen = dst_dim / 2.0f;
21600                       float2 src_cen = src_dim / 2.0f;
21601
21602                       int2   dst_loc = (int2)(get_global_id(0), get_global_id(1));
21603
21604                       float2 dst_pos = convert_float2(dst_loc) - dst_cen;
21605                       float2 src_pos = {
21606                           cos(angle) * dst_pos.x - sin(angle) * dst_pos.y,
21607                           sin(angle) * dst_pos.x + cos(angle) * dst_pos.y
21608                       };
21609                       src_pos = src_pos * src_dim / dst_dim;
21610
21611                       float2 src_loc = src_pos + src_cen;
21612
21613                       if (src_loc.x < 0.0f      || src_loc.y < 0.0f ||
21614                           src_loc.x > src_dim.x || src_loc.y > src_dim.y)
21615                           write_imagef(dst, dst_loc, 0.5f);
21616                       else
21617                           write_imagef(dst, dst_loc, read_imagef(src, sampler, src_loc));
21618                   }
21619
21620       •   Blend two inputs together, with the amount of each input used
21621           varying with the index counter.
21622
21623                   __kernel void blend_images(__write_only image2d_t dst,
21624                                              unsigned int index,
21625                                              __read_only  image2d_t src1,
21626                                              __read_only  image2d_t src2)
21627                   {
21628                       const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
21629                                                  CLK_FILTER_LINEAR);
21630
21631                       float blend = (cos((float)index / 50.0f) + 1.0f) / 2.0f;
21632
21633                       int2  dst_loc = (int2)(get_global_id(0), get_global_id(1));
21634                       int2 src1_loc = dst_loc * get_image_dim(src1) / get_image_dim(dst);
21635                       int2 src2_loc = dst_loc * get_image_dim(src2) / get_image_dim(dst);
21636
21637                       float4 val1 = read_imagef(src1, sampler, src1_loc);
21638                       float4 val2 = read_imagef(src2, sampler, src2_loc);
21639
21640                       write_imagef(dst, dst_loc, val1 * blend + val2 * (1.0f - blend));
21641                   }
21642
21643   roberts_opencl
21644       Apply the Roberts cross operator
21645       (<https://en.wikipedia.org/wiki/Roberts_cross>) to input video stream.
21646
21647       The filter accepts the following option:
21648
21649       planes
21650           Set which planes to filter. Default value is 0xf, by which all
21651           planes are processed.
21652
21653       scale
21654           Set value which will be multiplied with filtered result.  Range is
21655           "[0.0, 65535]" and default value is 1.0.
21656
21657       delta
21658           Set value which will be added to filtered result.  Range is
21659           "[-65535, 65535]" and default value is 0.0.
21660
21661       Example
21662
21663       •   Apply the Roberts cross operator with scale set to 2 and delta set
21664           to 10
21665
21666                   -i INPUT -vf "hwupload, roberts_opencl=scale=2:delta=10, hwdownload" OUTPUT
21667
21668   sobel_opencl
21669       Apply the Sobel operator
21670       (<https://en.wikipedia.org/wiki/Sobel_operator>) to input video stream.
21671
21672       The filter accepts the following option:
21673
21674       planes
21675           Set which planes to filter. Default value is 0xf, by which all
21676           planes are processed.
21677
21678       scale
21679           Set value which will be multiplied with filtered result.  Range is
21680           "[0.0, 65535]" and default value is 1.0.
21681
21682       delta
21683           Set value which will be added to filtered result.  Range is
21684           "[-65535, 65535]" and default value is 0.0.
21685
21686       Example
21687
21688       •   Apply sobel operator with scale set to 2 and delta set to 10
21689
21690                   -i INPUT -vf "hwupload, sobel_opencl=scale=2:delta=10, hwdownload" OUTPUT
21691
21692   tonemap_opencl
21693       Perform HDR(PQ/HLG) to SDR conversion with tone-mapping.
21694
21695       It accepts the following parameters:
21696
21697       tonemap
21698           Specify the tone-mapping operator to be used. Same as tonemap
21699           option in tonemap.
21700
21701       param
21702           Tune the tone mapping algorithm. same as param option in tonemap.
21703
21704       desat
21705           Apply desaturation for highlights that exceed this level of
21706           brightness. The higher the parameter, the more color information
21707           will be preserved. This setting helps prevent unnaturally blown-out
21708           colors for super-highlights, by (smoothly) turning into white
21709           instead. This makes images feel more natural, at the cost of
21710           reducing information about out-of-range colors.
21711
21712           The default value is 0.5, and the algorithm here is a little
21713           different from the cpu version tonemap currently. A setting of 0.0
21714           disables this option.
21715
21716       threshold
21717           The tonemapping algorithm parameters is fine-tuned per each scene.
21718           And a threshold is used to detect whether the scene has changed or
21719           not. If the distance between the current frame average brightness
21720           and the current running average exceeds a threshold value, we would
21721           re-calculate scene average and peak brightness.  The default value
21722           is 0.2.
21723
21724       format
21725           Specify the output pixel format.
21726
21727           Currently supported formats are:
21728
21729           p010
21730           nv12
21731       range, r
21732           Set the output color range.
21733
21734           Possible values are:
21735
21736           tv/mpeg
21737           pc/jpeg
21738
21739           Default is same as input.
21740
21741       primaries, p
21742           Set the output color primaries.
21743
21744           Possible values are:
21745
21746           bt709
21747           bt2020
21748
21749           Default is same as input.
21750
21751       transfer, t
21752           Set the output transfer characteristics.
21753
21754           Possible values are:
21755
21756           bt709
21757           bt2020
21758
21759           Default is bt709.
21760
21761       matrix, m
21762           Set the output colorspace matrix.
21763
21764           Possible value are:
21765
21766           bt709
21767           bt2020
21768
21769           Default is same as input.
21770
21771       Example
21772
21773       •   Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010
21774           format using linear operator.
21775
21776                   -i INPUT -vf "format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010" OUTPUT
21777
21778   unsharp_opencl
21779       Sharpen or blur the input video.
21780
21781       It accepts the following parameters:
21782
21783       luma_msize_x, lx
21784           Set the luma matrix horizontal size.  Range is "[1, 23]" and
21785           default value is 5.
21786
21787       luma_msize_y, ly
21788           Set the luma matrix vertical size.  Range is "[1, 23]" and default
21789           value is 5.
21790
21791       luma_amount, la
21792           Set the luma effect strength.  Range is "[-10, 10]" and default
21793           value is 1.0.
21794
21795           Negative values will blur the input video, while positive values
21796           will sharpen it, a value of zero will disable the effect.
21797
21798       chroma_msize_x, cx
21799           Set the chroma matrix horizontal size.  Range is "[1, 23]" and
21800           default value is 5.
21801
21802       chroma_msize_y, cy
21803           Set the chroma matrix vertical size.  Range is "[1, 23]" and
21804           default value is 5.
21805
21806       chroma_amount, ca
21807           Set the chroma effect strength.  Range is "[-10, 10]" and default
21808           value is 0.0.
21809
21810           Negative values will blur the input video, while positive values
21811           will sharpen it, a value of zero will disable the effect.
21812
21813       All parameters are optional and default to the equivalent of the string
21814       '5:5:1.0:5:5:0.0'.
21815
21816       Examples
21817
21818       •   Apply strong luma sharpen effect:
21819
21820                   -i INPUT -vf "hwupload, unsharp_opencl=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5, hwdownload" OUTPUT
21821
21822       •   Apply a strong blur of both luma and chroma parameters:
21823
21824                   -i INPUT -vf "hwupload, unsharp_opencl=7:7:-2:7:7:-2, hwdownload" OUTPUT
21825
21826   xfade_opencl
21827       Cross fade two videos with custom transition effect by using OpenCL.
21828
21829       It accepts the following options:
21830
21831       transition
21832           Set one of possible transition effects.
21833
21834           custom
21835               Select custom transition effect, the actual transition
21836               description will be picked from source and kernel options.
21837
21838           fade
21839           wipeleft
21840           wiperight
21841           wipeup
21842           wipedown
21843           slideleft
21844           slideright
21845           slideup
21846           slidedown
21847               Default transition is fade.
21848
21849       source
21850           OpenCL program source file for custom transition.
21851
21852       kernel
21853           Set name of kernel to use for custom transition from program source
21854           file.
21855
21856       duration
21857           Set duration of video transition.
21858
21859       offset
21860           Set time of start of transition relative to first video.
21861
21862       The program source file must contain a kernel function with the given
21863       name, which will be run once for each plane of the output.  Each run on
21864       a plane gets enqueued as a separate 2D global NDRange with one work-
21865       item for each pixel to be generated.  The global ID offset for each
21866       work-item is therefore the coordinates of a pixel in the destination
21867       image.
21868
21869       The kernel function needs to take the following arguments:
21870
21871       •   Destination image, __write_only image2d_t.
21872
21873           This image will become the output; the kernel should write all of
21874           it.
21875
21876       •   First Source image, __read_only image2d_t.  Second Source image,
21877           __read_only image2d_t.
21878
21879           These are the most recent images on each input.  The kernel may
21880           read from them to generate the output, but they can't be written
21881           to.
21882
21883       •   Transition progress, float. This value is always between 0 and 1
21884           inclusive.
21885
21886       Example programs:
21887
21888       •   Apply dots curtain transition effect:
21889
21890                   __kernel void blend_images(__write_only image2d_t dst,
21891                                              __read_only  image2d_t src1,
21892                                              __read_only  image2d_t src2,
21893                                              float progress)
21894                   {
21895                       const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
21896                                                  CLK_FILTER_LINEAR);
21897                       int2  p = (int2)(get_global_id(0), get_global_id(1));
21898                       float2 rp = (float2)(get_global_id(0), get_global_id(1));
21899                       float2 dim = (float2)(get_image_dim(src1).x, get_image_dim(src1).y);
21900                       rp = rp / dim;
21901
21902                       float2 dots = (float2)(20.0, 20.0);
21903                       float2 center = (float2)(0,0);
21904                       float2 unused;
21905
21906                       float4 val1 = read_imagef(src1, sampler, p);
21907                       float4 val2 = read_imagef(src2, sampler, p);
21908                       bool next = distance(fract(rp * dots, &unused), (float2)(0.5, 0.5)) < (progress / distance(rp, center));
21909
21910                       write_imagef(dst, p, next ? val1 : val2);
21911                   }
21912

VAAPI VIDEO FILTERS

21914       VAAPI Video filters are usually used with VAAPI decoder and VAAPI
21915       encoder. Below is a description of VAAPI video filters.
21916
21917       To enable compilation of these filters you need to configure FFmpeg
21918       with "--enable-vaapi".
21919
21920       To use vaapi filters, you need to setup the vaapi device correctly. For
21921       more information, please read
21922       <https://trac.ffmpeg.org/wiki/Hardware/VAAPI>
21923
21924   tonemap_vaapi
21925       Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range)
21926       conversion with tone-mapping.  It maps the dynamic range of HDR10
21927       content to the SDR content.  It currently only accepts HDR10 as input.
21928
21929       It accepts the following parameters:
21930
21931       format
21932           Specify the output pixel format.
21933
21934           Currently supported formats are:
21935
21936           p010
21937           nv12
21938
21939           Default is nv12.
21940
21941       primaries, p
21942           Set the output color primaries.
21943
21944           Default is same as input.
21945
21946       transfer, t
21947           Set the output transfer characteristics.
21948
21949           Default is bt709.
21950
21951       matrix, m
21952           Set the output colorspace matrix.
21953
21954           Default is same as input.
21955
21956       Example
21957
21958       •   Convert HDR(HDR10) video to bt2020-transfer-characteristic p010
21959           format
21960
21961                   tonemap_vaapi=format=p010:t=bt2020-10
21962

VIDEO SOURCES

21964       Below is a description of the currently available video sources.
21965
21966   buffer
21967       Buffer video frames, and make them available to the filter chain.
21968
21969       This source is mainly intended for a programmatic use, in particular
21970       through the interface defined in libavfilter/buffersrc.h.
21971
21972       It accepts the following parameters:
21973
21974       video_size
21975           Specify the size (width and height) of the buffered video frames.
21976           For the syntax of this option, check the "Video size" section in
21977           the ffmpeg-utils manual.
21978
21979       width
21980           The input video width.
21981
21982       height
21983           The input video height.
21984
21985       pix_fmt
21986           A string representing the pixel format of the buffered video
21987           frames.  It may be a number corresponding to a pixel format, or a
21988           pixel format name.
21989
21990       time_base
21991           Specify the timebase assumed by the timestamps of the buffered
21992           frames.
21993
21994       frame_rate
21995           Specify the frame rate expected for the video stream.
21996
21997       pixel_aspect, sar
21998           The sample (pixel) aspect ratio of the input video.
21999
22000       sws_param
22001           This option is deprecated and ignored. Prepend "sws_flags=flags;"
22002           to the filtergraph description to specify swscale flags for
22003           automatically inserted scalers. See Filtergraph syntax.
22004
22005       hw_frames_ctx
22006           When using a hardware pixel format, this should be a reference to
22007           an AVHWFramesContext describing input frames.
22008
22009       For example:
22010
22011               buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
22012
22013       will instruct the source to accept video frames with size 320x240 and
22014       with format "yuv410p", assuming 1/24 as the timestamps timebase and
22015       square pixels (1:1 sample aspect ratio).  Since the pixel format with
22016       name "yuv410p" corresponds to the number 6 (check the enum
22017       AVPixelFormat definition in libavutil/pixfmt.h), this example
22018       corresponds to:
22019
22020               buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
22021
22022       Alternatively, the options can be specified as a flat string, but this
22023       syntax is deprecated:
22024
22025       width:height:pix_fmt:time_base.num:time_base.den:pixel_aspect.num:pixel_aspect.den
22026
22027   cellauto
22028       Create a pattern generated by an elementary cellular automaton.
22029
22030       The initial state of the cellular automaton can be defined through the
22031       filename and pattern options. If such options are not specified an
22032       initial state is created randomly.
22033
22034       At each new frame a new row in the video is filled with the result of
22035       the cellular automaton next generation. The behavior when the whole
22036       frame is filled is defined by the scroll option.
22037
22038       This source accepts the following options:
22039
22040       filename, f
22041           Read the initial cellular automaton state, i.e. the starting row,
22042           from the specified file.  In the file, each non-whitespace
22043           character is considered an alive cell, a newline will terminate the
22044           row, and further characters in the file will be ignored.
22045
22046       pattern, p
22047           Read the initial cellular automaton state, i.e. the starting row,
22048           from the specified string.
22049
22050           Each non-whitespace character in the string is considered an alive
22051           cell, a newline will terminate the row, and further characters in
22052           the string will be ignored.
22053
22054       rate, r
22055           Set the video rate, that is the number of frames generated per
22056           second.  Default is 25.
22057
22058       random_fill_ratio, ratio
22059           Set the random fill ratio for the initial cellular automaton row.
22060           It is a floating point number value ranging from 0 to 1, defaults
22061           to 1/PHI.
22062
22063           This option is ignored when a file or a pattern is specified.
22064
22065       random_seed, seed
22066           Set the seed for filling randomly the initial row, must be an
22067           integer included between 0 and UINT32_MAX. If not specified, or if
22068           explicitly set to -1, the filter will try to use a good random seed
22069           on a best effort basis.
22070
22071       rule
22072           Set the cellular automaton rule, it is a number ranging from 0 to
22073           255.  Default value is 110.
22074
22075       size, s
22076           Set the size of the output video. For the syntax of this option,
22077           check the "Video size" section in the ffmpeg-utils manual.
22078
22079           If filename or pattern is specified, the size is set by default to
22080           the width of the specified initial state row, and the height is set
22081           to width * PHI.
22082
22083           If size is set, it must contain the width of the specified pattern
22084           string, and the specified pattern will be centered in the larger
22085           row.
22086
22087           If a filename or a pattern string is not specified, the size value
22088           defaults to "320x518" (used for a randomly generated initial
22089           state).
22090
22091       scroll
22092           If set to 1, scroll the output upward when all the rows in the
22093           output have been already filled. If set to 0, the new generated row
22094           will be written over the top row just after the bottom row is
22095           filled.  Defaults to 1.
22096
22097       start_full, full
22098           If set to 1, completely fill the output with generated rows before
22099           outputting the first frame.  This is the default behavior, for
22100           disabling set the value to 0.
22101
22102       stitch
22103           If set to 1, stitch the left and right row edges together.  This is
22104           the default behavior, for disabling set the value to 0.
22105
22106       Examples
22107
22108       •   Read the initial state from pattern, and specify an output of size
22109           200x400.
22110
22111                   cellauto=f=pattern:s=200x400
22112
22113       •   Generate a random initial row with a width of 200 cells, with a
22114           fill ratio of 2/3:
22115
22116                   cellauto=ratio=2/3:s=200x200
22117
22118       •   Create a pattern generated by rule 18 starting by a single alive
22119           cell centered on an initial row with width 100:
22120
22121                   cellauto=p=@s=100x400:full=0:rule=18
22122
22123       •   Specify a more elaborated initial pattern:
22124
22125                   cellauto=p='@@ @ @@':s=100x400:full=0:rule=18
22126
22127   coreimagesrc
22128       Video source generated on GPU using Apple's CoreImage API on OSX.
22129
22130       This video source is a specialized version of the coreimage video
22131       filter.  Use a core image generator at the beginning of the applied
22132       filterchain to generate the content.
22133
22134       The coreimagesrc video source accepts the following options:
22135
22136       list_generators
22137           List all available generators along with all their respective
22138           options as well as possible minimum and maximum values along with
22139           the default values.
22140
22141                   list_generators=true
22142
22143       size, s
22144           Specify the size of the sourced video. For the syntax of this
22145           option, check the "Video size" section in the ffmpeg-utils manual.
22146           The default value is "320x240".
22147
22148       rate, r
22149           Specify the frame rate of the sourced video, as the number of
22150           frames generated per second. It has to be a string in the format
22151           frame_rate_num/frame_rate_den, an integer number, a floating point
22152           number or a valid video frame rate abbreviation. The default value
22153           is "25".
22154
22155       sar Set the sample aspect ratio of the sourced video.
22156
22157       duration, d
22158           Set the duration of the sourced video. See the Time duration
22159           section in the ffmpeg-utils(1) manual for the accepted syntax.
22160
22161           If not specified, or the expressed duration is negative, the video
22162           is supposed to be generated forever.
22163
22164       Additionally, all options of the coreimage video filter are accepted.
22165       A complete filterchain can be used for further processing of the
22166       generated input without CPU-HOST transfer. See coreimage documentation
22167       and examples for details.
22168
22169       Examples
22170
22171       •   Use CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
22172           given as complete and escaped command-line for Apple's standard
22173           bash shell:
22174
22175                   ffmpeg -f lavfi -i coreimagesrc=s=100x100:filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
22176
22177           This example is equivalent to the QRCode example of coreimage
22178           without the need for a nullsrc video source.
22179
22180   gradients
22181       Generate several gradients.
22182
22183       size, s
22184           Set frame size. For the syntax of this option, check the "Video
22185           size" section in the ffmpeg-utils manual. Default value is
22186           "640x480".
22187
22188       rate, r
22189           Set frame rate, expressed as number of frames per second. Default
22190           value is "25".
22191
22192       c0, c1, c2, c3, c4, c5, c6, c7
22193           Set 8 colors. Default values for colors is to pick random one.
22194
22195       x0, y0, y0, y1
22196           Set gradient line source and destination points. If negative or out
22197           of range, random ones are picked.
22198
22199       nb_colors, n
22200           Set number of colors to use at once. Allowed range is from 2 to 8.
22201           Default value is 2.
22202
22203       seed
22204           Set seed for picking gradient line points.
22205
22206       duration, d
22207           Set the duration of the sourced video. See the Time duration
22208           section in the ffmpeg-utils(1) manual for the accepted syntax.
22209
22210           If not specified, or the expressed duration is negative, the video
22211           is supposed to be generated forever.
22212
22213       speed
22214           Set speed of gradients rotation.
22215
22216   mandelbrot
22217       Generate a Mandelbrot set fractal, and progressively zoom towards the
22218       point specified with start_x and start_y.
22219
22220       This source accepts the following options:
22221
22222       end_pts
22223           Set the terminal pts value. Default value is 400.
22224
22225       end_scale
22226           Set the terminal scale value.  Must be a floating point value.
22227           Default value is 0.3.
22228
22229       inner
22230           Set the inner coloring mode, that is the algorithm used to draw the
22231           Mandelbrot fractal internal region.
22232
22233           It shall assume one of the following values:
22234
22235           black
22236               Set black mode.
22237
22238           convergence
22239               Show time until convergence.
22240
22241           mincol
22242               Set color based on point closest to the origin of the
22243               iterations.
22244
22245           period
22246               Set period mode.
22247
22248           Default value is mincol.
22249
22250       bailout
22251           Set the bailout value. Default value is 10.0.
22252
22253       maxiter
22254           Set the maximum of iterations performed by the rendering algorithm.
22255           Default value is 7189.
22256
22257       outer
22258           Set outer coloring mode.  It shall assume one of following values:
22259
22260           iteration_count
22261               Set iteration count mode.
22262
22263           normalized_iteration_count
22264               set normalized iteration count mode.
22265
22266           Default value is normalized_iteration_count.
22267
22268       rate, r
22269           Set frame rate, expressed as number of frames per second. Default
22270           value is "25".
22271
22272       size, s
22273           Set frame size. For the syntax of this option, check the "Video
22274           size" section in the ffmpeg-utils manual. Default value is
22275           "640x480".
22276
22277       start_scale
22278           Set the initial scale value. Default value is 3.0.
22279
22280       start_x
22281           Set the initial x position. Must be a floating point value between
22282           -100 and 100. Default value is
22283           -0.743643887037158704752191506114774.
22284
22285       start_y
22286           Set the initial y position. Must be a floating point value between
22287           -100 and 100. Default value is
22288           -0.131825904205311970493132056385139.
22289
22290   mptestsrc
22291       Generate various test patterns, as generated by the MPlayer test
22292       filter.
22293
22294       The size of the generated video is fixed, and is 256x256.  This source
22295       is useful in particular for testing encoding features.
22296
22297       This source accepts the following options:
22298
22299       rate, r
22300           Specify the frame rate of the sourced video, as the number of
22301           frames generated per second. It has to be a string in the format
22302           frame_rate_num/frame_rate_den, an integer number, a floating point
22303           number or a valid video frame rate abbreviation. The default value
22304           is "25".
22305
22306       duration, d
22307           Set the duration of the sourced video. See the Time duration
22308           section in the ffmpeg-utils(1) manual for the accepted syntax.
22309
22310           If not specified, or the expressed duration is negative, the video
22311           is supposed to be generated forever.
22312
22313       test, t
22314           Set the number or the name of the test to perform. Supported tests
22315           are:
22316
22317           dc_luma
22318           dc_chroma
22319           freq_luma
22320           freq_chroma
22321           amp_luma
22322           amp_chroma
22323           cbp
22324           mv
22325           ring1
22326           ring2
22327           all
22328           max_frames, m
22329               Set the maximum number of frames generated for each test,
22330               default value is 30.
22331
22332           Default value is "all", which will cycle through the list of all
22333           tests.
22334
22335       Some examples:
22336
22337               mptestsrc=t=dc_luma
22338
22339       will generate a "dc_luma" test pattern.
22340
22341   frei0r_src
22342       Provide a frei0r source.
22343
22344       To enable compilation of this filter you need to install the frei0r
22345       header and configure FFmpeg with "--enable-frei0r".
22346
22347       This source accepts the following parameters:
22348
22349       size
22350           The size of the video to generate. For the syntax of this option,
22351           check the "Video size" section in the ffmpeg-utils manual.
22352
22353       framerate
22354           The framerate of the generated video. It may be a string of the
22355           form num/den or a frame rate abbreviation.
22356
22357       filter_name
22358           The name to the frei0r source to load. For more information
22359           regarding frei0r and how to set the parameters, read the frei0r
22360           section in the video filters documentation.
22361
22362       filter_params
22363           A '|'-separated list of parameters to pass to the frei0r source.
22364
22365       For example, to generate a frei0r partik0l source with size 200x200 and
22366       frame rate 10 which is overlaid on the overlay filter main input:
22367
22368               frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
22369
22370   life
22371       Generate a life pattern.
22372
22373       This source is based on a generalization of John Conway's life game.
22374
22375       The sourced input represents a life grid, each pixel represents a cell
22376       which can be in one of two possible states, alive or dead. Every cell
22377       interacts with its eight neighbours, which are the cells that are
22378       horizontally, vertically, or diagonally adjacent.
22379
22380       At each interaction the grid evolves according to the adopted rule,
22381       which specifies the number of neighbor alive cells which will make a
22382       cell stay alive or born. The rule option allows one to specify the rule
22383       to adopt.
22384
22385       This source accepts the following options:
22386
22387       filename, f
22388           Set the file from which to read the initial grid state. In the
22389           file, each non-whitespace character is considered an alive cell,
22390           and newline is used to delimit the end of each row.
22391
22392           If this option is not specified, the initial grid is generated
22393           randomly.
22394
22395       rate, r
22396           Set the video rate, that is the number of frames generated per
22397           second.  Default is 25.
22398
22399       random_fill_ratio, ratio
22400           Set the random fill ratio for the initial random grid. It is a
22401           floating point number value ranging from 0 to 1, defaults to 1/PHI.
22402           It is ignored when a file is specified.
22403
22404       random_seed, seed
22405           Set the seed for filling the initial random grid, must be an
22406           integer included between 0 and UINT32_MAX. If not specified, or if
22407           explicitly set to -1, the filter will try to use a good random seed
22408           on a best effort basis.
22409
22410       rule
22411           Set the life rule.
22412
22413           A rule can be specified with a code of the kind "SNS/BNB", where NS
22414           and NB are sequences of numbers in the range 0-8, NS specifies the
22415           number of alive neighbor cells which make a live cell stay alive,
22416           and NB the number of alive neighbor cells which make a dead cell to
22417           become alive (i.e. to "born").  "s" and "b" can be used in place of
22418           "S" and "B", respectively.
22419
22420           Alternatively a rule can be specified by an 18-bits integer. The 9
22421           high order bits are used to encode the next cell state if it is
22422           alive for each number of neighbor alive cells, the low order bits
22423           specify the rule for "borning" new cells. Higher order bits encode
22424           for an higher number of neighbor cells.  For example the number
22425           6153 = "(12<<9)+9" specifies a stay alive rule of 12 and a born
22426           rule of 9, which corresponds to "S23/B03".
22427
22428           Default value is "S23/B3", which is the original Conway's game of
22429           life rule, and will keep a cell alive if it has 2 or 3 neighbor
22430           alive cells, and will born a new cell if there are three alive
22431           cells around a dead cell.
22432
22433       size, s
22434           Set the size of the output video. For the syntax of this option,
22435           check the "Video size" section in the ffmpeg-utils manual.
22436
22437           If filename is specified, the size is set by default to the same
22438           size of the input file. If size is set, it must contain the size
22439           specified in the input file, and the initial grid defined in that
22440           file is centered in the larger resulting area.
22441
22442           If a filename is not specified, the size value defaults to
22443           "320x240" (used for a randomly generated initial grid).
22444
22445       stitch
22446           If set to 1, stitch the left and right grid edges together, and the
22447           top and bottom edges also. Defaults to 1.
22448
22449       mold
22450           Set cell mold speed. If set, a dead cell will go from death_color
22451           to mold_color with a step of mold. mold can have a value from 0 to
22452           255.
22453
22454       life_color
22455           Set the color of living (or new born) cells.
22456
22457       death_color
22458           Set the color of dead cells. If mold is set, this is the first
22459           color used to represent a dead cell.
22460
22461       mold_color
22462           Set mold color, for definitely dead and moldy cells.
22463
22464           For the syntax of these 3 color options, check the "Color" section
22465           in the ffmpeg-utils manual.
22466
22467       Examples
22468
22469       •   Read a grid from pattern, and center it on a grid of size 300x300
22470           pixels:
22471
22472                   life=f=pattern:s=300x300
22473
22474       •   Generate a random grid of size 200x200, with a fill ratio of 2/3:
22475
22476                   life=ratio=2/3:s=200x200
22477
22478       •   Specify a custom rule for evolving a randomly generated grid:
22479
22480                   life=rule=S14/B34
22481
22482       •   Full example with slow death effect (mold) using ffplay:
22483
22484                   ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16
22485
22486   allrgb, allyuv, color, colorspectrum, haldclutsrc, nullsrc, pal75bars,
22487       pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2,
22488       yuvtestsrc
22489       The "allrgb" source returns frames of size 4096x4096 of all rgb colors.
22490
22491       The "allyuv" source returns frames of size 4096x4096 of all yuv colors.
22492
22493       The "color" source provides an uniformly colored input.
22494
22495       The "colorspectrum" source provides a color spectrum input.
22496
22497       The "haldclutsrc" source provides an identity Hald CLUT. See also
22498       haldclut filter.
22499
22500       The "nullsrc" source returns unprocessed video frames. It is mainly
22501       useful to be employed in analysis / debugging tools, or as the source
22502       for filters which ignore the input data.
22503
22504       The "pal75bars" source generates a color bars pattern, based on EBU PAL
22505       recommendations with 75% color levels.
22506
22507       The "pal100bars" source generates a color bars pattern, based on EBU
22508       PAL recommendations with 100% color levels.
22509
22510       The "rgbtestsrc" source generates an RGB test pattern useful for
22511       detecting RGB vs BGR issues. You should see a red, green and blue
22512       stripe from top to bottom.
22513
22514       The "smptebars" source generates a color bars pattern, based on the
22515       SMPTE Engineering Guideline EG 1-1990.
22516
22517       The "smptehdbars" source generates a color bars pattern, based on the
22518       SMPTE RP 219-2002.
22519
22520       The "testsrc" source generates a test video pattern, showing a color
22521       pattern, a scrolling gradient and a timestamp. This is mainly intended
22522       for testing purposes.
22523
22524       The "testsrc2" source is similar to testsrc, but supports more pixel
22525       formats instead of just "rgb24". This allows using it as an input for
22526       other tests without requiring a format conversion.
22527
22528       The "yuvtestsrc" source generates an YUV test pattern. You should see a
22529       y, cb and cr stripe from top to bottom.
22530
22531       The sources accept the following parameters:
22532
22533       level
22534           Specify the level of the Hald CLUT, only available in the
22535           "haldclutsrc" source. A level of "N" generates a picture of "N*N*N"
22536           by "N*N*N" pixels to be used as identity matrix for 3D lookup
22537           tables. Each component is coded on a "1/(N*N)" scale.
22538
22539       color, c
22540           Specify the color of the source, only available in the "color"
22541           source. For the syntax of this option, check the "Color" section in
22542           the ffmpeg-utils manual.
22543
22544       size, s
22545           Specify the size of the sourced video. For the syntax of this
22546           option, check the "Video size" section in the ffmpeg-utils manual.
22547           The default value is "320x240".
22548
22549           This option is not available with the "allrgb", "allyuv", and
22550           "haldclutsrc" filters.
22551
22552       rate, r
22553           Specify the frame rate of the sourced video, as the number of
22554           frames generated per second. It has to be a string in the format
22555           frame_rate_num/frame_rate_den, an integer number, a floating point
22556           number or a valid video frame rate abbreviation. The default value
22557           is "25".
22558
22559       duration, d
22560           Set the duration of the sourced video. See the Time duration
22561           section in the ffmpeg-utils(1) manual for the accepted syntax.
22562
22563           If not specified, or the expressed duration is negative, the video
22564           is supposed to be generated forever.
22565
22566           Since the frame rate is used as time base, all frames including the
22567           last one will have their full duration. If the specified duration
22568           is not a multiple of the frame duration, it will be rounded up.
22569
22570       sar Set the sample aspect ratio of the sourced video.
22571
22572       alpha
22573           Specify the alpha (opacity) of the background, only available in
22574           the "testsrc2" source. The value must be between 0 (fully
22575           transparent) and 255 (fully opaque, the default).
22576
22577       decimals, n
22578           Set the number of decimals to show in the timestamp, only available
22579           in the "testsrc" source.
22580
22581           The displayed timestamp value will correspond to the original
22582           timestamp value multiplied by the power of 10 of the specified
22583           value. Default value is 0.
22584
22585       type
22586           Set the type of the color spectrum, only available in the
22587           "colorspectrum" source. Can be one of the following:
22588
22589           black
22590           white
22591           all
22592
22593       Examples
22594
22595       •   Generate a video with a duration of 5.3 seconds, with size 176x144
22596           and a frame rate of 10 frames per second:
22597
22598                   testsrc=duration=5.3:size=qcif:rate=10
22599
22600       •   The following graph description will generate a red source with an
22601           opacity of 0.2, with size "qcif" and a frame rate of 10 frames per
22602           second:
22603
22604                   color=c=red@0.2:s=qcif:r=10
22605
22606       •   If the input content is to be ignored, "nullsrc" can be used. The
22607           following command generates noise in the luminance plane by
22608           employing the "geq" filter:
22609
22610                   nullsrc=s=256x256, geq=random(1)*255:128:128
22611
22612       Commands
22613
22614       The "color" source supports the following commands:
22615
22616       c, color
22617           Set the color of the created image. Accepts the same syntax of the
22618           corresponding color option.
22619
22620   openclsrc
22621       Generate video using an OpenCL program.
22622
22623       source
22624           OpenCL program source file.
22625
22626       kernel
22627           Kernel name in program.
22628
22629       size, s
22630           Size of frames to generate.  This must be set.
22631
22632       format
22633           Pixel format to use for the generated frames.  This must be set.
22634
22635       rate, r
22636           Number of frames generated every second.  Default value is '25'.
22637
22638       For details of how the program loading works, see the program_opencl
22639       filter.
22640
22641       Example programs:
22642
22643       •   Generate a colour ramp by setting pixel values from the position of
22644           the pixel in the output image.  (Note that this will work with all
22645           pixel formats, but the generated output will not be the same.)
22646
22647                   __kernel void ramp(__write_only image2d_t dst,
22648                                      unsigned int index)
22649                   {
22650                       int2 loc = (int2)(get_global_id(0), get_global_id(1));
22651
22652                       float4 val;
22653                       val.xy = val.zw = convert_float2(loc) / convert_float2(get_image_dim(dst));
22654
22655                       write_imagef(dst, loc, val);
22656                   }
22657
22658       •   Generate a Sierpinski carpet pattern, panning by a single pixel
22659           each frame.
22660
22661                   __kernel void sierpinski_carpet(__write_only image2d_t dst,
22662                                                   unsigned int index)
22663                   {
22664                       int2 loc = (int2)(get_global_id(0), get_global_id(1));
22665
22666                       float4 value = 0.0f;
22667                       int x = loc.x + index;
22668                       int y = loc.y + index;
22669                       while (x > 0 || y > 0) {
22670                           if (x % 3 == 1 && y % 3 == 1) {
22671                               value = 1.0f;
22672                               break;
22673                           }
22674                           x /= 3;
22675                           y /= 3;
22676                       }
22677
22678                       write_imagef(dst, loc, value);
22679                   }
22680
22681   sierpinski
22682       Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
22683
22684       This source accepts the following options:
22685
22686       size, s
22687           Set frame size. For the syntax of this option, check the "Video
22688           size" section in the ffmpeg-utils manual. Default value is
22689           "640x480".
22690
22691       rate, r
22692           Set frame rate, expressed as number of frames per second. Default
22693           value is "25".
22694
22695       seed
22696           Set seed which is used for random panning.
22697
22698       jump
22699           Set max jump for single pan destination. Allowed range is from 1 to
22700           10000.
22701
22702       type
22703           Set fractal type, can be default "carpet" or "triangle".
22704

VIDEO SINKS

22706       Below is a description of the currently available video sinks.
22707
22708   buffersink
22709       Buffer video frames, and make them available to the end of the filter
22710       graph.
22711
22712       This sink is mainly intended for programmatic use, in particular
22713       through the interface defined in libavfilter/buffersink.h or the
22714       options system.
22715
22716       It accepts a pointer to an AVBufferSinkContext structure, which defines
22717       the incoming buffers' formats, to be passed as the opaque parameter to
22718       "avfilter_init_filter" for initialization.
22719
22720   nullsink
22721       Null video sink: do absolutely nothing with the input video. It is
22722       mainly useful as a template and for use in analysis / debugging tools.
22723

MULTIMEDIA FILTERS

22725       Below is a description of the currently available multimedia filters.
22726
22727   abitscope
22728       Convert input audio to a video output, displaying the audio bit scope.
22729
22730       The filter accepts the following options:
22731
22732       rate, r
22733           Set frame rate, expressed as number of frames per second. Default
22734           value is "25".
22735
22736       size, s
22737           Specify the video size for the output. For the syntax of this
22738           option, check the "Video size" section in the ffmpeg-utils manual.
22739           Default value is "1024x256".
22740
22741       colors
22742           Specify list of colors separated by space or by '|' which will be
22743           used to draw channels. Unrecognized or missing colors will be
22744           replaced by white color.
22745
22746   adrawgraph
22747       Draw a graph using input audio metadata.
22748
22749       See drawgraph
22750
22751   agraphmonitor
22752       See graphmonitor.
22753
22754   ahistogram
22755       Convert input audio to a video output, displaying the volume histogram.
22756
22757       The filter accepts the following options:
22758
22759       dmode
22760           Specify how histogram is calculated.
22761
22762           It accepts the following values:
22763
22764           single
22765               Use single histogram for all channels.
22766
22767           separate
22768               Use separate histogram for each channel.
22769
22770           Default is "single".
22771
22772       rate, r
22773           Set frame rate, expressed as number of frames per second. Default
22774           value is "25".
22775
22776       size, s
22777           Specify the video size for the output. For the syntax of this
22778           option, check the "Video size" section in the ffmpeg-utils manual.
22779           Default value is "hd720".
22780
22781       scale
22782           Set display scale.
22783
22784           It accepts the following values:
22785
22786           log logarithmic
22787
22788           sqrt
22789               square root
22790
22791           cbrt
22792               cubic root
22793
22794           lin linear
22795
22796           rlog
22797               reverse logarithmic
22798
22799           Default is "log".
22800
22801       ascale
22802           Set amplitude scale.
22803
22804           It accepts the following values:
22805
22806           log logarithmic
22807
22808           lin linear
22809
22810           Default is "log".
22811
22812       acount
22813           Set how much frames to accumulate in histogram.  Default is 1.
22814           Setting this to -1 accumulates all frames.
22815
22816       rheight
22817           Set histogram ratio of window height.
22818
22819       slide
22820           Set sonogram sliding.
22821
22822           It accepts the following values:
22823
22824           replace
22825               replace old rows with new ones.
22826
22827           scroll
22828               scroll from top to bottom.
22829
22830           Default is "replace".
22831
22832   aphasemeter
22833       Measures phase of input audio, which is exported as metadata
22834       "lavfi.aphasemeter.phase", representing mean phase of current audio
22835       frame. A video output can also be produced and is enabled by default.
22836       The audio is passed through as first output.
22837
22838       Audio will be rematrixed to stereo if it has a different channel
22839       layout. Phase value is in range "[-1, 1]" where "-1" means left and
22840       right channels are completely out of phase and 1 means channels are in
22841       phase.
22842
22843       The filter accepts the following options, all related to its video
22844       output:
22845
22846       rate, r
22847           Set the output frame rate. Default value is 25.
22848
22849       size, s
22850           Set the video size for the output. For the syntax of this option,
22851           check the "Video size" section in the ffmpeg-utils manual.  Default
22852           value is "800x400".
22853
22854       rc
22855       gc
22856       bc  Specify the red, green, blue contrast. Default values are 2, 7 and
22857           1.  Allowed range is "[0, 255]".
22858
22859       mpc Set color which will be used for drawing median phase. If color is
22860           "none" which is default, no median phase value will be drawn.
22861
22862       video
22863           Enable video output. Default is enabled.
22864
22865       phasing detection
22866
22867       The filter also detects out of phase and mono sequences in stereo
22868       streams.  It logs the sequence start, end and duration when it lasts
22869       longer or as long as the minimum set.
22870
22871       The filter accepts the following options for this detection:
22872
22873       phasing
22874           Enable mono and out of phase detection. Default is disabled.
22875
22876       tolerance, t
22877           Set phase tolerance for mono detection, in amplitude ratio. Default
22878           is 0.  Allowed range is "[0, 1]".
22879
22880       angle, a
22881           Set angle threshold for out of phase detection, in degree. Default
22882           is 170.  Allowed range is "[90, 180]".
22883
22884       duration, d
22885           Set mono or out of phase duration until notification, expressed in
22886           seconds. Default is 2.
22887
22888       Examples
22889
22890       •   Complete example with ffmpeg to detect 1 second of mono with 0.001
22891           phase tolerance:
22892
22893                   ffmpeg -i stereo.wav -af aphasemeter=video=0:phasing=1:duration=1:tolerance=0.001 -f null -
22894
22895   avectorscope
22896       Convert input audio to a video output, representing the audio vector
22897       scope.
22898
22899       The filter is used to measure the difference between channels of stereo
22900       audio stream. A monaural signal, consisting of identical left and right
22901       signal, results in straight vertical line. Any stereo separation is
22902       visible as a deviation from this line, creating a Lissajous figure.  If
22903       the straight (or deviation from it) but horizontal line appears this
22904       indicates that the left and right channels are out of phase.
22905
22906       The filter accepts the following options:
22907
22908       mode, m
22909           Set the vectorscope mode.
22910
22911           Available values are:
22912
22913           lissajous
22914               Lissajous rotated by 45 degrees.
22915
22916           lissajous_xy
22917               Same as above but not rotated.
22918
22919           polar
22920               Shape resembling half of circle.
22921
22922           Default value is lissajous.
22923
22924       size, s
22925           Set the video size for the output. For the syntax of this option,
22926           check the "Video size" section in the ffmpeg-utils manual.  Default
22927           value is "400x400".
22928
22929       rate, r
22930           Set the output frame rate. Default value is 25.
22931
22932       rc
22933       gc
22934       bc
22935       ac  Specify the red, green, blue and alpha contrast. Default values are
22936           40, 160, 80 and 255.  Allowed range is "[0, 255]".
22937
22938       rf
22939       gf
22940       bf
22941       af  Specify the red, green, blue and alpha fade. Default values are 15,
22942           10, 5 and 5.  Allowed range is "[0, 255]".
22943
22944       zoom
22945           Set the zoom factor. Default value is 1. Allowed range is "[0,
22946           10]".  Values lower than 1 will auto adjust zoom factor to maximal
22947           possible value.
22948
22949       draw
22950           Set the vectorscope drawing mode.
22951
22952           Available values are:
22953
22954           dot Draw dot for each sample.
22955
22956           line
22957               Draw line between previous and current sample.
22958
22959           Default value is dot.
22960
22961       scale
22962           Specify amplitude scale of audio samples.
22963
22964           Available values are:
22965
22966           lin Linear.
22967
22968           sqrt
22969               Square root.
22970
22971           cbrt
22972               Cubic root.
22973
22974           log Logarithmic.
22975
22976       swap
22977           Swap left channel axis with right channel axis.
22978
22979       mirror
22980           Mirror axis.
22981
22982           none
22983               No mirror.
22984
22985           x   Mirror only x axis.
22986
22987           y   Mirror only y axis.
22988
22989           xy  Mirror both axis.
22990
22991       Examples
22992
22993       •   Complete example using ffplay:
22994
22995                   ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
22996                                [a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]'
22997
22998       Commands
22999
23000       This filter supports the all above options as commands except options
23001       "size" and "rate".
23002
23003   bench, abench
23004       Benchmark part of a filtergraph.
23005
23006       The filter accepts the following options:
23007
23008       action
23009           Start or stop a timer.
23010
23011           Available values are:
23012
23013           start
23014               Get the current time, set it as frame metadata (using the key
23015               "lavfi.bench.start_time"), and forward the frame to the next
23016               filter.
23017
23018           stop
23019               Get the current time and fetch the "lavfi.bench.start_time"
23020               metadata from the input frame metadata to get the time
23021               difference. Time difference, average, maximum and minimum time
23022               (respectively "t", "avg", "max" and "min") are then printed.
23023               The timestamps are expressed in seconds.
23024
23025       Examples
23026
23027       •   Benchmark selectivecolor filter:
23028
23029                   bench=start,selectivecolor=reds=-.2 .12 -.49,bench=stop
23030
23031   concat
23032       Concatenate audio and video streams, joining them together one after
23033       the other.
23034
23035       The filter works on segments of synchronized video and audio streams.
23036       All segments must have the same number of streams of each type, and
23037       that will also be the number of streams at output.
23038
23039       The filter accepts the following options:
23040
23041       n   Set the number of segments. Default is 2.
23042
23043       v   Set the number of output video streams, that is also the number of
23044           video streams in each segment. Default is 1.
23045
23046       a   Set the number of output audio streams, that is also the number of
23047           audio streams in each segment. Default is 0.
23048
23049       unsafe
23050           Activate unsafe mode: do not fail if segments have a different
23051           format.
23052
23053       The filter has v+a outputs: first v video outputs, then a audio
23054       outputs.
23055
23056       There are nx(v+a) inputs: first the inputs for the first segment, in
23057       the same order as the outputs, then the inputs for the second segment,
23058       etc.
23059
23060       Related streams do not always have exactly the same duration, for
23061       various reasons including codec frame size or sloppy authoring. For
23062       that reason, related synchronized streams (e.g. a video and its audio
23063       track) should be concatenated at once. The concat filter will use the
23064       duration of the longest stream in each segment (except the last one),
23065       and if necessary pad shorter audio streams with silence.
23066
23067       For this filter to work correctly, all segments must start at timestamp
23068       0.
23069
23070       All corresponding streams must have the same parameters in all
23071       segments; the filtering system will automatically select a common pixel
23072       format for video streams, and a common sample format, sample rate and
23073       channel layout for audio streams, but other settings, such as
23074       resolution, must be converted explicitly by the user.
23075
23076       Different frame rates are acceptable but will result in variable frame
23077       rate at output; be sure to configure the output file to handle it.
23078
23079       Examples
23080
23081       •   Concatenate an opening, an episode and an ending, all in bilingual
23082           version (video in stream 0, audio in streams 1 and 2):
23083
23084                   ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv -filter_complex \
23085                     '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2]
23086                      concat=n=3:v=1:a=2 [v] [a1] [a2]' \
23087                     -map '[v]' -map '[a1]' -map '[a2]' output.mkv
23088
23089       •   Concatenate two parts, handling audio and video separately, using
23090           the (a)movie sources, and adjusting the resolution:
23091
23092                   movie=part1.mp4, scale=512:288 [v1] ; amovie=part1.mp4 [a1] ;
23093                   movie=part2.mp4, scale=512:288 [v2] ; amovie=part2.mp4 [a2] ;
23094                   [v1] [v2] concat [outv] ; [a1] [a2] concat=v=0:a=1 [outa]
23095
23096           Note that a desync will happen at the stitch if the audio and video
23097           streams do not have exactly the same duration in the first file.
23098
23099       Commands
23100
23101       This filter supports the following commands:
23102
23103       next
23104           Close the current segment and step to the next one
23105
23106   ebur128
23107       EBU R128 scanner filter. This filter takes an audio stream and analyzes
23108       its loudness level. By default, it logs a message at a frequency of
23109       10Hz with the Momentary loudness (identified by "M"), Short-term
23110       loudness ("S"), Integrated loudness ("I") and Loudness Range ("LRA").
23111
23112       The filter can only analyze streams which have sample format is double-
23113       precision floating point. The input stream will be converted to this
23114       specification, if needed. Users may need to insert aformat and/or
23115       aresample filters after this filter to obtain the original parameters.
23116
23117       The filter also has a video output (see the video option) with a real
23118       time graph to observe the loudness evolution. The graphic contains the
23119       logged message mentioned above, so it is not printed anymore when this
23120       option is set, unless the verbose logging is set. The main graphing
23121       area contains the short-term loudness (3 seconds of analysis), and the
23122       gauge on the right is for the momentary loudness (400 milliseconds),
23123       but can optionally be configured to instead display short-term loudness
23124       (see gauge).
23125
23126       The green area marks a  +/- 1LU target range around the target loudness
23127       (-23LUFS by default, unless modified through target).
23128
23129       More information about the Loudness Recommendation EBU R128 on
23130       <http://tech.ebu.ch/loudness>.
23131
23132       The filter accepts the following options:
23133
23134       video
23135           Activate the video output. The audio stream is passed unchanged
23136           whether this option is set or no. The video stream will be the
23137           first output stream if activated. Default is 0.
23138
23139       size
23140           Set the video size. This option is for video only. For the syntax
23141           of this option, check the "Video size" section in the ffmpeg-utils
23142           manual.  Default and minimum resolution is "640x480".
23143
23144       meter
23145           Set the EBU scale meter. Default is 9. Common values are 9 and 18,
23146           respectively for EBU scale meter +9 and EBU scale meter +18. Any
23147           other integer value between this range is allowed.
23148
23149       metadata
23150           Set metadata injection. If set to 1, the audio input will be
23151           segmented into 100ms output frames, each of them containing various
23152           loudness information in metadata.  All the metadata keys are
23153           prefixed with "lavfi.r128.".
23154
23155           Default is 0.
23156
23157       framelog
23158           Force the frame logging level.
23159
23160           Available values are:
23161
23162           info
23163               information logging level
23164
23165           verbose
23166               verbose logging level
23167
23168           By default, the logging level is set to info. If the video or the
23169           metadata options are set, it switches to verbose.
23170
23171       peak
23172           Set peak mode(s).
23173
23174           Available modes can be cumulated (the option is a "flag" type).
23175           Possible values are:
23176
23177           none
23178               Disable any peak mode (default).
23179
23180           sample
23181               Enable sample-peak mode.
23182
23183               Simple peak mode looking for the higher sample value. It logs a
23184               message for sample-peak (identified by "SPK").
23185
23186           true
23187               Enable true-peak mode.
23188
23189               If enabled, the peak lookup is done on an over-sampled version
23190               of the input stream for better peak accuracy. It logs a message
23191               for true-peak.  (identified by "TPK") and true-peak per frame
23192               (identified by "FTPK").  This mode requires a build with
23193               "libswresample".
23194
23195       dualmono
23196           Treat mono input files as "dual mono". If a mono file is intended
23197           for playback on a stereo system, its EBU R128 measurement will be
23198           perceptually incorrect.  If set to "true", this option will
23199           compensate for this effect.  Multi-channel input files are not
23200           affected by this option.
23201
23202       panlaw
23203           Set a specific pan law to be used for the measurement of dual mono
23204           files.  This parameter is optional, and has a default value of
23205           -3.01dB.
23206
23207       target
23208           Set a specific target level (in LUFS) used as relative zero in the
23209           visualization.  This parameter is optional and has a default value
23210           of -23LUFS as specified by EBU R128. However, material published
23211           online may prefer a level of -16LUFS (e.g. for use with podcasts or
23212           video platforms).
23213
23214       gauge
23215           Set the value displayed by the gauge. Valid values are "momentary"
23216           and s "shortterm". By default the momentary value will be used, but
23217           in certain scenarios it may be more useful to observe the short
23218           term value instead (e.g.  live mixing).
23219
23220       scale
23221           Sets the display scale for the loudness. Valid parameters are
23222           "absolute" (in LUFS) or "relative" (LU) relative to the target.
23223           This only affects the video output, not the summary or continuous
23224           log output.
23225
23226       Examples
23227
23228       •   Real-time graph using ffplay, with a EBU scale meter +18:
23229
23230                   ffplay -f lavfi -i "amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]"
23231
23232       •   Run an analysis with ffmpeg:
23233
23234                   ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
23235
23236   interleave, ainterleave
23237       Temporally interleave frames from several inputs.
23238
23239       "interleave" works with video inputs, "ainterleave" with audio.
23240
23241       These filters read frames from several inputs and send the oldest
23242       queued frame to the output.
23243
23244       Input streams must have well defined, monotonically increasing frame
23245       timestamp values.
23246
23247       In order to submit one frame to output, these filters need to enqueue
23248       at least one frame for each input, so they cannot work in case one
23249       input is not yet terminated and will not receive incoming frames.
23250
23251       For example consider the case when one input is a "select" filter which
23252       always drops input frames. The "interleave" filter will keep reading
23253       from that input, but it will never be able to send new frames to output
23254       until the input sends an end-of-stream signal.
23255
23256       Also, depending on inputs synchronization, the filters will drop frames
23257       in case one input receives more frames than the other ones, and the
23258       queue is already filled.
23259
23260       These filters accept the following options:
23261
23262       nb_inputs, n
23263           Set the number of different inputs, it is 2 by default.
23264
23265       duration
23266           How to determine the end-of-stream.
23267
23268           longest
23269               The duration of the longest input. (default)
23270
23271           shortest
23272               The duration of the shortest input.
23273
23274           first
23275               The duration of the first input.
23276
23277       Examples
23278
23279       •   Interleave frames belonging to different streams using ffmpeg:
23280
23281                   ffmpeg -i bambi.avi -i pr0n.mkv -filter_complex "[0:v][1:v] interleave" out.avi
23282
23283       •   Add flickering blur effect:
23284
23285                   select='if(gt(random(0), 0.2), 1, 2)':n=2 [tmp], boxblur=2:2, [tmp] interleave
23286
23287   latency, alatency
23288       Measure filtering latency.
23289
23290       Report previous filter filtering latency, delay in number of audio
23291       samples for audio filters or number of video frames for video filters.
23292
23293       On end of input stream, filter will report min and max measured latency
23294       for previous running filter in filtergraph.
23295
23296   metadata, ametadata
23297       Manipulate frame metadata.
23298
23299       This filter accepts the following options:
23300
23301       mode
23302           Set mode of operation of the filter.
23303
23304           Can be one of the following:
23305
23306           select
23307               If both "value" and "key" is set, select frames which have such
23308               metadata. If only "key" is set, select every frame that has
23309               such key in metadata.
23310
23311           add Add new metadata "key" and "value". If key is already available
23312               do nothing.
23313
23314           modify
23315               Modify value of already present key.
23316
23317           delete
23318               If "value" is set, delete only keys that have such value.
23319               Otherwise, delete key. If "key" is not set, delete all metadata
23320               values in the frame.
23321
23322           print
23323               Print key and its value if metadata was found. If "key" is not
23324               set print all metadata values available in frame.
23325
23326       key Set key used with all modes. Must be set for all modes except
23327           "print" and "delete".
23328
23329       value
23330           Set metadata value which will be used. This option is mandatory for
23331           "modify" and "add" mode.
23332
23333       function
23334           Which function to use when comparing metadata value and "value".
23335
23336           Can be one of following:
23337
23338           same_str
23339               Values are interpreted as strings, returns true if metadata
23340               value is same as "value".
23341
23342           starts_with
23343               Values are interpreted as strings, returns true if metadata
23344               value starts with the "value" option string.
23345
23346           less
23347               Values are interpreted as floats, returns true if metadata
23348               value is less than "value".
23349
23350           equal
23351               Values are interpreted as floats, returns true if "value" is
23352               equal with metadata value.
23353
23354           greater
23355               Values are interpreted as floats, returns true if metadata
23356               value is greater than "value".
23357
23358           expr
23359               Values are interpreted as floats, returns true if expression
23360               from option "expr" evaluates to true.
23361
23362           ends_with
23363               Values are interpreted as strings, returns true if metadata
23364               value ends with the "value" option string.
23365
23366       expr
23367           Set expression which is used when "function" is set to "expr".  The
23368           expression is evaluated through the eval API and can contain the
23369           following constants:
23370
23371           VALUE1, FRAMEVAL
23372               Float representation of "value" from metadata key.
23373
23374           VALUE2, USERVAL
23375               Float representation of "value" as supplied by user in "value"
23376               option.
23377
23378       file
23379           If specified in "print" mode, output is written to the named file.
23380           Instead of plain filename any writable url can be specified.
23381           Filename ``-'' is a shorthand for standard output. If "file" option
23382           is not set, output is written to the log with AV_LOG_INFO loglevel.
23383
23384       direct
23385           Reduces buffering in print mode when output is written to a URL set
23386           using file.
23387
23388       Examples
23389
23390       •   Print all metadata values for frames with key
23391           "lavfi.signalstats.YDIF" with values between 0 and 1.
23392
23393                   signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
23394
23395       •   Print silencedetect output to file metadata.txt.
23396
23397                   silencedetect,ametadata=mode=print:file=metadata.txt
23398
23399       •   Direct all metadata to a pipe with file descriptor 4.
23400
23401                   metadata=mode=print:file='pipe\:4'
23402
23403   perms, aperms
23404       Set read/write permissions for the output frames.
23405
23406       These filters are mainly aimed at developers to test direct path in the
23407       following filter in the filtergraph.
23408
23409       The filters accept the following options:
23410
23411       mode
23412           Select the permissions mode.
23413
23414           It accepts the following values:
23415
23416           none
23417               Do nothing. This is the default.
23418
23419           ro  Set all the output frames read-only.
23420
23421           rw  Set all the output frames directly writable.
23422
23423           toggle
23424               Make the frame read-only if writable, and writable if read-
23425               only.
23426
23427           random
23428               Set each output frame read-only or writable randomly.
23429
23430       seed
23431           Set the seed for the random mode, must be an integer included
23432           between 0 and "UINT32_MAX". If not specified, or if explicitly set
23433           to "-1", the filter will try to use a good random seed on a best
23434           effort basis.
23435
23436       Note: in case of auto-inserted filter between the permission filter and
23437       the following one, the permission might not be received as expected in
23438       that following filter. Inserting a format or aformat filter before the
23439       perms/aperms filter can avoid this problem.
23440
23441   realtime, arealtime
23442       Slow down filtering to match real time approximately.
23443
23444       These filters will pause the filtering for a variable amount of time to
23445       match the output rate with the input timestamps.  They are similar to
23446       the re option to "ffmpeg".
23447
23448       They accept the following options:
23449
23450       limit
23451           Time limit for the pauses. Any pause longer than that will be
23452           considered a timestamp discontinuity and reset the timer. Default
23453           is 2 seconds.
23454
23455       speed
23456           Speed factor for processing. The value must be a float larger than
23457           zero.  Values larger than 1.0 will result in faster than realtime
23458           processing, smaller will slow processing down. The limit is
23459           automatically adapted accordingly. Default is 1.0.
23460
23461           A processing speed faster than what is possible without these
23462           filters cannot be achieved.
23463
23464   segment, asegment
23465       Split single input stream into multiple streams.
23466
23467       This filter does opposite of concat filters.
23468
23469       "segment" works on video frames, "asegment" on audio samples.
23470
23471       This filter accepts the following options:
23472
23473       timestamps
23474           Timestamps of output segments separated by '|'. The first segment
23475           will run from the beginning of the input stream. The last segment
23476           will run until the end of the input stream
23477
23478       frames, samples
23479           Exact frame/sample count to split the segments.
23480
23481       In all cases, prefixing an each segment with '+' will make it relative
23482       to the previous segment.
23483
23484       Examples
23485
23486       •   Split input audio stream into three output audio streams, starting
23487           at start of input audio stream and storing that in 1st output audio
23488           stream, then following at 60th second and storing than in 2nd
23489           output audio stream, and last after 150th second of input audio
23490           stream store in 3rd output audio stream:
23491
23492                   asegment=timestamps="60|150"
23493
23494   select, aselect
23495       Select frames to pass in output.
23496
23497       This filter accepts the following options:
23498
23499       expr, e
23500           Set expression, which is evaluated for each input frame.
23501
23502           If the expression is evaluated to zero, the frame is discarded.
23503
23504           If the evaluation result is negative or NaN, the frame is sent to
23505           the first output; otherwise it is sent to the output with index
23506           "ceil(val)-1", assuming that the input index starts from 0.
23507
23508           For example a value of 1.2 corresponds to the output with index
23509           "ceil(1.2)-1 = 2-1 = 1", that is the second output.
23510
23511       outputs, n
23512           Set the number of outputs. The output to which to send the selected
23513           frame is based on the result of the evaluation. Default value is 1.
23514
23515       The expression can contain the following constants:
23516
23517       n   The (sequential) number of the filtered frame, starting from 0.
23518
23519       selected_n
23520           The (sequential) number of the selected frame, starting from 0.
23521
23522       prev_selected_n
23523           The sequential number of the last selected frame. It's NAN if
23524           undefined.
23525
23526       TB  The timebase of the input timestamps.
23527
23528       pts The PTS (Presentation TimeStamp) of the filtered frame, expressed
23529           in TB units. It's NAN if undefined.
23530
23531       t   The PTS of the filtered frame, expressed in seconds. It's NAN if
23532           undefined.
23533
23534       prev_pts
23535           The PTS of the previously filtered frame. It's NAN if undefined.
23536
23537       prev_selected_pts
23538           The PTS of the last previously filtered frame. It's NAN if
23539           undefined.
23540
23541       prev_selected_t
23542           The PTS of the last previously selected frame, expressed in
23543           seconds. It's NAN if undefined.
23544
23545       start_pts
23546           The first PTS in the stream which is not NAN. It remains NAN if not
23547           found.
23548
23549       start_t
23550           The first PTS, in seconds, in the stream which is not NAN. It
23551           remains NAN if not found.
23552
23553       pict_type (video only)
23554           The type of the filtered frame. It can assume one of the following
23555           values:
23556
23557           I
23558           P
23559           B
23560           S
23561           SI
23562           SP
23563           BI
23564       interlace_type (video only)
23565           The frame interlace type. It can assume one of the following
23566           values:
23567
23568           PROGRESSIVE
23569               The frame is progressive (not interlaced).
23570
23571           TOPFIRST
23572               The frame is top-field-first.
23573
23574           BOTTOMFIRST
23575               The frame is bottom-field-first.
23576
23577       consumed_sample_n (audio only)
23578           the number of selected samples before the current frame
23579
23580       samples_n (audio only)
23581           the number of samples in the current frame
23582
23583       sample_rate (audio only)
23584           the input sample rate
23585
23586       key This is 1 if the filtered frame is a key-frame, 0 otherwise.
23587
23588       pos the position in the file of the filtered frame, -1 if the
23589           information is not available (e.g. for synthetic video)
23590
23591       scene (video only)
23592           value between 0 and 1 to indicate a new scene; a low value reflects
23593           a low probability for the current frame to introduce a new scene,
23594           while a higher value means the current frame is more likely to be
23595           one (see the example below)
23596
23597       concatdec_select
23598           The concat demuxer can select only part of a concat input file by
23599           setting an inpoint and an outpoint, but the output packets may not
23600           be entirely contained in the selected interval. By using this
23601           variable, it is possible to skip frames generated by the concat
23602           demuxer which are not exactly contained in the selected interval.
23603
23604           This works by comparing the frame pts against the
23605           lavf.concat.start_time and the lavf.concat.duration packet metadata
23606           values which are also present in the decoded frames.
23607
23608           The concatdec_select variable is -1 if the frame pts is at least
23609           start_time and either the duration metadata is missing or the frame
23610           pts is less than start_time + duration, 0 otherwise, and NaN if the
23611           start_time metadata is missing.
23612
23613           That basically means that an input frame is selected if its pts is
23614           within the interval set by the concat demuxer.
23615
23616       The default value of the select expression is "1".
23617
23618       Examples
23619
23620       •   Select all frames in input:
23621
23622                   select
23623
23624           The example above is the same as:
23625
23626                   select=1
23627
23628       •   Skip all frames:
23629
23630                   select=0
23631
23632       •   Select only I-frames:
23633
23634                   select='eq(pict_type\,I)'
23635
23636       •   Select one frame every 100:
23637
23638                   select='not(mod(n\,100))'
23639
23640       •   Select only frames contained in the 10-20 time interval:
23641
23642                   select=between(t\,10\,20)
23643
23644       •   Select only I-frames contained in the 10-20 time interval:
23645
23646                   select=between(t\,10\,20)*eq(pict_type\,I)
23647
23648       •   Select frames with a minimum distance of 10 seconds:
23649
23650                   select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
23651
23652       •   Use aselect to select only audio frames with samples number > 100:
23653
23654                   aselect='gt(samples_n\,100)'
23655
23656       •   Create a mosaic of the first scenes:
23657
23658                   ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
23659
23660           Comparing scene against a value between 0.3 and 0.5 is generally a
23661           sane choice.
23662
23663       •   Send even and odd frames to separate outputs, and compose them:
23664
23665                   select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h
23666
23667       •   Select useful frames from an ffconcat file which is using inpoints
23668           and outpoints but where the source files are not intra frame only.
23669
23670                   ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf select=concatdec_select -af aselect=concatdec_select output.avi
23671
23672   sendcmd, asendcmd
23673       Send commands to filters in the filtergraph.
23674
23675       These filters read commands to be sent to other filters in the
23676       filtergraph.
23677
23678       "sendcmd" must be inserted between two video filters, "asendcmd" must
23679       be inserted between two audio filters, but apart from that they act the
23680       same way.
23681
23682       The specification of commands can be provided in the filter arguments
23683       with the commands option, or in a file specified by the filename
23684       option.
23685
23686       These filters accept the following options:
23687
23688       commands, c
23689           Set the commands to be read and sent to the other filters.
23690
23691       filename, f
23692           Set the filename of the commands to be read and sent to the other
23693           filters.
23694
23695       Commands syntax
23696
23697       A commands description consists of a sequence of interval
23698       specifications, comprising a list of commands to be executed when a
23699       particular event related to that interval occurs. The occurring event
23700       is typically the current frame time entering or leaving a given time
23701       interval.
23702
23703       An interval is specified by the following syntax:
23704
23705               <START>[-<END>] <COMMANDS>;
23706
23707       The time interval is specified by the START and END times.  END is
23708       optional and defaults to the maximum time.
23709
23710       The current frame time is considered within the specified interval if
23711       it is included in the interval [START, END), that is when the time is
23712       greater or equal to START and is lesser than END.
23713
23714       COMMANDS consists of a sequence of one or more command specifications,
23715       separated by ",", relating to that interval.  The syntax of a command
23716       specification is given by:
23717
23718               [<FLAGS>] <TARGET> <COMMAND> <ARG>
23719
23720       FLAGS is optional and specifies the type of events relating to the time
23721       interval which enable sending the specified command, and must be a non-
23722       null sequence of identifier flags separated by "+" or "|" and enclosed
23723       between "[" and "]".
23724
23725       The following flags are recognized:
23726
23727       enter
23728           The command is sent when the current frame timestamp enters the
23729           specified interval. In other words, the command is sent when the
23730           previous frame timestamp was not in the given interval, and the
23731           current is.
23732
23733       leave
23734           The command is sent when the current frame timestamp leaves the
23735           specified interval. In other words, the command is sent when the
23736           previous frame timestamp was in the given interval, and the current
23737           is not.
23738
23739       expr
23740           The command ARG is interpreted as expression and result of
23741           expression is passed as ARG.
23742
23743           The expression is evaluated through the eval API and can contain
23744           the following constants:
23745
23746           POS Original position in the file of the frame, or undefined if
23747               undefined for the current frame.
23748
23749           PTS The presentation timestamp in input.
23750
23751           N   The count of the input frame for video or audio, starting from
23752               0.
23753
23754           T   The time in seconds of the current frame.
23755
23756           TS  The start time in seconds of the current command interval.
23757
23758           TE  The end time in seconds of the current command interval.
23759
23760           TI  The interpolated time of the current command interval, TI = (T
23761               - TS) / (TE - TS).
23762
23763       If FLAGS is not specified, a default value of "[enter]" is assumed.
23764
23765       TARGET specifies the target of the command, usually the name of the
23766       filter class or a specific filter instance name.
23767
23768       COMMAND specifies the name of the command for the target filter.
23769
23770       ARG is optional and specifies the optional list of argument for the
23771       given COMMAND.
23772
23773       Between one interval specification and another, whitespaces, or
23774       sequences of characters starting with "#" until the end of line, are
23775       ignored and can be used to annotate comments.
23776
23777       A simplified BNF description of the commands specification syntax
23778       follows:
23779
23780               <COMMAND_FLAG>  ::= "enter" | "leave"
23781               <COMMAND_FLAGS> ::= <COMMAND_FLAG> [(+|"|")<COMMAND_FLAG>]
23782               <COMMAND>       ::= ["[" <COMMAND_FLAGS> "]"] <TARGET> <COMMAND> [<ARG>]
23783               <COMMANDS>      ::= <COMMAND> [,<COMMANDS>]
23784               <INTERVAL>      ::= <START>[-<END>] <COMMANDS>
23785               <INTERVALS>     ::= <INTERVAL>[;<INTERVALS>]
23786
23787       Examples
23788
23789       •   Specify audio tempo change at second 4:
23790
23791                   asendcmd=c='4.0 atempo tempo 1.5',atempo
23792
23793       •   Target a specific filter instance:
23794
23795                   asendcmd=c='4.0 atempo@my tempo 1.5',atempo@my
23796
23797       •   Specify a list of drawtext and hue commands in a file.
23798
23799                   # show text in the interval 5-10
23800                   5.0-10.0 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=hello world',
23801                            [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=';
23802
23803                   # desaturate the image in the interval 15-20
23804                   15.0-20.0 [enter] hue s 0,
23805                             [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=nocolor',
23806                             [leave] hue s 1,
23807                             [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=color';
23808
23809                   # apply an exponential saturation fade-out effect, starting from time 25
23810                   25 [enter] hue s exp(25-t)
23811
23812           A filtergraph allowing to read and process the above command list
23813           stored in a file test.cmd, can be specified with:
23814
23815                   sendcmd=f=test.cmd,drawtext=fontfile=FreeSerif.ttf:text='',hue
23816
23817   setpts, asetpts
23818       Change the PTS (presentation timestamp) of the input frames.
23819
23820       "setpts" works on video frames, "asetpts" on audio frames.
23821
23822       This filter accepts the following options:
23823
23824       expr
23825           The expression which is evaluated for each frame to construct its
23826           timestamp.
23827
23828       The expression is evaluated through the eval API and can contain the
23829       following constants:
23830
23831       FRAME_RATE, FR
23832           frame rate, only defined for constant frame-rate video
23833
23834       PTS The presentation timestamp in input
23835
23836       N   The count of the input frame for video or the number of consumed
23837           samples, not including the current frame for audio, starting from
23838           0.
23839
23840       NB_CONSUMED_SAMPLES
23841           The number of consumed samples, not including the current frame
23842           (only audio)
23843
23844       NB_SAMPLES, S
23845           The number of samples in the current frame (only audio)
23846
23847       SAMPLE_RATE, SR
23848           The audio sample rate.
23849
23850       STARTPTS
23851           The PTS of the first frame.
23852
23853       STARTT
23854           the time in seconds of the first frame
23855
23856       INTERLACED
23857           State whether the current frame is interlaced.
23858
23859       T   the time in seconds of the current frame
23860
23861       POS original position in the file of the frame, or undefined if
23862           undefined for the current frame
23863
23864       PREV_INPTS
23865           The previous input PTS.
23866
23867       PREV_INT
23868           previous input time in seconds
23869
23870       PREV_OUTPTS
23871           The previous output PTS.
23872
23873       PREV_OUTT
23874           previous output time in seconds
23875
23876       RTCTIME
23877           The wallclock (RTC) time in microseconds. This is deprecated, use
23878           time(0) instead.
23879
23880       RTCSTART
23881           The wallclock (RTC) time at the start of the movie in microseconds.
23882
23883       TB  The timebase of the input timestamps.
23884
23885       Examples
23886
23887       •   Start counting PTS from zero
23888
23889                   setpts=PTS-STARTPTS
23890
23891       •   Apply fast motion effect:
23892
23893                   setpts=0.5*PTS
23894
23895       •   Apply slow motion effect:
23896
23897                   setpts=2.0*PTS
23898
23899       •   Set fixed rate of 25 frames per second:
23900
23901                   setpts=N/(25*TB)
23902
23903       •   Set fixed rate 25 fps with some jitter:
23904
23905                   setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
23906
23907       •   Apply an offset of 10 seconds to the input PTS:
23908
23909                   setpts=PTS+10/TB
23910
23911       •   Generate timestamps from a "live source" and rebase onto the
23912           current timebase:
23913
23914                   setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
23915
23916       •   Generate timestamps by counting samples:
23917
23918                   asetpts=N/SR/TB
23919
23920   setrange
23921       Force color range for the output video frame.
23922
23923       The "setrange" filter marks the color range property for the output
23924       frames. It does not change the input frame, but only sets the
23925       corresponding property, which affects how the frame is treated by
23926       following filters.
23927
23928       The filter accepts the following options:
23929
23930       range
23931           Available values are:
23932
23933           auto
23934               Keep the same color range property.
23935
23936           unspecified, unknown
23937               Set the color range as unspecified.
23938
23939           limited, tv, mpeg
23940               Set the color range as limited.
23941
23942           full, pc, jpeg
23943               Set the color range as full.
23944
23945   settb, asettb
23946       Set the timebase to use for the output frames timestamps.  It is mainly
23947       useful for testing timebase configuration.
23948
23949       It accepts the following parameters:
23950
23951       expr, tb
23952           The expression which is evaluated into the output timebase.
23953
23954       The value for tb is an arithmetic expression representing a rational.
23955       The expression can contain the constants "AVTB" (the default timebase),
23956       "intb" (the input timebase) and "sr" (the sample rate, audio only).
23957       Default value is "intb".
23958
23959       Examples
23960
23961       •   Set the timebase to 1/25:
23962
23963                   settb=expr=1/25
23964
23965       •   Set the timebase to 1/10:
23966
23967                   settb=expr=0.1
23968
23969       •   Set the timebase to 1001/1000:
23970
23971                   settb=1+0.001
23972
23973       •   Set the timebase to 2*intb:
23974
23975                   settb=2*intb
23976
23977       •   Set the default timebase value:
23978
23979                   settb=AVTB
23980
23981   showcqt
23982       Convert input audio to a video output representing frequency spectrum
23983       logarithmically using Brown-Puckette constant Q transform algorithm
23984       with direct frequency domain coefficient calculation (but the transform
23985       itself is not really constant Q, instead the Q factor is actually
23986       variable/clamped), with musical tone scale, from E0 to D#10.
23987
23988       The filter accepts the following options:
23989
23990       size, s
23991           Specify the video size for the output. It must be even. For the
23992           syntax of this option, check the "Video size" section in the
23993           ffmpeg-utils manual.  Default value is "1920x1080".
23994
23995       fps, rate, r
23996           Set the output frame rate. Default value is 25.
23997
23998       bar_h
23999           Set the bargraph height. It must be even. Default value is "-1"
24000           which computes the bargraph height automatically.
24001
24002       axis_h
24003           Set the axis height. It must be even. Default value is "-1" which
24004           computes the axis height automatically.
24005
24006       sono_h
24007           Set the sonogram height. It must be even. Default value is "-1"
24008           which computes the sonogram height automatically.
24009
24010       fullhd
24011           Set the fullhd resolution. This option is deprecated, use size, s
24012           instead. Default value is 1.
24013
24014       sono_v, volume
24015           Specify the sonogram volume expression. It can contain variables:
24016
24017           bar_v
24018               the bar_v evaluated expression
24019
24020           frequency, freq, f
24021               the frequency where it is evaluated
24022
24023           timeclamp, tc
24024               the value of timeclamp option
24025
24026           and functions:
24027
24028           a_weighting(f)
24029               A-weighting of equal loudness
24030
24031           b_weighting(f)
24032               B-weighting of equal loudness
24033
24034           c_weighting(f)
24035               C-weighting of equal loudness.
24036
24037           Default value is 16.
24038
24039       bar_v, volume2
24040           Specify the bargraph volume expression. It can contain variables:
24041
24042           sono_v
24043               the sono_v evaluated expression
24044
24045           frequency, freq, f
24046               the frequency where it is evaluated
24047
24048           timeclamp, tc
24049               the value of timeclamp option
24050
24051           and functions:
24052
24053           a_weighting(f)
24054               A-weighting of equal loudness
24055
24056           b_weighting(f)
24057               B-weighting of equal loudness
24058
24059           c_weighting(f)
24060               C-weighting of equal loudness.
24061
24062           Default value is "sono_v".
24063
24064       sono_g, gamma
24065           Specify the sonogram gamma. Lower gamma makes the spectrum more
24066           contrast, higher gamma makes the spectrum having more range.
24067           Default value is 3.  Acceptable range is "[1, 7]".
24068
24069       bar_g, gamma2
24070           Specify the bargraph gamma. Default value is 1. Acceptable range is
24071           "[1, 7]".
24072
24073       bar_t
24074           Specify the bargraph transparency level. Lower value makes the
24075           bargraph sharper.  Default value is 1. Acceptable range is "[0,
24076           1]".
24077
24078       timeclamp, tc
24079           Specify the transform timeclamp. At low frequency, there is trade-
24080           off between accuracy in time domain and frequency domain. If
24081           timeclamp is lower, event in time domain is represented more
24082           accurately (such as fast bass drum), otherwise event in frequency
24083           domain is represented more accurately (such as bass guitar).
24084           Acceptable range is "[0.002, 1]". Default value is 0.17.
24085
24086       attack
24087           Set attack time in seconds. The default is 0 (disabled). Otherwise,
24088           it limits future samples by applying asymmetric windowing in time
24089           domain, useful when low latency is required. Accepted range is "[0,
24090           1]".
24091
24092       basefreq
24093           Specify the transform base frequency. Default value is
24094           20.01523126408007475, which is frequency 50 cents below E0.
24095           Acceptable range is "[10, 100000]".
24096
24097       endfreq
24098           Specify the transform end frequency. Default value is
24099           20495.59681441799654, which is frequency 50 cents above D#10.
24100           Acceptable range is "[10, 100000]".
24101
24102       coeffclamp
24103           This option is deprecated and ignored.
24104
24105       tlength
24106           Specify the transform length in time domain. Use this option to
24107           control accuracy trade-off between time domain and frequency domain
24108           at every frequency sample.  It can contain variables:
24109
24110           frequency, freq, f
24111               the frequency where it is evaluated
24112
24113           timeclamp, tc
24114               the value of timeclamp option.
24115
24116           Default value is "384*tc/(384+tc*f)".
24117
24118       count
24119           Specify the transform count for every video frame. Default value is
24120           6.  Acceptable range is "[1, 30]".
24121
24122       fcount
24123           Specify the transform count for every single pixel. Default value
24124           is 0, which makes it computed automatically. Acceptable range is
24125           "[0, 10]".
24126
24127       fontfile
24128           Specify font file for use with freetype to draw the axis. If not
24129           specified, use embedded font. Note that drawing with font file or
24130           embedded font is not implemented with custom basefreq and endfreq,
24131           use axisfile option instead.
24132
24133       font
24134           Specify fontconfig pattern. This has lower priority than fontfile.
24135           The ":" in the pattern may be replaced by "|" to avoid unnecessary
24136           escaping.
24137
24138       fontcolor
24139           Specify font color expression. This is arithmetic expression that
24140           should return integer value 0xRRGGBB. It can contain variables:
24141
24142           frequency, freq, f
24143               the frequency where it is evaluated
24144
24145           timeclamp, tc
24146               the value of timeclamp option
24147
24148           and functions:
24149
24150           midi(f)
24151               midi number of frequency f, some midi numbers: E0(16), C1(24),
24152               C2(36), A4(69)
24153
24154           r(x), g(x), b(x)
24155               red, green, and blue value of intensity x.
24156
24157           Default value is "st(0, (midi(f)-59.5)/12); st(1,
24158           if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0)); r(1-ld(1)) +
24159           b(ld(1))".
24160
24161       axisfile
24162           Specify image file to draw the axis. This option override fontfile
24163           and fontcolor option.
24164
24165       axis, text
24166           Enable/disable drawing text to the axis. If it is set to 0, drawing
24167           to the axis is disabled, ignoring fontfile and axisfile option.
24168           Default value is 1.
24169
24170       csp Set colorspace. The accepted values are:
24171
24172           unspecified
24173               Unspecified (default)
24174
24175           bt709
24176               BT.709
24177
24178           fcc FCC
24179
24180           bt470bg
24181               BT.470BG or BT.601-6 625
24182
24183           smpte170m
24184               SMPTE-170M or BT.601-6 525
24185
24186           smpte240m
24187               SMPTE-240M
24188
24189           bt2020ncl
24190               BT.2020 with non-constant luminance
24191
24192       cscheme
24193           Set spectrogram color scheme. This is list of floating point values
24194           with format "left_r|left_g|left_b|right_r|right_g|right_b".  The
24195           default is "1|0.5|0|0|0.5|1".
24196
24197       Examples
24198
24199       •   Playing audio while showing the spectrum:
24200
24201                   ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]'
24202
24203       •   Same as above, but with frame rate 30 fps:
24204
24205                   ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]'
24206
24207       •   Playing at 1280x720:
24208
24209                   ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=s=1280x720:count=4 [out0]'
24210
24211       •   Disable sonogram display:
24212
24213                   sono_h=0
24214
24215       •   A1 and its harmonics: A1, A2, (near)E3, A3:
24216
24217                   ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t),
24218                                    asplit[a][out1]; [a] showcqt [out0]'
24219
24220       •   Same as above, but with more accuracy in frequency domain:
24221
24222                   ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t),
24223                                    asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'
24224
24225       •   Custom volume:
24226
24227                   bar_v=10:sono_v=bar_v*a_weighting(f)
24228
24229       •   Custom gamma, now spectrum is linear to the amplitude.
24230
24231                   bar_g=2:sono_g=2
24232
24233       •   Custom tlength equation:
24234
24235                   tc=0.33:tlength='st(0,0.17); 384*tc / (384 / ld(0) + tc*f /(1-ld(0))) + 384*tc / (tc*f / ld(0) + 384 /(1-ld(0)))'
24236
24237       •   Custom fontcolor and fontfile, C-note is colored green, others are
24238           colored blue:
24239
24240                   fontcolor='if(mod(floor(midi(f)+0.5),12), 0x0000FF, g(1))':fontfile=myfont.ttf
24241
24242       •   Custom font using fontconfig:
24243
24244                   font='Courier New,Monospace,mono|bold'
24245
24246       •   Custom frequency range with custom axis using image file:
24247
24248                   axisfile=myaxis.png:basefreq=40:endfreq=10000
24249
24250   showfreqs
24251       Convert input audio to video output representing the audio power
24252       spectrum.  Audio amplitude is on Y-axis while frequency is on X-axis.
24253
24254       The filter accepts the following options:
24255
24256       size, s
24257           Specify size of video. For the syntax of this option, check the
24258           "Video size" section in the ffmpeg-utils manual.  Default is
24259           "1024x512".
24260
24261       mode
24262           Set display mode.  This set how each frequency bin will be
24263           represented.
24264
24265           It accepts the following values:
24266
24267           line
24268           bar
24269           dot
24270
24271           Default is "bar".
24272
24273       ascale
24274           Set amplitude scale.
24275
24276           It accepts the following values:
24277
24278           lin Linear scale.
24279
24280           sqrt
24281               Square root scale.
24282
24283           cbrt
24284               Cubic root scale.
24285
24286           log Logarithmic scale.
24287
24288           Default is "log".
24289
24290       fscale
24291           Set frequency scale.
24292
24293           It accepts the following values:
24294
24295           lin Linear scale.
24296
24297           log Logarithmic scale.
24298
24299           rlog
24300               Reverse logarithmic scale.
24301
24302           Default is "lin".
24303
24304       win_size
24305           Set window size. Allowed range is from 16 to 65536.
24306
24307           Default is 2048
24308
24309       win_func
24310           Set windowing function.
24311
24312           It accepts the following values:
24313
24314           rect
24315           bartlett
24316           hanning
24317           hamming
24318           blackman
24319           welch
24320           flattop
24321           bharris
24322           bnuttall
24323           bhann
24324           sine
24325           nuttall
24326           lanczos
24327           gauss
24328           tukey
24329           dolph
24330           cauchy
24331           parzen
24332           poisson
24333           bohman
24334
24335           Default is "hanning".
24336
24337       overlap
24338           Set window overlap. In range "[0, 1]". Default is 1, which means
24339           optimal overlap for selected window function will be picked.
24340
24341       averaging
24342           Set time averaging. Setting this to 0 will display current maximal
24343           peaks.  Default is 1, which means time averaging is disabled.
24344
24345       colors
24346           Specify list of colors separated by space or by '|' which will be
24347           used to draw channel frequencies. Unrecognized or missing colors
24348           will be replaced by white color.
24349
24350       cmode
24351           Set channel display mode.
24352
24353           It accepts the following values:
24354
24355           combined
24356           separate
24357
24358           Default is "combined".
24359
24360       minamp
24361           Set minimum amplitude used in "log" amplitude scaler.
24362
24363       data
24364           Set data display mode.
24365
24366           It accepts the following values:
24367
24368           magnitude
24369           phase
24370           delay
24371
24372           Default is "magnitude".
24373
24374   showspatial
24375       Convert stereo input audio to a video output, representing the spatial
24376       relationship between two channels.
24377
24378       The filter accepts the following options:
24379
24380       size, s
24381           Specify the video size for the output. For the syntax of this
24382           option, check the "Video size" section in the ffmpeg-utils manual.
24383           Default value is "512x512".
24384
24385       win_size
24386           Set window size. Allowed range is from 1024 to 65536. Default size
24387           is 4096.
24388
24389       win_func
24390           Set window function.
24391
24392           It accepts the following values:
24393
24394           rect
24395           bartlett
24396           hann
24397           hanning
24398           hamming
24399           blackman
24400           welch
24401           flattop
24402           bharris
24403           bnuttall
24404           bhann
24405           sine
24406           nuttall
24407           lanczos
24408           gauss
24409           tukey
24410           dolph
24411           cauchy
24412           parzen
24413           poisson
24414           bohman
24415
24416           Default value is "hann".
24417
24418       overlap
24419           Set ratio of overlap window. Default value is 0.5.  When value is 1
24420           overlap is set to recommended size for specific window function
24421           currently used.
24422
24423   showspectrum
24424       Convert input audio to a video output, representing the audio frequency
24425       spectrum.
24426
24427       The filter accepts the following options:
24428
24429       size, s
24430           Specify the video size for the output. For the syntax of this
24431           option, check the "Video size" section in the ffmpeg-utils manual.
24432           Default value is "640x512".
24433
24434       slide
24435           Specify how the spectrum should slide along the window.
24436
24437           It accepts the following values:
24438
24439           replace
24440               the samples start again on the left when they reach the right
24441
24442           scroll
24443               the samples scroll from right to left
24444
24445           fullframe
24446               frames are only produced when the samples reach the right
24447
24448           rscroll
24449               the samples scroll from left to right
24450
24451           lreplace
24452               the samples start again on the right when they reach the left
24453
24454           Default value is "replace".
24455
24456       mode
24457           Specify display mode.
24458
24459           It accepts the following values:
24460
24461           combined
24462               all channels are displayed in the same row
24463
24464           separate
24465               all channels are displayed in separate rows
24466
24467           Default value is combined.
24468
24469       color
24470           Specify display color mode.
24471
24472           It accepts the following values:
24473
24474           channel
24475               each channel is displayed in a separate color
24476
24477           intensity
24478               each channel is displayed using the same color scheme
24479
24480           rainbow
24481               each channel is displayed using the rainbow color scheme
24482
24483           moreland
24484               each channel is displayed using the moreland color scheme
24485
24486           nebulae
24487               each channel is displayed using the nebulae color scheme
24488
24489           fire
24490               each channel is displayed using the fire color scheme
24491
24492           fiery
24493               each channel is displayed using the fiery color scheme
24494
24495           fruit
24496               each channel is displayed using the fruit color scheme
24497
24498           cool
24499               each channel is displayed using the cool color scheme
24500
24501           magma
24502               each channel is displayed using the magma color scheme
24503
24504           green
24505               each channel is displayed using the green color scheme
24506
24507           viridis
24508               each channel is displayed using the viridis color scheme
24509
24510           plasma
24511               each channel is displayed using the plasma color scheme
24512
24513           cividis
24514               each channel is displayed using the cividis color scheme
24515
24516           terrain
24517               each channel is displayed using the terrain color scheme
24518
24519           Default value is channel.
24520
24521       scale
24522           Specify scale used for calculating intensity color values.
24523
24524           It accepts the following values:
24525
24526           lin linear
24527
24528           sqrt
24529               square root, default
24530
24531           cbrt
24532               cubic root
24533
24534           log logarithmic
24535
24536           4thrt
24537               4th root
24538
24539           5thrt
24540               5th root
24541
24542           Default value is sqrt.
24543
24544       fscale
24545           Specify frequency scale.
24546
24547           It accepts the following values:
24548
24549           lin linear
24550
24551           log logarithmic
24552
24553           Default value is lin.
24554
24555       saturation
24556           Set saturation modifier for displayed colors. Negative values
24557           provide alternative color scheme. 0 is no saturation at all.
24558           Saturation must be in [-10.0, 10.0] range.  Default value is 1.
24559
24560       win_func
24561           Set window function.
24562
24563           It accepts the following values:
24564
24565           rect
24566           bartlett
24567           hann
24568           hanning
24569           hamming
24570           blackman
24571           welch
24572           flattop
24573           bharris
24574           bnuttall
24575           bhann
24576           sine
24577           nuttall
24578           lanczos
24579           gauss
24580           tukey
24581           dolph
24582           cauchy
24583           parzen
24584           poisson
24585           bohman
24586
24587           Default value is "hann".
24588
24589       orientation
24590           Set orientation of time vs frequency axis. Can be "vertical" or
24591           "horizontal". Default is "vertical".
24592
24593       overlap
24594           Set ratio of overlap window. Default value is 0.  When value is 1
24595           overlap is set to recommended size for specific window function
24596           currently used.
24597
24598       gain
24599           Set scale gain for calculating intensity color values.  Default
24600           value is 1.
24601
24602       data
24603           Set which data to display. Can be "magnitude", default or "phase",
24604           or unwrapped phase: "uphase".
24605
24606       rotation
24607           Set color rotation, must be in [-1.0, 1.0] range.  Default value is
24608           0.
24609
24610       start
24611           Set start frequency from which to display spectrogram. Default is
24612           0.
24613
24614       stop
24615           Set stop frequency to which to display spectrogram. Default is 0.
24616
24617       fps Set upper frame rate limit. Default is "auto", unlimited.
24618
24619       legend
24620           Draw time and frequency axes and legends. Default is disabled.
24621
24622       drange
24623           Set dynamic range used to calculate intensity color values. Default
24624           is 120 dBFS.  Allowed range is from 10 to 200.
24625
24626       limit
24627           Set upper limit of input audio samples volume in dBFS. Default is 0
24628           dBFS.  Allowed range is from -100 to 100.
24629
24630       The usage is very similar to the showwaves filter; see the examples in
24631       that section.
24632
24633       Examples
24634
24635       •   Large window with logarithmic color scaling:
24636
24637                   showspectrum=s=1280x480:scale=log
24638
24639       •   Complete example for a colored and sliding spectrum per channel
24640           using ffplay:
24641
24642                   ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
24643                                [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'
24644
24645   showspectrumpic
24646       Convert input audio to a single video frame, representing the audio
24647       frequency spectrum.
24648
24649       The filter accepts the following options:
24650
24651       size, s
24652           Specify the video size for the output. For the syntax of this
24653           option, check the "Video size" section in the ffmpeg-utils manual.
24654           Default value is "4096x2048".
24655
24656       mode
24657           Specify display mode.
24658
24659           It accepts the following values:
24660
24661           combined
24662               all channels are displayed in the same row
24663
24664           separate
24665               all channels are displayed in separate rows
24666
24667           Default value is combined.
24668
24669       color
24670           Specify display color mode.
24671
24672           It accepts the following values:
24673
24674           channel
24675               each channel is displayed in a separate color
24676
24677           intensity
24678               each channel is displayed using the same color scheme
24679
24680           rainbow
24681               each channel is displayed using the rainbow color scheme
24682
24683           moreland
24684               each channel is displayed using the moreland color scheme
24685
24686           nebulae
24687               each channel is displayed using the nebulae color scheme
24688
24689           fire
24690               each channel is displayed using the fire color scheme
24691
24692           fiery
24693               each channel is displayed using the fiery color scheme
24694
24695           fruit
24696               each channel is displayed using the fruit color scheme
24697
24698           cool
24699               each channel is displayed using the cool color scheme
24700
24701           magma
24702               each channel is displayed using the magma color scheme
24703
24704           green
24705               each channel is displayed using the green color scheme
24706
24707           viridis
24708               each channel is displayed using the viridis color scheme
24709
24710           plasma
24711               each channel is displayed using the plasma color scheme
24712
24713           cividis
24714               each channel is displayed using the cividis color scheme
24715
24716           terrain
24717               each channel is displayed using the terrain color scheme
24718
24719           Default value is intensity.
24720
24721       scale
24722           Specify scale used for calculating intensity color values.
24723
24724           It accepts the following values:
24725
24726           lin linear
24727
24728           sqrt
24729               square root, default
24730
24731           cbrt
24732               cubic root
24733
24734           log logarithmic
24735
24736           4thrt
24737               4th root
24738
24739           5thrt
24740               5th root
24741
24742           Default value is log.
24743
24744       fscale
24745           Specify frequency scale.
24746
24747           It accepts the following values:
24748
24749           lin linear
24750
24751           log logarithmic
24752
24753           Default value is lin.
24754
24755       saturation
24756           Set saturation modifier for displayed colors. Negative values
24757           provide alternative color scheme. 0 is no saturation at all.
24758           Saturation must be in [-10.0, 10.0] range.  Default value is 1.
24759
24760       win_func
24761           Set window function.
24762
24763           It accepts the following values:
24764
24765           rect
24766           bartlett
24767           hann
24768           hanning
24769           hamming
24770           blackman
24771           welch
24772           flattop
24773           bharris
24774           bnuttall
24775           bhann
24776           sine
24777           nuttall
24778           lanczos
24779           gauss
24780           tukey
24781           dolph
24782           cauchy
24783           parzen
24784           poisson
24785           bohman
24786
24787           Default value is "hann".
24788
24789       orientation
24790           Set orientation of time vs frequency axis. Can be "vertical" or
24791           "horizontal". Default is "vertical".
24792
24793       gain
24794           Set scale gain for calculating intensity color values.  Default
24795           value is 1.
24796
24797       legend
24798           Draw time and frequency axes and legends. Default is enabled.
24799
24800       rotation
24801           Set color rotation, must be in [-1.0, 1.0] range.  Default value is
24802           0.
24803
24804       start
24805           Set start frequency from which to display spectrogram. Default is
24806           0.
24807
24808       stop
24809           Set stop frequency to which to display spectrogram. Default is 0.
24810
24811       drange
24812           Set dynamic range used to calculate intensity color values. Default
24813           is 120 dBFS.  Allowed range is from 10 to 200.
24814
24815       limit
24816           Set upper limit of input audio samples volume in dBFS. Default is 0
24817           dBFS.  Allowed range is from -100 to 100.
24818
24819       Examples
24820
24821       •   Extract an audio spectrogram of a whole audio track in a 1024x1024
24822           picture using ffmpeg:
24823
24824                   ffmpeg -i audio.flac -lavfi showspectrumpic=s=1024x1024 spectrogram.png
24825
24826   showvolume
24827       Convert input audio volume to a video output.
24828
24829       The filter accepts the following options:
24830
24831       rate, r
24832           Set video rate.
24833
24834       b   Set border width, allowed range is [0, 5]. Default is 1.
24835
24836       w   Set channel width, allowed range is [80, 8192]. Default is 400.
24837
24838       h   Set channel height, allowed range is [1, 900]. Default is 20.
24839
24840       f   Set fade, allowed range is [0, 1]. Default is 0.95.
24841
24842       c   Set volume color expression.
24843
24844           The expression can use the following variables:
24845
24846           VOLUME
24847               Current max volume of channel in dB.
24848
24849           PEAK
24850               Current peak.
24851
24852           CHANNEL
24853               Current channel number, starting from 0.
24854
24855       t   If set, displays channel names. Default is enabled.
24856
24857       v   If set, displays volume values. Default is enabled.
24858
24859       o   Set orientation, can be horizontal: "h" or vertical: "v", default
24860           is "h".
24861
24862       s   Set step size, allowed range is [0, 5]. Default is 0, which means
24863           step is disabled.
24864
24865       p   Set background opacity, allowed range is [0, 1]. Default is 0.
24866
24867       m   Set metering mode, can be peak: "p" or rms: "r", default is "p".
24868
24869       ds  Set display scale, can be linear: "lin" or log: "log", default is
24870           "lin".
24871
24872       dm  In second.  If set to > 0., display a line for the max level in the
24873           previous seconds.  default is disabled: 0.
24874
24875       dmc The color of the max line. Use when "dm" option is set to > 0.
24876           default is: "orange"
24877
24878   showwaves
24879       Convert input audio to a video output, representing the samples waves.
24880
24881       The filter accepts the following options:
24882
24883       size, s
24884           Specify the video size for the output. For the syntax of this
24885           option, check the "Video size" section in the ffmpeg-utils manual.
24886           Default value is "600x240".
24887
24888       mode
24889           Set display mode.
24890
24891           Available values are:
24892
24893           point
24894               Draw a point for each sample.
24895
24896           line
24897               Draw a vertical line for each sample.
24898
24899           p2p Draw a point for each sample and a line between them.
24900
24901           cline
24902               Draw a centered vertical line for each sample.
24903
24904           Default value is "point".
24905
24906       n   Set the number of samples which are printed on the same column. A
24907           larger value will decrease the frame rate. Must be a positive
24908           integer. This option can be set only if the value for rate is not
24909           explicitly specified.
24910
24911       rate, r
24912           Set the (approximate) output frame rate. This is done by setting
24913           the option n. Default value is "25".
24914
24915       split_channels
24916           Set if channels should be drawn separately or overlap. Default
24917           value is 0.
24918
24919       colors
24920           Set colors separated by '|' which are going to be used for drawing
24921           of each channel.
24922
24923       scale
24924           Set amplitude scale.
24925
24926           Available values are:
24927
24928           lin Linear.
24929
24930           log Logarithmic.
24931
24932           sqrt
24933               Square root.
24934
24935           cbrt
24936               Cubic root.
24937
24938           Default is linear.
24939
24940       draw
24941           Set the draw mode. This is mostly useful to set for high n.
24942
24943           Available values are:
24944
24945           scale
24946               Scale pixel values for each drawn sample.
24947
24948           full
24949               Draw every sample directly.
24950
24951           Default value is "scale".
24952
24953       Examples
24954
24955       •   Output the input file audio and the corresponding video
24956           representation at the same time:
24957
24958                   amovie=a.mp3,asplit[out0],showwaves[out1]
24959
24960       •   Create a synthetic signal and show it with showwaves, forcing a
24961           frame rate of 30 frames per second:
24962
24963                   aevalsrc=sin(1*2*PI*t)*sin(880*2*PI*t):cos(2*PI*200*t),asplit[out0],showwaves=r=30[out1]
24964
24965   showwavespic
24966       Convert input audio to a single video frame, representing the samples
24967       waves.
24968
24969       The filter accepts the following options:
24970
24971       size, s
24972           Specify the video size for the output. For the syntax of this
24973           option, check the "Video size" section in the ffmpeg-utils manual.
24974           Default value is "600x240".
24975
24976       split_channels
24977           Set if channels should be drawn separately or overlap. Default
24978           value is 0.
24979
24980       colors
24981           Set colors separated by '|' which are going to be used for drawing
24982           of each channel.
24983
24984       scale
24985           Set amplitude scale.
24986
24987           Available values are:
24988
24989           lin Linear.
24990
24991           log Logarithmic.
24992
24993           sqrt
24994               Square root.
24995
24996           cbrt
24997               Cubic root.
24998
24999           Default is linear.
25000
25001       draw
25002           Set the draw mode.
25003
25004           Available values are:
25005
25006           scale
25007               Scale pixel values for each drawn sample.
25008
25009           full
25010               Draw every sample directly.
25011
25012           Default value is "scale".
25013
25014       filter
25015           Set the filter mode.
25016
25017           Available values are:
25018
25019           average
25020               Use average samples values for each drawn sample.
25021
25022           peak
25023               Use peak samples values for each drawn sample.
25024
25025           Default value is "average".
25026
25027       Examples
25028
25029       •   Extract a channel split representation of the wave form of a whole
25030           audio track in a 1024x800 picture using ffmpeg:
25031
25032                   ffmpeg -i audio.flac -lavfi showwavespic=split_channels=1:s=1024x800 waveform.png
25033
25034   sidedata, asidedata
25035       Delete frame side data, or select frames based on it.
25036
25037       This filter accepts the following options:
25038
25039       mode
25040           Set mode of operation of the filter.
25041
25042           Can be one of the following:
25043
25044           select
25045               Select every frame with side data of "type".
25046
25047           delete
25048               Delete side data of "type". If "type" is not set, delete all
25049               side data in the frame.
25050
25051       type
25052           Set side data type used with all modes. Must be set for "select"
25053           mode. For the list of frame side data types, refer to the
25054           "AVFrameSideDataType" enum in libavutil/frame.h. For example, to
25055           choose "AV_FRAME_DATA_PANSCAN" side data, you must specify
25056           "PANSCAN".
25057
25058   spectrumsynth
25059       Synthesize audio from 2 input video spectrums, first input stream
25060       represents magnitude across time and second represents phase across
25061       time.  The filter will transform from frequency domain as displayed in
25062       videos back to time domain as presented in audio output.
25063
25064       This filter is primarily created for reversing processed showspectrum
25065       filter outputs, but can synthesize sound from other spectrograms too.
25066       But in such case results are going to be poor if the phase data is not
25067       available, because in such cases phase data need to be recreated,
25068       usually it's just recreated from random noise.  For best results use
25069       gray only output ("channel" color mode in showspectrum filter) and
25070       "log" scale for magnitude video and "lin" scale for phase video. To
25071       produce phase, for 2nd video, use "data" option. Inputs videos should
25072       generally use "fullframe" slide mode as that saves resources needed for
25073       decoding video.
25074
25075       The filter accepts the following options:
25076
25077       sample_rate
25078           Specify sample rate of output audio, the sample rate of audio from
25079           which spectrum was generated may differ.
25080
25081       channels
25082           Set number of channels represented in input video spectrums.
25083
25084       scale
25085           Set scale which was used when generating magnitude input spectrum.
25086           Can be "lin" or "log". Default is "log".
25087
25088       slide
25089           Set slide which was used when generating inputs spectrums.  Can be
25090           "replace", "scroll", "fullframe" or "rscroll".  Default is
25091           "fullframe".
25092
25093       win_func
25094           Set window function used for resynthesis.
25095
25096       overlap
25097           Set window overlap. In range "[0, 1]". Default is 1, which means
25098           optimal overlap for selected window function will be picked.
25099
25100       orientation
25101           Set orientation of input videos. Can be "vertical" or "horizontal".
25102           Default is "vertical".
25103
25104       Examples
25105
25106       •   First create magnitude and phase videos from audio, assuming audio
25107           is stereo with 44100 sample rate, then resynthesize videos back to
25108           audio with spectrumsynth:
25109
25110                   ffmpeg -i input.flac -lavfi showspectrum=mode=separate:scale=log:overlap=0.875:color=channel:slide=fullframe:data=magnitude -an -c:v rawvideo magnitude.nut
25111                   ffmpeg -i input.flac -lavfi showspectrum=mode=separate:scale=lin:overlap=0.875:color=channel:slide=fullframe:data=phase -an -c:v rawvideo phase.nut
25112                   ffmpeg -i magnitude.nut -i phase.nut -lavfi spectrumsynth=channels=2:sample_rate=44100:win_func=hann:overlap=0.875:slide=fullframe output.flac
25113
25114   split, asplit
25115       Split input into several identical outputs.
25116
25117       "asplit" works with audio input, "split" with video.
25118
25119       The filter accepts a single parameter which specifies the number of
25120       outputs. If unspecified, it defaults to 2.
25121
25122       Examples
25123
25124       •   Create two separate outputs from the same input:
25125
25126                   [in] split [out0][out1]
25127
25128       •   To create 3 or more outputs, you need to specify the number of
25129           outputs, like in:
25130
25131                   [in] asplit=3 [out0][out1][out2]
25132
25133       •   Create two separate outputs from the same input, one cropped and
25134           one padded:
25135
25136                   [in] split [splitout1][splitout2];
25137                   [splitout1] crop=100:100:0:0    [cropout];
25138                   [splitout2] pad=200:200:100:100 [padout];
25139
25140       •   Create 5 copies of the input audio with ffmpeg:
25141
25142                   ffmpeg -i INPUT -filter_complex asplit=5 OUTPUT
25143
25144   zmq, azmq
25145       Receive commands sent through a libzmq client, and forward them to
25146       filters in the filtergraph.
25147
25148       "zmq" and "azmq" work as a pass-through filters. "zmq" must be inserted
25149       between two video filters, "azmq" between two audio filters. Both are
25150       capable to send messages to any filter type.
25151
25152       To enable these filters you need to install the libzmq library and
25153       headers and configure FFmpeg with "--enable-libzmq".
25154
25155       For more information about libzmq see: <http://www.zeromq.org/>
25156
25157       The "zmq" and "azmq" filters work as a libzmq server, which receives
25158       messages sent through a network interface defined by the bind_address
25159       (or the abbreviation "b") option.  Default value of this option is
25160       tcp://localhost:5555. You may want to alter this value to your needs,
25161       but do not forget to escape any ':' signs (see filtergraph escaping).
25162
25163       The received message must be in the form:
25164
25165               <TARGET> <COMMAND> [<ARG>]
25166
25167       TARGET specifies the target of the command, usually the name of the
25168       filter class or a specific filter instance name. The default filter
25169       instance name uses the pattern Parsed_<filter_name>_<index>, but you
25170       can override this by using the filter_name@id syntax (see Filtergraph
25171       syntax).
25172
25173       COMMAND specifies the name of the command for the target filter.
25174
25175       ARG is optional and specifies the optional argument list for the given
25176       COMMAND.
25177
25178       Upon reception, the message is processed and the corresponding command
25179       is injected into the filtergraph. Depending on the result, the filter
25180       will send a reply to the client, adopting the format:
25181
25182               <ERROR_CODE> <ERROR_REASON>
25183               <MESSAGE>
25184
25185       MESSAGE is optional.
25186
25187       Examples
25188
25189       Look at tools/zmqsend for an example of a zmq client which can be used
25190       to send commands processed by these filters.
25191
25192       Consider the following filtergraph generated by ffplay.  In this
25193       example the last overlay filter has an instance name. All other filters
25194       will have default instance names.
25195
25196               ffplay -dumpgraph 1 -f lavfi "
25197               color=s=100x100:c=red  [l];
25198               color=s=100x100:c=blue [r];
25199               nullsrc=s=200x100, zmq [bg];
25200               [bg][l]   overlay     [bg+l];
25201               [bg+l][r] overlay@my=x=100 "
25202
25203       To change the color of the left side of the video, the following
25204       command can be used:
25205
25206               echo Parsed_color_0 c yellow | tools/zmqsend
25207
25208       To change the right side:
25209
25210               echo Parsed_color_1 c pink | tools/zmqsend
25211
25212       To change the position of the right side:
25213
25214               echo overlay@my x 150 | tools/zmqsend
25215

MULTIMEDIA SOURCES

25217       Below is a description of the currently available multimedia sources.
25218
25219   amovie
25220       This is the same as movie source, except it selects an audio stream by
25221       default.
25222
25223   movie
25224       Read audio and/or video stream(s) from a movie container.
25225
25226       It accepts the following parameters:
25227
25228       filename
25229           The name of the resource to read (not necessarily a file; it can
25230           also be a device or a stream accessed through some protocol).
25231
25232       format_name, f
25233           Specifies the format assumed for the movie to read, and can be
25234           either the name of a container or an input device. If not
25235           specified, the format is guessed from movie_name or by probing.
25236
25237       seek_point, sp
25238           Specifies the seek point in seconds. The frames will be output
25239           starting from this seek point. The parameter is evaluated with
25240           "av_strtod", so the numerical value may be suffixed by an IS
25241           postfix. The default value is "0".
25242
25243       streams, s
25244           Specifies the streams to read. Several streams can be specified,
25245           separated by "+". The source will then have as many outputs, in the
25246           same order. The syntax is explained in the "Stream specifiers"
25247           section in the ffmpeg manual. Two special names, "dv" and "da"
25248           specify respectively the default (best suited) video and audio
25249           stream. Default is "dv", or "da" if the filter is called as
25250           "amovie".
25251
25252       stream_index, si
25253           Specifies the index of the video stream to read. If the value is
25254           -1, the most suitable video stream will be automatically selected.
25255           The default value is "-1". Deprecated. If the filter is called
25256           "amovie", it will select audio instead of video.
25257
25258       loop
25259           Specifies how many times to read the stream in sequence.  If the
25260           value is 0, the stream will be looped infinitely.  Default value is
25261           "1".
25262
25263           Note that when the movie is looped the source timestamps are not
25264           changed, so it will generate non monotonically increasing
25265           timestamps.
25266
25267       discontinuity
25268           Specifies the time difference between frames above which the point
25269           is considered a timestamp discontinuity which is removed by
25270           adjusting the later timestamps.
25271
25272       dec_threads
25273           Specifies the number of threads for decoding
25274
25275       format_opts
25276           Specify format options for the opened file. Format options can be
25277           specified as a list of key=value pairs separated by ':'. The
25278           following example shows how to add protocol_whitelist and
25279           protocol_blacklist options:
25280
25281                   ffplay -f lavfi
25282                   "movie=filename='1.sdp':format_opts='protocol_whitelist=file,rtp,udp\:protocol_blacklist=http'"
25283
25284       It allows overlaying a second video on top of the main input of a
25285       filtergraph, as shown in this graph:
25286
25287               input -----------> deltapts0 --> overlay --> output
25288                                                   ^
25289                                                   |
25290               movie --> scale--> deltapts1 -------+
25291
25292       Examples
25293
25294       •   Skip 3.2 seconds from the start of the AVI file in.avi, and overlay
25295           it on top of the input labelled "in":
25296
25297                   movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [over];
25298                   [in] setpts=PTS-STARTPTS [main];
25299                   [main][over] overlay=16:16 [out]
25300
25301       •   Read from a video4linux2 device, and overlay it on top of the input
25302           labelled "in":
25303
25304                   movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [over];
25305                   [in] setpts=PTS-STARTPTS [main];
25306                   [main][over] overlay=16:16 [out]
25307
25308       •   Read the first video stream and the audio stream with id 0x81 from
25309           dvd.vob; the video is connected to the pad named "video" and the
25310           audio is connected to the pad named "audio":
25311
25312                   movie=dvd.vob:s=v:0+#0x81 [video] [audio]
25313
25314       Commands
25315
25316       Both movie and amovie support the following commands:
25317
25318       seek
25319           Perform seek using "av_seek_frame".  The syntax is: seek
25320           stream_index|timestamp|flags
25321
25322stream_index: If stream_index is -1, a default stream is
25323               selected, and timestamp is automatically converted from
25324               AV_TIME_BASE units to the stream specific time_base.
25325
25326timestamp: Timestamp in AVStream.time_base units or, if no
25327               stream is specified, in AV_TIME_BASE units.
25328
25329flags: Flags which select direction and seeking mode.
25330
25331       get_duration
25332           Get movie duration in AV_TIME_BASE units.
25333

SEE ALSO

25335       ffmpeg(1), ffplay(1), ffprobe(1), libavfilter(3)
25336

AUTHORS

25338       The FFmpeg developers.
25339
25340       For details about the authorship, see the Git history of the project
25341       (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
25342       the FFmpeg source directory, or browsing the online repository at
25343       <http://source.ffmpeg.org>.
25344
25345       Maintainers for the specific components are listed in the file
25346       MAINTAINERS in the source code tree.
25347
25348
25349
25350                                                             FFMPEG-FILTERS(1)
Impressum