Skip to content

Instantly share code, notes, and snippets.

@ummjackson
Created July 13, 2022 06:26
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ummjackson/75112c0a82705a6f51f2094a26adf528 to your computer and use it in GitHub Desktop.
FFmpeg Audio Spectrum
#!/bin/sh
# Make sure you have ffmpeg installed (eg. brew install ffmpeg)
ffmpeg -i "your-audio-file.wav" -filter_complex "asplit[main][tmp]; [tmp]aformat=channel_layouts=mono,aresample=32000 [cut]; [cut]showfreqs=mode=bar:ascale=sqrt:win_size=2048:s=1920x240:colors=White[out]; [out]split[top][bottom]; [bottom]vflip[bottom]; [top][bottom]vstack=inputs=2[combined]" -map "[combined]" -pix_fmt yuv420p -map "[main]" -preset ultrafast output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment