Audio filters
Audio filters transform an AudioStream. The common ones read as
methods; the whole FFmpeg catalog is reachable as Filter classes through apply().
$audio = Media::open('podcast.wav')->audioStream();
$audio->normalizeLoudness(i: -16, tp: -1.5, lra: 11); // friendly method$audio->apply(new \FFmpeg\Filter\Loudnorm(i: -16, tp: -1.5)); // the same — any audio filterParameters can be a number, an FFmpeg expression, or a per-frame closure — see the Architecture.
A few you’ll reach for
Section titled “A few you’ll reach for”| Method | FFmpeg | Does |
|---|---|---|
normalizeLoudness() | loudnorm | EBU R128 loudness normalization |
duckUnder() | sidechaincompress | Duck one track under another |
mixWith() | amix | Mix tracks together |
limit() | alimiter | Hard-limit peaks |
volume() | volume | Change gain |
fade() | afade | Fade in / out |
Full recipes — loudness, ducking, limiting — are in the Examples. A page per filter (parameters, examples, gotchas) follows.
An Artisan Build project.
Built on FFmpeg — an independent binding, not affiliated with or endorsed by the FFmpeg project. Support FFmpeg.