Seamless Looper
Create seamless looping versions of ambient/background videos with smooth crossfade transitions at the junction.
Limitations: Output is visual-only (no audio). Input must be MP4. Videos under 2 seconds are skipped.
Quick Start
cd ~/.openclaw/skills/seamless-looper
bash scripts/loop.sh <source_dir> <output_dir> [crossfade_seconds]
Example:
bash scripts/loop.sh ~/Videos/ambient ~/Videos/looped 1
- Source dir must contain
.mp4 files
- Output dir created automatically
- Default crossfade: 1 second
Output
Looped files saved as <filename>_looped.mp4 in the output directory.
How It Works
- Takes each
.mp4 in source dir
- Doubles the video (original + original via stream_loop)
- Applies crossfade at the junction point (fade out tail, fade in head)
- Outputs
<filename>_looped.mp4 — seamless loop of the original duration
Requirements
ffmpeg (with libx264 and overlay filter support)
ffprobe (for duration detection)
Install on macOS: brew install ffmpeg
Tips
| Use Case | Crossfade |
|---|
| Fast cuts, high motion | 0.5s |
| Default ambient | 1s |
| Slow fades, nature footage | 2s |
| Very slow drift | 3s |
Limitations
- Input must be
.mp4
- Videos <2s duration are skipped
- No audio looping (visual-only output)
- Output duration = 2x input duration
File Structure
seamless-looper/
├── SKILL.md ← you are here
├── scripts/
│ └── loop.sh ← main loop script
└── references/
└── tips.md ← use cases + crossfade presets