Editing Saree Brand Reels
Default toolchain: FFmpeg + librosa (Python) for analysis and render. If the user specifies DaVinci Resolve, Premiere, or CapCut, apply the same decisions manually.
Bash# 1. Inventory inputs ffprobe -v error -show_entries stream=width,height,r_frame_rate,duration -of csv clips/*.mp4 # 2. Detect beats python - <<'EOF' import librosa, json y, sr = librosa.load("track.mp3") tempo, beats = librosa.beat.beat_track(y=y, sr=sr, units="time") print(json.dumps({"bpm": float(tempo), "beats": beats.tolist()[:40]})) EOF
Then: choose the track segment, build a cut list on beat timestamps, stabilize, grade, assemble, add logo outro, export 1080x1920 H.264.
Progress:
- [ ] Step 1: Inventory footage, track, logo
- [ ] Step 2: Analyze track and select segment
- [ ] Step 3: Triage and stabilize clips
- [ ] Step 4: Build beat-synced cut list
- [ ] Step 5: Apply color grade
- [ ] Step 6: Add transitions
- [ ] Step 7: Build logo outro (upscale if needed)
- [ ] Step 8: Export and QA
Step 1: Inventory
- Record each clip's resolution, fps, duration, and shot type (full drape, pallu detail, border/zari closeup, motion/twirl, fabric texture, model portrait, flat-lay).
- Target format: 1080x1920, 9:16, 30fps (use 24fps only if all footage is 24fps and a filmic look is wanted). Reframe landscape clips with a 9:16 crop that keeps the full saree drape in frame; never stretch.
- Check the logo: if shorter side is under 1000px or visibly soft, flag for upscale in Step 7.
Step 2: Analyze track and select segment
- Run beat detection to get BPM, beat times, and downbeats. Also compute an energy curve (RMS) to find the drop or strongest phrase.
- Segment rule: use only the portion needed. Target 15-25s total (reels perform best under 30s). Pick a segment that:
- Starts on a downbeat (bar boundary), ideally just before a build or drop
- Ends on a bar boundary or natural phrase end, never mid-phrase
- Leaves 2.0-2.5s at the end for the logo outro
- Trim with a 0.3-0.5s audio fade-out so the ending feels complete:
Bashffmpeg -ss <start> -t <dur> -i track.mp3 -af "afade=t=out:st=<dur-0.5>:d=0.5,loudnorm=I=-14:TP=-1" segment.wav
Step 3: Triage and stabilize
- Reject clips with blur, heavy overexposure, or distracting backgrounds before editing.
- Stabilize only shaky clips (skip already-smooth gimbal shots; double stabilization causes warping on fabric):
Bashffmpeg -i in.mp4 -vf vidstabdetect=shakiness=6:accuracy=15 -f null - ffmpeg -i in.mp4 -vf vidstabtransform=smoothing=20:zoom=3:optzoom=0,unsharp=5:5:0.5 out.mp4
- Keep stabilization crop under ~5%. If warping appears on flowing fabric, lower
smoothingto 10 or use the clip as a short accent only.
Step 4: Build the beat-synced cut list
Detect pace first:
- Fast track (BPM >= 110): hook rules apply as written below.
- Slow track (BPM < 110): cut on every 2nd beat (or every beat only if BPM is 90-109); skip the rapid hook and open with one confident hero shot.
Seconds 0-3 (hook): Cut on every beat (or every half-beat if BPM > 140). Use 4-6 of the most visually striking shots: pallu swirl, zari closeup, fabric motion, bold color pop. Each shot lasts exactly one beat interval. Cut frames must land on the beat timestamp, within ±1 frame.
After 3s (reveal): Shift to cuts on every 2nd or 4th beat (one bar or half-bar). Target shot lengths:
- Full-saree reveal shots: 1.5-2.5s minimum so viewers see the entire drape
- Detail shots (border, weave, embroidery): 0.8-1.2s
- Never hold a shot under 0.6s after the hook
Shot order for the full reel:
- Hook burst (0-3s): strongest motion and detail
- Hero full-length shot of the lead saree (on the first downbeat after 3s)
- Alternate: detail, full drape, motion, detail, full drape
- Peak shot on the drop or highest-energy moment
- Closing wide shot, then logo
B-roll rule: each clip is used once. Track used clips in a manifest:
JSON{"clip_07.mp4": {"used": true, "at": "00:04.2", "in": 1.2, "out": 3.4}}
If there is more footage than runtime, pick the best; if less, trim clips into distinct, non-overlapping sub-segments only when the user permits. Otherwise shorten the reel rather than repeat. Warn the user if footage runs out.
Frame-accurate cuts: convert beat times to frames (frame = round(t * fps)) and cut at those frames rather than at raw seconds.
Step 5: Color grade
Goal: premium, warm, rich, skin-flattering, with saturated but not neon fabric colors.
Baseline grade (apply uniformly to every clip for cohesion):
- Lift shadows slightly (matte feel): blacks at ~5-8%
- Warm highlights, neutral mids; gentle teal-leaning shadows only for contrast
- Contrast: +10-15% with a soft S-curve
- Saturation: +8-12% overall, then pull back any clip where silk or zari clips (reds, magentas, golds are the usual offenders)
- Protect skin tones: keep hue near the skin line and avoid orange push
- Fine film grain at 3-5% and mild bloom on highlights for zari shimmer
Bashffmpeg -i in.mp4 -vf "eq=contrast=1.12:saturation=1.1:gamma=0.97,curves=preset=medium_contrast,colorbalance=rs=-0.03:bs=0.04:rh=0.04:bh=-0.03,noise=alls=6:allf=t" graded.mp4
Use a LUT (lut3d=premium_warm.cube) if the user supplies one; it overrides the baseline above. Match exposure and white balance across clips before grading so the LUT behaves consistently.
Step 6: Transitions
Transitions are a main visual effect, so use them deliberately and keep them beat-aligned:
- In the hook (0-3s): hard cuts plus micro-effects on the beat: quick zoom punch (105-110% over 4-6 frames), whip-pan, or flash frame (2 frames white at 30% opacity). No long dissolves.
- After 3s: smooth, motion-driven transitions: fabric-wipe (match a swirling pallu to cover the frame and reveal the next shot), whip-pan, speed-ramped push-in, or short cross-dissolve (6-10 frames) on slow shots.
- Transition midpoint falls on the beat; the effect spans a few frames either side.
- Limit to 2-3 transition styles across the reel for a cohesive, premium feel. Avoid stock star-wipes, spins, or glitch effects.
Step 7: Animated logo outro
- Duration: 2.0-2.5s, starting on a downbeat or the final bar. Background: a clean dark or brand-colored plate, or a soft blurred last frame.
- If the logo is blurry or under 1000px, upscale before animating:
Bash# AI upscale (preferred) realesrgan-ncnn-vulkan -i logo.png -o logo_4k.png -s 4 # Fallback ffmpeg -i logo.png -vf "scale=3840:-1:flags=lanczos,unsharp=5:5:0.8" logo_4k.png
Work in 4K for the logo asset, then scale to project resolution at comp time. Vector logos (SVG/AI) need no upscale; render at the target size. If the logo has a transparent background, preserve alpha (PNG, not JPG).
- Animation: gentle scale-in (92% to 100%) with fade and a light shimmer sweep, plus a soft audio "tail" from the track. Add the tagline or handle below only if the user supplied one.
- Hold the final logo still for at least 1.0s.
Step 8: Export and QA
Bashffmpeg -i assembled.mp4 -i segment.wav -c:v libx264 -preset slow -crf 17 -pix_fmt yuv420p \ -vf "scale=1080:1920" -r 30 -c:a aac -b:a 256k -movflags +faststart reel.mp4
QA checklist:
- Cuts land on beats in the hook (scrub frame by frame)
- No clip appears twice
- Every full-saree shot is held long enough to read the whole drape
- No warping or jitter from stabilization
- Colors consistent across clips; skin natural; zari not clipped
- Audio ends cleanly; no pop at the trim point
- Logo sharp at full-screen; text within the safe zone (keep key content out of top 250px and bottom 400px for platform UI)
- Total length under 30s
Example 1: Input: 14 clips (mixed 4K and 1080p), a 128 BPM Bollywood-electronic track, a 600px JPG logo, brief: "festive silk collection, premium feel." Output: 22s reel. Segment taken from 0:38 (a build into the drop) through 1:00 with a 0.5s fade. Hook: 6 cuts at 0.47s each on every beat (pallu swirl, zari macro, borders, twirl). Shots from 3s onward are 1.9-2.4s on full drapes, with 0.9s detail inserts between. 11 of 14 clips used (3 rejected as blurry), each once. Warm matte grade, fabric-wipe transitions. Logo upscaled 4x via Real-ESRGAN, animated over 2.2s. Exported 1080x1920 H.264.
Example 2: Input: 6 clips, a slow 82 BPM instrumental, vector SVG logo. Output: 16s reel. Slow track so no rapid hook: opens on a single hero reveal, then cuts every 2nd beat (~1.5s). Longer cross-dissolves and slow push-ins. All 6 clips used once, no repeats. Logo rendered directly from SVG with no upscale. Reel shortened to 16s rather than repeating footage.
- Lead with the most visually arresting motion in the first 3 seconds, not a logo or title.
- Show the saree's full silhouette at least once for each design featured, because buyers judge drape, length, and border together.
- Alternate wide and close shots to build rhythm: wide, detail, wide, motion.
- Cut on movement (a turn, a pallu lift) so edits feel invisible.
- Normalize audio to about -14 LUFS for social platforms.
- Add burned-in captions only if requested; the reel should work silent-with-music as a visual piece.
- Export a manifest (cut list with timestamps, clips used, BPM, beat grid) so the user can request adjustments.
- Cutting between beats. Off-beat cuts in the hook are the fastest way to make the edit feel amateur.
- Keeping the fast cadence all the way through. Viewers then never see the full saree; slow down after 3s.
- Repeating a clip to fill time. Shorten the reel or ask for more footage instead.
- Over-stabilizing flowing fabric, which causes jelly warping.
- Over-saturating reds and golds, which crushes zari detail and turns silk plasticky.
- Using the whole track. Take only the segment that forms a complete arc, with a clean ending.
- Stretching a low-res logo or exporting it as JPG with a white box. Upscale properly and keep transparency.
- Too many transition styles, which reads as template-y rather than premium.
- Ignoring platform safe zones, so UI covers the logo or product.
- Asking the user to pick timestamps. Detect beats and choose the segment, then report the choices so they can override.
If the supplied footage is large or the project needs separate stages, split into analyze_track.py, stabilize.sh, grade.sh, and assemble.py files rather than a single long script.