Skip to content

Showspectrumpic

Audio Video Single output Transform

Convert input audio to a spectrum video output single picture.

FFmpeg filter: showspectrumpic — 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 Showspectrumpic(…));
$result = $node->outputs()[0];

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

$result = $video->apply(new Showspectrumpic(…));

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
sizestring4096x2048—set video size
modeShowspectrumpicModecombinedcombined, separateset channel display mode
colorShowspectrumpicColorintensitychannel, intensity, rainbow, moreland, nebulae, fire, fiery, fruit, …set channel coloring
scaleShowspectrumpicScaleloglin, sqrt, cbrt, log, 4thrt, 5thrtset display scale
fscaleShowspectrumpicFscalelinlin, logset frequency scale
saturationfloat1-10–10color saturation multiplier
win_funcShowspectrumpicWinFunchanningrect, bartlett, hanning, hamming, blackman, welch, flattop, bharris, …set window function
orientationShowspectrumpicOrientationverticalvertical, horizontalset orientation
gainfloat10–128set scale gain
legendbooltrue—draw legend
rotationfloat0-1–1color rotation
startint0≥ 0start frequency
stopint0≥ 0stop frequency
drangefloat12010–200set dynamic range in dBFS
limitfloat0-100–100set upper limit in dBFS
opacityfloat10–10set opacity strength

FFmpeg also names these options (use the parameter shown above): s → size.


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