Get this effect
Switch to Code in your Claude Desktop App
Install the skill (once)
Show the prompt
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/skillsAsk for the effect
Add a zoom pulse on beat to input.mp4 How big the frame gets on a beat: 1.08 Seconds to ease back to full size after each beat: 0.3
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 zoom pulse on beat 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 script.
| Setting | Default | What it does |
|---|---|---|
PULSE | 1.08 | How big the frame gets on a beat. 1.08 is 8% bigger. |
EASE | 0.3 | Seconds to ease back to full size after each beat. |
BASS_HZ | 150 | Beats are found in the sound below this frequency, where the kick drum sits. |
RATE | 22050 | Audio sample rate the beat tracking uses. |
HOP | 256 | Audio samples per analysis step. Smaller gives more exact beat times. |
Without the skill
Don’t want to install the skill? Paste this prompt into Claude Code and Claude writes the script itself.
Show the prompt
Add a zoom pulse on the beat to input.mp4. Find the kick drum beats with librosa: take the onset strength of the audio (mono, 22050 Hz) with hop_length 256, fmax 150 Hz and n_mels 8, run librosa.beat.beat_track on that envelope, move each beat back to where its hit starts with librosa.onset.onset_backtrack, convert to seconds and round each to the nearest video frame. On each beat, scale the frame up to 1.08x about its center (crop the same amount from all four sides, so the middle doesn't move) and ease back to 1.0x over 0.3 seconds with zoom = 1 + 0.08 x (1 - p)^2, where p is the seconds since the beat divided by 0.3. Between pulses the frame stays at 1.0x. No text is needed; if you add any, draw it with Pillow, not ffmpeg's drawtext. Keep the size (540x960), 30fps and the audio, encode H.264 yuv420p, and save it as output.mp4.Run it without Claude
This is the exact script we tested. Save it as zoom-pulse-on-beat.py and run:
python3 zoom-pulse-on-beat.py input.mp4 output.mp4Show the script
#!/usr/bin/env python3
"""Zoom pulse on beat: the frame bumps 8% bigger on every kick drum, then eases back to full size.
Usage: python3 zoom-pulse-on-beat.py input.mp4 output.mp4 (the input needs a music track with a beat)
Needs ffmpeg, librosa, numpy and OpenCV (pip install librosa numpy opencv-python-headless).
"""
import json
import subprocess
import sys
import cv2
import librosa
import numpy as np
PULSE = 1.08 # how big the frame gets on a beat (1.08 = 8% bigger)
EASE = 0.3 # seconds to ease back to full size after each beat
BASS_HZ = 150 # beats are found in the sound below this frequency (the kick drum)
RATE = 22050 # audio sample rate the beat tracking uses
HOP = 256 # audio samples per analysis step (smaller = more exact beat times)
def probe(path):
info = json.loads(subprocess.check_output(["ffprobe", "-v", "error", "-select_streams", "v:0", "-show_entries",
"stream=width,height,r_frame_rate", "-of", "json", path]))
s = info["streams"][0]
num, den = s["r_frame_rate"].split("/")
return s["width"], s["height"], s["r_frame_rate"], float(num) / float(den)
def beat_times(src):
"""Kick drum beats in seconds: track the beat in the bass, then move each one back to where its hit starts."""
pcm = subprocess.check_output(["ffmpeg", "-v", "error", "-i", src, "-ac", "1", "-ar", str(RATE), "-f", "f32le", "-"])
audio = np.frombuffer(pcm, np.float32)
bass = librosa.onset.onset_strength(y=audio, sr=RATE, hop_length=HOP, fmax=BASS_HZ, n_mels=8)
_, beats = librosa.beat.beat_track(onset_envelope=bass, sr=RATE, hop_length=HOP)
beats = librosa.onset.onset_backtrack(beats, bass)
return librosa.frames_to_time(beats, sr=RATE, hop_length=HOP)
def zoom_at(t, beats):
"""PULSE right on a beat, easing out to 1 over EASE seconds."""
past = beats[beats <= t + 1e-6]
if not len(past) or t - past[-1] >= EASE:
return 1.0
p = (t - past[-1]) / EASE
return 1 + (PULSE - 1) * (1 - p) ** 2
src, out = sys.argv[1], sys.argv[2]
w, h, rate, fps = probe(src)
beats = np.round(beat_times(src) * fps) / fps # line each beat up with a video frame
reader = subprocess.Popen(["ffmpeg", "-v", "error", "-i", src, "-f", "rawvideo", "-pix_fmt", "rgb24", "-"],
stdout=subprocess.PIPE)
writer = subprocess.Popen(["ffmpeg", "-v", "error", "-y", "-f", "rawvideo", "-pix_fmt", "rgb24", "-s", f"{w}x{h}",
"-r", rate, "-i", "-", "-i", src, "-map", "0:v", "-map", "1:a?", "-c:v", "libx264",
"-crf", "18", "-pix_fmt", "yuv420p", "-c:a", "copy", "-shortest", out], stdin=subprocess.PIPE)
i = 0
while True:
raw = reader.stdout.read(w * h * 3)
if len(raw) < w * h * 3:
break
img = np.frombuffer(raw, np.uint8).reshape(h, w, 3)
z = zoom_at(i / fps, beats)
scale = np.float32([[z, 0, (1 - z) * w / 2], [0, z, (1 - z) * h / 2]]) # scale up about the center
writer.stdin.write(cv2.warpAffine(img, scale, (w, h), flags=cv2.INTER_LINEAR).tobytes())
i += 1
writer.stdin.close()
reader.wait()
sys.exit(writer.wait())





