When should you use it?
- Your agent builds marketing or launch videos as code (Remotion or similar) and the edit feels off the music
- You have a licensed music track and a scene list with rough timings
- You want consistent pacing across a series of short promo videos
Not for: Tracks you do not have the rights to use; Footage edited in a timeline app where the agent cannot move the cuts
What do you need, and what do you get?
You need
- A music file you are licensed to use
- The video project or a scene list with start times
- Frame rate of the final render
You get
- Detected tempo and beat times
- A cut list with old and new times and how many frames each cut moved
- The reveal timed to the drop, plus subtle kick-driven zoom settings
How does it work, step by step?
- Choose the music yourselfPick a track you hold the rights to and put it in the project folder; the agent only places it.
- Map the beatsHave the agent run librosa on the file and report the tempo, beat timestamps and the loudest change in the song.
- Snap the scene changesMove each scene boundary to the nearest beat, favoring bar starts every four or eight beats rather than every beat, and stretch the animation between them slightly.
- Time the reveal and add motionPlace the product reveal on the drop and add a roughly 1% zoom pulse on kicks.
- Check by earWatch the opening seconds with sound; if one cut lands late, ask the agent to nudge only that cut by a few frames.
The prompt
The original prompt by @Pashoke1, word for word, with a link to where it was published. Below it is our adapted version with fill-in blanks, if you want it. Works in Claude Code, Claude, ChatGPT and others. Values in lime are placeholders.
Original prompt by @Pashoke1
Here's my track: ./audio/track.mp3. Detect the BPM and every beat with librosa. Find the biggest drop. Move every scene cut onto a beat. Land the drop on the product reveal. Punch the frame 1% on each kick.
Exactly as published by @Pashoke1 in Post on cutting AI-built videos on the beat.
Our adapted version (optional)
Fill in the blanks (optional; the copied prompt uses your values)
Use {music_file} (I hold the rights) as the soundtrack for {video_project}, rendered at {fps} fps. Analyze the audio with librosa: report the tempo, the beat times and the moment the song gets loudest. Before changing anything, confirm the beats line up with the kick drum, not the hi-hats; if they are off by about half a beat, track the low-frequency band instead and show me the corrected times. Then move each scene change to the nearest bar start, about every {cut_every} beats, and put {key_moment} on the loudest moment. Add a 1% zoom pulse on kicks. Show a table of each cut: old time, new time and frames moved. Keep the previous version so I can compare.
What can go wrong?
- Beat detection can lock onto hi-hats or off-beats and land every cut half a beat late; in our dry run it did, so check the first few beats against the kick drum before snapping.
- Cutting on every single beat at dance-music tempos feels frantic; space cuts four or eight beats apart.
- Music rights are on you: use royalty-free or licensed tracks only.
Our take
A small, practical trick for anyone using an AI coding agent to build promo videos: music timing is where these videos usually look amateur, and the fix is plain measurement. The prompt works because each instruction is checkable, so you can confirm the tempo, the drop time and each moved cut. We ran it on a synthetic 124 BPM track with a quiet intro, a drop at about 16 seconds and a seven-scene mock product video. Beat tracking out of the box reported 123 BPM but locked onto the hi-hats, so every beat sat about a quarter second late; tracking the low-frequency kick band instead brought the error under 30 milliseconds, and onset detection found the drop within 15 milliseconds. Our adapted prompt asks the agent to show that alignment check before it moves anything. The poster's own advice to space cuts four or eight beats apart and to fix stray cuts one at a time held up in our run.
Where the time goes back: Finding beats and moving each cut by hand is fiddly timeline work; here the agent produces a frame-exact cut list in one pass and you only review it.
FAQ
Do I need to know audio editing?
Does this work outside Remotion?
Source and credit
The original prompt on this page is by @Pashoke1, shown word for word with a link to where it was published. The summary, notes and adapted version are ours.
- Original
- Post on cutting AI-built videos on the beat
- Creator
- Yaori (@Pashoke1)
- Published on
- X
- Original date
- Oct 20, 2026
- License
- Not openly licensed; the original prompt is shown word for word with credit and a link to the original
- Originally for
- Claude Code
- AI dry run
- Oct 21, 2026: passed. Dry-run tested by our AI test agent on sample input. Real audio analysis run; method works with the alignment check, which we added to our adapted prompt and pitfalls.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.