FFMPEG-FILTERS(1) FFMPEG-FILTERS(1) NAME ffmpeg-filters - FFmpeg filters DESCRIPTION This document describes filters, sources, and sinks provided by the libavfilter library. FILTERING INTRODUCTION Filtering in FFmpeg is enabled through the libavfilter library. In libavfilter, a filter can have multiple inputs and multiple outputs. To illustrate the sorts of things that are possible, we consider the following filtergraph. [main] input --> split ---------------------> overlay --> output | ^ |[tmp] [flip]| +-----> crop --> vflip -------+ This filtergraph splits the input stream in two streams, then sends one stream through the crop filter and the vflip filter, before merging it back with the other stream by overlaying it on top. You can use the following command to achieve this: ffmpeg -i INPUT -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT The result will be that the top half of the video is mirrored onto the bottom half of the output video. Filters in the same linear chain are separated by commas, and distinct linear chains of filters are separated by semicolons. In our example, crop,vflip are in one linear chain, split and overlay are separately in another. The points where the linear chains join are labelled by names enclosed in square brackets. In the example, the split filter generates two outputs that are associated to the labels [main] and [tmp]. The stream sent to the second output of split, labelled as [tmp], is processed through the crop filter, which crops away the lower half part of the video, and then vertically flipped. The overlay filter takes in input the first unchanged output of the split filter (which was labelled as [main]), and overlay on its lower half the output generated by the crop,vflip filterchain. Some filters take in input a list of parameters: they are specified after the filter name and an equal sign, and are separated from each other by a colon. There exist so-called source filters that do not have an audio/video input, and sink filters that will not have audio/video output. GRAPH The graph2dot program included in the FFmpeg tools directory can be used to parse a filtergraph description and issue a corresponding textual representation in the dot language. Invoke the command: graph2dot -h to see how to use graph2dot. You can then pass the dot description to the dot program (from the graphviz suite of programs) and obtain a graphical representation of the filtergraph. For example the sequence of commands: echo | \ tools/graph2dot -o graph.tmp && \ dot -Tpng graph.tmp -o graph.png && \ display graph.png can be used to create and display an image representing the graph described by the GRAPH_DESCRIPTION string. Note that this string must be a complete self-contained graph, with its inputs and outputs explicitly defined. For example if your command line is of the form: ffmpeg -i infile -vf scale=640:360 outfile your GRAPH_DESCRIPTION string will need to be of the form: nullsrc,scale=640:360,nullsink you may also need to set the nullsrc parameters and add a format filter in order to simulate a specific input file. FILTERGRAPH DESCRIPTION A filtergraph is a directed graph of connected filters. It can contain cycles, and there can be multiple links between a pair of filters. Each link has one input pad on one side connecting it to one filter from which it takes its input, and one output pad on the other side connecting it to one filter accepting its output. Each filter in a filtergraph is an instance of a filter class registered in the application, which defines the features and the number of input and output pads of the filter. A filter with no input pads is called a "source", and a filter with no output pads is called a "sink". Filtergraph syntax A filtergraph has a textual representation, which is recognized by the -filter/-vf/-af and -filter_complex options in ffmpeg and -vf/-af in ffplay, and by the "avfilter_graph_parse_ptr()" function defined in libavfilter/avfilter.h. A filterchain consists of a sequence of connected filters, each one connected to the previous one in the sequence. A filterchain is represented by a list of ","-separated filter descriptions. A filtergraph consists of a sequence of filterchains. A sequence of filterchains is represented by a list of ";"-separated filterchain descriptions. A filter is represented by a string of the form: [in_link_1]...[in_link_N]filter_name@id=arguments[out_link_1]...[out_link_M] filter_name is the name of the filter class of which the described filter is an instance of, and has to be the name of one of the filter classes registered in the program optionally followed by "@id". The name of the filter class is optionally followed by a string "=arguments". arguments is a string which contains the parameters used to initialize the filter instance. It may have one of two forms: o A ':'-separated list of key=value pairs. o A ':'-separated list of value. In this case, the keys are assumed to be the option names in the order they are declared. E.g. the "fade" filter declares three options in this order -- type, start_frame and nb_frames. Then the parameter list in:0:30 means that the value in is assigned to the option type, 0 to start_frame and 30 to nb_frames. o A ':'-separated list of mixed direct value and long key=value pairs. The direct value must precede the key=value pairs, and follow the same constraints order of the previous point. The following key=value pairs can be set in any preferred order. If the option value itself is a list of items (e.g. the "format" filter takes a list of pixel formats), the items in the list are usually separated by |. The list of arguments can be quoted using the character ' as initial and ending mark, and the character \ for escaping the characters within the quoted text; otherwise the argument string is considered terminated when the next special character (belonging to the set []=;,) is encountered. The name and arguments of the filter are optionally preceded and followed by a list of link labels. A link label allows one to name a link and associate it to a filter output or input pad. The preceding labels in_link_1 ... in_link_N, are associated to the filter input pads, the following labels out_link_1 ... out_link_M, are associated to the output pads. When two link labels with the same name are found in the filtergraph, a link between the corresponding input and output pad is created. If an output pad is not labelled, it is linked by default to the first unlabelled input pad of the next filter in the filterchain. For example in the filterchain nullsrc, split[L1], [L2]overlay, nullsink the split filter instance has two output pads, and the overlay filter instance two input pads. The first output pad of split is labelled "L1", the first input pad of overlay is labelled "L2", and the second output pad of split is linked to the second input pad of overlay, which are both unlabelled. In a filter description, if the input label of the first filter is not specified, "in" is assumed; if the output label of the last filter is not specified, "out" is assumed. In a complete filterchain all the unlabelled filter input and output pads must be connected. A filtergraph is considered valid if all the filter input and output pads of all the filterchains are connected. Libavfilter will automatically insert scale filters where format conversion is required. It is possible to specify swscale flags for those automatically inserted scalers by prepending "sws_flags=flags;" to the filtergraph description. Here is a BNF description of the filtergraph syntax: ::= sequence of alphanumeric characters and '_' ::= ["@"] ::= "[" "]" ::= [] ::= sequence of chars (possibly quoted) ::= [] ["=" ] [] ::= [,] ::= [sws_flags=;] [;] Notes on filtergraph escaping Filtergraph description composition entails several levels of escaping. See the "Quoting and escaping" section in the ffmpeg-utils(1) manual for more information about the employed escaping procedure. A first level escaping affects the content of each filter option value, which may contain the special character ":" used to separate values, or one of the escaping characters "\'". A second level escaping affects the whole filter description, which may contain the escaping characters "\'" or the special characters "[],;" used by the filtergraph description. Finally, when you specify a filtergraph on a shell commandline, you need to perform a third level escaping for the shell special characters contained within it. For example, consider the following string to be embedded in the drawtext filter description text value: this is a 'string': may contain one, or more, special characters This string contains the "'" special escaping character, and the ":" special character, so it needs to be escaped in this way: text=this is a \'string\'\: may contain one, or more, special characters A second level of escaping is required when embedding the filter description in a filtergraph description, in order to escape all the filtergraph special characters. Thus the example above becomes: drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters (note that in addition to the "\'" escaping special characters, also "," needs to be escaped). Finally an additional level of escaping is needed when writing the filtergraph description in a shell command, which depends on the escaping rules of the adopted shell. For example, assuming that "\" is special and needs to be escaped with another "\", the previous string will finally result in: -vf "drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters" TIMELINE EDITING Some filters support a generic enable option. For the filters supporting timeline editing, this option can be set to an expression which is evaluated before sending a frame to the filter. If the evaluation is non-zero, the filter will be enabled, otherwise the frame will be sent unchanged to the next filter in the filtergraph. The expression accepts the following values: t timestamp expressed in seconds, NAN if the input timestamp is unknown n sequential number of the input frame, starting from 0 pos the position in the file of the input frame, NAN if unknown w h width and height of the input frame if video Additionally, these filters support an enable command that can be used to re-define the expression. Like any other filtering option, the enable option follows the same rules. For example, to enable a blur filter (smartblur) from 10 seconds to 3 minutes, and a curves filter starting at 3 seconds: smartblur = enable='between(t,10,3*60)', curves = enable='gte(t,3)' : preset=cross_process See "ffmpeg -filters" to view which filters have timeline support. CHANGING OPTIONS AT RUNTIME WITH A COMMAND Some options can be changed during the operation of the filter using a command. These options are marked 'T' on the output of ffmpeg -h filter=. The name of the command is the name of the option and the argument is the new value. OPTIONS FOR FILTERS WITH SEVERAL INPUTS Some filters with several inputs support a common set of options. These options can only be set by name, not with the short notation. eof_action The action to take when EOF is encountered on the secondary input; it accepts one of the following values: repeat Repeat the last frame (the default). endall End both streams. pass Pass the main input through. shortest If set to 1, force the output to terminate when the shortest input terminates. Default value is 0. repeatlast If set to 1, force the filter to extend the last frame of secondary streams until the end of the primary stream. A value of 0 disables this behavior. Default value is 1. AUDIO FILTERS When you configure your FFmpeg build, you can disable any of the existing filters using "--disable-filters". The configure output will show the audio filters included in your build. Below is a description of the currently available audio filters. acompressor A compressor is mainly used to reduce the dynamic range of a signal. Especially modern music is mostly compressed at a high ratio to improve the overall loudness. It's done to get the highest attention of a listener, "fatten" the sound and bring more "power" to the track. If a signal is compressed too much it may sound dull or "dead" afterwards or it may start to "pump" (which could be a powerful effect but can also destroy a track completely). The right compression is the key to reach a professional sound and is the high art of mixing and mastering. Because of its complex settings it may take a long time to get the right feeling for this kind of effect. Compression is done by detecting the volume above a chosen level "threshold" and dividing it by the factor set with "ratio". So if you set the threshold to -12dB and your signal reaches -6dB a ratio of 2:1 will result in a signal at -9dB. Because an exact manipulation of the signal would cause distortion of the waveform the reduction can be levelled over the time. This is done by setting "Attack" and "Release". "attack" determines how long the signal has to rise above the threshold before any reduction will occur and "release" sets the time the signal has to fall below the threshold to reduce the reduction again. Shorter signals than the chosen attack time will be left untouched. The overall reduction of the signal can be made up afterwards with the "makeup" setting. So compressing the peaks of a signal about 6dB and raising the makeup to this level results in a signal twice as loud than the source. To gain a softer entry in the compression the "knee" flattens the hard edge at the threshold in the range of the chosen decibels. The filter accepts the following options: level_in Set input gain. Default is 1. Range is between 0.015625 and 64. mode Set mode of compressor operation. Can be "upward" or "downward". Default is "downward". threshold If a signal of stream rises above this level it will affect the gain reduction. By default it is 0.125. Range is between 0.00097563 and 1. ratio Set a ratio by which the signal is reduced. 1:2 means that if the level rose 4dB above the threshold, it will be only 2dB above after the reduction. Default is 2. Range is between 1 and 20. attack Amount of milliseconds the signal has to rise above the threshold before gain reduction starts. Default is 20. Range is between 0.01 and 2000. release Amount of milliseconds the signal has to fall below the threshold before reduction is decreased again. Default is 250. Range is between 0.01 and 9000. makeup Set the amount by how much signal will be amplified after processing. Default is 1. Range is from 1 to 64. knee Curve the sharp knee around the threshold to enter gain reduction more softly. Default is 2.82843. Range is between 1 and 8. link Choose if the "average" level between all channels of input stream or the louder("maximum") channel of input stream affects the reduction. Default is "average". detection Should the exact signal be taken in case of "peak" or an RMS one in case of "rms". Default is "rms" which is mostly smoother. mix How much to use compressed signal in output. Default is 1. Range is between 0 and 1. Commands This filter supports the all above options as commands. acontrast Simple audio dynamic range compression/expansion filter. The filter accepts the following options: contrast Set contrast. Default is 33. Allowed range is between 0 and 100. acopy Copy the input audio source unchanged to the output. This is mainly useful for testing purposes. acrossfade Apply cross fade from one input audio stream to another input audio stream. The cross fade is applied for specified duration near the end of first stream. The filter accepts the following options: nb_samples, ns Specify the number of samples for which the cross fade effect has to last. At the end of the cross fade effect the first input audio will be completely silent. Default is 44100. duration, d Specify the duration of the cross fade effect. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. By default the duration is determined by nb_samples. If set this option is used instead of nb_samples. overlap, o Should first stream end overlap with second stream start. Default is enabled. curve1 Set curve for cross fade transition for first stream. curve2 Set curve for cross fade transition for second stream. For description of available curve types see afade filter description. Examples o Cross fade from one input to another: ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac o Cross fade from one input to another but without overlapping: ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac acrossover Split audio stream into several bands. This filter splits audio stream into two or more frequency ranges. Summing all streams back will give flat output. The filter accepts the following options: split Set split frequencies. Those must be positive and increasing. order Set filter order for each band split. This controls filter roll-off or steepness of filter transfer function. Available values are: 2nd 12 dB per octave. 4th 24 dB per octave. 6th 36 dB per octave. 8th 48 dB per octave. 10th 60 dB per octave. 12th 72 dB per octave. 14th 84 dB per octave. 16th 96 dB per octave. 18th 108 dB per octave. 20th 120 dB per octave. Default is 4th. level Set input gain level. Allowed range is from 0 to 1. Default value is 1. gains Set output gain for each band. Default value is 1 for all bands. Examples o Split input audio stream into two bands (low and high) with split frequency of 1500 Hz, each band will be in separate stream: ffmpeg -i in.flac -filter_complex 'acrossover=split=1500[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav o Same as above, but with higher filter order: ffmpeg -i in.flac -filter_complex 'acrossover=split=1500:order=8th[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav o Same as above, but also with additional middle band (frequencies between 1500 and 8000): 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 acrusher Reduce audio bit resolution. This filter is bit crusher with enhanced functionality. A bit crusher is used to audibly reduce number of bits an audio signal is sampled with. This doesn't change the bit depth at all, it just produces the effect. Material reduced in bit depth sounds more harsh and "digital". This filter is able to even round to continuous values instead of discrete bit depths. Additionally it has a D/C offset which results in different crushing of the lower and the upper half of the signal. An Anti-Aliasing setting is able to produce "softer" crushing sounds. Another feature of this filter is the logarithmic mode. This setting switches from linear distances between bits to logarithmic ones. The result is a much more "natural" sounding crusher which doesn't gate low signals for example. The human ear has a logarithmic perception, so this kind of crushing is much more pleasant. Logarithmic crushing is also able to get anti-aliased. The filter accepts the following options: level_in Set level in. level_out Set level out. bits Set bit reduction. mix Set mixing amount. mode Can be linear: "lin" or logarithmic: "log". dc Set DC. aa Set anti-aliasing. samples Set sample reduction. lfo Enable LFO. By default disabled. lforange Set LFO range. lforate Set LFO rate. Commands This filter supports the all above options as commands. acue Delay audio filtering until a given wallclock timestamp. See the cue filter. adeclick Remove impulsive noise from input audio. Samples detected as impulsive noise are replaced by interpolated samples using autoregressive modelling. window, w Set window size, in milliseconds. Allowed range is from 10 to 100. Default value is 55 milliseconds. This sets size of window which will be processed at once. overlap, o Set window overlap, in percentage of window size. Allowed range is from 50 to 95. Default value is 75 percent. Setting this to a very high value increases impulsive noise removal but makes whole process much slower. arorder, a Set autoregression order, in percentage of window size. Allowed range is from 0 to 25. Default value is 2 percent. This option also controls quality of interpolated samples using neighbour good samples. threshold, t Set threshold value. Allowed range is from 1 to 100. Default value is 2. This controls the strength of impulsive noise which is going to be removed. The lower value, the more samples will be detected as impulsive noise. burst, b Set burst fusion, in percentage of window size. Allowed range is 0 to 10. Default value is 2. If any two samples detected as noise are spaced less than this value then any sample between those two samples will be also detected as noise. method, m Set overlap method. It accepts the following values: add, a Select overlap-add method. Even not interpolated samples are slightly changed with this method. save, s Select overlap-save method. Not interpolated samples remain unchanged. Default value is "a". adeclip Remove clipped samples from input audio. Samples detected as clipped are replaced by interpolated samples using autoregressive modelling. window, w Set window size, in milliseconds. Allowed range is from 10 to 100. Default value is 55 milliseconds. This sets size of window which will be processed at once. overlap, o Set window overlap, in percentage of window size. Allowed range is from 50 to 95. Default value is 75 percent. arorder, a Set autoregression order, in percentage of window size. Allowed range is from 0 to 25. Default value is 8 percent. This option also controls quality of interpolated samples using neighbour good samples. threshold, t Set threshold value. Allowed range is from 1 to 100. Default value is 10. Higher values make clip detection less aggressive. hsize, n Set size of histogram used to detect clips. Allowed range is from 100 to 9999. Default value is 1000. Higher values make clip detection less aggressive. method, m Set overlap method. It accepts the following values: add, a Select overlap-add method. Even not interpolated samples are slightly changed with this method. save, s Select overlap-save method. Not interpolated samples remain unchanged. Default value is "a". adecorrelate Apply decorrelation to input audio stream. The filter accepts the following options: stages Set decorrelation stages of filtering. Allowed range is from 1 to 16. Default value is 6. seed Set random seed used for setting delay in samples across channels. adelay Delay one or more audio channels. Samples in delayed channel are filled with silence. The filter accepts the following option: delays Set list of delays in milliseconds for each channel separated by '|'. Unused delays will be silently ignored. If number of given delays is smaller than number of channels all remaining channels will not be delayed. If you want to delay exact number of samples, append 'S' to number. If you want instead to delay in seconds, append 's' to number. all Use last set delay for all remaining channels. By default is disabled. This option if enabled changes how option "delays" is interpreted. Examples o Delay first channel by 1.5 seconds, the third channel by 0.5 seconds and leave the second channel (and any other channels that may be present) unchanged. adelay=1500|0|500 o Delay second channel by 500 samples, the third channel by 700 samples and leave the first channel (and any other channels that may be present) unchanged. adelay=0|500S|700S o Delay all channels by same number of samples: adelay=delays=64S:all=1 adenorm Remedy denormals in audio by adding extremely low-level noise. This filter shall be placed before any filter that can produce denormals. A description of the accepted parameters follows. level Set level of added noise in dB. Default is "-351". Allowed range is from -451 to -90. type Set type of added noise. dc Add DC signal. ac Add AC signal. square Add square signal. pulse Add pulse signal. Default is "dc". Commands This filter supports the all above options as commands. aderivative, aintegral Compute derivative/integral of audio stream. Applying both filters one after another produces original audio. adynamicequalizer Apply dynamic equalization to input audio stream. A description of the accepted options follows. threshold Set the detection threshold used to trigger equalization. Threshold detection is using bandpass filter. Default value is 0. Allowed range is from 0 to 100. dfrequency Set the detection frequency in Hz used for bandpass filter used to trigger equalization. Default value is 1000 Hz. Allowed range is between 2 and 1000000 Hz. dqfactor Set the detection resonance factor for bandpass filter used to trigger equalization. Default value is 1. Allowed range is from 0.001 to 1000. tfrequency Set the target frequency of equalization filter. Default value is 1000 Hz. Allowed range is between 2 and 1000000 Hz. tqfactor Set the target resonance factor for target equalization filter. Default value is 1. Allowed range is from 0.001 to 1000. attack Set the amount of milliseconds the signal from detection has to rise above the detection threshold before equalization starts. Default is 20. Allowed range is between 1 and 2000. release Set the amount of milliseconds the signal from detection has to fall below the detection threshold before equalization ends. Default is 200. Allowed range is between 1 and 2000. knee Curve the sharp knee around the detection threshold to calculate equalization gain more softly. Default is 1. Allowed range is between 0 and 8. ratio Set the ratio by which the equalization gain is raised. Default is 1. Allowed range is between 1 and 20. makeup Set the makeup offset in dB by which the equalization gain is raised. Default is 0. Allowed range is between 0 and 30. range Set the max allowed cut/boost amount in dB. Default is 0. Allowed range is from 0 to 200. slew Set the slew factor. Default is 1. Allowed range is from 1 to 200. mode Set the mode of filter operation, can be one of the following: listen Output only isolated bandpass signal. cut Cut frequencies above detection threshold. boost Boost frequencies bellow detection threshold. Default mode is cut. Commands This filter supports the all above options as commands. adynamicsmooth Apply dynamic smoothing to input audio stream. A description of the accepted options follows. sensitivity Set an amount of sensitivity to frequency fluctations. Default is 2. Allowed range is from 0 to 1e+06. basefreq Set a base frequency for smoothing. Default value is 22050. Allowed range is from 2 to 1e+06. Commands This filter supports the all above options as commands. aecho Apply echoing to the input audio. Echoes are reflected sound and can occur naturally amongst mountains (and sometimes large buildings) when talking or shouting; digital echo effects emulate this behaviour and are often used to help fill out the sound of a single instrument or vocal. The time difference between the original signal and the reflection is the "delay", and the loudness of the reflected signal is the "decay". Multiple echoes can have different delays and decays. A description of the accepted parameters follows. in_gain Set input gain of reflected signal. Default is 0.6. out_gain Set output gain of reflected signal. Default is 0.3. delays Set list of time intervals in milliseconds between original signal and reflections separated by '|'. Allowed range for each "delay" is "(0 - 90000.0]". Default is 1000. decays Set list of loudness of reflected signals separated by '|'. Allowed range for each "decay" is "(0 - 1.0]". Default is 0.5. Examples o Make it sound as if there are twice as many instruments as are actually playing: aecho=0.8:0.88:60:0.4 o If delay is very short, then it sounds like a (metallic) robot playing music: aecho=0.8:0.88:6:0.4 o A longer delay will sound like an open air concert in the mountains: aecho=0.8:0.9:1000:0.3 o Same as above but with one more mountain: aecho=0.8:0.9:1000|1800:0.3|0.25 aemphasis Audio emphasis filter creates or restores material directly taken from LPs or emphased CDs with different filter curves. E.g. to store music on vinyl the signal has to be altered by a filter first to even out the disadvantages of this recording medium. Once the material is played back the inverse filter has to be applied to restore the distortion of the frequency response. The filter accepts the following options: level_in Set input gain. level_out Set output gain. mode Set filter mode. For restoring material use "reproduction" mode, otherwise use "production" mode. Default is "reproduction" mode. type Set filter type. Selects medium. Can be one of the following: col select Columbia. emi select EMI. bsi select BSI (78RPM). riaa select RIAA. cd select Compact Disc (CD). 50fm select 50Xs (FM). 75fm select 75Xs (FM). 50kf select 50Xs (FM-KF). 75kf select 75Xs (FM-KF). Commands This filter supports the all above options as commands. aeval Modify an audio signal according to the specified expressions. This filter accepts one or more expressions (one for each channel), which are evaluated and used to modify a corresponding audio signal. It accepts the following parameters: exprs Set the '|'-separated expressions list for each separate channel. If the number of input channels is greater than the number of expressions, the last specified expression is used for the remaining output channels. channel_layout, c Set output channel layout. If not specified, the channel layout is specified by the number of expressions. If set to same, it will use by default the same input channel layout. Each expression in exprs can contain the following constants and functions: ch channel number of the current expression n number of the evaluated sample, starting from 0 s sample rate t time of the evaluated sample expressed in seconds nb_in_channels nb_out_channels input and output number of channels val(CH) the value of input channel with number CH Note: this filter is slow. For faster processing you should use a dedicated filter. Examples o Half volume: aeval=val(ch)/2:c=same o Invert phase of the second channel: aeval=val(0)|-val(1) aexciter An exciter is used to produce high sound that is not present in the original signal. This is done by creating harmonic distortions of the signal which are restricted in range and added to the original signal. An Exciter raises the upper end of an audio signal without simply raising the higher frequencies like an equalizer would do to create a more "crisp" or "brilliant" sound. The filter accepts the following options: level_in Set input level prior processing of signal. Allowed range is from 0 to 64. Default value is 1. level_out Set output level after processing of signal. Allowed range is from 0 to 64. Default value is 1. amount Set the amount of harmonics added to original signal. Allowed range is from 0 to 64. Default value is 1. drive Set the amount of newly created harmonics. Allowed range is from 0.1 to 10. Default value is 8.5. blend Set the octave of newly created harmonics. Allowed range is from -10 to 10. Default value is 0. freq Set the lower frequency limit of producing harmonics in Hz. Allowed range is from 2000 to 12000 Hz. Default is 7500 Hz. ceil Set the upper frequency limit of producing harmonics. Allowed range is from 9999 to 20000 Hz. If value is lower than 10000 Hz no limit is applied. listen Mute the original signal and output only added harmonics. By default is disabled. Commands This filter supports the all above options as commands. afade Apply fade-in/out effect to input audio. A description of the accepted parameters follows. type, t Specify the effect type, can be either "in" for fade-in, or "out" for a fade-out effect. Default is "in". start_sample, ss Specify the number of the start sample for starting to apply the fade effect. Default is 0. nb_samples, ns Specify the number of samples for which the fade effect has to last. At the end of the fade-in effect the output audio will have the same volume as the input audio, at the end of the fade-out transition the output audio will be silence. Default is 44100. start_time, st Specify the start time of the fade effect. Default is 0. The value must be specified as a time duration; see the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. If set this option is used instead of start_sample. duration, d Specify the duration of the fade effect. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. At the end of the fade-in effect the output audio will have the same volume as the input audio, at the end of the fade-out transition the output audio will be silence. By default the duration is determined by nb_samples. If set this option is used instead of nb_samples. curve Set curve for fade transition. It accepts the following values: tri select triangular, linear slope (default) qsin select quarter of sine wave hsin select half of sine wave esin select exponential sine wave log select logarithmic ipar select inverted parabola qua select quadratic cub select cubic squ select square root cbr select cubic root par select parabola exp select exponential iqsin select inverted quarter of sine wave ihsin select inverted half of sine wave dese select double-exponential seat desi select double-exponential sigmoid losi select logistic sigmoid sinc select sine cardinal function isinc select inverted sine cardinal function nofade no fade applied Commands This filter supports the all above options as commands. Examples o Fade in first 15 seconds of audio: afade=t=in:ss=0:d=15 o Fade out last 25 seconds of a 900 seconds audio: afade=t=out:st=875:d=25 afftdn Denoise audio samples with FFT. A description of the accepted parameters follows. nr Set the noise reduction in dB, allowed range is 0.01 to 97. Default value is 12 dB. nf Set the noise floor in dB, allowed range is -80 to -20. Default value is -50 dB. nt Set the noise type. It accepts the following values: w Select white noise. v Select vinyl noise. s Select shellac noise. c Select custom noise, defined in "bn" option. Default value is white noise. bn Set custom band noise for every one of 15 bands. Bands are separated by ' ' or '|'. rf Set the residual floor in dB, allowed range is -80 to -20. Default value is -38 dB. tn Enable noise tracking. By default is disabled. With this enabled, noise floor is automatically adjusted. tr Enable residual tracking. By default is disabled. om Set the output mode. It accepts the following values: i Pass input unchanged. o Pass noise filtered out. n Pass only noise. Default value is o. Commands This filter supports the following commands: sample_noise, sn Start or stop measuring noise profile. Syntax for the command is : "start" or "stop" string. After measuring noise profile is stopped it will be automatically applied in filtering. noise_reduction, nr Change noise reduction. Argument is single float number. Syntax for the command is : "noise_reduction" noise_floor, nf Change noise floor. Argument is single float number. Syntax for the command is : "noise_floor" output_mode, om Change output mode operation. Syntax for the command is : "i", "o" or "n" string. afftfilt Apply arbitrary expressions to samples in frequency domain. real Set frequency domain real expression for each separate channel separated by '|'. Default is "re". If the number of input channels is greater than the number of expressions, the last specified expression is used for the remaining output channels. imag Set frequency domain imaginary expression for each separate channel separated by '|'. Default is "im". Each expression in real and imag can contain the following constants and functions: sr sample rate b current frequency bin number nb number of available bins ch channel number of the current expression chs number of channels pts current frame pts re current real part of frequency bin of current channel im current imaginary part of frequency bin of current channel real(b, ch) Return the value of real part of frequency bin at location (bin,channel) imag(b, ch) Return the value of imaginary part of frequency bin at location (bin,channel) win_size Set window size. Allowed range is from 16 to 131072. Default is 4096 win_func Set window function. It accepts the following values: rect bartlett hann, hanning hamming blackman welch flattop bharris bnuttall bhann sine nuttall lanczos gauss tukey dolph cauchy parzen poisson bohman Default is "hann". overlap Set window overlap. If set to 1, the recommended overlap for selected window function will be picked. Default is 0.75. Examples o Leave almost only low frequencies in audio: afftfilt="'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'" o Apply robotize effect: afftfilt="real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75" o Apply whisper effect: 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" afir Apply an arbitrary Finite Impulse Response filter. This filter is designed for applying long FIR filters, up to 60 seconds long. It can be used as component for digital crossover filters, room equalization, cross talk cancellation, wavefield synthesis, auralization, ambiophonics, ambisonics and spatialization. This filter uses the streams higher than first one as FIR coefficients. If the non-first stream holds a single channel, it will be used for all input channels in the first stream, otherwise the number of channels in the non-first stream must be same as the number of channels in the first stream. It accepts the following parameters: dry Set dry gain. This sets input gain. wet Set wet gain. This sets final output gain. length Set Impulse Response filter length. Default is 1, which means whole IR is processed. gtype Enable applying gain measured from power of IR. Set which approach to use for auto gain measurement. none Do not apply any gain. peak select peak gain, very conservative approach. This is default value. dc select DC gain, limited application. gn select gain to noise approach, this is most popular one. irgain Set gain to be applied to IR coefficients before filtering. Allowed range is 0 to 1. This gain is applied after any gain applied with gtype option. irfmt Set format of IR stream. Can be "mono" or "input". Default is "input". maxir Set max allowed Impulse Response filter duration in seconds. Default is 30 seconds. Allowed range is 0.1 to 60 seconds. response Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream. By default it is disabled. channel Set for which IR channel to display frequency response. By default is first channel displayed. This option is used only when response is enabled. size Set video stream size. This option is used only when response is enabled. rate Set video stream frame rate. This option is used only when response is enabled. minp Set minimal partition size used for convolution. Default is 8192. Allowed range is from 1 to 32768. Lower values decreases latency at cost of higher CPU usage. maxp Set maximal partition size used for convolution. Default is 8192. Allowed range is from 8 to 32768. Lower values may increase CPU usage. nbirs Set number of input impulse responses streams which will be switchable at runtime. Allowed range is from 1 to 32. Default is 1. ir Set IR stream which will be used for convolution, starting from 0, should always be lower than supplied value by "nbirs" option. Default is 0. This option can be changed at runtime via commands. Examples o Apply reverb to stream using mono IR file as second input, complete command using ffmpeg: ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav aformat Set output format constraints for the input audio. The framework will negotiate the most appropriate format to minimize conversions. It accepts the following parameters: sample_fmts, f A '|'-separated list of requested sample formats. sample_rates, r A '|'-separated list of requested sample rates. channel_layouts, cl A '|'-separated list of requested channel layouts. See the Channel Layout section in the ffmpeg-utils(1) manual for the required syntax. If a parameter is omitted, all values are allowed. Force the output to either unsigned 8-bit or signed 16-bit stereo aformat=sample_fmts=u8|s16:channel_layouts=stereo afreqshift Apply frequency shift to input audio samples. The filter accepts the following options: shift Specify frequency shift. Allowed range is -INT_MAX to INT_MAX. Default value is 0.0. level Set output gain applied to final output. Allowed range is from 0.0 to 1.0. Default value is 1.0. order Set filter order used for filtering. Allowed range is from 1 to 16. Default value is 8. Commands This filter supports the all above options as commands. afwtdn Reduce broadband noise from input samples using Wavelets. A description of the accepted options follows. sigma Set the noise sigma, allowed range is from 0 to 1. Default value is 0. This option controls strength of denoising applied to input samples. Most useful way to set this option is via decibels, eg. -45dB. levels Set the number of wavelet levels of decomposition. Allowed range is from 1 to 12. Default value is 10. Setting this too low make denoising performance very poor. wavet Set wavelet type for decomposition of input frame. They are sorted by number of coefficients, from lowest to highest. More coefficients means worse filtering speed, but overall better quality. Available wavelets are: sym2 sym4 rbior68 deb10 sym10 coif5 bl3 percent Set percent of full denoising. Allowed range is from 0 to 100 percent. Default value is 85 percent or partial denoising. profile If enabled, first input frame will be used as noise profile. If first frame samples contain non-noise performance will be very poor. adaptive If enabled, input frames are analyzed for presence of noise. If noise is detected with high possibility then input frame profile will be used for processing following frames, until new noise frame is detected. samples Set size of single frame in number of samples. Allowed range is from 512 to 65536. Default frame size is 8192 samples. softness Set softness applied inside thresholding function. Allowed range is from 0 to 10. Default softness is 1. Commands This filter supports the all above options as commands. agate A gate is mainly used to reduce lower parts of a signal. This kind of signal processing reduces disturbing noise between useful signals. Gating is done by detecting the volume below a chosen level threshold and dividing it by the factor set with ratio. The bottom of the noise floor is set via range. Because an exact manipulation of the signal would cause distortion of the waveform the reduction can be levelled over time. This is done by setting attack and release. attack determines how long the signal has to fall below the threshold before any reduction will occur and release sets the time the signal has to rise above the threshold to reduce the reduction again. Shorter signals than the chosen attack time will be left untouched. level_in Set input level before filtering. Default is 1. Allowed range is from 0.015625 to 64. mode Set the mode of operation. Can be "upward" or "downward". Default is "downward". If set to "upward" mode, higher parts of signal will be amplified, expanding dynamic range in upward direction. Otherwise, in case of "downward" lower parts of signal will be reduced. range Set the level of gain reduction when the signal is below the threshold. Default is 0.06125. Allowed range is from 0 to 1. Setting this to 0 disables reduction and then filter behaves like expander. threshold If a signal rises above this level the gain reduction is released. Default is 0.125. Allowed range is from 0 to 1. ratio Set a ratio by which the signal is reduced. Default is 2. Allowed range is from 1 to 9000. attack Amount of milliseconds the signal has to rise above the threshold before gain reduction stops. Default is 20 milliseconds. Allowed range is from 0.01 to 9000. release Amount of milliseconds the signal has to fall below the threshold before the reduction is increased again. Default is 250 milliseconds. Allowed range is from 0.01 to 9000. makeup Set amount of amplification of signal after processing. Default is 1. Allowed range is from 1 to 64. knee Curve the sharp knee around the threshold to enter gain reduction more softly. Default is 2.828427125. Allowed range is from 1 to 8. detection Choose if exact signal should be taken for detection or an RMS like one. Default is "rms". Can be "peak" or "rms". link Choose if the average level between all channels or the louder channel affects the reduction. Default is "average". Can be "average" or "maximum". Commands This filter supports the all above options as commands. aiir Apply an arbitrary Infinite Impulse Response filter. It accepts the following parameters: zeros, z Set B/numerator/zeros/reflection coefficients. poles, p Set A/denominator/poles/ladder coefficients. gains, k Set channels gains. dry_gain Set input gain. wet_gain Set output gain. format, f Set coefficients format. ll lattice-ladder function sf analog transfer function tf digital transfer function zp Z-plane zeros/poles, cartesian (default) pr Z-plane zeros/poles, polar radians pd Z-plane zeros/poles, polar degrees sp S-plane zeros/poles process, r Set type of processing. d direct processing s serial processing p parallel processing precision, e Set filtering precision. dbl double-precision floating-point (default) flt single-precision floating-point i32 32-bit integers i16 16-bit integers normalize, n Normalize filter coefficients, by default is enabled. Enabling it will normalize magnitude response at DC to 0dB. mix How much to use filtered signal in output. Default is 1. Range is between 0 and 1. response Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream. By default it is disabled. channel Set for which IR channel to display frequency response. By default is first channel displayed. This option is used only when response is enabled. size Set video stream size. This option is used only when response is enabled. Coefficients in "tf" and "sf" format are separated by spaces and are in ascending order. Coefficients in "zp" format are separated by spaces and order of coefficients doesn't matter. Coefficients in "zp" format are complex numbers with i imaginary unit. Different coefficients and gains can be provided for every channel, in such case use '|' to separate coefficients or gains. Last provided coefficients will be used for all remaining channels. Examples o Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample rate: 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 o Same as above but in "zp" format: 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 o Apply 3-rd order analog normalized Butterworth low-pass filter, using analog transfer function format: aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d alimiter The limiter prevents an input signal from rising over a desired threshold. This limiter uses lookahead technology to prevent your signal from distorting. It means that there is a small delay after the signal is processed. Keep in mind that the delay it produces is the attack time you set. The filter accepts the following options: level_in Set input gain. Default is 1. level_out Set output gain. Default is 1. limit Don't let signals above this level pass the limiter. Default is 1. attack The limiter will reach its attenuation level in this amount of time in milliseconds. Default is 5 milliseconds. release Come back from limiting to attenuation 1.0 in this amount of milliseconds. Default is 50 milliseconds. asc When gain reduction is always needed ASC takes care of releasing to an average reduction level rather than reaching a reduction of 0 in the release time. asc_level Select how much the release time is affected by ASC, 0 means nearly no changes in release time while 1 produces higher release times. level Auto level output signal. Default is enabled. This normalizes audio back to 0dB if enabled. Depending on picked setting it is recommended to upsample input 2x or 4x times with aresample before applying this filter. allpass Apply a two-pole all-pass filter with central frequency (in Hz) frequency, and filter-width width. An all-pass filter changes the audio's frequency to phase relationship without changing its frequency to amplitude relationship. The filter accepts the following options: frequency, f Set frequency in Hz. width_type, t Set method to specify band-width of filter. h Hz q Q-Factor o octave s slope k kHz width, w Specify the band-width of a filter in width_type units. mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. order, o Set the filter order, can be 1 or 2. Default is 2. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. Commands This filter supports the following commands: frequency, f Change allpass frequency. Syntax for the command is : "frequency" width_type, t Change allpass width_type. Syntax for the command is : "width_type" width, w Change allpass width. Syntax for the command is : "width" mix, m Change allpass mix. Syntax for the command is : "mix" aloop Loop audio samples. The filter accepts the following options: loop Set the number of loops. Setting this value to -1 will result in infinite loops. Default is 0. size Set maximal number of samples. Default is 0. start Set first sample of loop. Default is 0. amerge Merge two or more audio streams into a single multi-channel stream. The filter accepts the following options: inputs Set the number of inputs. Default is 2. If the channel layouts of the inputs are disjoint, and therefore compatible, the channel layout of the output will be set accordingly and the channels will be reordered as necessary. If the channel layouts of the inputs are not disjoint, the output will have all the channels of the first input then all the channels of the second input, in that order, and the channel layout of the output will be the default value corresponding to the total number of channels. For example, if the first input is in 2.1 (FL+FR+LF) and the second input is FC+BL+BR, then the output will be in 5.1, with the channels in the following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of the first input, b1 is the first channel of the second input). On the other hand, if both input are in stereo, the output channels will be in the default order: a1, a2, b1, b2, and the channel layout will be arbitrarily set to 4.0, which may or may not be the expected value. All inputs must have the same sample rate, and format. If inputs do not have the same duration, the output will stop with the shortest. Examples o Merge two mono files into a stereo stream: amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge o Multiple merges assuming 1 video stream and 6 audio streams in input.mkv: 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 amix Mixes multiple audio inputs into a single output. Note that this filter only supports float samples (the amerge and pan audio filters support many formats). If the amix input has integer samples then aresample will be automatically inserted to perform the conversion to float samples. For example ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT will mix 3 input audio streams to a single output with the same duration as the first input and a dropout transition time of 3 seconds. It accepts the following parameters: inputs The number of inputs. If unspecified, it defaults to 2. duration How to determine the end-of-stream. longest The duration of the longest input. (default) shortest The duration of the shortest input. first The duration of the first input. dropout_transition The transition time, in seconds, for volume renormalization when an input stream ends. The default value is 2 seconds. weights Specify weight of each input audio stream as sequence. Each weight is separated by space. By default all inputs have same weight. normalize Always scale inputs instead of only doing summation of samples. Beware of heavy clipping if inputs are not normalized prior or after filtering by this filter if this option is disabled. By default is enabled. Commands This filter supports the following commands: weights normalize Syntax is same as option with same name. amultiply Multiply first audio stream with second audio stream and store result in output audio stream. Multiplication is done by multiplying each sample from first stream with sample at same position from second stream. With this element-wise multiplication one can create amplitude fades and amplitude modulations. anequalizer High-order parametric multiband equalizer for each channel. It accepts the following parameters: params This option string is in format: "cchn f=cf w=w g=g t=f | ..." Each equalizer band is separated by '|'. chn Set channel number to which equalization will be applied. If input doesn't have that channel the entry is ignored. f Set central frequency for band. If input doesn't have that frequency the entry is ignored. w Set band width in Hertz. g Set band gain in dB. t Set filter type for band, optional, can be: 0 Butterworth, this is default. 1 Chebyshev type 1. 2 Chebyshev type 2. curves With this option activated frequency response of anequalizer is displayed in video stream. size Set video stream size. Only useful if curves option is activated. mgain Set max gain that will be displayed. Only useful if curves option is activated. Setting this to a reasonable value makes it possible to display gain which is derived from neighbour bands which are too close to each other and thus produce higher gain when both are activated. fscale Set frequency scale used to draw frequency response in video output. Can be linear or logarithmic. Default is logarithmic. colors Set color for each channel curve which is going to be displayed in video stream. This is list of color names separated by space or by '|'. Unrecognised or missing colors will be replaced by white color. Examples o Lower gain by 10 of central frequency 200Hz and width 100 Hz for first 2 channels using Chebyshev type 1 filter: anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1 Commands This filter supports the following commands: change Alter existing filter parameters. Syntax for the commands is : "fN|f=freq|w=width|g=gain" fN is existing filter number, starting from 0, if no such filter is available error is returned. freq set new frequency parameter. width set new width parameter in Hertz. gain set new gain parameter in dB. Full filter invocation with asendcmd may look like this: asendcmd=c='4.0 anequalizer change 0|f=200|w=50|g=1',anequalizer=... anlmdn Reduce broadband noise in audio samples using Non-Local Means algorithm. Each sample is adjusted by looking for other samples with similar contexts. This context similarity is defined by comparing their surrounding patches of size p. Patches are searched in an area of r around the sample. The filter accepts the following options: strength, s Set denoising strength. Allowed range is from 0.00001 to 10. Default value is 0.00001. patch, p Set patch radius duration. Allowed range is from 1 to 100 milliseconds. Default value is 2 milliseconds. research, r Set research radius duration. Allowed range is from 2 to 300 milliseconds. Default value is 6 milliseconds. output, o Set the output mode. It accepts the following values: i Pass input unchanged. o Pass noise filtered out. n Pass only noise. Default value is o. smooth, m Set smooth factor. Default value is 11. Allowed range is from 1 to 15. Commands This filter supports the all above options as commands. anlmf, anlms Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first audio stream using the second audio stream. This adaptive filter is used to mimic a desired filter by finding the filter coefficients that relate to producing the least mean square of the error signal (difference between the desired, 2nd input audio stream and the actual signal, the 1st input audio stream). A description of the accepted options follows. order Set filter order. mu Set filter mu. eps Set the filter eps. leakage Set the filter leakage. out_mode It accepts the following values: i Pass the 1st input. d Pass the 2nd input. o Pass filtered samples. n Pass difference between desired and filtered samples. Default value is o. Examples o One of many usages of this filter is noise reduction, input audio is filtered with same samples that are delayed by fixed amount, one such example for stereo audio is: asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o Commands This filter supports the same commands as options, excluding option "order". anull Pass the audio source unchanged to the output. apad Pad the end of an audio stream with silence. This can be used together with ffmpeg -shortest to extend audio streams to the same length as the video stream. A description of the accepted options follows. packet_size Set silence packet size. Default value is 4096. pad_len Set the number of samples of silence to add to the end. After the value is reached, the stream is terminated. This option is mutually exclusive with whole_len. whole_len Set the minimum total number of samples in the output audio stream. If the value is longer than the input audio length, silence is added to the end, until the value is reached. This option is mutually exclusive with pad_len. pad_dur Specify the duration of samples of silence to add. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. Used only if set to non-negative value. whole_dur Specify the minimum total duration in the output audio stream. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. Used only if set to non-negative value. If the value is longer than the input audio length, silence is added to the end, until the value is reached. This option is mutually exclusive with pad_dur If neither the pad_len nor the whole_len nor pad_dur nor whole_dur option is set, the filter will add silence to the end of the input stream indefinitely. Note that for ffmpeg 4.4 and earlier a zero pad_dur or whole_dur also caused the filter to add silence indefinitely. Examples o Add 1024 samples of silence to the end of the input: apad=pad_len=1024 o Make sure the audio output will contain at least 10000 samples, pad the input with silence if required: apad=whole_len=10000 o Use ffmpeg to pad the audio input with silence, so that the video stream will always result the shortest and will be converted until the end in the output file when using the shortest option: ffmpeg -i VIDEO -i AUDIO -filter_complex "[1:0]apad" -shortest OUTPUT aphaser Add a phasing effect to the input audio. A phaser filter creates series of peaks and troughs in the frequency spectrum. The position of the peaks and troughs are modulated so that they vary over time, creating a sweeping effect. A description of the accepted parameters follows. in_gain Set input gain. Default is 0.4. out_gain Set output gain. Default is 0.74 delay Set delay in milliseconds. Default is 3.0. decay Set decay. Default is 0.4. speed Set modulation speed in Hz. Default is 0.5. type Set modulation type. Default is triangular. It accepts the following values: triangular, t sinusoidal, s aphaseshift Apply phase shift to input audio samples. The filter accepts the following options: shift Specify phase shift. Allowed range is from -1.0 to 1.0. Default value is 0.0. level Set output gain applied to final output. Allowed range is from 0.0 to 1.0. Default value is 1.0. order Set filter order used for filtering. Allowed range is from 1 to 16. Default value is 8. Commands This filter supports the all above options as commands. apsyclip Apply Psychoacoustic clipper to input audio stream. The filter accepts the following options: level_in Set input gain. By default it is 1. Range is [0.015625 - 64]. level_out Set output gain. By default it is 1. Range is [0.015625 - 64]. clip Set the clipping start value. Default value is 0dBFS or 1. diff Output only difference samples, useful to hear introduced distortions. By default is disabled. adaptive Set strenght of adaptive distortion applied. Default value is 0.5. Allowed range is from 0 to 1. iterations Set number of iterations of psychoacoustic clipper. Allowed range is from 1 to 20. Default value is 10. level Auto level output signal. Default is disabled. This normalizes audio back to 0dBFS if enabled. Commands This filter supports the all above options as commands. apulsator Audio pulsator is something between an autopanner and a tremolo. But it can produce funny stereo effects as well. Pulsator changes the volume of the left and right channel based on a LFO (low frequency oscillator) with different waveforms and shifted phases. This filter have the ability to define an offset between left and right channel. An offset of 0 means that both LFO shapes match each other. The left and right channel are altered equally - a conventional tremolo. An offset of 50% means that the shape of the right channel is exactly shifted in phase (or moved backwards about half of the frequency) - pulsator acts as an autopanner. At 1 both curves match again. Every setting in between moves the phase shift gapless between all stages and produces some "bypassing" sounds with sine and triangle waveforms. The more you set the offset near 1 (starting from the 0.5) the faster the signal passes from the left to the right speaker. The filter accepts the following options: level_in Set input gain. By default it is 1. Range is [0.015625 - 64]. level_out Set output gain. By default it is 1. Range is [0.015625 - 64]. mode Set waveform shape the LFO will use. Can be one of: sine, triangle, square, sawup or sawdown. Default is sine. amount Set modulation. Define how much of original signal is affected by the LFO. offset_l Set left channel offset. Default is 0. Allowed range is [0 - 1]. offset_r Set right channel offset. Default is 0.5. Allowed range is [0 - 1]. width Set pulse width. Default is 1. Allowed range is [0 - 2]. timing Set possible timing mode. Can be one of: bpm, ms or hz. Default is hz. bpm Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if timing is set to bpm. ms Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if timing is set to ms. hz Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100]. Only used if timing is set to hz. aresample Resample the input audio to the specified parameters, using the libswresample library. If none are specified then the filter will automatically convert between its input and output. This filter is also able to stretch/squeeze the audio data to make it match the timestamps or to inject silence / cut out audio to make it match the timestamps, do a combination of both or do neither. The filter accepts the syntax [sample_rate:]resampler_options, where sample_rate expresses a sample rate and resampler_options is a list of key=value pairs, separated by ":". See the "Resampler Options" section in the ffmpeg-resampler(1) manual for the complete list of supported options. Examples o Resample the input audio to 44100Hz: aresample=44100 o Stretch/squeeze samples to the given timestamps, with a maximum of 1000 samples per second compensation: aresample=async=1000 areverse Reverse an audio clip. Warning: This filter requires memory to buffer the entire clip, so trimming is suggested. Examples o Take the first 5 seconds of a clip, and reverse it. atrim=end=5,areverse arnndn Reduce noise from speech using Recurrent Neural Networks. This filter accepts the following options: model, m Set train model file to load. This option is always required. mix Set how much to mix filtered samples into final output. Allowed range is from -1 to 1. Default value is 1. Negative values are special, they set how much to keep filtered noise in the final filter output. Set this option to -1 to hear actual noise removed from input signal. Commands This filter supports the all above options as commands. asdr Measure Audio Signal-to-Distortion Ratio. This filter takes two audio streams for input, and outputs first audio stream. Results are in dB per channel at end of either input. asetnsamples Set the number of samples per each output audio frame. The last output packet may contain a different number of samples, as the filter will flush all the remaining samples when the input audio signals its end. The filter accepts the following options: nb_out_samples, n Set the number of frames per each output audio frame. The number is intended as the number of samples per each channel. Default value is 1024. pad, p If set to 1, the filter will pad the last audio frame with zeroes, so that the last frame will contain the same number of samples as the previous ones. Default value is 1. For example, to set the number of per-frame samples to 1234 and disable padding for the last frame, use: asetnsamples=n=1234:p=0 asetrate Set the sample rate without altering the PCM data. This will result in a change of speed and pitch. The filter accepts the following options: sample_rate, r Set the output sample rate. Default is 44100 Hz. ashowinfo Show a line containing various information for each input audio frame. The input audio is not modified. The shown line contains a sequence of key/value pairs of the form key:value. The following values are shown in the output: n The (sequential) number of the input frame, starting from 0. pts The presentation timestamp of the input frame, in time base units; the time base depends on the filter input pad, and is usually 1/sample_rate. pts_time The presentation timestamp of the input frame in seconds. pos position of the frame in the input stream, -1 if this information in unavailable and/or meaningless (for example in case of synthetic audio) fmt The sample format. chlayout The channel layout. rate The sample rate for the audio frame. nb_samples The number of samples (per channel) in the frame. checksum The Adler-32 checksum (printed in hexadecimal) of the audio data. For planar audio, the data is treated as if all the planes were concatenated. plane_checksums A list of Adler-32 checksums for each data plane. asoftclip Apply audio soft clipping. Soft clipping is a type of distortion effect where the amplitude of a signal is saturated along a smooth curve, rather than the abrupt shape of hard-clipping. This filter accepts the following options: type Set type of soft-clipping. It accepts the following values: hard tanh atan cubic exp alg quintic sin erf threshold Set threshold from where to start clipping. Default value is 0dB or 1. output Set gain applied to output. Default value is 0dB or 1. param Set additional parameter which controls sigmoid function. oversample Set oversampling factor. Commands This filter supports the all above options as commands. aspectralstats Display frequency domain statistical information about the audio channels. Statistics are calculated and stored as metadata for each audio channel and for each audio frame. It accepts the following option: win_size Set the window length in samples. Default value is 2048. Allowed range is from 32 to 65536. win_func Set window function. It accepts the following values: rect bartlett hann, hanning hamming blackman welch flattop bharris bnuttall bhann sine nuttall lanczos gauss tukey dolph cauchy parzen poisson bohman Default is "hann". overlap Set window overlap. Allowed range is from 0 to 1. Default value is 0.5. A list of each metadata key follows: mean variance centroid spread skewness kurtosis entropy flatness crest flux slope decrease rolloff asr Automatic Speech Recognition This filter uses PocketSphinx for speech recognition. To enable compilation of this filter, you need to configure FFmpeg with "--enable-pocketsphinx". It accepts the following options: rate Set sampling rate of input audio. Defaults is 16000. This need to match speech models, otherwise one will get poor results. hmm Set dictionary containing acoustic model files. dict Set pronunciation dictionary. lm Set language model file. lmctl Set language model set. lmname Set which language model to use. logfn Set output for log messages. The filter exports recognized speech as the frame metadata "lavfi.asr.text". astats Display time domain statistical information about the audio channels. Statistics are calculated and displayed for each audio channel and, where applicable, an overall figure is also given. It accepts the following option: length Short window length in seconds, used for peak and trough RMS measurement. Default is 0.05 (50 milliseconds). Allowed range is "[0 - 10]". metadata Set metadata injection. All the metadata keys are prefixed with "lavfi.astats.X", where "X" is channel number starting from 1 or string "Overall". Default is disabled. Available keys for each channel are: DC_offset Min_level Max_level Min_difference Max_difference Mean_difference RMS_difference Peak_level RMS_peak RMS_trough Crest_factor Flat_factor Peak_count Noise_floor Noise_floor_count Entropy Bit_depth Dynamic_range Zero_crossings Zero_crossings_rate Number_of_NaNs Number_of_Infs Number_of_denormals and for Overall: DC_offset Min_level Max_level Min_difference Max_difference Mean_difference RMS_difference Peak_level RMS_level RMS_peak RMS_trough Flat_factor Peak_count Noise_floor Noise_floor_count Entropy Bit_depth Number_of_samples Number_of_NaNs Number_of_Infs Number_of_denormals For example full key look like this "lavfi.astats.1.DC_offset" or this "lavfi.astats.Overall.Peak_count". For description what each key means read below. reset Set the number of frames over which cumulative stats are calculated before being reset Default is disabled. measure_perchannel Select the parameters which are measured per channel. The metadata keys can be used as flags, default is all which measures everything. none disables all per channel measurement. measure_overall Select the parameters which are measured overall. The metadata keys can be used as flags, default is all which measures everything. none disables all overall measurement. A description of each shown parameter follows: DC offset Mean amplitude displacement from zero. Min level Minimal sample level. Max level Maximal sample level. Min difference Minimal difference between two consecutive samples. Max difference Maximal difference between two consecutive samples. Mean difference Mean difference between two consecutive samples. The average of each difference between two consecutive samples. RMS difference Root Mean Square difference between two consecutive samples. Peak level dB RMS level dB Standard peak and RMS level measured in dBFS. RMS peak dB RMS trough dB Peak and trough values for RMS level measured over a short window. Crest factor Standard ratio of peak to RMS level (note: not in dB). Flat factor Flatness (i.e. consecutive samples with the same value) of the signal at its peak levels (i.e. either Min level or Max level). Peak count Number of occasions (not the number of samples) that the signal attained either Min level or Max level. Noise floor dB Minimum local peak measured in dBFS over a short window. Noise floor count Number of occasions (not the number of samples) that the signal attained Noise floor. Entropy Entropy measured across whole audio. Entropy of value near 1.0 is typically measured for white noise. Bit depth Overall bit depth of audio. Number of bits used for each sample. Dynamic range Measured dynamic range of audio in dB. Zero crossings Number of points where the waveform crosses the zero level axis. Zero crossings rate Rate of Zero crossings and number of audio samples. asubboost Boost subwoofer frequencies. The filter accepts the following options: dry Set dry gain, how much of original signal is kept. Allowed range is from 0 to 1. Default value is 0.7. wet Set wet gain, how much of filtered signal is kept. Allowed range is from 0 to 1. Default value is 0.7. decay Set delay line decay gain value. Allowed range is from 0 to 1. Default value is 0.7. feedback Set delay line feedback gain value. Allowed range is from 0 to 1. Default value is 0.9. cutoff Set cutoff frequency in Hertz. Allowed range is 50 to 900. Default value is 100. slope Set slope amount for cutoff frequency. Allowed range is 0.0001 to 1. Default value is 0.5. delay Set delay. Allowed range is from 1 to 100. Default value is 20. Commands This filter supports the all above options as commands. asubcut Cut subwoofer frequencies. This filter allows to set custom, steeper roll off than highpass filter, and thus is able to more attenuate frequency content in stop- band. The filter accepts the following options: cutoff Set cutoff frequency in Hertz. Allowed range is 2 to 200. Default value is 20. order Set filter order. Available values are from 3 to 20. Default value is 10. level Set input gain level. Allowed range is from 0 to 1. Default value is 1. Commands This filter supports the all above options as commands. asupercut Cut super frequencies. The filter accepts the following options: cutoff Set cutoff frequency in Hertz. Allowed range is 20000 to 192000. Default value is 20000. order Set filter order. Available values are from 3 to 20. Default value is 10. level Set input gain level. Allowed range is from 0 to 1. Default value is 1. Commands This filter supports the all above options as commands. asuperpass Apply high order Butterworth band-pass filter. The filter accepts the following options: centerf Set center frequency in Hertz. Allowed range is 2 to 999999. Default value is 1000. order Set filter order. Available values are from 4 to 20. Default value is 4. qfactor Set Q-factor. Allowed range is from 0.01 to 100. Default value is 1. level Set input gain level. Allowed range is from 0 to 2. Default value is 1. Commands This filter supports the all above options as commands. asuperstop Apply high order Butterworth band-stop filter. The filter accepts the following options: centerf Set center frequency in Hertz. Allowed range is 2 to 999999. Default value is 1000. order Set filter order. Available values are from 4 to 20. Default value is 4. qfactor Set Q-factor. Allowed range is from 0.01 to 100. Default value is 1. level Set input gain level. Allowed range is from 0 to 2. Default value is 1. Commands This filter supports the all above options as commands. atempo Adjust audio tempo. The filter accepts exactly one parameter, the audio tempo. If not specified then the filter will assume nominal 1.0 tempo. Tempo must be in the [0.5, 100.0] range. Note that tempo greater than 2 will skip some samples rather than blend them in. If for any reason this is a concern it is always possible to daisy-chain several instances of atempo to achieve the desired product tempo. Examples o Slow down audio to 80% tempo: atempo=0.8 o To speed up audio to 300% tempo: atempo=3 o To speed up audio to 300% tempo by daisy-chaining two atempo instances: atempo=sqrt(3),atempo=sqrt(3) Commands This filter supports the following commands: tempo Change filter tempo scale factor. Syntax for the command is : "tempo" atilt Apply spectral tilt filter to audio stream. This filter apply any spectral roll-off slope over any specified frequency band. The filter accepts the following options: freq Set central frequency of tilt in Hz. Default is 10000 Hz. slope Set slope direction of tilt. Default is 0. Allowed range is from -1 to 1. width Set width of tilt. Default is 1000. Allowed range is from 100 to 10000. order Set order of tilt filter. level Set input volume level. Allowed range is from 0 to 4. Defalt is 1. Commands This filter supports the all above options as commands. atrim Trim the input so that the output contains one continuous subpart of the input. It accepts the following parameters: start Timestamp (in seconds) of the start of the section to keep. I.e. the audio sample with the timestamp start will be the first sample in the output. end Specify time of the first audio sample that will be dropped, i.e. the audio sample immediately preceding the one with the timestamp end will be the last sample in the output. start_pts Same as start, except this option sets the start timestamp in samples instead of seconds. end_pts Same as end, except this option sets the end timestamp in samples instead of seconds. duration The maximum duration of the output in seconds. start_sample The number of the first sample that should be output. end_sample The number of the first sample that should be dropped. start, end, and duration are expressed as time duration specifications; see the Time duration section in the ffmpeg-utils(1) manual. Note that the first two sets of the start/end options and the duration option look at the frame timestamp, while the _sample options simply count the samples that pass through the filter. So start/end_pts and start/end_sample will give different results when the timestamps are wrong, inexact or do not start at zero. Also note that this filter does not modify the timestamps. If you wish to have the output timestamps start at zero, insert the asetpts filter after the atrim filter. If multiple start or end options are set, this filter tries to be greedy and keep all samples that match at least one of the specified constraints. To keep only the part that matches all the constraints at once, chain multiple atrim filters. The defaults are such that all the input is kept. So it is possible to set e.g. just the end values to keep everything before the specified time. Examples: o Drop everything except the second minute of input: ffmpeg -i INPUT -af atrim=60:120 o Keep only the first 1000 samples: ffmpeg -i INPUT -af atrim=end_sample=1000 axcorrelate Calculate normalized windowed cross-correlation between two input audio streams. Resulted samples are always between -1 and 1 inclusive. If result is 1 it means two input samples are highly correlated in that selected segment. Result 0 means they are not correlated at all. If result is -1 it means two input samples are out of phase, which means they cancel each other. The filter accepts the following options: size Set size of segment over which cross-correlation is calculated. Default is 256. Allowed range is from 2 to 131072. algo Set algorithm for cross-correlation. Can be "slow" or "fast". Default is "slow". Fast algorithm assumes mean values over any given segment are always zero and thus need much less calculations to make. This is generally not true, but is valid for typical audio streams. Examples o Calculate correlation between channels in stereo audio stream: ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav bandpass Apply a two-pole Butterworth band-pass filter with central frequency frequency, and (3dB-point) band-width width. The csg option selects a constant skirt gain (peak gain = Q) instead of the default: constant 0dB peak gain. The filter roll off at 6dB per octave (20dB per decade). The filter accepts the following options: frequency, f Set the filter's central frequency. Default is 3000. csg Constant skirt gain if set to 1. Defaults to 0. width_type, t Set method to specify band-width of filter. h Hz q Q-Factor o octave s slope k kHz width, w Specify the band-width of a filter in width_type units. mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. Commands This filter supports the following commands: frequency, f Change bandpass frequency. Syntax for the command is : "frequency" width_type, t Change bandpass width_type. Syntax for the command is : "width_type" width, w Change bandpass width. Syntax for the command is : "width" mix, m Change bandpass mix. Syntax for the command is : "mix" bandreject Apply a two-pole Butterworth band-reject filter with central frequency frequency, and (3dB-point) band-width width. The filter roll off at 6dB per octave (20dB per decade). The filter accepts the following options: frequency, f Set the filter's central frequency. Default is 3000. width_type, t Set method to specify band-width of filter. h Hz q Q-Factor o octave s slope k kHz width, w Specify the band-width of a filter in width_type units. mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. Commands This filter supports the following commands: frequency, f Change bandreject frequency. Syntax for the command is : "frequency" width_type, t Change bandreject width_type. Syntax for the command is : "width_type" width, w Change bandreject width. Syntax for the command is : "width" mix, m Change bandreject mix. Syntax for the command is : "mix" bass, lowshelf Boost or cut the bass (lower) frequencies of the audio using a two-pole shelving filter with a response similar to that of a standard hi-fi's tone-controls. This is also known as shelving equalisation (EQ). The filter accepts the following options: gain, g Give the gain at 0 Hz. Its useful range is about -20 (for a large cut) to +20 (for a large boost). Beware of clipping when using a positive gain. frequency, f Set the filter's central frequency and so can be used to extend or reduce the frequency range to be boosted or cut. The default value is 100 Hz. width_type, t Set method to specify band-width of filter. h Hz q Q-Factor o octave s slope k kHz width, w Determine how steep is the filter's shelf transition. poles, p Set number of poles. Default is 2. mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. Commands This filter supports the following commands: frequency, f Change bass frequency. Syntax for the command is : "frequency" width_type, t Change bass width_type. Syntax for the command is : "width_type" width, w Change bass width. Syntax for the command is : "width" gain, g Change bass gain. Syntax for the command is : "gain" mix, m Change bass mix. Syntax for the command is : "mix" biquad Apply a biquad IIR filter with the given coefficients. Where b0, b1, b2 and a0, a1, a2 are the numerator and denominator coefficients respectively. and channels, c specify which channels to filter, by default all available are filtered. Commands This filter supports the following commands: a0 a1 a2 b0 b1 b2 Change biquad parameter. Syntax for the command is : "value" mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. bs2b Bauer stereo to binaural transformation, which improves headphone listening of stereo audio records. To enable compilation of this filter you need to configure FFmpeg with "--enable-libbs2b". It accepts the following parameters: profile Pre-defined crossfeed level. default Default level (fcut=700, feed=50). cmoy Chu Moy circuit (fcut=700, feed=60). jmeier Jan Meier circuit (fcut=650, feed=95). fcut Cut frequency (in Hz). feed Feed level (in Hz). channelmap Remap input channels to new locations. It accepts the following parameters: map Map channels from input to output. The argument is a '|'-separated list of mappings, each in the "in_channel-out_channel" or in_channel form. in_channel can be either the name of the input channel (e.g. FL for front left) or its index in the input channel layout. out_channel is the name of the output channel or its index in the output channel layout. If out_channel is not given then it is implicitly an index, starting with zero and increasing by one for each mapping. channel_layout The channel layout of the output stream. If no mapping is present, the filter will implicitly map input channels to output channels, preserving indices. Examples o For example, assuming a 5.1+downmix input MOV file, ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav will create an output WAV file tagged as stereo from the downmix channels of the input. o To fix a 5.1 WAV improperly encoded in AAC's native channel order ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav channelsplit Split each channel from an input audio stream into a separate output stream. It accepts the following parameters: channel_layout The channel layout of the input stream. The default is "stereo". channels A channel layout describing the channels to be extracted as separate output streams or "all" to extract each input channel as a separate stream. The default is "all". Choosing channels not present in channel layout in the input will result in an error. Examples o For example, assuming a stereo input MP3 file, ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv will create an output Matroska file with two audio streams, one containing only the left channel and the other the right channel. o Split a 5.1 WAV file into per-channel files: ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]' -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]' front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]' side_right.wav o Extract only LFE from a 5.1 WAV file: ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]' -map '[LFE]' lfe.wav chorus Add a chorus effect to the audio. Can make a single vocal sound like a chorus, but can also be applied to instrumentation. Chorus resembles an echo effect with a short delay, but whereas with echo the delay is constant, with chorus, it is varied using using sinusoidal or triangular modulation. The modulation depth defines the range the modulated delay is played before or after the delay. Hence the delayed sound will sound slower or faster, that is the delayed sound tuned around the original one, like in a chorus where some vocals are slightly off key. It accepts the following parameters: in_gain Set input gain. Default is 0.4. out_gain Set output gain. Default is 0.4. delays Set delays. A typical delay is around 40ms to 60ms. decays Set decays. speeds Set speeds. depths Set depths. Examples o A single delay: chorus=0.7:0.9:55:0.4:0.25:2 o Two delays: chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3 o Fuller sounding chorus with three delays: 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 compand Compress or expand the audio's dynamic range. It accepts the following parameters: attacks decays A list of times in seconds for each channel over which the instantaneous level of the input signal is averaged to determine its volume. attacks refers to increase of volume and decays refers to decrease of volume. For most situations, the attack time (response to the audio getting louder) should be shorter than the decay time, because the human ear is more sensitive to sudden loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and a typical value for decay is 0.8 seconds. If specified number of attacks & decays is lower than number of channels, the last set attack/decay will be used for all remaining channels. points A list of points for the transfer function, specified in dB relative to the maximum possible signal amplitude. Each key points list must be defined using the following syntax: "x0/y0|x1/y1|x2/y2|...." or "x0/y0 x1/y1 x2/y2 ...." The input values must be in strictly increasing order but the transfer function does not have to be monotonically rising. The point "0/0" is assumed but may be overridden (by "0/out-dBn"). Typical values for the transfer function are "-70/-70|-60/-20|1/0". soft-knee Set the curve radius in dB for all joints. It defaults to 0.01. gain Set the additional gain in dB to be applied at all points on the transfer function. This allows for easy adjustment of the overall gain. It defaults to 0. volume Set an initial volume, in dB, to be assumed for each channel when filtering starts. This permits the user to supply a nominal level initially, so that, for example, a very large gain is not applied to initial signal levels before the companding has begun to operate. A typical value for audio which is initially quiet is -90 dB. It defaults to 0. delay Set a delay, in seconds. The input audio is analyzed immediately, but audio is delayed before being fed to the volume adjuster. Specifying a delay approximately equal to the attack/decay times allows the filter to effectively operate in predictive rather than reactive mode. It defaults to 0. Examples o Make music with both quiet and loud passages suitable for listening to in a noisy environment: compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2 Another example for audio with whisper and explosion parts: compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0 o A noise gate for when the noise is at a lower level than the signal: compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1 o Here is another noise gate, this time for when the noise is at a higher level than the signal (making it, in some ways, similar to squelch): compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1 o 2:1 compression starting at -6dB: compand=points=-80/-80|-6/-6|0/-3.8|20/3.5 o 2:1 compression starting at -9dB: compand=points=-80/-80|-9/-9|0/-5.3|20/2.9 o 2:1 compression starting at -12dB: compand=points=-80/-80|-12/-12|0/-6.8|20/1.9 o 2:1 compression starting at -18dB: compand=points=-80/-80|-18/-18|0/-9.8|20/0.7 o 3:1 compression starting at -15dB: compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2 o Compressor/Gate: compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6 o Expander: 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 o Hard limiter at -6dB: compand=attacks=0:points=-80/-80|-6/-6|20/-6 o Hard limiter at -12dB: compand=attacks=0:points=-80/-80|-12/-12|20/-12 o Hard noise gate at -35 dB: compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20 o Soft limiter: compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8 compensationdelay Compensation Delay Line is a metric based delay to compensate differing positions of microphones or speakers. For example, you have recorded guitar with two microphones placed in different locations. Because the front of sound wave has fixed speed in normal conditions, the phasing of microphones can vary and depends on their location and interposition. The best sound mix can be achieved when these microphones are in phase (synchronized). Note that a distance of ~30 cm between microphones makes one microphone capture the signal in antiphase to the other microphone. That makes the final mix sound moody. This filter helps to solve phasing problems by adding different delays to each microphone track and make them synchronized. The best result can be reached when you take one track as base and synchronize other tracks one by one with it. Remember that synchronization/delay tolerance depends on sample rate, too. Higher sample rates will give more tolerance. The filter accepts the following parameters: mm Set millimeters distance. This is compensation distance for fine tuning. Default is 0. cm Set cm distance. This is compensation distance for tightening distance setup. Default is 0. m Set meters distance. This is compensation distance for hard distance setup. Default is 0. dry Set dry amount. Amount of unprocessed (dry) signal. Default is 0. wet Set wet amount. Amount of processed (wet) signal. Default is 1. temp Set temperature in degrees Celsius. This is the temperature of the environment. Default is 20. crossfeed Apply headphone crossfeed filter. Crossfeed is the process of blending the left and right channels of stereo audio recording. It is mainly used to reduce extreme stereo separation of low frequencies. The intent is to produce more speaker like sound to the listener. The filter accepts the following options: strength Set strength of crossfeed. Default is 0.2. Allowed range is from 0 to 1. This sets gain of low shelf filter for side part of stereo image. Default is -6dB. Max allowed is -30db when strength is set to 1. range Set soundstage wideness. Default is 0.5. Allowed range is from 0 to 1. This sets cut off frequency of low shelf filter. Default is cut off near 1550 Hz. With range set to 1 cut off frequency is set to 2100 Hz. slope Set curve slope of low shelf filter. Default is 0.5. Allowed range is from 0.01 to 1. level_in Set input gain. Default is 0.9. level_out Set output gain. Default is 1. Commands This filter supports the all above options as commands. crystalizer Simple algorithm for audio noise sharpening. This filter linearly increases differences betweeen each audio sample. The filter accepts the following options: i Sets the intensity of effect (default: 2.0). Must be in range between -10.0 to 0 (unchanged sound) to 10.0 (maximum effect). To inverse filtering use negative value. c Enable clipping. By default is enabled. Commands This filter supports the all above options as commands. dcshift Apply a DC shift to the audio. This can be useful to remove a DC offset (caused perhaps by a hardware problem in the recording chain) from the audio. The effect of a DC offset is reduced headroom and hence volume. The astats filter can be used to determine if a signal has a DC offset. shift Set the DC shift, allowed range is [-1, 1]. It indicates the amount to shift the audio. limitergain Optional. It should have a value much less than 1 (e.g. 0.05 or 0.02) and is used to prevent clipping. deesser Apply de-essing to the audio samples. i Set intensity for triggering de-essing. Allowed range is from 0 to 1. Default is 0. m Set amount of ducking on treble part of sound. Allowed range is from 0 to 1. Default is 0.5. f How much of original frequency content to keep when de-essing. Allowed range is from 0 to 1. Default is 0.5. s Set the output mode. It accepts the following values: i Pass input unchanged. o Pass ess filtered out. e Pass only ess. Default value is o. drmeter Measure audio dynamic range. DR values of 14 and higher is found in very dynamic material. DR of 8 to 13 is found in transition material. And anything less that 8 have very poor dynamics and is very compressed. The filter accepts the following options: length Set window length in seconds used to split audio into segments of equal length. Default is 3 seconds. dynaudnorm Dynamic Audio Normalizer. This filter applies a certain amount of gain to the input audio in order to bring its peak magnitude to a target level (e.g. 0 dBFS). However, in contrast to more "simple" normalization algorithms, the Dynamic Audio Normalizer *dynamically* re-adjusts the gain factor to the input audio. This allows for applying extra gain to the "quiet" sections of the audio while avoiding distortions or clipping the "loud" sections. In other words: The Dynamic Audio Normalizer will "even out" the volume of quiet and loud sections, in the sense that the volume of each section is brought to the same target level. Note, however, that the Dynamic Audio Normalizer achieves this goal *without* applying "dynamic range compressing". It will retain 100% of the dynamic range *within* each section of the audio file. framelen, f Set the frame length in milliseconds. In range from 10 to 8000 milliseconds. Default is 500 milliseconds. The Dynamic Audio Normalizer processes the input audio in small chunks, referred to as frames. This is required, because a peak magnitude has no meaning for just a single sample value. Instead, we need to determine the peak magnitude for a contiguous sequence of sample values. While a "standard" normalizer would simply use the peak magnitude of the complete file, the Dynamic Audio Normalizer determines the peak magnitude individually for each frame. The length of a frame is specified in milliseconds. By default, the Dynamic Audio Normalizer uses a frame length of 500 milliseconds, which has been found to give good results with most files. Note that the exact frame length, in number of samples, will be determined automatically, based on the sampling rate of the individual input audio file. gausssize, g Set the Gaussian filter window size. In range from 3 to 301, must be odd number. Default is 31. Probably the most important parameter of the Dynamic Audio Normalizer is the "window size" of the Gaussian smoothing filter. The filter's window size is specified in frames, centered around the current frame. For the sake of simplicity, this must be an odd number. Consequently, the default value of 31 takes into account the current frame, as well as the 15 preceding frames and the 15 subsequent frames. Using a larger window results in a stronger smoothing effect and thus in less gain variation, i.e. slower gain adaptation. Conversely, using a smaller window results in a weaker smoothing effect and thus in more gain variation, i.e. faster gain adaptation. In other words, the more you increase this value, the more the Dynamic Audio Normalizer will behave like a "traditional" normalization filter. On the contrary, the more you decrease this value, the more the Dynamic Audio Normalizer will behave like a dynamic range compressor. peak, p Set the target peak value. This specifies the highest permissible magnitude level for the normalized audio input. This filter will try to approach the target peak magnitude as closely as possible, but at the same time it also makes sure that the normalized signal will never exceed the peak magnitude. A frame's maximum local gain factor is imposed directly by the target peak magnitude. The default value is 0.95 and thus leaves a headroom of 5%*. It is not recommended to go above this value. maxgain, m Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0. The Dynamic Audio Normalizer determines the maximum possible (local) gain factor for each input frame, i.e. the maximum gain factor that does not result in clipping or distortion. The maximum gain factor is determined by the frame's highest magnitude sample. However, the Dynamic Audio Normalizer additionally bounds the frame's maximum gain factor by a predetermined (global) maximum gain factor. This is done in order to avoid excessive gain factors in "silent" or almost silent frames. By default, the maximum gain factor is 10.0, For most inputs the default value should be sufficient and it usually is not recommended to increase this value. Though, for input with an extremely low overall volume level, it may be necessary to allow even higher gain factors. Note, however, that the Dynamic Audio Normalizer does not simply apply a "hard" threshold (i.e. cut off values above the threshold). Instead, a "sigmoid" threshold function will be applied. This way, the gain factors will smoothly approach the threshold value, but never exceed that value. targetrms, r Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled. By default, the Dynamic Audio Normalizer performs "peak" normalization. This means that the maximum local gain factor for each frame is defined (only) by the frame's highest magnitude sample. This way, the samples can be amplified as much as possible without exceeding the maximum signal level, i.e. without clipping. Optionally, however, the Dynamic Audio Normalizer can also take into account the frame's root mean square, abbreviated RMS. In electrical engineering, the RMS is commonly used to determine the power of a time-varying signal. It is therefore considered that the RMS is a better approximation of the "perceived loudness" than just looking at the signal's peak magnitude. Consequently, by adjusting all frames to a constant RMS value, a uniform "perceived loudness" can be established. If a target RMS value has been specified, a frame's local gain factor is defined as the factor that would result in exactly that RMS value. Note, however, that the maximum local gain factor is still restricted by the frame's highest magnitude sample, in order to prevent clipping. coupling, n Enable channels coupling. By default is enabled. By default, the Dynamic Audio Normalizer will amplify all channels by the same amount. This means the same gain factor will be applied to all channels, i.e. the maximum possible gain factor is determined by the "loudest" channel. However, in some recordings, it may happen that the volume of the different channels is uneven, e.g. one channel may be "quieter" than the other one(s). In this case, this option can be used to disable the channel coupling. This way, the gain factor will be determined independently for each channel, depending only on the individual channel's highest magnitude sample. This allows for harmonizing the volume of the different channels. correctdc, c Enable DC bias correction. By default is disabled. An audio signal (in the time domain) is a sequence of sample values. In the Dynamic Audio Normalizer these sample values are represented in the -1.0 to 1.0 range, regardless of the original input format. Normally, the audio signal, or "waveform", should be centered around the zero point. That means if we calculate the mean value of all samples in a file, or in a single frame, then the result should be 0.0 or at least very close to that value. If, however, there is a significant deviation of the mean value from 0.0, in either positive or negative direction, this is referred to as a DC bias or DC offset. Since a DC bias is clearly undesirable, the Dynamic Audio Normalizer provides optional DC bias correction. With DC bias correction enabled, the Dynamic Audio Normalizer will determine the mean value, or "DC correction" offset, of each input frame and subtract that value from all of the frame's sample values which ensures those samples are centered around 0.0 again. Also, in order to avoid "gaps" at the frame boundaries, the DC correction offset values will be interpolated smoothly between neighbouring frames. altboundary, b Enable alternative boundary mode. By default is disabled. The Dynamic Audio Normalizer takes into account a certain neighbourhood around each frame. This includes the preceding frames as well as the subsequent frames. However, for the "boundary" frames, located at the very beginning and at the very end of the audio file, not all neighbouring frames are available. In particular, for the first few frames in the audio file, the preceding frames are not known. And, similarly, for the last few frames in the audio file, the subsequent frames are not known. Thus, the question arises which gain factors should be assumed for the missing frames in the "boundary" region. The Dynamic Audio Normalizer implements two modes to deal with this situation. The default boundary mode assumes a gain factor of exactly 1.0 for the missing frames, resulting in a smooth "fade in" and "fade out" at the beginning and at the end of the input, respectively. compress, s Set the compress factor. In range from 0.0 to 30.0. Default is 0.0. By default, the Dynamic Audio Normalizer does not apply "traditional" compression. This means that signal peaks will not be pruned and thus the full dynamic range will be retained within each local neighbourhood. However, in some cases it may be desirable to combine the Dynamic Audio Normalizer's normalization algorithm with a more "traditional" compression. For this purpose, the Dynamic Audio Normalizer provides an optional compression (thresholding) function. If (and only if) the compression feature is enabled, all input frames will be processed by a soft knee thresholding function prior to the actual normalization process. Put simply, the thresholding function is going to prune all samples whose magnitude exceeds a certain threshold value. However, the Dynamic Audio Normalizer does not simply apply a fixed threshold value. Instead, the threshold value will be adjusted for each individual frame. In general, smaller parameters result in stronger compression, and vice versa. Values below 3.0 are not recommended, because audible distortion may appear. threshold, t Set the target threshold value. This specifies the lowest permissible magnitude level for the audio input which will be normalized. If input frame volume is above this value frame will be normalized. Otherwise frame may not be normalized at all. The default value is set to 0, which means all input frames will be normalized. This option is mostly useful if digital noise is not wanted to be amplified. Commands This filter supports the all above options as commands. earwax Make audio easier to listen to on headphones. This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio so that when listened to on headphones the stereo image is moved from inside your head (standard for headphones) to outside and in front of the listener (standard for speakers). Ported from SoX. equalizer Apply a two-pole peaking equalisation (EQ) filter. With this filter, the signal-level at and around a selected frequency can be increased or decreased, whilst (unlike bandpass and bandreject filters) that at all other frequencies is unchanged. In order to produce complex equalisation curves, this filter can be given several times, each with a different central frequency. The filter accepts the following options: frequency, f Set the filter's central frequency in Hz. width_type, t Set method to specify band-width of filter. h Hz q Q-Factor o octave s slope k kHz width, w Specify the band-width of a filter in width_type units. gain, g Set the required gain or attenuation in dB. Beware of clipping when using a positive gain. mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. Examples o Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz: equalizer=f=1000:t=h:width=200:g=-10 o Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz with Q 2: equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5 Commands This filter supports the following commands: frequency, f Change equalizer frequency. Syntax for the command is : "frequency" width_type, t Change equalizer width_type. Syntax for the command is : "width_type" width, w Change equalizer width. Syntax for the command is : "width" gain, g Change equalizer gain. Syntax for the command is : "gain" mix, m Change equalizer mix. Syntax for the command is : "mix" extrastereo Linearly increases the difference between left and right channels which adds some sort of "live" effect to playback. The filter accepts the following options: m Sets the difference coefficient (default: 2.5). 0.0 means mono sound (average of both channels), with 1.0 sound will be unchanged, with -1.0 left and right channels will be swapped. c Enable clipping. By default is enabled. Commands This filter supports the all above options as commands. firequalizer Apply FIR Equalization using arbitrary frequency response. The filter accepts the following option: gain Set gain curve equation (in dB). The expression can contain variables: f the evaluated frequency sr sample rate ch channel number, set to 0 when multichannels evaluation is disabled chid channel id, see libavutil/channel_layout.h, set to the first channel id when multichannels evaluation is disabled chs number of channels chlayout channel_layout, see libavutil/channel_layout.h and functions: gain_interpolate(f) interpolate gain on frequency f based on gain_entry cubic_interpolate(f) same as gain_interpolate, but smoother This option is also available as command. Default is gain_interpolate(f). gain_entry Set gain entry for gain_interpolate function. The expression can contain functions: entry(f, g) store gain entry at frequency f with value g This option is also available as command. delay Set filter delay in seconds. Higher value means more accurate. Default is 0.01. accuracy Set filter accuracy in Hz. Lower value means more accurate. Default is 5. wfunc Set window function. Acceptable values are: rectangular rectangular window, useful when gain curve is already smooth hann hann window (default) hamming hamming window blackman blackman window nuttall3 3-terms continuous 1st derivative nuttall window mnuttall3 minimum 3-terms discontinuous nuttall window nuttall 4-terms continuous 1st derivative nuttall window bnuttall minimum 4-terms discontinuous nuttall (blackman-nuttall) window bharris blackman-harris window tukey tukey window fixed If enabled, use fixed number of audio samples. This improves speed when filtering with large delay. Default is disabled. multi Enable multichannels evaluation on gain. Default is disabled. zero_phase Enable zero phase mode by subtracting timestamp to compensate delay. Default is disabled. scale Set scale used by gain. Acceptable values are: linlin linear frequency, linear gain linlog linear frequency, logarithmic (in dB) gain (default) loglin logarithmic (in octave scale where 20 Hz is 0) frequency, linear gain loglog logarithmic frequency, logarithmic gain dumpfile Set file for dumping, suitable for gnuplot. dumpscale Set scale for dumpfile. Acceptable values are same with scale option. Default is linlog. fft2 Enable 2-channel convolution using complex FFT. This improves speed significantly. Default is disabled. min_phase Enable minimum phase impulse response. Default is disabled. Examples o lowpass at 1000 Hz: firequalizer=gain='if(lt(f,1000), 0, -INF)' o lowpass at 1000 Hz with gain_entry: firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)' o custom equalization: firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)' o higher delay with zero phase to compensate delay: firequalizer=delay=0.1:fixed=on:zero_phase=on o lowpass on left channel, highpass on right channel: firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))' :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on flanger Apply a flanging effect to the audio. The filter accepts the following options: delay Set base delay in milliseconds. Range from 0 to 30. Default value is 0. depth Set added sweep delay in milliseconds. Range from 0 to 10. Default value is 2. regen Set percentage regeneration (delayed signal feedback). Range from -95 to 95. Default value is 0. width Set percentage of delayed signal mixed with original. Range from 0 to 100. Default value is 71. speed Set sweeps per second (Hz). Range from 0.1 to 10. Default value is 0.5. shape Set swept wave shape, can be triangular or sinusoidal. Default value is sinusoidal. phase Set swept wave percentage-shift for multi channel. Range from 0 to 100. Default value is 25. interp Set delay-line interpolation, linear or quadratic. Default is linear. haas Apply Haas effect to audio. Note that this makes most sense to apply on mono signals. With this filter applied to mono signals it give some directionality and stretches its stereo image. The filter accepts the following options: level_in Set input level. By default is 1, or 0dB level_out Set output level. By default is 1, or 0dB. side_gain Set gain applied to side part of signal. By default is 1. middle_source Set kind of middle source. Can be one of the following: left Pick left channel. right Pick right channel. mid Pick middle part signal of stereo image. side Pick side part signal of stereo image. middle_phase Change middle phase. By default is disabled. left_delay Set left channel delay. By default is 2.05 milliseconds. left_balance Set left channel balance. By default is -1. left_gain Set left channel gain. By default is 1. left_phase Change left phase. By default is disabled. right_delay Set right channel delay. By defaults is 2.12 milliseconds. right_balance Set right channel balance. By default is 1. right_gain Set right channel gain. By default is 1. right_phase Change right phase. By default is enabled. hdcd Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM stream with embedded HDCD codes is expanded into a 20-bit PCM stream. The filter supports the Peak Extend and Low-level Gain Adjustment features of HDCD, and detects the Transient Filter flag. ffmpeg -i HDCD16.flac -af hdcd OUT24.flac When using the filter with wav, note the default encoding for wav is 16-bit, so the resulting 20-bit stream will be truncated back to 16-bit. Use something like -acodec pcm_s24le after the filter to get 24-bit PCM output. ffmpeg -i HDCD16.wav -af hdcd OUT16.wav ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav The filter accepts the following options: disable_autoconvert Disable any automatic format conversion or resampling in the filter graph. process_stereo Process the stereo channels together. If target_gain does not match between channels, consider it invalid and use the last valid target_gain. cdt_ms Set the code detect timer period in ms. force_pe Always extend peaks above -3dBFS even if PE isn't signaled. analyze_mode Replace audio with a solid tone and adjust the amplitude to signal some specific aspect of the decoding process. The output file can be loaded in an audio editor alongside the original to aid analysis. "analyze_mode=pe:force_pe=true" can be used to see all samples above the PE level. Modes are: 0, off Disabled 1, lle Gain adjustment level at each sample 2, pe Samples where peak extend occurs 3, cdt Samples where the code detect timer is active 4, tgm Samples where the target gain does not match between channels headphone Apply head-related transfer functions (HRTFs) to create virtual loudspeakers around the user for binaural listening via headphones. The HRIRs are provided via additional streams, for each channel one stereo input stream is needed. The filter accepts the following options: map Set mapping of input streams for convolution. The argument is a '|'-separated list of channel names in order as they are given as additional stream inputs for filter. This also specify number of input streams. Number of input streams must be not less than number of channels in first stream plus one. gain Set gain applied to audio. Value is in dB. Default is 0. type Set processing type. Can be time or freq. time is processing audio in time domain which is slow. freq is processing audio in frequency domain which is fast. Default is freq. lfe Set custom gain for LFE channels. Value is in dB. Default is 0. size Set size of frame in number of samples which will be processed at once. Default value is 1024. Allowed range is from 1024 to 96000. hrir Set format of hrir stream. Default value is stereo. Alternative value is multich. If value is set to stereo, number of additional streams should be greater or equal to number of input channels in first input stream. Also each additional stream should have stereo number of channels. If value is set to multich, number of additional streams should be exactly one. Also number of input channels of additional stream should be equal or greater than twice number of channels of first input stream. Examples o Full example using wav files as coefficients with amovie filters for 7.1 downmix, each amovie filter use stereo file with IR coefficients as input. The files give coefficients for each position of virtual loudspeaker: ffmpeg -i input.wav -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" output.wav o Full example using wav files as coefficients with amovie filters for 7.1 downmix, but now in multich hrir format. 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" output.wav highpass Apply a high-pass filter with 3dB point frequency. The filter can be either single-pole, or double-pole (the default). The filter roll off at 6dB per pole per octave (20dB per pole per decade). The filter accepts the following options: frequency, f Set frequency in Hz. Default is 3000. poles, p Set number of poles. Default is 2. width_type, t Set method to specify band-width of filter. h Hz q Q-Factor o octave s slope k kHz width, w Specify the band-width of a filter in width_type units. Applies only to double-pole filter. The default is 0.707q and gives a Butterworth response. mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. Commands This filter supports the following commands: frequency, f Change highpass frequency. Syntax for the command is : "frequency" width_type, t Change highpass width_type. Syntax for the command is : "width_type" width, w Change highpass width. Syntax for the command is : "width" mix, m Change highpass mix. Syntax for the command is : "mix" join Join multiple input streams into one multi-channel stream. It accepts the following parameters: inputs The number of input streams. It defaults to 2. channel_layout The desired output channel layout. It defaults to stereo. map Map channels from inputs to output. The argument is a '|'-separated list of mappings, each in the "input_idx.in_channel-out_channel" form. input_idx is the 0-based index of the input stream. in_channel can be either the name of the input channel (e.g. FL for front left) or its index in the specified input stream. out_channel is the name of the output channel. The filter will attempt to guess the mappings when they are not specified explicitly. It does so by first trying to find an unused matching input channel and if that fails it picks the first unused input channel. Join 3 inputs (with properly set channel layouts): ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT Build a 5.1 output from 6 single-channel streams: ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex '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' out ladspa Load a LADSPA (Linux Audio Developer's Simple Plugin API) plugin. To enable compilation of this filter you need to configure FFmpeg with "--enable-ladspa". file, f Specifies the name of LADSPA plugin library to load. If the environment variable LADSPA_PATH is defined, the LADSPA plugin is searched in each one of the directories specified by the colon separated list in LADSPA_PATH, otherwise in the standard LADSPA paths, which are in this order: HOME/.ladspa/lib/, /usr/local/lib/ladspa/, /usr/lib/ladspa/. plugin, p Specifies the plugin within the library. Some libraries contain only one plugin, but others contain many of them. If this is not set filter will list all available plugins within the specified library. controls, c Set the '|' separated list of controls which are zero or more floating point values that determine the behavior of the loaded plugin (for example delay, threshold or gain). Controls need to be defined using the following syntax: c0=value0|c1=value1|c2=value2|..., where valuei is the value set on the i-th control. Alternatively they can be also defined using the following syntax: value0|value1|value2|..., where valuei is the value set on the i-th control. If controls is set to "help", all available controls and their valid ranges are printed. sample_rate, s Specify the sample rate, default to 44100. Only used if plugin have zero inputs. nb_samples, n Set the number of samples per channel per each output frame, default is 1024. Only used if plugin have zero inputs. duration, d Set the minimum duration of the sourced audio. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. Note that the resulting duration may be greater than the specified duration, as the generated audio is always cut at the end of a complete frame. If not specified, or the expressed duration is negative, the audio is supposed to be generated forever. Only used if plugin have zero inputs. latency, l Enable latency compensation, by default is disabled. Only used if plugin have inputs. Examples o List all available plugins within amp (LADSPA example plugin) library: ladspa=file=amp o List all available controls and their valid ranges for "vcf_notch" plugin from "VCF" library: ladspa=f=vcf:p=vcf_notch:c=help o Simulate low quality audio equipment using "Computer Music Toolkit" (CMT) plugin library: ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12 o Add reverberation to the audio using TAP-plugins (Tom's Audio Processing plugins): ladspa=file=tap_reverb:tap_reverb o Generate white noise, with 0.2 amplitude: ladspa=file=cmt:noise_source_white:c=c0=.2 o Generate 20 bpm clicks using plugin "C* Click - Metronome" from the "C* Audio Plugin Suite" (CAPS) library: ladspa=file=caps:Click:c=c1=20' o Apply "C* Eq10X2 - Stereo 10-band equaliser" effect: ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2 o Increase volume by 20dB using fast lookahead limiter from Steve Harris "SWH Plugins" collection: ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2 o Attenuate low frequencies using Multiband EQ from Steve Harris "SWH Plugins" collection: ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0 o Reduce stereo image using "Narrower" from the "C* Audio Plugin Suite" (CAPS) library: ladspa=caps:Narrower o Another white noise, now using "C* Audio Plugin Suite" (CAPS) library: ladspa=caps:White:.2 o Some fractal noise, using "C* Audio Plugin Suite" (CAPS) library: ladspa=caps:Fractal:c=c1=1 o Dynamic volume normalization using "VLevel" plugin: ladspa=vlevel-ladspa:vlevel_mono Commands This filter supports the following commands: cN Modify the N-th control value. If the specified value is not valid, it is ignored and prior one is kept. loudnorm EBU R128 loudness normalization. Includes both dynamic and linear normalization modes. Support for both single pass (livestreams, files) and double pass (files) modes. This algorithm can target IL, LRA, and maximum true peak. In dynamic mode, to accurately detect true peaks, the audio stream will be upsampled to 192 kHz. Use the "-ar" option or "aresample" filter to explicitly set an output sample rate. The filter accepts the following options: I, i Set integrated loudness target. Range is -70.0 - -5.0. Default value is -24.0. LRA, lra Set loudness range target. Range is 1.0 - 20.0. Default value is 7.0. TP, tp Set maximum true peak. Range is -9.0 - +0.0. Default value is -2.0. measured_I, measured_i Measured IL of input file. Range is -99.0 - +0.0. measured_LRA, measured_lra Measured LRA of input file. Range is 0.0 - 99.0. measured_TP, measured_tp Measured true peak of input file. Range is -99.0 - +99.0. measured_thresh Measured threshold of input file. Range is -99.0 - +0.0. offset Set offset gain. Gain is applied before the true-peak limiter. Range is -99.0 - +99.0. Default is +0.0. linear Normalize by linearly scaling the source audio. "measured_I", "measured_LRA", "measured_TP", and "measured_thresh" must all be specified. Target LRA shouldn't be lower than source LRA and the change in integrated loudness shouldn't result in a true peak which exceeds the target TP. If any of these conditions aren't met, normalization mode will revert to dynamic. Options are "true" or "false". Default is "true". dual_mono Treat mono input files as "dual-mono". If a mono file is intended for playback on a stereo system, its EBU R128 measurement will be perceptually incorrect. If set to "true", this option will compensate for this effect. Multi-channel input files are not affected by this option. Options are true or false. Default is false. print_format Set print format for stats. Options are summary, json, or none. Default value is none. lowpass Apply a low-pass filter with 3dB point frequency. The filter can be either single-pole or double-pole (the default). The filter roll off at 6dB per pole per octave (20dB per pole per decade). The filter accepts the following options: frequency, f Set frequency in Hz. Default is 500. poles, p Set number of poles. Default is 2. width_type, t Set method to specify band-width of filter. h Hz q Q-Factor o octave s slope k kHz width, w Specify the band-width of a filter in width_type units. Applies only to double-pole filter. The default is 0.707q and gives a Butterworth response. mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. Examples o Lowpass only LFE channel, it LFE is not present it does nothing: lowpass=c=LFE Commands This filter supports the following commands: frequency, f Change lowpass frequency. Syntax for the command is : "frequency" width_type, t Change lowpass width_type. Syntax for the command is : "width_type" width, w Change lowpass width. Syntax for the command is : "width" mix, m Change lowpass mix. Syntax for the command is : "mix" lv2 Load a LV2 (LADSPA Version 2) plugin. To enable compilation of this filter you need to configure FFmpeg with "--enable-lv2". plugin, p Specifies the plugin URI. You may need to escape ':'. controls, c Set the '|' separated list of controls which are zero or more floating point values that determine the behavior of the loaded plugin (for example delay, threshold or gain). If controls is set to "help", all available controls and their valid ranges are printed. sample_rate, s Specify the sample rate, default to 44100. Only used if plugin have zero inputs. nb_samples, n Set the number of samples per channel per each output frame, default is 1024. Only used if plugin have zero inputs. duration, d Set the minimum duration of the sourced audio. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. Note that the resulting duration may be greater than the specified duration, as the generated audio is always cut at the end of a complete frame. If not specified, or the expressed duration is negative, the audio is supposed to be generated forever. Only used if plugin have zero inputs. Examples o Apply bass enhancer plugin from Calf: lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2 o Apply vinyl plugin from Calf: lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5 o Apply bit crusher plugin from ArtyFX: lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3 mcompand Multiband Compress or expand the audio's dynamic range. The input audio is divided into bands using 4th order Linkwitz-Riley IIRs. This is akin to the crossover of a loudspeaker, and results in flat frequency response when absent compander action. It accepts the following parameters: args This option syntax is: attack,decay,[attack,decay..] soft-knee points crossover_frequency [delay [initial_volume [gain]]] | attack,decay ... For explanation of each item refer to compand filter documentation. pan Mix channels with specific gain levels. The filter accepts the output channel layout followed by a set of channels definitions. This filter is also designed to efficiently remap the channels of an audio stream. The filter accepts parameters of the form: "l|outdef|outdef|..." l output channel layout or number of channels outdef output channel specification, of the form: "out_name=[gain*]in_name[(+-)[gain*]in_name...]" out_name output channel to define, either a channel name (FL, FR, etc.) or a channel number (c0, c1, etc.) gain multiplicative coefficient for the channel, 1 leaving the volume unchanged in_name input channel to use, see out_name for details; it is not possible to mix named and numbered input channels If the `=' in a channel specification is replaced by `<', then the gains for that specification will be renormalized so that the total is 1, thus avoiding clipping noise. Mixing examples For example, if you want to down-mix from stereo to mono, but with a bigger factor for the left channel: pan=1c|c0=0.9*c0+0.1*c1 A customized down-mix to stereo that works automatically for 3-, 4-, 5- and 7-channels surround: pan=stereo| FL < FL + 0.5*FC + 0.6*BL + 0.6*SL | FR < FR + 0.5*FC + 0.6*BR + 0.6*SR Note that ffmpeg integrates a default down-mix (and up-mix) system that should be preferred (see "-ac" option) unless you have very specific needs. Remapping examples The channel remapping will be effective if, and only if: * * If all these conditions are satisfied, the filter will notify the user ("Pure channel mapping detected"), and use an optimized and lossless method to do the remapping. For example, if you have a 5.1 source and want a stereo audio stream by dropping the extra channels: pan="stereo| c0=FL | c1=FR" Given the same source, you can also switch front left and front right channels and keep the input channel layout: pan="5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5" If the input is a stereo audio stream, you can mute the front left channel (and still keep the stereo channel layout) with: pan="stereo|c1=c1" Still with a stereo audio stream input, you can copy the right channel in both front left and right: pan="stereo| c0=FR | c1=FR" replaygain ReplayGain scanner filter. This filter takes an audio stream as an input and outputs it unchanged. At end of filtering it displays "track_gain" and "track_peak". resample Convert the audio sample format, sample rate and channel layout. It is not meant to be used directly. rubberband Apply time-stretching and pitch-shifting with librubberband. To enable compilation of this filter, you need to configure FFmpeg with "--enable-librubberband". The filter accepts the following options: tempo Set tempo scale factor. pitch Set pitch scale factor. transients Set transients detector. Possible values are: crisp mixed smooth detector Set detector. Possible values are: compound percussive soft phase Set phase. Possible values are: laminar independent window Set processing window size. Possible values are: standard short long smoothing Set smoothing. Possible values are: off on formant Enable formant preservation when shift pitching. Possible values are: shifted preserved pitchq Set pitch quality. Possible values are: quality speed consistency channels Set channels. Possible values are: apart together Commands This filter supports the following commands: tempo Change filter tempo scale factor. Syntax for the command is : "tempo" pitch Change filter pitch scale factor. Syntax for the command is : "pitch" sidechaincompress This filter acts like normal compressor but has the ability to compress detected signal using second input signal. It needs two input streams and returns one output stream. First input stream will be processed depending on second stream signal. The filtered signal then can be filtered with other filters in later stages of processing. See pan and amerge filter. The filter accepts the following options: level_in Set input gain. Default is 1. Range is between 0.015625 and 64. mode Set mode of compressor operation. Can be "upward" or "downward". Default is "downward". threshold If a signal of second stream raises above this level it will affect the gain reduction of first stream. By default is 0.125. Range is between 0.00097563 and 1. ratio Set a ratio about which the signal is reduced. 1:2 means that if the level raised 4dB above the threshold, it will be only 2dB above after the reduction. Default is 2. Range is between 1 and 20. attack Amount of milliseconds the signal has to rise above the threshold before gain reduction starts. Default is 20. Range is between 0.01 and 2000. release Amount of milliseconds the signal has to fall below the threshold before reduction is decreased again. Default is 250. Range is between 0.01 and 9000. makeup Set the amount by how much signal will be amplified after processing. Default is 1. Range is from 1 to 64. knee Curve the sharp knee around the threshold to enter gain reduction more softly. Default is 2.82843. Range is between 1 and 8. link Choose if the "average" level between all channels of side-chain stream or the louder("maximum") channel of side-chain stream affects the reduction. Default is "average". detection Should the exact signal be taken in case of "peak" or an RMS one in case of "rms". Default is "rms" which is mainly smoother. level_sc Set sidechain gain. Default is 1. Range is between 0.015625 and 64. mix How much to use compressed signal in output. Default is 1. Range is between 0 and 1. Commands This filter supports the all above options as commands. Examples o Full ffmpeg example taking 2 audio inputs, 1st input to be compressed depending on the signal of 2nd input and later compressed signal to be merged with 2nd input: ffmpeg -i main.flac -i sidechain.flac -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge" sidechaingate A sidechain gate acts like a normal (wideband) gate but has the ability to filter the detected signal before sending it to the gain reduction stage. Normally a gate uses the full range signal to detect a level above the threshold. For example: If you cut all lower frequencies from your sidechain signal the gate will decrease the volume of your track only if not enough highs appear. With this technique you are able to reduce the resonation of a natural drum or remove "rumbling" of muted strokes from a heavily distorted guitar. It needs two input streams and returns one output stream. First input stream will be processed depending on second stream signal. The filter accepts the following options: level_in Set input level before filtering. Default is 1. Allowed range is from 0.015625 to 64. mode Set the mode of operation. Can be "upward" or "downward". Default is "downward". If set to "upward" mode, higher parts of signal will be amplified, expanding dynamic range in upward direction. Otherwise, in case of "downward" lower parts of signal will be reduced. range Set the level of gain reduction when the signal is below the threshold. Default is 0.06125. Allowed range is from 0 to 1. Setting this to 0 disables reduction and then filter behaves like expander. threshold If a signal rises above this level the gain reduction is released. Default is 0.125. Allowed range is from 0 to 1. ratio Set a ratio about which the signal is reduced. Default is 2. Allowed range is from 1 to 9000. attack Amount of milliseconds the signal has to rise above the threshold before gain reduction stops. Default is 20 milliseconds. Allowed range is from 0.01 to 9000. release Amount of milliseconds the signal has to fall below the threshold before the reduction is increased again. Default is 250 milliseconds. Allowed range is from 0.01 to 9000. makeup Set amount of amplification of signal after processing. Default is 1. Allowed range is from 1 to 64. knee Curve the sharp knee around the threshold to enter gain reduction more softly. Default is 2.828427125. Allowed range is from 1 to 8. detection Choose if exact signal should be taken for detection or an RMS like one. Default is rms. Can be peak or rms. link Choose if the average level between all channels or the louder channel affects the reduction. Default is average. Can be average or maximum. level_sc Set sidechain gain. Default is 1. Range is from 0.015625 to 64. Commands This filter supports the all above options as commands. silencedetect Detect silence in an audio stream. This filter logs a message when it detects that the input audio volume is less or equal to a noise tolerance value for a duration greater or equal to the minimum detected noise duration. The printed times and duration are expressed in seconds. The "lavfi.silence_start" or "lavfi.silence_start.X" metadata key is set on the first frame whose timestamp equals or exceeds the detection duration and it contains the timestamp of the first frame of the silence. The "lavfi.silence_duration" or "lavfi.silence_duration.X" and "lavfi.silence_end" or "lavfi.silence_end.X" metadata keys are set on the first frame after the silence. If mono is enabled, and each channel is evaluated separately, the ".X" suffixed keys are used, and "X" corresponds to the channel number. The filter accepts the following options: noise, n Set noise tolerance. Can be specified in dB (in case "dB" is appended to the specified value) or amplitude ratio. Default is -60dB, or 0.001. duration, d Set silence duration until notification (default is 2 seconds). See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. mono, m Process each channel separately, instead of combined. By default is disabled. Examples o Detect 5 seconds of silence with -50dB noise tolerance: silencedetect=n=-50dB:d=5 o Complete example with ffmpeg to detect silence with 0.0001 noise tolerance in silence.mp3: ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null - silenceremove Remove silence from the beginning, middle or end of the audio. The filter accepts the following options: start_periods This value is used to indicate if audio should be trimmed at beginning of the audio. A value of zero indicates no silence should be trimmed from the beginning. When specifying a non-zero value, it trims audio up until it finds non-silence. Normally, when trimming silence from beginning of audio the start_periods will be 1 but it can be increased to higher values to trim all audio up to specific count of non-silence periods. Default value is 0. start_duration Specify the amount of time that non-silence must be detected before it stops trimming audio. By increasing the duration, bursts of noises can be treated as silence and trimmed off. Default value is 0. start_threshold This indicates what sample value should be treated as silence. For digital audio, a value of 0 may be fine but for audio recorded from analog, you may wish to increase the value to account for background noise. Can be specified in dB (in case "dB" is appended to the specified value) or amplitude ratio. Default value is 0. start_silence Specify max duration of silence at beginning that will be kept after trimming. Default is 0, which is equal to trimming all samples detected as silence. start_mode Specify mode of detection of silence end in start of multi-channel audio. Can be any or all. Default is any. With any, any sample that is detected as non-silence will cause stopped trimming of silence. With all, only if all channels are detected as non- silence will cause stopped trimming of silence. stop_periods Set the count for trimming silence from the end of audio. To remove silence from the middle of a file, specify a stop_periods that is negative. This value is then treated as a positive value and is used to indicate the effect should restart processing as specified by start_periods, making it suitable for removing periods of silence in the middle of the audio. Default value is 0. stop_duration Specify a duration of silence that must exist before audio is not copied any more. By specifying a higher duration, silence that is wanted can be left in the audio. Default value is 0. stop_threshold This is the same as start_threshold but for trimming silence from the end of audio. Can be specified in dB (in case "dB" is appended to the specified value) or amplitude ratio. Default value is 0. stop_silence Specify max duration of silence at end that will be kept after trimming. Default is 0, which is equal to trimming all samples detected as silence. stop_mode Specify mode of detection of silence start in end of multi-channel audio. Can be any or all. Default is any. With any, any sample that is detected as non-silence will cause stopped trimming of silence. With all, only if all channels are detected as non- silence will cause stopped trimming of silence. detection Set how is silence detected. Can be "rms" or "peak". Second is faster and works better with digital silence which is exactly 0. Default value is "rms". window Set duration in number of seconds used to calculate size of window in number of samples for detecting silence. Default value is 0.02. Allowed range is from 0 to 10. Examples o The following example shows how this filter can be used to start a recording that does not contain the delay at the start which usually occurs between pressing the record button and the start of the performance: silenceremove=start_periods=1:start_duration=5:start_threshold=0.02 o Trim all silence encountered from beginning to end where there is more than 1 second of silence in audio: silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB o Trim all digital silence samples, using peak detection, from beginning to end where there is more than 0 samples of digital silence in audio and digital silence is detected in all channels at same positions in stream: silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0 sofalizer SOFAlizer uses head-related transfer functions (HRTFs) to create virtual loudspeakers around the user for binaural listening via headphones (audio formats up to 9 channels supported). The HRTFs are stored in SOFA files (see for a database). SOFAlizer is developed at the Acoustics Research Institute (ARI) of the Austrian Academy of Sciences. To enable compilation of this filter you need to configure FFmpeg with "--enable-libmysofa". The filter accepts the following options: sofa Set the SOFA file used for rendering. gain Set gain applied to audio. Value is in dB. Default is 0. rotation Set rotation of virtual loudspeakers in deg. Default is 0. elevation Set elevation of virtual speakers in deg. Default is 0. radius Set distance in meters between loudspeakers and the listener with near-field HRTFs. Default is 1. type Set processing type. Can be time or freq. time is processing audio in time domain which is slow. freq is processing audio in frequency domain which is fast. Default is freq. speakers Set custom positions of virtual loudspeakers. Syntax for this option is: [| |...]. Each virtual loudspeaker is described with short channel name following with azimuth and elevation in degrees. Each virtual loudspeaker description is separated by '|'. For example to override front left and front right channel positions use: 'speakers=FL 45 15|FR 345 15'. Descriptions with unrecognised channel names are ignored. lfegain Set custom gain for LFE channels. Value is in dB. Default is 0. framesize Set custom frame size in number of samples. Default is 1024. Allowed range is from 1024 to 96000. Only used if option type is set to freq. normalize Should all IRs be normalized upon importing SOFA file. By default is enabled. interpolate Should nearest IRs be interpolated with neighbor IRs if exact position does not match. By default is disabled. minphase Minphase all IRs upon loading of SOFA file. By default is disabled. anglestep Set neighbor search angle step. Only used if option interpolate is enabled. radstep Set neighbor search radius step. Only used if option interpolate is enabled. Examples o Using ClubFritz6 sofa file: sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=1 o Using ClubFritz12 sofa file and bigger radius with small rotation: sofalizer=sofa=/path/to/ClubFritz12.sofa:type=freq:radius=2:rotation=5 o Similar as above but with custom speaker positions for front left, front right, back left and back right and also with custom gain: "sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=2:speakers=FL 45|FR 315|BL 135|BR 225:gain=28" speechnorm Speech Normalizer. This filter expands or compresses each half-cycle of audio samples (local set of samples all above or all below zero and between two nearest zero crossings) depending on threshold value, so audio reaches target peak value under conditions controlled by below options. The filter accepts the following options: peak, p Set the expansion target peak value. This specifies the highest allowed absolute amplitude level for the normalized audio input. Default value is 0.95. Allowed range is from 0.0 to 1.0. expansion, e Set the maximum expansion factor. Allowed range is from 1.0 to 50.0. Default value is 2.0. This option controls maximum local half-cycle of samples expansion. The maximum expansion would be such that local peak value reaches target peak value but never to surpass it and that ratio between new and previous peak value does not surpass this option value. compression, c Set the maximum compression factor. Allowed range is from 1.0 to 50.0. Default value is 2.0. This option controls maximum local half-cycle of samples compression. This option is used only if threshold option is set to value greater than 0.0, then in such cases when local peak is lower or same as value set by threshold all samples belonging to that peak's half-cycle will be compressed by current compression factor. threshold, t Set the threshold value. Default value is 0.0. Allowed range is from 0.0 to 1.0. This option specifies which half-cycles of samples will be compressed and which will be expanded. Any half- cycle samples with their local peak value below or same as this option value will be compressed by current compression factor, otherwise, if greater than threshold value they will be expanded with expansion factor so that it could reach peak target value but never surpass it. raise, r Set the expansion raising amount per each half-cycle of samples. Default value is 0.001. Allowed range is from 0.0 to 1.0. This controls how fast expansion factor is raised per each new half- cycle until it reaches expansion value. Setting this options too high may lead to distortions. fall, f Set the compression raising amount per each half-cycle of samples. Default value is 0.001. Allowed range is from 0.0 to 1.0. This controls how fast compression factor is raised per each new half- cycle until it reaches compression value. channels, h Specify which channels to filter, by default all available channels are filtered. invert, i Enable inverted filtering, by default is disabled. This inverts interpretation of threshold option. When enabled any half-cycle of samples with their local peak value below or same as threshold option will be expanded otherwise it will be compressed. link, l Link channels when calculating gain applied to each filtered channel sample, by default is disabled. When disabled each filtered channel gain calculation is independent, otherwise when this option is enabled the minimum of all possible gains for each filtered channel is used. Commands This filter supports the all above options as commands. stereotools This filter has some handy utilities to manage stereo signals, for converting M/S stereo recordings to L/R signal while having control over the parameters or spreading the stereo image of master track. The filter accepts the following options: level_in Set input level before filtering for both channels. Defaults is 1. Allowed range is from 0.015625 to 64. level_out Set output level after filtering for both channels. Defaults is 1. Allowed range is from 0.015625 to 64. balance_in Set input balance between both channels. Default is 0. Allowed range is from -1 to 1. balance_out Set output balance between both channels. Default is 0. Allowed range is from -1 to 1. softclip Enable softclipping. Results in analog distortion instead of harsh digital 0dB clipping. Disabled by default. mutel Mute the left channel. Disabled by default. muter Mute the right channel. Disabled by default. phasel Change the phase of the left channel. Disabled by default. phaser Change the phase of the right channel. Disabled by default. mode Set stereo mode. Available values are: lr>lr Left/Right to Left/Right, this is default. lr>ms Left/Right to Mid/Side. ms>lr Mid/Side to Left/Right. lr>ll Left/Right to Left/Left. lr>rr Left/Right to Right/Right. lr>l+r Left/Right to Left + Right. lr>rl Left/Right to Right/Left. ms>ll Mid/Side to Left/Left. ms>rr Mid/Side to Right/Right. ms>rl Mid/Side to Right/Left. lr>l-r Left/Right to Left - Right. slev Set level of side signal. Default is 1. Allowed range is from 0.015625 to 64. sbal Set balance of side signal. Default is 0. Allowed range is from -1 to 1. mlev Set level of the middle signal. Default is 1. Allowed range is from 0.015625 to 64. mpan Set middle signal pan. Default is 0. Allowed range is from -1 to 1. base Set stereo base between mono and inversed channels. Default is 0. Allowed range is from -1 to 1. delay Set delay in milliseconds how much to delay left from right channel and vice versa. Default is 0. Allowed range is from -20 to 20. sclevel Set S/C level. Default is 1. Allowed range is from 1 to 100. phase Set the stereo phase in degrees. Default is 0. Allowed range is from 0 to 360. bmode_in, bmode_out Set balance mode for balance_in/balance_out option. Can be one of the following: balance Classic balance mode. Attenuate one channel at time. Gain is raised up to 1. amplitude Similar as classic mode above but gain is raised up to 2. power Equal power distribution, from -6dB to +6dB range. Commands This filter supports the all above options as commands. Examples o Apply karaoke like effect: stereotools=mlev=0.015625 o Convert M/S signal to L/R: "stereotools=mode=ms>lr" stereowiden This filter enhance the stereo effect by suppressing signal common to both channels and by delaying the signal of left into right and vice versa, thereby widening the stereo effect. The filter accepts the following options: delay Time in milliseconds of the delay of left signal into right and vice versa. Default is 20 milliseconds. feedback Amount of gain in delayed signal into right and vice versa. Gives a delay effect of left signal in right output and vice versa which gives widening effect. Default is 0.3. crossfeed Cross feed of left into right with inverted phase. This helps in suppressing the mono. If the value is 1 it will cancel all the signal common to both channels. Default is 0.3. drymix Set level of input signal of original channel. Default is 0.8. Commands This filter supports the all above options except "delay" as commands. superequalizer Apply 18 band equalizer. The filter accepts the following options: 1b Set 65Hz band gain. 2b Set 92Hz band gain. 3b Set 131Hz band gain. 4b Set 185Hz band gain. 5b Set 262Hz band gain. 6b Set 370Hz band gain. 7b Set 523Hz band gain. 8b Set 740Hz band gain. 9b Set 1047Hz band gain. 10b Set 1480Hz band gain. 11b Set 2093Hz band gain. 12b Set 2960Hz band gain. 13b Set 4186Hz band gain. 14b Set 5920Hz band gain. 15b Set 8372Hz band gain. 16b Set 11840Hz band gain. 17b Set 16744Hz band gain. 18b Set 20000Hz band gain. surround Apply audio surround upmix filter. This filter allows to produce multichannel output from audio stream. The filter accepts the following options: chl_out Set output channel layout. By default, this is 5.1. See the Channel Layout section in the ffmpeg-utils(1) manual for the required syntax. chl_in Set input channel layout. By default, this is stereo. See the Channel Layout section in the ffmpeg-utils(1) manual for the required syntax. level_in Set input volume level. By default, this is 1. level_out Set output volume level. By default, this is 1. lfe Enable LFE channel output if output channel layout has it. By default, this is enabled. lfe_low Set LFE low cut off frequency. By default, this is 128 Hz. lfe_high Set LFE high cut off frequency. By default, this is 256 Hz. lfe_mode Set LFE mode, can be add or sub. Default is add. In add mode, LFE channel is created from input audio and added to output. In sub mode, LFE channel is created from input audio and added to output but also all non-LFE output channels are subtracted with output LFE channel. angle Set angle of stereo surround transform, Allowed range is from 0 to 360. Default is 90. fc_in Set front center input volume. By default, this is 1. fc_out Set front center output volume. By default, this is 1. fl_in Set front left input volume. By default, this is 1. fl_out Set front left output volume. By default, this is 1. fr_in Set front right input volume. By default, this is 1. fr_out Set front right output volume. By default, this is 1. sl_in Set side left input volume. By default, this is 1. sl_out Set side left output volume. By default, this is 1. sr_in Set side right input volume. By default, this is 1. sr_out Set side right output volume. By default, this is 1. bl_in Set back left input volume. By default, this is 1. bl_out Set back left output volume. By default, this is 1. br_in Set back right input volume. By default, this is 1. br_out Set back right output volume. By default, this is 1. bc_in Set back center input volume. By default, this is 1. bc_out Set back center output volume. By default, this is 1. lfe_in Set LFE input volume. By default, this is 1. lfe_out Set LFE output volume. By default, this is 1. allx Set spread usage of stereo image across X axis for all channels. ally Set spread usage of stereo image across Y axis for all channels. fcx, flx, frx, blx, brx, slx, srx, bcx Set spread usage of stereo image across X axis for each channel. fcy, fly, fry, bly, bry, sly, sry, bcy Set spread usage of stereo image across Y axis for each channel. win_size Set window size. Allowed range is from 1024 to 65536. Default size is 4096. win_func Set window function. It accepts the following values: rect bartlett hann, hanning hamming blackman welch flattop bharris bnuttall bhann sine nuttall lanczos gauss tukey dolph cauchy parzen poisson bohman Default is "hann". overlap Set window overlap. If set to 1, the recommended overlap for selected window function will be picked. Default is 0.5. treble, highshelf Boost or cut treble (upper) frequencies of the audio using a two-pole shelving filter with a response similar to that of a standard hi-fi's tone-controls. This is also known as shelving equalisation (EQ). The filter accepts the following options: gain, g Give the gain at whichever is the lower of ~22 kHz and the Nyquist frequency. Its useful range is about -20 (for a large cut) to +20 (for a large boost). Beware of clipping when using a positive gain. frequency, f Set the filter's central frequency and so can be used to extend or reduce the frequency range to be boosted or cut. The default value is 3000 Hz. width_type, t Set method to specify band-width of filter. h Hz q Q-Factor o octave s slope k kHz width, w Determine how steep is the filter's shelf transition. poles, p Set number of poles. Default is 2. mix, m How much to use filtered signal in output. Default is 1. Range is between 0 and 1. channels, c Specify which channels to filter, by default all available are filtered. normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. transform, a Set transform type of IIR filter. di dii tdii latt svf precision, r Set precison of filtering. auto Pick automatic sample format depending on surround filters. s16 Always use signed 16-bit. s32 Always use signed 32-bit. f32 Always use float 32-bit. f64 Always use float 64-bit. Commands This filter supports the following commands: frequency, f Change treble frequency. Syntax for the command is : "frequency" width_type, t Change treble width_type. Syntax for the command is : "width_type" width, w Change treble width. Syntax for the command is : "width" gain, g Change treble gain. Syntax for the command is : "gain" mix, m Change treble mix. Syntax for the command is : "mix" tremolo Sinusoidal amplitude modulation. The filter accepts the following options: f Modulation frequency in Hertz. Modulation frequencies in the subharmonic range (20 Hz or lower) will result in a tremolo effect. This filter may also be used as a ring modulator by specifying a modulation frequency higher than 20 Hz. Range is 0.1 - 20000.0. Default value is 5.0 Hz. d Depth of modulation as a percentage. Range is 0.0 - 1.0. Default value is 0.5. vibrato Sinusoidal phase modulation. The filter accepts the following options: f Modulation frequency in Hertz. Range is 0.1 - 20000.0. Default value is 5.0 Hz. d Depth of modulation as a percentage. Range is 0.0 - 1.0. Default value is 0.5. volume Adjust the input audio volume. It accepts the following parameters: volume Set audio volume expression. Output values are clipped to the maximum value. The output audio volume is given by the relation: = * The default value for volume is "1.0". precision This parameter represents the mathematical precision. It determines which input sample formats will be allowed, which affects the precision of the volume scaling. fixed 8-bit fixed-point; this limits input sample format to U8, S16, and S32. float 32-bit floating-point; this limits input sample format to FLT. (default) double 64-bit floating-point; this limits input sample format to DBL. replaygain Choose the behaviour on encountering ReplayGain side data in input frames. drop Remove ReplayGain side data, ignoring its contents (the default). ignore Ignore ReplayGain side data, but leave it in the frame. track Prefer the track gain, if present. album Prefer the album gain, if present. replaygain_preamp Pre-amplification gain in dB to apply to the selected replaygain gain. Default value for replaygain_preamp is 0.0. replaygain_noclip Prevent clipping by limiting the gain applied. Default value for replaygain_noclip is 1. eval Set when the volume expression is evaluated. It accepts the following values: once only evaluate expression once during the filter initialization, or when the volume command is sent frame evaluate expression for each incoming frame Default value is once. The volume expression can contain the following parameters. n frame number (starting at zero) nb_channels number of channels nb_consumed_samples number of samples consumed by the filter nb_samples number of samples in the current frame pos original frame position in the file pts frame PTS sample_rate sample rate startpts PTS at start of stream startt time at start of stream t frame time tb timestamp timebase volume last set volume value Note that when eval is set to once only the sample_rate and tb variables are available, all other variables will evaluate to NAN. Commands This filter supports the following commands: volume Modify the volume expression. The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value. Examples o Halve the input audio volume: volume=volume=0.5 volume=volume=1/2 volume=volume=-6.0206dB In all the above example the named key for volume can be omitted, for example like in: volume=0.5 o Increase input audio power by 6 decibels using fixed-point precision: volume=volume=6dB:precision=fixed o Fade volume after time 10 with an annihilation period of 5 seconds: volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame volumedetect Detect the volume of the input video. The filter has no parameters. The input is not modified. Statistics about the volume will be printed in the log when the input stream end is reached. In particular it will show the mean volume (root mean square), maximum volume (on a per-sample basis), and the beginning of a histogram of the registered volume values (from the maximum value to a cumulated 1/1000 of the samples). All volumes are in decibels relative to the maximum PCM value. Examples Here is an excerpt of the output: [Parsed_volumedetect_0 0xa23120] mean_volume: -27 dB [Parsed_volumedetect_0 0xa23120] max_volume: -4 dB [Parsed_volumedetect_0 0xa23120] histogram_4db: 6 [Parsed_volumedetect_0 0xa23120] histogram_5db: 62 [Parsed_volumedetect_0 0xa23120] histogram_6db: 286 [Parsed_volumedetect_0 0xa23120] histogram_7db: 1042 [Parsed_volumedetect_0 0xa23120] histogram_8db: 2551 [Parsed_volumedetect_0 0xa23120] histogram_9db: 4609 [Parsed_volumedetect_0 0xa23120] histogram_10db: 8409 It means that: o The mean square energy is approximately -27 dB, or 10^-2.7. o The largest sample is at -4 dB, or more precisely between -4 dB and -5 dB. o There are 6 samples at -4 dB, 62 at -5 dB, 286 at -6 dB, etc. In other words, raising the volume by +4 dB does not cause any clipping, raising it by +5 dB causes clipping for 6 samples, etc. AUDIO SOURCES Below is a description of the currently available audio sources. abuffer Buffer audio frames, and make them available to the filter chain. This source is mainly intended for a programmatic use, in particular through the interface defined in libavfilter/buffersrc.h. It accepts the following parameters: time_base The timebase which will be used for timestamps of submitted frames. It must be either a floating-point number or in numerator/denominator form. sample_rate The sample rate of the incoming audio buffers. sample_fmt The sample format of the incoming audio buffers. Either a sample format name or its corresponding integer representation from the enum AVSampleFormat in libavutil/samplefmt.h channel_layout The channel layout of the incoming audio buffers. Either a channel layout name from channel_layout_map in libavutil/channel_layout.c or its corresponding integer representation from the AV_CH_LAYOUT_* macros in libavutil/channel_layout.h channels The number of channels of the incoming audio buffers. If both channels and channel_layout are specified, then they must be consistent. Examples abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo will instruct the source to accept planar 16bit signed stereo at 44100Hz. Since the sample format with name "s16p" corresponds to the number 6 and the "stereo" channel layout corresponds to the value 0x3, this is equivalent to: abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3 aevalsrc Generate an audio signal specified by an expression. This source accepts in input one or more expressions (one for each channel), which are evaluated and used to generate a corresponding audio signal. This source accepts the following options: exprs Set the '|'-separated expressions list for each separate channel. In case the channel_layout option is not specified, the selected channel layout depends on the number of provided expressions. Otherwise the last specified expression is applied to the remaining output channels. channel_layout, c Set the channel layout. The number of channels in the specified layout must be equal to the number of specified expressions. duration, d Set the minimum duration of the sourced audio. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. Note that the resulting duration may be greater than the specified duration, as the generated audio is always cut at the end of a complete frame. If not specified, or the expressed duration is negative, the audio is supposed to be generated forever. nb_samples, n Set the number of samples per channel per each output frame, default to 1024. sample_rate, s Specify the sample rate, default to 44100. Each expression in exprs can contain the following constants: n number of the evaluated sample, starting from 0 t time of the evaluated sample expressed in seconds, starting from 0 s sample rate Examples o Generate silence: aevalsrc=0 o Generate a sin signal with frequency of 440 Hz, set sample rate to 8000 Hz: aevalsrc="sin(440*2*PI*t):s=8000" o Generate a two channels signal, specify the channel layout (Front Center + Back Center) explicitly: aevalsrc="sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC" o Generate white noise: aevalsrc="-2+random(0)" o Generate an amplitude modulated signal: aevalsrc="sin(10*2*PI*t)*sin(880*2*PI*t)" o Generate 2.5 Hz binaural beats on a 360 Hz carrier: aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)" afirsrc Generate a FIR coefficients using frequency sampling method. The resulting stream can be used with afir filter for filtering the audio signal. The filter accepts the following options: taps, t Set number of filter coefficents in output audio stream. Default value is 1025. frequency, f Set frequency points from where magnitude and phase are set. This must be in non decreasing order, and first element must be 0, while last element must be 1. Elements are separated by white spaces. magnitude, m Set magnitude value for every frequency point set by frequency. Number of values must be same as number of frequency points. Values are separated by white spaces. phase, p Set phase value for every frequency point set by frequency. Number of values must be same as number of frequency points. Values are separated by white spaces. sample_rate, r Set sample rate, default is 44100. nb_samples, n Set number of samples per each frame. Default is 1024. win_func, w Set window function. Default is blackman. anullsrc The null audio source, return unprocessed audio frames. It is mainly useful as a template and to be employed in analysis / debugging tools, or as the source for filters which ignore the input data (for example the sox synth filter). This source accepts the following options: channel_layout, cl Specifies the channel layout, and can be either an integer or a string representing a channel layout. The default value of channel_layout is "stereo". Check the channel_layout_map definition in libavutil/channel_layout.c for the mapping between strings and channel layout values. sample_rate, r Specifies the sample rate, and defaults to 44100. nb_samples, n Set the number of samples per requested frames. duration, d Set the duration of the sourced audio. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. If not specified, or the expressed duration is negative, the audio is supposed to be generated forever. Examples o Set the sample rate to 48000 Hz and the channel layout to AV_CH_LAYOUT_MONO. anullsrc=r=48000:cl=4 o Do the same operation with a more obvious syntax: anullsrc=r=48000:cl=mono All the parameters need to be explicitly defined. flite Synthesize a voice utterance using the libflite library. To enable compilation of this filter you need to configure FFmpeg with "--enable-libflite". Note that versions of the flite library prior to 2.0 are not thread- safe. The filter accepts the following options: list_voices If set to 1, list the names of the available voices and exit immediately. Default value is 0. nb_samples, n Set the maximum number of samples per frame. Default value is 512. textfile Set the filename containing the text to speak. text Set the text to speak. voice, v Set the voice to use for the speech synthesis. Default value is "kal". See also the list_voices option. Examples o Read from file speech.txt, and synthesize the text using the standard flite voice: flite=textfile=speech.txt o Read the specified text selecting the "slt" voice: flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt o Input text to ffmpeg: ffmpeg -f lavfi -i flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt o Make ffplay speak the specified text, using "flite" and the "lavfi" device: ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.' For more information about libflite, check: anoisesrc Generate a noise audio signal. The filter accepts the following options: sample_rate, r Specify the sample rate. Default value is 48000 Hz. amplitude, a Specify the amplitude (0.0 - 1.0) of the generated audio stream. Default value is 1.0. duration, d Specify the duration of the generated audio stream. Not specifying this option results in noise with an infinite length. color, colour, c Specify the color of noise. Available noise colors are white, pink, brown, blue, violet and velvet. Default color is white. seed, s Specify a value used to seed the PRNG. nb_samples, n Set the number of samples per each output frame, default is 1024. Examples o Generate 60 seconds of pink noise, with a 44.1 kHz sampling rate and an amplitude of 0.5: anoisesrc=d=60:c=pink:r=44100:a=0.5 hilbert Generate odd-tap Hilbert transform FIR coefficients. The resulting stream can be used with afir filter for phase-shifting the signal by 90 degrees. This is used in many matrix coding schemes and for analytic signal generation. The process is often written as a multiplication by i (or j), the imaginary unit. The filter accepts the following options: sample_rate, s Set sample rate, default is 44100. taps, t Set length of FIR filter, default is 22051. nb_samples, n Set number of samples per each frame. win_func, w Set window function to be used when generating FIR coefficients. sinc Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients. The resulting stream can be used with afir filter for filtering the audio signal. The filter accepts the following options: sample_rate, r Set sample rate, default is 44100. nb_samples, n Set number of samples per each frame. Default is 1024. hp Set high-pass frequency. Default is 0. lp Set low-pass frequency. Default is 0. If high-pass frequency is lower than low-pass frequency and low-pass frequency is higher than 0 then filter will create band-pass filter coefficients, otherwise band-reject filter coefficients. phase Set filter phase response. Default is 50. Allowed range is from 0 to 100. beta Set Kaiser window beta. att Set stop-band attenuation. Default is 120dB, allowed range is from 40 to 180 dB. round Enable rounding, by default is disabled. hptaps Set number of taps for high-pass filter. lptaps Set number of taps for low-pass filter. sine Generate an audio signal made of a sine wave with amplitude 1/8. The audio signal is bit-exact. The filter accepts the following options: frequency, f Set the carrier frequency. Default is 440 Hz. beep_factor, b Enable a periodic beep every second with frequency beep_factor times the carrier frequency. Default is 0, meaning the beep is disabled. sample_rate, r Specify the sample rate, default is 44100. duration, d Specify the duration of the generated audio stream. samples_per_frame Set the number of samples per output frame. The expression can contain the following constants: n The (sequential) number of the output audio frame, starting from 0. pts The PTS (Presentation TimeStamp) of the output audio frame, expressed in TB units. t The PTS of the output audio frame, expressed in seconds. TB The timebase of the output audio frames. Default is 1024. Examples o Generate a simple 440 Hz sine wave: sine o Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5 seconds: sine=220:4:d=5 sine=f=220:b=4:d=5 sine=frequency=220:beep_factor=4:duration=5 o Generate a 1 kHz sine wave following "1602,1601,1602,1601,1602" NTSC pattern: sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))' AUDIO SINKS Below is a description of the currently available audio sinks. abuffersink Buffer audio frames, and make them available to the end of filter chain. This sink is mainly intended for programmatic use, in particular through the interface defined in libavfilter/buffersink.h or the options system. It accepts a pointer to an AVABufferSinkContext structure, which defines the incoming buffers' formats, to be passed as the opaque parameter to "avfilter_init_filter" for initialization. anullsink Null audio sink; do absolutely nothing with the input audio. It is mainly useful as a template and for use in analysis / debugging tools. VIDEO FILTERS When you configure your FFmpeg build, you can disable any of the existing filters using "--disable-filters". The configure output will show the video filters included in your build. Below is a description of the currently available video filters. addroi Mark a region of interest in a video frame. The frame data is passed through unchanged, but metadata is attached to the frame indicating regions of interest which can affect the behaviour of later encoding. Multiple regions can be marked by applying the filter multiple times. x Region distance in pixels from the left edge of the frame. y Region distance in pixels from the top edge of the frame. w Region width in pixels. h Region height in pixels. The parameters x, y, w and h are expressions, and may contain the following variables: iw Width of the input frame. ih Height of the input frame. qoffset Quantisation offset to apply within the region. This must be a real value in the range -1 to +1. A value of zero indicates no quality change. A negative value asks for better quality (less quantisation), while a positive value asks for worse quality (greater quantisation). The range is calibrated so that the extreme values indicate the largest possible offset - if the rest of the frame is encoded with the worst possible quality, an offset of -1 indicates that this region should be encoded with the best possible quality anyway. Intermediate values are then interpolated in some codec-dependent way. For example, in 10-bit H.264 the quantisation parameter varies between -12 and 51. A typical qoffset value of -1/10 therefore indicates that this region should be encoded with a QP around one- tenth of the full range better than the rest of the frame. So, if most of the frame were to be encoded with a QP of around 30, this region would get a QP of around 24 (an offset of approximately -1/10 * (51 - -12) = -6.3). An extreme value of -1 would indicate that this region should be encoded with the best possible quality regardless of the treatment of the rest of the frame - that is, should be encoded at a QP of -12. clear If set to true, remove any existing regions of interest marked on the frame before adding the new one. Examples o Mark the centre quarter of the frame as interesting. addroi=iw/4:ih/4:iw/2:ih/2:-1/10 o Mark the 100-pixel-wide region on the left edge of the frame as very uninteresting (to be encoded at much lower quality than the rest of the frame). addroi=0:0:100:ih:+1/5 alphaextract Extract the alpha component from the input as a grayscale video. This is especially useful with the alphamerge filter. alphamerge Add or replace the alpha component of the primary input with the grayscale value of a second input. This is intended for use with alphaextract to allow the transmission or storage of frame sequences that have alpha in a format that doesn't support an alpha channel. For example, to reconstruct full frames from a normal YUV-encoded video and a separate video created with alphaextract, you might use: movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out] amplify Amplify differences between current pixel and pixels of adjacent frames in same pixel location. This filter accepts the following options: radius Set frame radius. Default is 2. Allowed range is from 1 to 63. For example radius of 3 will instruct filter to calculate average of 7 frames. factor Set factor to amplify difference. Default is 2. Allowed range is from 0 to 65535. threshold Set threshold for difference amplification. Any difference greater or equal to this value will not alter source pixel. Default is 10. Allowed range is from 0 to 65535. tolerance Set tolerance for difference amplification. Any difference lower to this value will not alter source pixel. Default is 0. Allowed range is from 0 to 65535. low Set lower limit for changing source pixel. Default is 65535. Allowed range is from 0 to 65535. This option controls maximum possible value that will decrease source pixel value. high Set high limit for changing source pixel. Default is 65535. Allowed range is from 0 to 65535. This option controls maximum possible value that will increase source pixel value. planes Set which planes to filter. Default is all. Allowed range is from 0 to 15. Commands This filter supports the following commands that corresponds to option of same name: factor threshold tolerance low high planes ass Same as the subtitles filter, except that it doesn't require libavcodec and libavformat to work. On the other hand, it is limited to ASS (Advanced Substation Alpha) subtitles files. This filter accepts the following option in addition to the common options from the subtitles filter: shaping Set the shaping engine Available values are: auto The default libass shaping engine, which is the best available. simple Fast, font-agnostic shaper that can do only substitutions complex Slower shaper using OpenType for substitutions and positioning The default is "auto". atadenoise Apply an Adaptive Temporal Averaging Denoiser to the video input. The filter accepts the following options: 0a Set threshold A for 1st plane. Default is 0.02. Valid range is 0 to 0.3. 0b Set threshold B for 1st plane. Default is 0.04. Valid range is 0 to 5. 1a Set threshold A for 2nd plane. Default is 0.02. Valid range is 0 to 0.3. 1b Set threshold B for 2nd plane. Default is 0.04. Valid range is 0 to 5. 2a Set threshold A for 3rd plane. Default is 0.02. Valid range is 0 to 0.3. 2b Set threshold B for 3rd plane. Default is 0.04. Valid range is 0 to 5. Threshold A is designed to react on abrupt changes in the input signal and threshold B is designed to react on continuous changes in the input signal. s Set number of frames filter will use for averaging. Default is 9. Must be odd number in range [5, 129]. p Set what planes of frame filter will use for averaging. Default is all. a Set what variant of algorithm filter will use for averaging. Default is "p" parallel. Alternatively can be set to "s" serial. Parallel can be faster then serial, while other way around is never true. Parallel will abort early on first change being greater then thresholds, while serial will continue processing other side of frames if they are equal or below thresholds. 0s 1s 2s Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767. Valid range is from 0 to 32767. This options controls weight for each pixel in radius defined by size. Default value means every pixel have same weight. Setting this option to 0 effectively disables filtering. Commands This filter supports same commands as options except option "s". The command accepts the same syntax of the corresponding option. avgblur Apply average blur filter. The filter accepts the following options: sizeX Set horizontal radius size. planes Set which planes to filter. By default all planes are filtered. sizeY Set vertical radius size, if zero it will be same as "sizeX". Default is 0. Commands This filter supports same commands as options. The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value. bbox Compute the bounding box for the non-black pixels in the input frame luminance plane. This filter computes the bounding box containing all the pixels with a luminance value greater than the minimum allowed value. The parameters describing the bounding box are printed on the filter log. The filter accepts the following option: min_val Set the minimal luminance value. Default is 16. Commands This filter supports the all above options as commands. bilateral Apply bilateral filter, spatial smoothing while preserving edges. The filter accepts the following options: sigmaS Set sigma of gaussian function to calculate spatial weight. Allowed range is 0 to 512. Default is 0.1. sigmaR Set sigma of gaussian function to calculate range weight. Allowed range is 0 to 1. Default is 0.1. planes Set planes to filter. Default is first only. Commands This filter supports the all above options as commands. bitplanenoise Show and measure bit plane noise. The filter accepts the following options: bitplane Set which plane to analyze. Default is 1. filter Filter out noisy pixels from "bitplane" set above. Default is disabled. blackdetect Detect video intervals that are (almost) completely black. Can be useful to detect chapter transitions, commercials, or invalid recordings. The filter outputs its detection analysis to both the log as well as frame metadata. If a black segment of at least the specified minimum duration is found, a line with the start and end timestamps as well as duration is printed to the log with level "info". In addition, a log line with level "debug" is printed per frame showing the black amount detected for that frame. The filter also attaches metadata to the first frame of a black segment with key "lavfi.black_start" and to the first frame after the black segment ends with key "lavfi.black_end". The value is the frame's timestamp. This metadata is added regardless of the minimum duration specified. The filter accepts the following options: black_min_duration, d Set the minimum detected black duration expressed in seconds. It must be a non-negative floating point number. Default value is 2.0. picture_black_ratio_th, pic_th Set the threshold for considering a picture "black". Express the minimum value for the ratio: / for which a picture is considered black. Default value is 0.98. pixel_black_th, pix_th Set the threshold for considering a pixel "black". The threshold expresses the maximum pixel luminance value for which a pixel is considered "black". The provided value is scaled according to the following equation: = + * luminance_range_size and luminance_minimum_value depend on the input video format, the range is [0-255] for YUV full-range formats and [16-235] for YUV non full-range formats. Default value is 0.10. The following example sets the maximum pixel threshold to the minimum value, and detects only black intervals of 2 or more seconds: blackdetect=d=2:pix_th=0.00 blackframe Detect frames that are (almost) completely black. Can be useful to detect chapter transitions or commercials. Output lines consist of the frame number of the detected frame, the percentage of blackness, the position in the file if known or -1 and the timestamp in seconds. In order to display the output lines, you need to set the loglevel at least to the AV_LOG_INFO value. This filter exports frame metadata "lavfi.blackframe.pblack". The value represents the percentage of pixels in the picture that are below the threshold value. It accepts the following parameters: amount The percentage of the pixels that have to be below the threshold; it defaults to 98. threshold, thresh The threshold below which a pixel value is considered black; it defaults to 32. blend Blend two video frames into each other. The "blend" filter takes two input streams and outputs one stream, the first input is the "top" layer and second input is "bottom" layer. By default, the output terminates when the longest input terminates. The "tblend" (time blend) filter takes two consecutive frames from one single stream, and outputs the result obtained by blending the new frame on top of the old frame. A description of the accepted options follows. c0_mode c1_mode c2_mode c3_mode all_mode Set blend mode for specific pixel component or all pixel components in case of all_mode. Default value is "normal". Available values for component modes are: addition and average bleach burn darken difference divide dodge exclusion extremity freeze geometric glow grainextract grainmerge hardlight hardmix hardoverlay harmonic heat interpolate lighten linearlight multiply multiply128 negation normal or overlay phoenix pinlight reflect screen softdifference softlight stain subtract vividlight xor c0_opacity c1_opacity c2_opacity c3_opacity all_opacity Set blend opacity for specific pixel component or all pixel components in case of all_opacity. Only used in combination with pixel component blend modes. c0_expr c1_expr c2_expr c3_expr all_expr Set blend expression for specific pixel component or all pixel components in case of all_expr. Note that related mode options will be ignored if those are set. The expressions can use the following variables: N The sequential number of the filtered frame, starting from 0. X Y the coordinates of the current sample W H the width and height of currently filtered plane SW SH Width and height scale for the plane being filtered. It is the ratio between the dimensions of the current plane to the luma plane, e.g. for a "yuv420p" frame, the values are "1,1" for the luma plane and "0.5,0.5" for the chroma planes. T Time of the current frame, expressed in seconds. TOP, A Value of pixel component at current location for first video frame (top layer). BOTTOM, B Value of pixel component at current location for second video frame (bottom layer). The "blend" filter also supports the framesync options. Examples o Apply transition from bottom layer to top layer in first 10 seconds: blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))' o Apply linear horizontal transition from top layer to bottom layer: blend=all_expr='A*(X/W)+B*(1-X/W)' o Apply 1x1 checkerboard effect: blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)' o Apply uncover left effect: blend=all_expr='if(gte(N*SW+X,W),A,B)' o Apply uncover down effect: blend=all_expr='if(gte(Y-N*SH,0),A,B)' o Apply uncover up-left effect: blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)' o Split diagonally video and shows top and bottom layer on each side: blend=all_expr='if(gt(X,Y*(W/H)),A,B)' o Display differences between the current and the previous frame: tblend=all_mode=grainextract Commands This filter supports same commands as options. bm3d Denoise frames using Block-Matching 3D algorithm. The filter accepts the following options. sigma Set denoising strength. Default value is 1. Allowed range is from 0 to 999.9. The denoising algorithm is very sensitive to sigma, so adjust it according to the source. block Set local patch size. This sets dimensions in 2D. bstep Set sliding step for processing blocks. Default value is 4. Allowed range is from 1 to 64. Smaller values allows processing more reference blocks and is slower. group Set maximal number of similar blocks for 3rd dimension. Default value is 1. When set to 1, no block matching is done. Larger values allows more blocks in single group. Allowed range is from 1 to 256. range Set radius for search block matching. Default is 9. Allowed range is from 1 to INT32_MAX. mstep Set step between two search locations for block matching. Default is 1. Allowed range is from 1 to 64. Smaller is slower. thmse Set threshold of mean square error for block matching. Valid range is 0 to INT32_MAX. hdthr Set thresholding parameter for hard thresholding in 3D transformed domain. Larger values results in stronger hard-thresholding filtering in frequency domain. estim Set filtering estimation mode. Can be "basic" or "final". Default is "basic". ref If enabled, filter will use 2nd stream for block matching. Default is disabled for "basic" value of estim option, and always enabled if value of estim is "final". planes Set planes to filter. Default is all available except alpha. Examples o Basic filtering with bm3d: bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic o Same as above, but filtering only luma: bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic:planes=1 o Same as above, but with both estimation modes: 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 o Same as above, but prefilter with nlmeans filter instead: 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 boxblur Apply a boxblur algorithm to the input video. It accepts the following parameters: luma_radius, lr luma_power, lp chroma_radius, cr chroma_power, cp alpha_radius, ar alpha_power, ap A description of the accepted options follows. luma_radius, lr chroma_radius, cr alpha_radius, ar Set an expression for the box radius in pixels used for blurring the corresponding input plane. The radius value must be a non-negative number, and must not be greater than the value of the expression "min(w,h)/2" for the luma and alpha planes, and of "min(cw,ch)/2" for the chroma planes. Default value for luma_radius is "2". If not specified, chroma_radius and alpha_radius default to the corresponding value set for luma_radius. The expressions can contain the following constants: w h The input width and height in pixels. cw ch The input chroma image width and height in pixels. hsub vsub The horizontal and vertical chroma subsample values. For example, for the pixel format "yuv422p", hsub is 2 and vsub is 1. luma_power, lp chroma_power, cp alpha_power, ap Specify how many times the boxblur filter is applied to the corresponding plane. Default value for luma_power is 2. If not specified, chroma_power and alpha_power default to the corresponding value set for luma_power. A value of 0 will disable the effect. Examples o Apply a boxblur filter with the luma, chroma, and alpha radii set to 2: boxblur=luma_radius=2:luma_power=1 boxblur=2:1 o Set the luma radius to 2, and alpha and chroma radius to 0: boxblur=2:1:cr=0:ar=0 o Set the luma and chroma radii to a fraction of the video dimension: boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1 bwdif Deinterlace the input video ("bwdif" stands for "Bob Weaver Deinterlacing Filter"). Motion adaptive deinterlacing based on yadif with the use of w3fdif and cubic interpolation algorithms. It accepts the following parameters: mode The interlacing mode to adopt. It accepts one of the following values: 0, send_frame Output one frame for each frame. 1, send_field Output one frame for each field. The default value is "send_field". parity The picture field parity assumed for the input interlaced video. It accepts one of the following values: 0, tff Assume the top field is first. 1, bff Assume the bottom field is first. -1, auto Enable automatic detection of field parity. The default value is "auto". If the interlacing is unknown or the decoder does not export this information, top field first will be assumed. deint Specify which frames to deinterlace. Accepts one of the following values: 0, all Deinterlace all frames. 1, interlaced Only deinterlace frames marked as interlaced. The default value is "all". cas Apply Contrast Adaptive Sharpen filter to video stream. The filter accepts the following options: strength Set the sharpening strength. Default value is 0. planes Set planes to filter. Default value is to filter all planes except alpha plane. Commands This filter supports same commands as options. chromahold Remove all color information for all colors except for certain one. The filter accepts the following options: color The color which will not be replaced with neutral chroma. similarity Similarity percentage with the above color. 0.01 matches only the exact key color, while 1.0 matches everything. blend Blend percentage. 0.0 makes pixels either fully gray, or not gray at all. Higher values result in more preserved color. yuv Signals that the color passed is already in YUV instead of RGB. Literal colors like "green" or "red" don't make sense with this enabled anymore. This can be used to pass exact YUV values as hexadecimal numbers. Commands This filter supports same commands as options. The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value. chromakey YUV colorspace color/chroma keying. The filter accepts the following options: color The color which will be replaced with transparency. similarity Similarity percentage with the key color. 0.01 matches only the exact key color, while 1.0 matches everything. blend Blend percentage. 0.0 makes pixels either fully transparent, or not transparent at all. Higher values result in semi-transparent pixels, with a higher transparency the more similar the pixels color is to the key color. yuv Signals that the color passed is already in YUV instead of RGB. Literal colors like "green" or "red" don't make sense with this enabled anymore. This can be used to pass exact YUV values as hexadecimal numbers. Commands This filter supports same commands as options. The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value. Examples o Make every green pixel in the input image transparent: ffmpeg -i input.png -vf chromakey=green out.png o Overlay a greenscreen-video on top of a static black background. 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 chromanr Reduce chrominance noise. The filter accepts the following options: thres Set threshold for averaging chrominance values. Sum of absolute difference of Y, U and V pixel components of current pixel and neighbour pixels lower than this threshold will be used in averaging. Luma component is left unchanged and is copied to output. Default value is 30. Allowed range is from 1 to 200. sizew Set horizontal radius of rectangle used for averaging. Allowed range is from 1 to 100. Default value is 5. sizeh Set vertical radius of rectangle used for averaging. Allowed range is from 1 to 100. Default value is 5. stepw Set horizontal step when averaging. Default value is 1. Allowed range is from 1 to 50. Mostly useful to speed-up filtering. steph Set vertical step when averaging. Default value is 1. Allowed range is from 1 to 50. Mostly useful to speed-up filtering. threy Set Y threshold for averaging chrominance values. Set finer control for max allowed difference between Y components of current pixel and neigbour pixels. Default value is 200. Allowed range is from 1 to 200. threu Set U threshold for averaging chrominance values. Set finer control for max allowed difference between U components of current pixel and neigbour pixels. Default value is 200. Allowed range is from 1 to 200. threv Set V threshold for averaging chrominance values. Set finer control for max allowed difference between V components of current pixel and neigbour pixels. Default value is 200. Allowed range is from 1 to 200. distance Set distance type used in calculations. manhattan Absolute difference. euclidean Difference squared. Default distance type is manhattan. Commands This filter supports same commands as options. The command accepts the same syntax of the corresponding option. chromashift Shift chroma pixels horizontally and/or vertically. The filter accepts the following options: cbh Set amount to shift chroma-blue horizontally. cbv Set amount to shift chroma-blue vertically. crh Set amount to shift chroma-red horizontally. crv Set amount to shift chroma-red vertically. edge Set edge mode, can be smear, default, or warp. Commands This filter supports the all above options as commands. ciescope Display CIE color diagram with pixels overlaid onto it. The filter accepts the following options: system Set color system. ntsc, 470m ebu, 470bg smpte 240m apple widergb cie1931 rec709, hdtv uhdtv, rec2020 dcip3 cie Set CIE system. xyy ucs luv gamuts Set what gamuts to draw. See "system" option for available values. size, s Set ciescope size, by default set to 512. intensity, i Set intensity used to map input pixel values to CIE diagram. contrast Set contrast used to draw tongue colors that are out of active color system gamut. corrgamma Correct gamma displayed on scope, by default enabled. showwhite Show white point on CIE diagram, by default disabled. gamma Set input gamma. Used only with XYZ input color space. codecview Visualize information exported by some codecs. Some codecs can export information through frames using side-data or other means. For example, some MPEG based codecs export motion vectors through the export_mvs flag in the codec flags2 option. The filter accepts the following option: block Display block partition structure using the luma plane. mv Set motion vectors to visualize. Available flags for mv are: pf forward predicted MVs of P-frames bf forward predicted MVs of B-frames bb backward predicted MVs of B-frames qp Display quantization parameters using the chroma planes. mv_type, mvt Set motion vectors type to visualize. Includes MVs from all frames unless specified by frame_type option. Available flags for mv_type are: fp forward predicted MVs bp backward predicted MVs frame_type, ft Set frame type to visualize motion vectors of. Available flags for frame_type are: if intra-coded frames (I-frames) pf predicted frames (P-frames) bf bi-directionally predicted frames (B-frames) Examples o Visualize forward predicted MVs of all frames using ffplay: ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp o Visualize multi-directionals MVs of P and B-Frames using ffplay: ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb colorbalance Modify intensity of primary colors (red, green and blue) of input frames. The filter allows an input frame to be adjusted in the shadows, midtones or highlights regions for the red-cyan, green-magenta or blue- yellow balance. A positive adjustment value shifts the balance towards the primary color, a negative value towards the complementary color. The filter accepts the following options: rs gs bs Adjust red, green and blue shadows (darkest pixels). rm gm bm Adjust red, green and blue midtones (medium pixels). rh gh bh Adjust red, green and blue highlights (brightest pixels). Allowed ranges for options are "[-1.0, 1.0]". Defaults are 0. pl Preserve lightness when changing color balance. Default is disabled. Examples o Add red color cast to shadows: colorbalance=rs=.3 Commands This filter supports the all above options as commands. colorcontrast Adjust color contrast between RGB components. The filter accepts the following options: rc Set the red-cyan contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0. gm Set the green-magenta contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0. by Set the blue-yellow contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0. rcw gmw byw Set the weight of each "rc", "gm", "by" option value. Default value is 0.0. Allowed range is from 0.0 to 1.0. If all weights are 0.0 filtering is disabled. pl Set the amount of preserving lightness. Default value is 0.0. Allowed range is from 0.0 to 1.0. Commands This filter supports the all above options as commands. colorcorrect Adjust color white balance selectively for blacks and whites. This filter operates in YUV colorspace. The filter accepts the following options: rl Set the red shadow spot. Allowed range is from -1.0 to 1.0. Default value is 0. bl Set the blue shadow spot. Allowed range is from -1.0 to 1.0. Default value is 0. rh Set the red highlight spot. Allowed range is from -1.0 to 1.0. Default value is 0. bh Set the red highlight spot. Allowed range is from -1.0 to 1.0. Default value is 0. saturation Set the amount of saturation. Allowed range is from -3.0 to 3.0. Default value is 1. analyze If set to anything other than "manual" it will analyze every frame and use derived parameters for filtering output frame. Possible values are: manual average minmax median Default value is "manual". Commands This filter supports the all above options as commands. colorchannelmixer Adjust video input frames by re-mixing color channels. This filter modifies a color channel by adding the values associated to the other channels of the same pixels. For example if the value to modify is red, the output value will be: =* + * + * + * The filter accepts the following options: rr rg rb ra Adjust contribution of input red, green, blue and alpha channels for output red channel. Default is 1 for rr, and 0 for rg, rb and ra. gr gg gb ga Adjust contribution of input red, green, blue and alpha channels for output green channel. Default is 1 for gg, and 0 for gr, gb and ga. br bg bb ba Adjust contribution of input red, green, blue and alpha channels for output blue channel. Default is 1 for bb, and 0 for br, bg and ba. ar ag ab aa Adjust contribution of input red, green, blue and alpha channels for output alpha channel. Default is 1 for aa, and 0 for ar, ag and ab. Allowed ranges for options are "[-2.0, 2.0]". pc Set preserve color mode. The accepted values are: none Disable color preserving, this is default. lum Preserve luminance. max Preserve max value of RGB triplet. avg Preserve average value of RGB triplet. sum Preserve sum value of RGB triplet. nrm Preserve normalized value of RGB triplet. pwr Preserve power value of RGB triplet. pa Set the preserve color amount when changing colors. Allowed range is from "[0.0, 1.0]". Default is 0.0, thus disabled. Examples o Convert source to grayscale: colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3 o Simulate sepia tones: colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131 Commands This filter supports the all above options as commands. colorize Overlay a solid color on the video stream. The filter accepts the following options: hue Set the color hue. Allowed range is from 0 to 360. Default value is 0. saturation Set the color saturation. Allowed range is from 0 to 1. Default value is 0.5. lightness Set the color lightness. Allowed range is from 0 to 1. Default value is 0.5. mix Set the mix of source lightness. By default is set to 1.0. Allowed range is from 0.0 to 1.0. Commands This filter supports the all above options as commands. colorkey RGB colorspace color keying. This filter operates on 8-bit RGB format frames by setting the alpha component of each pixel which falls within the similarity radius of the key color to 0. The alpha value for pixels outside the similarity radius depends on the value of the blend option. The filter accepts the following options: color Set the color for which alpha will be set to 0 (full transparency). See "Color" section in the ffmpeg-utils manual. Default is "black". similarity Set the radius from the key color within which other colors also have full transparency. The computed distance is related to the unit fractional distance in 3D space between the RGB values of the key color and the pixel's color. Range is 0.01 to 1.0. 0.01 matches within a very small radius around the exact key color, while 1.0 matches everything. Default is 0.01. blend Set how the alpha value for pixels that fall outside the similarity radius is computed. 0.0 makes pixels either fully transparent or fully opaque. Higher values result in semi-transparent pixels, with greater transparency the more similar the pixel color is to the key color. Range is 0.0 to 1.0. Default is 0.0. Examples o Make every green pixel in the input image transparent: ffmpeg -i input.png -vf colorkey=green out.png o Overlay a greenscreen-video on top of a static background image. 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 Commands This filter supports same commands as options. The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value. colorhold Remove all color information for all RGB colors except for certain one. The filter accepts the following options: color The color which will not be replaced with neutral gray. similarity Similarity percentage with the above color. 0.01 matches only the exact key color, while 1.0 matches everything. blend Blend percentage. 0.0 makes pixels fully gray. Higher values result in more preserved color. Commands This filter supports same commands as options. The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value. colorlevels Adjust video input frames using levels. The filter accepts the following options: rimin gimin bimin aimin Adjust red, green, blue and alpha input black point. Allowed ranges for options are "[-1.0, 1.0]". Defaults are 0. rimax gimax bimax aimax Adjust red, green, blue and alpha input white point. Allowed ranges for options are "[-1.0, 1.0]". Defaults are 1. Input levels are used to lighten highlights (bright tones), darken shadows (dark tones), change the balance of bright and dark tones. romin gomin bomin aomin Adjust red, green, blue and alpha output black point. Allowed ranges for options are "[0, 1.0]". Defaults are 0. romax gomax bomax aomax Adjust red, green, blue and alpha output white point. Allowed ranges for options are "[0, 1.0]". Defaults are 1. Output levels allows manual selection of a constrained output level range. preserve Set preserve color mode. The accepted values are: none Disable color preserving, this is default. lum Preserve luminance. max Preserve max value of RGB triplet. avg Preserve average value of RGB triplet. sum Preserve sum value of RGB triplet. nrm Preserve normalized value of RGB triplet. pwr Preserve power value of RGB triplet. Examples o Make video output darker: colorlevels=rimin=0.058:gimin=0.058:bimin=0.058 o Increase contrast: colorlevels=rimin=0.039:gimin=0.039:bimin=0.039:rimax=0.96:gimax=0.96:bimax=0.96 o Make video output lighter: colorlevels=rimax=0.902:gimax=0.902:bimax=0.902 o Increase brightness: colorlevels=romin=0.5:gomin=0.5:bomin=0.5 Commands This filter supports the all above options as commands. colormatrix Convert color matrix. The filter accepts the following options: src dst Specify the source and destination color matrix. Both values must be specified. The accepted values are: bt709 BT.709 fcc FCC bt601 BT.601 bt470 BT.470 bt470bg BT.470BG smpte170m SMPTE-170M smpte240m SMPTE-240M bt2020 BT.2020 For example to convert from BT.601 to SMPTE-240M, use the command: colormatrix=bt601:smpte240m colorspace Convert colorspace, transfer characteristics or color primaries. Input video needs to have an even size. The filter accepts the following options: all Specify all color properties at once. The accepted values are: bt470m BT.470M bt470bg BT.470BG bt601-6-525 BT.601-6 525 bt601-6-625 BT.601-6 625 bt709 BT.709 smpte170m SMPTE-170M smpte240m SMPTE-240M bt2020 BT.2020 space Specify output colorspace. The accepted values are: bt709 BT.709 fcc FCC bt470bg BT.470BG or BT.601-6 625 smpte170m SMPTE-170M or BT.601-6 525 smpte240m SMPTE-240M ycgco YCgCo bt2020ncl BT.2020 with non-constant luminance trc Specify output transfer characteristics. The accepted values are: bt709 BT.709 bt470m BT.470M bt470bg BT.470BG gamma22 Constant gamma of 2.2 gamma28 Constant gamma of 2.8 smpte170m SMPTE-170M, BT.601-6 625 or BT.601-6 525 smpte240m SMPTE-240M srgb SRGB iec61966-2-1 iec61966-2-1 iec61966-2-4 iec61966-2-4 xvycc xvycc bt2020-10 BT.2020 for 10-bits content bt2020-12 BT.2020 for 12-bits content primaries Specify output color primaries. The accepted values are: bt709 BT.709 bt470m BT.470M bt470bg BT.470BG or BT.601-6 625 smpte170m SMPTE-170M or BT.601-6 525 smpte240m SMPTE-240M film film smpte431 SMPTE-431 smpte432 SMPTE-432 bt2020 BT.2020 jedec-p22 JEDEC P22 phosphors range Specify output color range. The accepted values are: tv TV (restricted) range mpeg MPEG (restricted) range pc PC (full) range jpeg JPEG (full) range format Specify output color format. The accepted values are: yuv420p YUV 4:2:0 planar 8-bits yuv420p10 YUV 4:2:0 planar 10-bits yuv420p12 YUV 4:2:0 planar 12-bits yuv422p YUV 4:2:2 planar 8-bits yuv422p10 YUV 4:2:2 planar 10-bits yuv422p12 YUV 4:2:2 planar 12-bits yuv444p YUV 4:4:4 planar 8-bits yuv444p10 YUV 4:4:4 planar 10-bits yuv444p12 YUV 4:4:4 planar 12-bits fast Do a fast conversion, which skips gamma/primary correction. This will take significantly less CPU, but will be mathematically incorrect. To get output compatible with that produced by the colormatrix filter, use fast=1. dither Specify dithering mode. The accepted values are: none No dithering fsb Floyd-Steinberg dithering wpadapt Whitepoint adaptation mode. The accepted values are: bradford Bradford whitepoint adaptation vonkries von Kries whitepoint adaptation identity identity whitepoint adaptation (i.e. no whitepoint adaptation) iall Override all input properties at once. Same accepted values as all. ispace Override input colorspace. Same accepted values as space. iprimaries Override input color primaries. Same accepted values as primaries. itrc Override input transfer characteristics. Same accepted values as trc. irange Override input color range. Same accepted values as range. The filter converts the transfer characteristics, color space and color primaries to the specified user values. The output value, if not specified, is set to a default value based on the "all" property. If that property is also not specified, the filter will log an error. The output color range and format default to the same value as the input color range and format. The input transfer characteristics, color space, color primaries and color range should be set on the input data. If any of these are missing, the filter will log an error and no conversion will take place. For example to convert the input to SMPTE-240M, use the command: colorspace=smpte240m colortemperature Adjust color temperature in video to simulate variations in ambient color temperature. The filter accepts the following options: temperature Set the temperature in Kelvin. Allowed range is from 1000 to 40000. Default value is 6500 K. mix Set mixing with filtered output. Allowed range is from 0 to 1. Default value is 1. pl Set the amount of preserving lightness. Allowed range is from 0 to 1. Default value is 0. Commands This filter supports same commands as options. convolution Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49 elements. The filter accepts the following options: 0m 1m 2m 3m Set matrix for each plane. Matrix is sequence of 9, 25 or 49 signed integers in square mode, and from 1 to 49 odd number of signed integers in row mode. 0rdiv 1rdiv 2rdiv 3rdiv Set multiplier for calculated value for each plane. If unset or 0, it will be sum of all matrix elements. 0bias 1bias 2bias 3bias Set bias for each plane. This value is added to the result of the multiplication. Useful for making the overall image brighter or darker. Default is 0.0. 0mode 1mode 2mode 3mode Set matrix mode for each plane. Can be square, row or column. Default is square. Commands This filter supports the all above options as commands. Examples o Apply sharpen: 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" o Apply blur: 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" o Apply edge enhance: 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" o Apply edge detect: 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" o Apply laplacian edge detector which includes diagonals: 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" o Apply emboss: 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" convolve Apply 2D convolution of video stream in frequency domain using second stream as impulse. The filter accepts the following options: planes Set which planes to process. impulse Set which impulse video frames will be processed, can be first or all. Default is all. The "convolve" filter also supports the framesync options. copy Copy the input video source unchanged to the output. This is mainly useful for testing purposes. coreimage Video filtering on GPU using Apple's CoreImage API on OSX. Hardware acceleration is based on an OpenGL context. Usually, this means it is processed by video hardware. However, software-based OpenGL implementations exist which means there is no guarantee for hardware processing. It depends on the respective OSX. There are many filters and image generators provided by Apple that come with a large variety of options. The filter has to be referenced by its name along with its options. The coreimage filter accepts the following options: list_filters List all available filters and generators along with all their respective options as well as possible minimum and maximum values along with the default values. list_filters=true filter Specify all filters by their respective name and options. Use list_filters to determine all valid filter names and options. Numerical options are specified by a float value and are automatically clamped to their respective value range. Vector and color options have to be specified by a list of space separated float values. Character escaping has to be done. A special option name "default" is available to use default options for a filter. It is required to specify either "default" or at least one of the filter options. All omitted options are used with their default values. The syntax of the filter string is as follows: filter=@