FFmpeg 4.1.11
Since* 3.4
#

Apply an arbitrary Frequency 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 and ambisonics.

This filter uses second stream as FIR coefficients. If second stream holds single channel, it will be used for all input channels in first stream, otherwise number of channels in second stream must be same as number of channels in first stream.

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 reponse, magnitude(magenta) and 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.

#

Examples

  • 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