readme-waves
v1.0.1
Published
Generate animated music equalizer SVGs for GitHub profile READMEs
Downloads
235
Maintainers
Readme
readme-waves
Generate animated music equalizer visualizations for GitHub profile READMEs.
Renders your music as a contribution-graph-style equalizer — frequency bands from left (bass) to right (treble), with GitHub's green color levels stacking from bottom to top based on intensity.
Output Modes
| Mode | Format | Audio | Auto-play in README | Best for |
|------|--------|-------|---------------------|----------|
| SVG | .svg | No | Yes (CSS animation) | Visual-only, lightweight |
| Video | .mp4 | Yes | Requires manual embed | Full experience with sound |
Quick Start
CLI
Requires ffmpeg and yt-dlp (for YouTube mode).
# From local audio file
npx readme-waves song.mp3 -o waveform.svg
# MP4 video with audio
npx readme-waves song.mp3 --video -o waveform.mp4
# From YouTube URL
npx readme-waves "https://www.youtube.com/watch?v=xxxxx" -o waveform.svg
# YouTube → MP4
npx readme-waves "https://www.youtube.com/watch?v=xxxxx" --video -o waveform.mp4Web App
Visit readme-wave.takalawang.dev — upload an audio file to generate SVG or MP4 directly in your browser. No server processing, everything runs client-side.
CLI Options
| Flag | Description | Default |
|------|-------------|---------|
| <input> | Audio file path or YouTube URL | (required) |
| -o, --output | Output file path | waveform.svg |
| --video | Generate MP4 video with audio | false |
| --rows | Amplitude levels (height in squares) | 7 |
| --cols | Frequency bands (number of columns) | 52 |
| --frames | Animation frames (SVG mode) | 60 |
| --fps | Video frame rate | 24 |
| --duration | SVG animation loop (seconds) | 10 |
| --theme | Color theme: dark, light | dark |
Embed in GitHub README
How It Works
- Decodes audio via ffmpeg (CLI) or Web Audio API (browser)
- Applies Short-Time Fourier Transform (STFT) with pure TypeScript FFT
- Trims to the lower 30% of the frequency range (where music energy lives)
- Per-band normalization with gamma correction for even dynamic range
- Generates equalizer visualization:
- SVG mode: per-cell CSS
@keyframesanimation - Video mode: raw pixel frames piped to ffmpeg (CLI) or ffmpeg.wasm (browser)
- SVG mode: per-cell CSS
Color Themes
Dark (default) — GitHub dark mode contribution colors:
#161b22 #006d32 #26a641 #39d353Light — GitHub light mode contribution colors:
#ebedf0 #40c463 #30a14e #216e39Local Development
pnpm install
pnpm dev # Next.js dev server
pnpm build:cli # Build CLITech Stack
- Next.js — web app
- Web Audio API — browser audio decoding
- @ffmpeg/ffmpeg — browser video encoding
- commander — CLI
- yt-dlp — YouTube download (CLI)
- ffmpeg — audio/video processing (CLI)
