`showcqt’, `showwaves’ and `showvolume’ (overlay) with colors option

Watch on youtube.com
doc

https://ffmpeg.org/ffmpeg-filters.html#showcqt, https://ffmpeg.org/ffmpeg-filters.html#showwaves, https://ffmpeg.org/ffmpeg-filters.html#showwvolume, https://ffmpeg.org/ffmpeg-filters.html#overlay

Some visualizers allow the “colors” option. You can specify the color for each channel by this option. The value following ‘@’ is the alpha value.

#! /bin/sh
ifn="Air on the G String (from Orchestral Suite no. 3, BWV 1068).mp3"
ifnb="`basename \"${ifn}\" .mp3`"
pref="`basename $0 .sh`"

#
for i in 0.1 0.3 0.5 0.7 0.9 ; do
#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:a]showcqt=s=1920x1080[vcqt];
[0:a]showvolume=p=1,scale=1280:40[vv];
[0:a]showwaves=split_channels=1:mode=line:colors=red@${i}|green@${i}:s=1280x480[vs];
[vs][vv]overlay=x=0:y=(H-h)/2[v1];
[vcqt][v1]overlay=x=W-w-50:y=50[v]
" -map '[v]' -map '0:a' -c:a copy \
  "${pref}_${ifnb}_tmp${i}.mp4"
#
done

alpha=0.1

00:00:00

alpha=0.3

00:00:36

alpha=0.5

00:01:12

alpha=0.7

00:01:48

alpha=0.9

00:02:24