showcqt draws the spectrum on a musical scale, with each octave the same width (like piano keys), plus a scrolling sonogram underneath. That makes notes and chords readable, unlike a linear FFT spectrum.
The command
ffmpeg -i input.aiff \
-filter_complex "[0:a]showcqt=size=1280x720:text=0,format=yuv420p[v]" \
-map "[v]" -map 0:a \
output.mp4 What each part does
showcqt=size=1280x720:text=0
720p; text=0 hides the note-name labels
(which also avoids needing a font)
format=yuv420p 4:2:0 for H.264
-map "[v]" -map 0:a the visualizer plus the original audio When to use it
Useful when the audio is music and you want viewers to see pitch: melodies, chords and bass lines show up as distinct bands, because each octave gets equal width. It suits music videos, harmony demonstrations or checking a mix for clashing notes. For speech, noise or sound effects, the musical scale adds little. Use showwaves.sh for a waveform, or avectorscope.sh and aphasemeter.sh to inspect the stereo image instead.
The header explains each flag. Useful edits:
- Change
size=1280x720to match your target, such as1920x1080for a 1080p upload. - Drop
text=0to show note-name labels. The header notes the labels need a font, so expect a font error if none is available. - Swap
input.aifffor any audio file ffmpeg can read.
If the video plays but is silent, check that -map 0:a survived your edits. If a player rejects the file, make sure format=yuv420p is still in the filter chain.
Notes
- Source
- ffmpeg-utilities/notes/ffmpeg-filters.txt