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);When to use it
Section titled “When to use it”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.
How to use it
Section titled “How to use it”TODO — prose: how the filter actually works and what its key parameters mean (the explanation FFmpeg’s terse option help omits).
Examples
Section titled “Examples”TODO — runnable PHP, with the equivalent ffmpeg CLI alongside.
Gotchas
Section titled “Gotchas”TODO
See also
Section titled “See also”TODO
Parameters
Section titled “Parameters”| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
dry | float | 1 | 0–10 | set dry gain |
wet | float | 1 | 0–10 | set wet gain |
length | float | 1 | 0–1 | set IR length |
gtype | AfirGtype | peak | none, peak, dc, gn, ac, rms | set IR auto gain type |
irnorm | float | 1 | -1–2 | set IR norm |
irlink | bool | true | — | set IR link |
irgain | float | 1 | 0–1 | set IR gain |
irfmt | AfirIrfmt | input | mono, input | set IR format |
maxir | float | 30 | 0.1–60 | set max IR length |
response | bool | false | — | show IR frequency response |
channel | int | 0 | 0–1024 | set IR channel to display frequency response |
size | string | hd720 | — | set video size |
rate | string | 25 | — | set video rate |
minp | int | 8192 | 1–65536 | set min partition size |
maxp | int | 8192 | 8–65536 | set max partition size |
nbirs | int | 1 | 1–32 | set number of input IRs |
ir | int | 0 | 0–31 | select IR |
precision | AfirPrecision | auto | auto, float, double | set processing precision |
irload | AfirIrload | init | init, access | set 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.