TIL: Generating Audio Waveform Images With ffmpeg
A waveform shows silence gaps, volume levels, and pacing in one glance. ffmpeg generates one from any audio file.
ffmpeg -i recording.wav -filter_complex "showwavespic=s=640x120" -frames:v 1 waveform.png
Output a single frame PNG showing the waveform of the entire file. Width 640, height 120. Dark regions are silence, tall peaks are loud sections.
ffmpeg -i recording.wav -filter_complex \
"showwavespic=s=640x120:colors=blue|red" -frames:v 1 waveform.png
Colour the waveform. The left channel blue, the right channel red. Mono files use the first colour.
ffmpeg -i recording.wav -filter_complex \
"showwavespic=s=640x200:split_channels=1:colors=green|orange" -frames:v 1 waveform.png
Split channels with a taller waveform. Each channel gets its own row. Useful for spotting phase issues or channel imbalance.
Can I overlay the waveform on a video?
Use the showwaves filter instead of showwavespic. It generates an animated waveform that changes over time.
What if the waveform is too dense?
Increase the width parameter. A 10 minute file at 640 pixels puts every second in 1 pixel. Use 1920 or higher for detailed views.