---
title: "How to add a scrolling spectrogram with Claude (tested prompt and ffmpeg command)"
description: "A red-to-yellow frequency map of the soundtrack scrolls right to left along a dark strip near the bottom, each drum hit leaving a glowing column that slides off the left edge. Install one skill and ask Claude Code, or run the ffmpeg command we tested yourself."
url: https://www.recharm.com/effects/scrolling-spectrogram
---

# How to add a scrolling spectrogram with Claude

A red-to-yellow frequency map of the soundtrack scrolls right to left along a dark strip near the bottom, each drum hit leaving a glowing column that slides off the left edge.

Made by the command on this page, from our own test clip.

## Get this effect

1. ### Switch to Code in your [Claude Desktop App](https://claude.com/download)

2. ### Install the skill (once)

   ```
   Install the Recharm video effects skill: download https://recharm-growth-staging.s3.us-east-2.amazonaws.com/website/downloads/recharm-video-effects.zip and unzip it into ~/.claude/skills
   ```

3. ### Ask for the effect

   ```
   Add a scrolling spectrogram to input.mp4
   Palette: fiery
   ```

## Several videos, several effects, one ask

Put your clips in the folder, mention them with @, and ask for everything at once. Claude runs one tested script after another on each clip, then joins them.

Add a scrolling spectrogram to **@clip1.mp4**, put a sale badge on **@clip2.mp4**, give **@clip3.mp4** a VHS look, then join all three with crossfades.

## Settings you can change

Ask Claude to change any of these, or edit them at the top of the command.

| Setting   | Default | What it does                                                                            |
| --------- | ------- | --------------------------------------------------------------------------------------- |
| `BAND`    | `0.20`  | Spectrogram height as a share of the frame height.                                      |
| `Y`       | `0.75`  | Top of the spectrogram, 0-1 down the frame.                                             |
| `SPEED`   | `160`   | Scroll speed in pixels per second. Faster makes each hit wider and the history shorter. |
| `PALETTE` | `fiery` | showspectrum color map: fiery, fire, magma, plasma, viridis...                          |
| `TOP_HZ`  | `8000`  | Highest frequency shown; low notes sit at the bottom.                                   |
| `SHADE`   | `0.7`   | Opacity of the dark strip behind the spectrogram.                                       |
| `RANGE`   | `80`    | Loudness range shown, in dB. Lower hides quiet sounds.                                  |

## Without the skill

Don’t want to install the skill? Paste this prompt into Claude Code and Claude writes the command itself.

```
In input.mp4 (540x960, it has a drum track), add a scrolling spectrogram of the audio near the bottom. Darken a full-width strip from y=720 to y=912 (192 pixels tall) with black at 70% opacity. Over that strip, place a 540x192 spectrogram made with ffmpeg's showspectrum filter from the input's own audio: slide=scroll (new sound enters at the right edge and moves left), 160 columns per second (fps=160, then resample to 30fps), color=fiery, scale=log, fscale=log, stop=8000 Hz, drange=80. Make its black (silent) parts transparent with colorkey=black:0.04:0.1 so the video shows through the gaps. Leave everything above y=720 and below y=912 untouched. There's no text; if you add any, draw it with Pillow, not ffmpeg's drawtext. Keep the size, 30fps, 6 second length and the audio. Save it as output.mp4.
```

## Run it without Claude

This is the exact command we tested. Save it as `scrolling-spectrogram.sh` and run:

```
sh scrolling-spectrogram.sh input.mp4 output.mp4
```

```
#!/bin/sh
# Scrolling spectrogram: a red-to-yellow map of the soundtrack's frequencies scrolls right to left along a dark strip near the bottom.
# Usage: sh recipe.sh input.mp4 output.mp4  (the input needs an audio track)
set -e
IN="$1"; OUT="$2"
BAND=0.20       # spectrogram height as a share of the frame height
Y=0.75          # top of the spectrogram (0-1 down the frame)
SPEED=160       # scroll speed in pixels per second
PALETTE=fiery   # showspectrum color map: fiery, fire, magma, plasma, viridis...
TOP_HZ=8000     # highest frequency shown; low notes sit at the bottom
SHADE=0.7       # opacity of the dark strip behind the spectrogram
RANGE=80        # loudness range shown, in dB: lower hides quiet sounds

SIZE=$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "$IN")
W=${SIZE%x*}; H=${SIZE#*x}
SH=$(echo "$H * $BAND / 2 * 2" | bc)          # even height for the spectrogram strip
TOP=$(echo "$H * $Y / 1" | bc)
# showspectrum adds one column per audio window and slides the picture left; colorkey makes the silent
# (black) parts see-through, so only the sound shows over a darkened strip of the video
ffmpeg -y -i "$IN" -filter_complex "\
[0:a]showspectrum=s=${W}x${SH}:slide=scroll:mode=combined:color=$PALETTE:scale=log:fscale=log:stop=$TOP_HZ:drange=$RANGE:fps=$SPEED,\
fps=30,format=rgba,colorkey=black:0.04:0.1[spec];\
[0:v]drawbox=x=0:y=$TOP:w=$W:h=$SH:color=black@$SHADE:t=fill[bg];\
[bg][spec]overlay=0:$TOP:shortest=1,format=yuv420p[v]" \
  -map "[v]" -map 0:a -r 30 -c:v libx264 -crf 18 -c:a copy "$OUT"
```

## More music-synced visuals

- [AI voice orb **AI voice orb**](https://www.recharm.com/effects/ai-voice-orb)
- [Audio-reactive blob **Audio-reactive blob**](https://www.recharm.com/effects/audio-reactive-blob)
- [Audio-reactive particles **Audio-reactive particles**](https://www.recharm.com/effects/audio-reactive-particles)
- [Audio-reactive text **Audio-reactive text**](https://www.recharm.com/effects/audio-reactive-text)
- [Audio waveform **Audio waveform**](https://www.recharm.com/effects/audio-waveform)

## Find 3x _winning ads_

Recharm cuts your ad footage into tagged, searchable clips: hooks, testimonials, product shots. Find the shots that win, add the effect with Claude, and ship 3x more ad edits.

[Start 14-day free trial](https://www.recharm.com/get-started)
