Skip to content

Showspectrum

Audio Video Single output Transform

Convert input audio to a spectrum video output.

FFmpeg filter: showspectrum — the official reference.

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

$node = $video->addFilter(new Showspectrum());
$result = $node->outputs()[0];

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

$result = $video->apply(new Showspectrum());

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
sizestring640x512set video size
slideShowspectrumSlidereplacereplace, scroll, fullframe, rscroll, lreplaceset sliding mode
modeShowspectrumModecombinedcombined, separateset channel display mode
colorShowspectrumColorchannelchannel, intensity, rainbow, moreland, nebulae, fire, fiery, fruit, …set channel coloring
scaleShowspectrumScalesqrtlin, sqrt, cbrt, log, 4thrt, 5thrtset display scale
fscaleShowspectrumFscalelinlin, logset frequency scale
saturationfloat1-1010color saturation multiplier
win_funcShowspectrumWinFunchanningrect, bartlett, hanning, hamming, blackman, welch, flattop, bharris, …set window function
orientationShowspectrumOrientationverticalvertical, horizontalset orientation
overlapfloat001set window overlap
gainfloat10128set scale gain
dataShowspectrumDatamagnitudemagnitude, phase, uphaseset data mode
rotationfloat0-11color rotation
startint00start frequency
stopint00stop frequency
fpsstringautoset video rate
legendboolfalsedraw legend
drangefloat12010200set dynamic range in dBFS
limitfloat0-100100set upper limit in dBFS
opacityfloat1010set opacity strength

FFmpeg also names these options (use the parameter shown above): ssize.


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