{"slug": "claude-skill-makes-edits-synced-to-song-beat", "title": "Claude Skill Makes Edits Synced to Song Beat", "summary": "A new open-source Claude Code skill from developer Ziad Abdelkarim automatically syncs video edits to a song's beat, analyzing audio with librosa, tagging scenes with PySceneDetect, and rendering beat-accurate cuts with ffmpeg effects. The pipeline runs four stages—beat_map.py, clip_tag.py, plan_edit.py, and render_edit.py—and supports custom cut density, aspect ratios, and reference-based color grading, with demos available in the repository's examples folder.", "body_md": "Automatic beat-synced video editing.\n\nFeed it a song and raw footage. It analyzes the beats, maps the energy, tags every scene, and cuts a ready-to-post edit — zero manual editing.\n\n## preview_flash-montage-1x1.mp4\n|\n## preview_sealife-beat-edit-9x16.mp4\n|\n\nFull-quality versions of both demos live in [ examples/](/ZiadAbdelkarim/beat-synced-edit/blob/main/examples).\n\nRun the four stages yourself. Same inputs, same edit, every time.\n\nThe repo ships a skill at `.claude/skills/beat-sync-edit/SKILL.md`\n\n. Open this folder in [Claude Code](https://claude.com/claude-code) and describe the edit you want:\n\n\"cut my footage to the chorus, white flash on every drop, space the cuts out so the shots breathe, then make it 9:16\"\n\nClaude runs the same pipeline and layers ffmpeg effects at beat-accurate timestamps — white flashes, stretch punches, hue shifts, RGB split, speed ramps, shakes, color grades. The full effects cookbook lives in the skill file.\n\nIn conversation you can also dictate:\n\n**Aspect ratio**— 9:16 vertical, 1:1 square, stacked over-under, or leave it 16:9** Cut density**— \"a cut on every beat\" vs \"spaced out, let the shots breathe\"** Hue / tint by reference**— point Claude at any other video on your machine (\"grade it like this one\") and it will sample frames from the reference and build a matching color grade; with the Claude-in-Chrome extension it can even study a look from a video on the web\n\n```\nsong.mp3  ──►  beat_map.py    ──►  beats, energy curve, peaks/valleys (JSON)\nclips.mp4 ──►  clip_tag.py    ──►  scenes tagged by motion/energy/brightness (JSON)\nboth      ──►  plan_edit.py   ──►  edit decision list: which clip hits which beat\nEDL       ──►  render_edit.py ──►  final MP4 (extract → concat → mux audio)\n```\n\n| Stage | What it does |\n|---|---|\n`beat_map.py` |\nlibrosa audio analysis — beat timestamps, tempo, energy over time, peaks/valleys, best highlight segments |\n`clip_tag.py` |\nPySceneDetect scene detection + per-clip motion/energy/brightness scoring; `--thumbs` exports a labeled contact sheet |\n`plan_edit.py` |\nthe matcher — high-energy clips land on energy peaks, calm clips on valleys, with anti-repetition, source spacing, and black-frame filtering |\n`render_edit.py` |\nffmpeg assembly; `--overunder` emits a stacked 960×1080 variant |\n`vertical_style.py` |\nfits 16:9 output into 9:16 with a stylized squeeze + grade for TikTok / Reels / Shorts |\n`flash_montage.py` |\nthe white-flash montage template — 1:1 edits from stills and/or video clips with `fadewhite` transitions, punch-ins, and handheld sway (see below) |\n\n```\npip install -r requirements.txt   # ffmpeg must be on PATH (brew install ffmpeg)\n\npython3 beat_map.py song.mp3\npython3 clip_tag.py footage.mp4 --thumbs\npython3 plan_edit.py song_beatmap.json footage_clips.json --html\npython3 render_edit.py footage_edl.json -a song.mp3 -v footage.mp4\n```\n\nAll creative control lives in `plan_edit.py`\n\n:\n\n| Flag | Effect |\n|---|---|\n`--beat-stride N` |\nCut density. `1` = a cut on every beat (default). `2` + keeps every Nth beat — fewer, longer cuts that breathe, for slow or contemplative footage |\n`--full` |\nEdit the whole song instead of the best-scoring segment |\n`--segment 2` |\nUse the second (or third) best highlight segment |\n`--exclude '1,6,0-30'` |\nDrop clips by id or source time range |\n`--lead '2:18,5'` |\nForce the opening cuts, in order |\n`--pin '8=138,peak2=22'` |\nPin a clip to a specific beat, peak, or valley |\n\nA useful convention when comparing densities: render both and suffix them `_beat-full`\n\nand `_beat-thinned`\n\n.\n\nThe square demo above is a montage: each scene holds for a couple of beats (about 2.8 seconds in the demo), then blooms into the next through a white flash. You make one by describing it.\n\nOpen this folder in [Claude Code](https://claude.com/claude-code), point it at your song and a folder of clips or photos, and say what you want:\n\n\"make a white-flash montage from these six clips — punch in on each animal, flashes about a second long\"\n\n\"use still frames instead of the moving clips, and give them a little handheld shake\"\n\n\"quicker flashes, and end it on a fade to white\"\n\nClaude picks the moments from each clip, frames each subject, times the scenes to your song, and renders the finished 1:1 video. Scenes can be video clips or still photos — stills get a subtle handheld sway so they don't look frozen — and the flash length is whatever you ask for.\n\nPrefer the command line? `python3 flash_montage.py --seq seq.json --audio song.wav --out montage.mp4`\n\n— the `seq.json`\n\nformat is documented at the top of the script.\n\n- Python 3.10+\n- ffmpeg on PATH\n`pip install -r requirements.txt`\n\n— librosa, PySceneDetect, OpenCV, NumPy", "url": "https://wpnews.pro/news/claude-skill-makes-edits-synced-to-song-beat", "canonical_source": "https://github.com/ZiadAbdelkarim/beat-synced-edit", "published_at": "2026-08-10 09:30:51+00:00", "updated_at": "2026-08-10 09:44:00.042357+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "developer-tools"], "entities": ["Ziad Abdelkarim", "Claude Code", "librosa", "PySceneDetect", "ffmpeg"], "alternates": {"html": "https://wpnews.pro/news/claude-skill-makes-edits-synced-to-song-beat", "markdown": "https://wpnews.pro/news/claude-skill-makes-edits-synced-to-song-beat.md", "text": "https://wpnews.pro/news/claude-skill-makes-edits-synced-to-song-beat.txt", "jsonld": "https://wpnews.pro/news/claude-skill-makes-edits-synced-to-song-beat.jsonld"}}