Skip to content

Aevalsrc

Audio Single output Source

Generate an audio signal generated by an expression.

FFmpeg filter: aevalsrc — the official reference.

Generate a stream. Aevalsrc 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 Aevalsrc());

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
exprsstringset the ’|‘-separated list of channels expressions
nb_samplesint10240set the number of samples per requested frame
sample_ratestring44100set the sample rate
durationint-1-1set audio duration
channel_layoutstringset channel layout

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


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