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
sizestring4096x2048set 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-1010color saturation multiplier
win_funcShowspectrumpicWinFunchanningrect, bartlett, hanning, hamming, blackman, welch, flattop, bharris, …set window function
orientationShowspectrumpicOrientationverticalvertical, horizontalset orientation
gainfloat10128set scale gain
legendbooltruedraw legend
rotationfloat0-11color rotation
startint00start frequency
stopint00stop frequency
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 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.