FFmpeg 1.2.12
Since* 1.0
#

Convert input audio to a video output, representing the audio frequency spectrum.

The filter accepts the following named parameters:

size, s

Specify the video size for the output. Default value is 640x512.

slide

Specify if the spectrum should slide along the window. Default value is 0.

mode

Specify display mode.

It accepts the following values:

combined

all channels are displayed in the same row

separate

all channels are displayed in separate rows

Default value is combined.

color

Specify display color mode.

It accepts the following values:

channel

each channel is displayed in a separate color

intensity

each channel is is displayed using the same color scheme

Default value is channel.

scale

Specify scale used for calculating intensity color values.

It accepts the following values:

lin

linear

sqrt

square root, default

cbrt

cubic root

log

logarithmic

Default value is sqrt.

saturation

Set saturation modifier for displayed colors. Negative values provide alternative color scheme. 0 is no saturation at all. Saturation must be in [-10.0, 10.0] range. Default value is 1.

The usage is very similar to the showwaves filter; see the examples in that section.

#

Examples

  • Large window with logarithmic color scaling:

    showspectrum=s=1280x480:scale=log
  • Complete example for a colored and sliding spectrum per channel using ffplay:

    ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
                 [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'