Editing Beat Synced Brand Reels
Editing Beat-Synced Brand Reels
Run this pipeline in order. Do not skip the analysis step.
Bash# 1. Audio analysis: BPM, beat grid, energy envelope python - <<'EOF' import librosa, numpy as np y, sr = librosa.load("track.wav", sr=None) tempo, beats = librosa.beat.beat_track(y=y, sr=sr, units="time") rms = librosa.feature.rms(y=y)[0] print("BPM:", float(np.atleast_1d(tempo)[0])) print("First 12 beats (s):", np.round(beats[:12], 3)) np.save("beats.npy", beats) EOF # 2. Stabilize (two-pass vid.stab) ffmpeg -i in.mp4 -vf vidstabdetect=shakiness=6:accuracy=15 -f null - ffmpeg -i in.mp4 -vf vidstabtransform=smoothing=20:zoom=2,unsharp=5:5:0.8 -c:v libx264 -crf 14 stab.mp4 # 3. Palette extraction from reference frames ffmpeg -i reference.mp4 -vf "fps=1,scale=320:-1" ref_%03d.png # then k-means (k=5) on the frames to get dominant colors + luma/saturation stats
The brief asks to download and reuse the exact audio from a reference reel. Handle this before editing:
- Use the audio only if the user supplies the file, or confirms they hold the license (own it, or it comes from a platform library cleared for commercial brand use). Music in a reference reel is usually licensed for that creator's account only.
- If the track is a trending Instagram/TikTok sound, import it inside the platform's native editor when posting rather than baking it into an exported file. This keeps it cleared for brand/business accounts or flags that it is not.
- Brand accounts frequently face stricter music restrictions than personal accounts. If uncertain, recommend a library track with a similar BPM and mood.
- Never strip or bypass platform protections to extract audio. If the user provides the file directly, proceed.
State this check in one line to the user, then continue working with the file they provide.
Progress:
- [ ] 1. Analyze reference: music (BPM, key mood, energy arc, drops) and color palette
- [ ] 2. Choose the track segment (complete-feeling arc, clean in/out on a downbeat)
- [ ] 3. Build the beat grid and the cut plan
- [ ] 4. Log and triage footage (one use per B-roll clip)
- [ ] 5. Stabilize shaky clips
- [ ] 6. Assemble: hook (0-3s) -> detail close-ups -> full-saree reveal -> showcase -> logo
- [ ] 7. Color grade to the extracted palette
- [ ] 8. Add transitions and non-footage visual effects
- [ ] 9. Logo: upscale to 4K if soft, animate, hold music through it
- [ ] 10. Audio finish, export, QC against checklist
Step 1: Analyze the Reference
Music - report these, concisely:
- BPM and feel (half-time vs. double-time), time signature
- Energy arc: intro, build, drop/peak, outro, with timestamps
- Mood descriptors (e.g., "soft festive, tabla + synth pad, 92 BPM")
- Cut density of the reference (average shot length vs. beat length)
Color palette - report:
- 5 dominant hex values plus the skin-tone/fabric-safe range
- Contrast character (lifted blacks? crushed?), saturation level, highlight roll-off
- Temperature bias (warm gold, cool pastel, jewel-tone rich)
- Grain/halation/bloom use
Summarize in a short "Style Card" and apply it consistently for the rest of the edit.
Step 2: Select the Track Segment
Use only as much track as the reel needs (target 15-30s unless told otherwise).
- Start on a downbeat or the pickup into one.
- Pick the section containing the most recognizable hook or build-to-peak.
- End on a phrase boundary, not mid-bar. Reserve the last 2.5-3.5s of music for the logo.
- Apply a 0.3-0.5s fade only if the track's natural end is not used.
Step 3: Beat Grid and Cut Plan
Convert beat times to frames: frame = round(beat_time * fps). Snap every cut to a beat (or half-beat) frame. Cuts land on the beat, not after it.
| Section | Time | Cut rhythm |
|---|---|---|
| Hook | 0-3s | Fast track: cut on every beat (or every half-beat at <100 BPM). Slow track: every 2 beats. |
| Detail sequence | 3-8s | Every 2 beats, 1-1.5s per shot |
| Full-saree reveal | next 2-4 beats | Hold one shot for 2-4 beats, longest shot so far |
| Showcase | middle | Every 4 beats (2-3s) so the whole saree is readable; vary framing |
| Logo | final 3s | No cuts; music continues |
Rule for the post-hook section: smooth, beat-matched, never frantic. A viewer must see the drape, pallu, and border in at least one full-length shot.
Step 4: Footage Triage
- Build a shot log: clip ID, content (border / zari / pallu / pleats / full / walking / twirl), usable range, shake level.
- Each B-roll clip is used exactly once. Different segments of one long clip count as the same clip; use only one segment.
- If footage is insufficient for the planned cuts, shorten the reel or merge beats (cut every 2 beats). Never repeat a clip to fill time. Tell the user the shortfall.
- Reject: soft focus, blown highlights on fabric, unflattering mid-motion frames.
Step 5: Stabilize
- Run two-pass stabilization on any shaky clip (Quick Start command, or Warp Stabilizer / DaVinci stabilizer with "Smooth Motion").
- Use smoothing 15-25 and crop-to-fix; check for jello/warp on pleated fabric and fall back to a tighter smoothing or a lighter crop if distortion appears.
- Stabilize before speed ramps and before grading.
- Leave intentional handheld clips alone only if the user asks for that look.
Step 6: Assemble the Story Arc
- Hook (0-3s): Macro close-ups: zari border, woven motif, pallu edge, thread texture. Shallow depth of field, slow subtle motion. Cuts fall precisely on beats.
- Detail build (3-8s): Pleats, fabric flow, blouse-border match, texture contrast.
- Reveal: Pull-back, tilt-up, or fabric-sweep transition into the full saree, timed to the track's biggest build/drop beat.
- Showcase: Full-length drape, walking, turning, pallu flow. Hold each shot long enough to read the whole garment.
- Close: Hero shot, then transition into the logo.
Step 7: Color Grade
Match the Style Card from the reference.
- Order: normalize exposure, correct white balance (fabric color accuracy first), apply the creative look.
- Protect the saree's true color. Brand fabric hue must stay recognizable; shift the surroundings and skin tones toward the palette, not the product.
- Apply one look to all clips via an adjustment layer, then make small per-clip matches.
- Keep skin tones on the skin-tone line; avoid teal-orange extremes on silk and zari.
- Subtle finishing: soft bloom on highlights (gold zari glints), light grain (very low), gentle vignette.
Step 8: Transitions and Effects
Allowed (the main visual language):
- Whip pans and motion-matched swipes on beats
- Fabric/pallu-sweep wipes (use the saree itself as the wipe)
- Light leaks and soft flares as transitions between clips
- Speed ramps into/out of cuts (e.g., 100% to 60% into the reveal)
- Smooth zoom-through and match cuts on shape or color
- Subtle glow on transition frames
Keep beat effects out of the footage itself. No flashes, shakes, zoom punches, glitches, strobing, or color pulses on the imagery driven by the beat. The beat is expressed only through where the cuts land and through transitions between clips. Footage within a shot stays clean.
Limit to 1 transition style family per reel (e.g., fabric-sweep + light-leak) to keep it premium.
Step 9: Logo Outro
- Inspect the supplied logo. If soft, pixelated, or under ~2000px on the long edge, upscale to 4K (3840 px long edge):
If the logo is flat artwork, vectorizing (Illustrator Image Trace / Inkscape) beats upscaling.Bash# Preferred for raster logos: AI upscaler (Real-ESRGAN) realesrgan-ncnn-vulkan -i logo.png -o logo_4k.png -s 4 # Then clean edges / remove background halo; vectorize if it is flat-color artwork - Animate: gentle reveal (soft scale 96%->100%, fade, light sweep across the mark, or thread/zari-line draw-on). Duration 1.5-2.5s, then hold 1s.
- Background: blurred last frame, brand-color solid, or the palette gradient.
- Audio: the same music continues uninterrupted through the logo. No whoosh, hit, riser, or sting. Fade the music to the end only in the final ~0.5-1s if the track does not resolve naturally.
Step 10: Audio Finish and Export
- Normalize to about -14 LUFS integrated, true peak below -1 dBTP.
- No added sound design anywhere (music only), unless requested.
- Export: 1080x1920 (9:16), 30 or 60 fps matching the source, H.264 high profile, 15-20 Mbps, AAC 320k. Optional 4K vertical master (2160x3840) for archive.
- Add safe margins: keep logo and key details inside the center 1080x1350 region to avoid UI overlap.
Example 1: Input: Reference reel at 104 BPM (warm gold palette, tabla + synth). 14 clips: 6 macro border/zari, 3 pleats/drape, 5 full-saree. Logo is 600px PNG.
Output:
- Style Card: palette
#C8962E #7A1F2B #F2E3C6 #2B1A1F #D9B38C, lifted blacks, warm highlights, low grain. - Segment: 0:42-1:07 of the track (25s), starts on downbeat, resolves on a phrase end.
- Cut plan (beat = 0.577s): 0-3s = cuts on every beat (5 macro border/zari shots), 3-8s = every 2 beats (pleats, flow), reveal on the drop at beat 16 (held 4 beats / 2.3s), showcase every 4 beats, logo from 21.5s.
- 12 clips used once each; 2 clips (duplicate angles) unused. 3 clips stabilized (shakiness 6-8).
- Logo upscaled 600 -> 3840 px via Real-ESRGAN, edge-cleaned, animated with a zari light sweep (2s + 1s hold), music continuing, no SFX.
- Lock the cut plan on the beat grid before touching grade or effects.
- Contrast shot scale on adjacent cuts (macro to wide to medium) so beats feel varied.
- Hide cuts in motion: cut mid-pallu-swish or mid-turn for seamless flow.
- Show the saree's full silhouette for at least 2 seconds in total; brands need the full product visible.
- Preview the first 3 seconds on a phone with sound; the hook decides retention.
- Keep a version with captions burned in? Only if requested; otherwise leave text off.
- Cuts slightly after the beat. Even 2-3 frames late feels off; snap to the frame.
- Beat-driven effects on footage (flashes, shakes, zoom punches). Explicitly avoided in this brief.
- Reusing a B-roll clip to fill time. Shorten the reel instead.
- Over-grading the fabric. Customers judge color from the reel; do not shift saree hue.
- Stabilizing after the grade or ramp, which causes artifacts.
- Warp-stabilizer jello on pleats. Reduce smoothing or crop tighter.
- Sound effects under the logo. Music only.
- Using the whole track. Cut to the segment that feels complete.
- Extracting and publishing reference audio without clearance. Confirm rights or use the platform's in-app sound.
- Stretching a blurry logo with plain bicubic resize; use AI upscale or vectorize.