Skip to content

Afir

Audio Single output Transform

Apply Finite Impulse Response filter with supplied coefficients in additional stream(s).

FFmpeg filter: afir — the official reference.

Add it to a graph. The explicit form works for every filter — bind it to its inputs and read the result from outputs():

$node = $audio->addFilter(new Afir(), [$other]);
$result = $node->outputs()[0];

Shorthand. Single-output filters can skip the node — apply() returns the result stream directly:

$result = $audio->apply(new Afir(), $other);

TODO — when this filter shines: what it’s the right tool for, what to reach for instead when it isn’t, and how it composes with neighbouring filters.

TODO — prose: how the filter actually works and what its key parameters mean (the explanation FFmpeg’s terse option help omits).

TODO — runnable PHP, with the equivalent ffmpeg CLI alongside.

TODO

TODO

ParameterTypeDefaultRange / valuesDescription
dryfloat1010set dry gain
wetfloat1010set wet gain
lengthfloat101set IR length
gtypeAfirGtypepeaknone, peak, dc, gn, ac, rmsset IR auto gain type
irnormfloat1-12set IR norm
irlinkbooltrueset IR link
irgainfloat101set IR gain
irfmtAfirIrfmtinputmono, inputset IR format
maxirfloat300.160set max IR length
responseboolfalseshow IR frequency response
channelint001024set IR channel to display frequency response
sizestringhd720set video size
ratestring25set video rate
minpint8192165536set min partition size
maxpint8192865536set max partition size
nbirsint1132set number of input IRs
irint0031select IR
precisionAfirPrecisionautoauto, float, doubleset processing precision
irloadAfirIrloadinitinit, accessset IR loading type

Maps to FFmpeg’s afir filter. Verified against ffmpeg n7.1.1.

An Artisan Build project.

Built on FFmpeg — an independent binding, not affiliated with or endorsed by the FFmpeg project. Support FFmpeg.