Skip to content

Sinc

Audio Single output Source

Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.

FFmpeg filter: sinc — the official reference.

Generate a stream. Sinc is a source — it has no input, so you create a stream from it rather than applying it to one:

$audio = \FFmpeg\AudioStream::generate(new Sinc());

apply() and addFilter() do not apply to source filters (there is nothing to attach them to).

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
sample_rateint441001set sample rate
nb_samplesint10241set the number of samples per requested frame
hpfloat00set high-pass filter frequency
lpfloat00set low-pass filter frequency
phasefloat500100set filter phase response
betafloat-1-1256set kaiser window beta
attfloat12040180set stop-band attenuation
roundboolfalseenable rounding
hptapsint0032768set number of taps for high-pass filter
lptapsint0032768set number of taps for low-pass filter

FFmpeg also names these options (use the parameter shown above): rsample_rate, nnb_samples.


Maps to FFmpeg’s sinc 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.