FFmpeg 2.3.6
Since* 2.3
#

Convert input audio to a video output representing frequency spectrum logarithmically (using constant Q transform with Brown-Puckette algorithm), with musical tone scale, from E0 to D#10 (10 octaves).

The filter accepts the following options:

volume

Specify the transform volume (multiplier). Acceptable value is [1.0, 100.0]. Default value is 16.0.

timeclamp

Specify the transform timeclamp. At low frequency, there is trade-off between accuracy in time domain and frequency domain. If timeclamp is lower, event in time domain is represented more accurately (such as fast bass drum), otherwise event in frequency domain is represented more accurately (such as bass guitar). Acceptable value is [0.1, 1.0]. Default value is 0.17.

coeffclamp

Specify the transform coeffclamp. If coeffclamp is lower, transform is more accurate, otherwise transform is faster. Acceptable value is [0.1, 10.0]. Default value is 1.0.

gamma

Specify gamma. Lower gamma makes the spectrum more contrast, higher gamma makes the spectrum having more range. Acceptable value is [1.0, 7.0]. Default value is 3.0.

fontfile

Specify font file for use with freetype. If not specified, use embedded font.

fullhd

If set to 1 (the default), the video size is 1920x1080 (full HD), if set to 0, the video size is 960x540. Use this option to make CPU usage lower.

fps

Specify video fps. Default value is 25.

count

Specify number of transform per frame, so there are fps*count transforms per second. Note that audio data rate must be divisible by fps*count. Default value is 6.

#

Examples

  • Playing audio while showing the spectrum:

    ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]'
  • Same as above, but with frame rate 30 fps:

    ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]'
  • Playing at 960x540 and lower CPU usage:

    ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fullhd=0:count=3 [out0]'
  • A1 and its harmonics: A1, A2, (near)E3, A3:

    ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t),
                     asplit[a][out1]; [a] showcqt [out0]'
  • Same as above, but with more accuracy in frequency domain (and slower):

    ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t),
                     asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'