Editing Saree Brand Reels
Bash# 1. Audio: download ONLY from a URL the user supplied and has rights to use yt-dlp -x --audio-format wav -o "audio_full.%(ext)s" "<REFERENCE_URL>" # 2. Detect beats python -c " import librosa, json y, sr = librosa.load('audio_full.wav') tempo, beats = librosa.beat.beat_track(y=y, sr=sr, units='time') json.dump({'tempo': float(tempo), 'beats': beats.tolist()}, open('beats.json','w')) print(f'BPM: {float(tempo):.1f}, beats: {len(beats)}') " # 3. Stabilize each clip (two-pass vidstab) ffmpeg -i clip.mp4 -vf vidstabdetect=shakiness=6:accuracy=15 -f null - ffmpeg -i clip.mp4 -vf vidstabtransform=smoothing=20:zoom=2,unsharp=5:5:0.8 stab_clip.mp4
Then assemble, grade, add the logo outro, and export per the workflow below.
Progress:
- [ ] Step 1: Inventory assets (clips, logo, audio source)
- [ ] Step 2: Acquire audio, flag rights status
- [ ] Step 3: Trim the audio to the best segment
- [ ] Step 4: Detect beats, build the cut grid
- [ ] Step 5: Stabilize shaky clips
- [ ] Step 6: Normalize clips (resolution, fps, orientation)
- [ ] Step 7: Assemble beat-synced timeline with transitions
- [ ] Step 8: Apply color grade
- [ ] Step 9: Prepare logo (upscale if blurry)
- [ ] Step 10: Build the black fade + logo reveal outro
- [ ] Step 11: Mux audio continuously, export, verify
Step 1: Inventory
List clips with ffprobe. Record resolution, fps, duration, and rotation. Confirm the logo file (prefer PNG with transparency, or SVG). Target output: 1080x1920, 30fps, H.264, 9:16.
Step 2: Audio acquisition
Use the reference URL the user gave. If the audio is commercial music, note in the handoff message that Instagram/YouTube may mute or claim it on a brand account, and that using the platform's native audio library at upload time is the safest route for a commercial account. Do not block on this; proceed and mention it once at the end.
Step 3: Choose the audio segment
Target 15-30s total, ending on a natural musical resolution. Pick the segment by energy, not by arbitrary timestamps:
Pythonimport librosa, numpy as np y, sr = librosa.load('audio_full.wav') rms = librosa.feature.rms(y=y)[0] hop = 512 times = librosa.frames_to_time(np.arange(len(rms)), sr=sr, hop_length=hop) # Find the highest-energy 20s window; snap start/end to nearest beats win = int(20 * sr / hop) scores = np.convolve(rms, np.ones(win), 'valid') start = times[scores.argmax()]
Snap start to the nearest beat, then end on a beat or downbeat. Trim with a short fade:
Bashffmpeg -ss $START -t $DUR -i audio_full.wav -af "afade=t=in:d=0.3,afade=t=out:st=$(echo "$DUR-1.5"|bc):d=1.5" audio_cut.wav
The fade-out should land during the logo reveal, not before it, so the track carries through.
Step 4: Beat grid
Cut on beats, not between them. Defaults:
- Fast sections: cut every 2 beats
- Slower or emotional sections: cut every 4 beats (one bar)
- Put the strongest clip on the first downbeat
- Reserve the final ~2.5s of the audio for the logo outro
Compute clip durations from beats.json: duration[i] = beats[i+n] - beats[i].
Step 5: Stabilization
Only stabilize clips that need it (visible handheld shake). Two-pass vidstab as in Quick Start. Defaults: smoothing=20, zoom=2. If the clip crops too aggressively, lower smoothing to 12. For extreme shake, add optzoom=1. Clips shot on a tripod or gimbal: skip.
Step 6: Normalize clips
Bashffmpeg -i in.mp4 -vf "scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,fps=30,setsar=1" -an norm.mp4
For landscape footage, use a slow punch-in (Ken Burns) instead of a static crop so it feels intentional:
zoompan=z='min(zoom+0.0008,1.15)':d=1:s=1080x1920:fps=30
Step 7: Timeline and transitions
Main visual effects are grading and smooth transitions. Use these, in order of preference:
| Transition | FFmpeg xfade | Use for |
|---|---|---|
| Soft dissolve | fade | Calm, fabric-flow shots |
| Directional wipe | slideleft / wipeleft | Beat hits, energy |
| Whip feel | smoothleft | Dance/movement cuts |
| Radial | circleopen | Reveal moments (use once) |
Rules:
- Transition duration: 0.25-0.4s, centered on the beat
- Pick 2 transition types max per reel for consistency
- Use
fadeon slow bars,slideleftorsmoothlefton bar boundaries
Bashffmpeg -i a.mp4 -i b.mp4 -filter_complex \ "xfade=transition=smoothleft:duration=0.3:offset=$OFFSET" out.mp4
Offset = (cumulative duration of prior clips) minus (transition duration).
Step 8: Color grade
Saree reels need rich, warm, skin-flattering color with preserved fabric detail. Apply one consistent grade across all clips.
Default "Premium Warm" grade:
Bash-vf "eq=contrast=1.08:saturation=1.18:gamma=0.97,\ colorbalance=rs=0.04:gs=0.0:bs=-0.04:rm=0.05:gm=0.01:bm=-0.03:rh=0.03:bh=-0.02,\ curves=preset=medium_contrast,\ vignette=PI/6"
Optionally add subtle film grain (noise=alls=6:allf=t) and a gentle bloom (blend a blurred copy at 15% opacity in screen mode).
Guidelines:
- Protect skin tones: if skin goes orange, reduce the
rm/rsvalues - Keep fabric colors accurate: never shift hue on the saree itself. If a saree is a specific color (e.g., emerald), verify it still reads emerald after grading
- Apply the grade after assembly so transitions are graded uniformly
- If clips have mismatched exposure, normalize first with
normalize=blackpt=black:whitept=whiteoreq=brightness
Step 9: Logo preparation
Check the logo's resolution. If under ~2000px wide or visibly soft, upscale:
Bash# Preferred: AI upscale (Real-ESRGAN), then verify realesrgan-ncnn-vulkan -i logo.png -o logo_4k.png -s 4 -n realesrgan-x4plus # Fallback: Lanczos ffmpeg -i logo.png -vf "scale=3840:-1:flags=lanczos,unsharp=5:5:0.6" logo_4k.png
Preserve transparency (PNG, -pix_fmt rgba). If the logo is vector (SVG), render it directly at 4K instead of upscaling.
Place the logo at ~60-70% of frame width, centered, on a pure black background.
Step 10: Black fade + logo reveal outro
Sequence (about 2.5s total):
- 0.0-0.6s: Last clip fades to black (
fade=t=out:d=0.6:color=black), a "black shadow" that rolls in. For extra polish, animate a soft vignette closing inward before the full fade. - 0.6-1.0s: Hold pure black (the beat of silence in the visuals; the audio keeps playing).
- 1.0-2.2s: Logo reveals with a polished animation.
- 2.2-2.5s+: Hold the logo, then end.
Logo animation (default): fade-in + slow scale-up (0.92 to 1.0) with a soft glow pulse:
Bashffmpeg -f lavfi -i color=c=black:s=1080x1920:d=2.5:r=30 -loop 1 -i logo_4k.png -filter_complex \ "[1:v]scale=864:-1,format=rgba,\ fade=t=in:st=1.0:d=0.9:alpha=1,\ zoompan=z='0.92+0.08*min(1,on/45)':d=75:s=864x864:fps=30[lg];\ [0:v][lg]overlay=(W-w)/2:(H-h)/2:enable='gte(t,1.0)'" outro.mp4
Alternatives if the brand is more dramatic: light-sweep shine across the logo (animated gradient mask) or a letter-by-letter wipe reveal.
Audio at the logo: do not add a whoosh, hit, or any sound effect. The same soundtrack continues underneath; only its fade-out (from Step 3) shapes the ending.
Step 11: Final mux and export
Bash# Concatenate graded timeline + outro, then attach the single audio track ffmpeg -i timeline_graded.mp4 -i outro.mp4 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[v]" -map "[v]" video_full.mp4 ffmpeg -i video_full.mp4 -i audio_cut.wav -map 0:v -map 1:a \ -c:v libx264 -preset slow -crf 17 -pix_fmt yuv420p \ -c:a aac -b:a 256k -shortest -movflags +faststart reel_final.mp4
Verify: audio length equals video length, no gap or restart at the outro, the first downbeat lands on a cut, and the file opens at 1080x1920.
Input: 9 saree clips (3 shaky handheld), brand logo at 600px (blurry), reference URL to a 3-min song at 112 BPM.
Output:
- Audio: 22s segment starting on a downbeat, 1.5s fade-out into the logo
- Beat grid: 2-beat cuts (about 1.07s) in the chorus, 4-beat cuts in the intro
- 3 handheld clips stabilized (
smoothing=20); 6 gimbal clips untouched fadeon slow bars,smoothlefton bar boundaries,circleopenonce at the drop- Premium Warm grade; emerald saree verified hue-accurate
- Logo upscaled 600px to 3840px via Real-ESRGAN
- Outro: 0.6s black fade, 0.4s hold, 1.2s logo scale-in, soundtrack unbroken
- Export:
reel_final.mp4, 1080x1920, 30fps, about 22s
- Cut on the beat, transition across it: the cut point sits on the beat, with the xfade centered around it
- Lead with the hero shot: best-looking saree drape on the first downbeat
- Vary shot scale: alternate wide, medium, detail (pleats, border, pallu) for rhythm
- Show fabric motion: flowing, twirling, and wind shots sell sarees; hold on them an extra beat
- One grade, one look: consistency reads as premium
- Keep text off: the brief calls for grading and transitions as the main effects
- Check the first 1.5 seconds: it decides whether viewers keep watching
- Over-stabilizing: heavy smoothing causes warp and crops out the garment; lower
smoothingif edges stretch - Cutting off-beat: even 100ms drift feels sloppy; always snap to detected beats
- Mixing 3+ transition types: looks amateur; stick to two
- Grading away the saree color: brand-accurate fabric color matters more than a stylized look
- Adding a logo SFX or restarting audio: the soundtrack must run continuously through the reveal
- Upscaling a JPEG logo with artifacts: request a PNG/SVG from the brand if possible; AI upscale amplifies compression noise
- Ignoring music rights: a commercial song on a brand account can get muted or claimed; flag this once and suggest the platform's licensed audio library for publishing
- Wrong aspect ratio: always deliver 9:16 vertical for Reels
- Letting audio outlast the video (or vice versa): use
-shortestand verify the durations match