Convert input audio to a single video frame, representing the audio frequency spectrum.
The filter accepts the following options:
- size, s
-
Specify the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is
4096x2048
. - 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 displayed using the same color scheme
- rainbow
-
each channel is displayed using the rainbow color scheme
- moreland
-
each channel is displayed using the moreland color scheme
- nebulae
-
each channel is displayed using the nebulae color scheme
- fire
-
each channel is displayed using the fire color scheme
- fiery
-
each channel is displayed using the fiery color scheme
- fruit
-
each channel is displayed using the fruit color scheme
- cool
-
each channel is displayed using the cool color scheme
Default value is intensity.
- scale
-
Specify scale used for calculating intensity color values.
It accepts the following values:
- lin
-
linear
- sqrt
-
square root, default
- cbrt
-
cubic root
- 4thrt
-
4th root
- 5thrt
-
5th root
- log
-
logarithmic
Default value is log.
- 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 is1
. - win_func
-
Set window function.
It accepts the following values:
- rect
- bartlett
- hann
- hanning
- hamming
- blackman
- welch
- flattop
- bharris
- bnuttall
- bhann
- sine
- nuttall
- lanczos
- gauss
- tukey
Default value is
hann
. - orientation
-
Set orientation of time vs frequency axis. Can be
vertical
orhorizontal
. Default isvertical
. - gain
-
Set scale gain for calculating intensity color values. Default value is
1
. - legend
-
Draw time and frequency axes and legends. Default is enabled.
Examples
-
Extract an audio spectrogram of a whole audio track in a 1024x1024 picture using ffmpeg:
ffmpeg -i audio.flac -lavfi showspectrumpic=s=1024x1024 spectrogram.png