`showcqt’ with basefreq, and endfreq (crop between A0 and C8)

Watch on youtube.com


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

# cqt   -> E0 - D#10
# "myaxis.png": 1920x120 (A0 - C8)
# basefreq=27.500
# endfreq=4186.009
# axisfile=myaxis.png
ffmpeg -y -i "${ifn}" -i "myaxis.png" \
    -filter_complex "
" -map '[v]' -map '0:a' -c:a copy \
  -shortest "${pref}_${ifnb}.mp4"
  • If you give “basefreq”, and “endfreq” to showcqt, showcqt wouldn’t render the axis (in most cases). Actually, you can use ‘axisfile’ option, but I’m trying it with “blend” manually.

  • “myaxis.png” was made by mk_piano_image.py.