| name | video-loop |
| description | Create a looping background video — crossfade the loop point, encode optimized MP4 + WebM, optional poster frame. Use whenever the user has a video that needs to loop for web use (hero sections, backgrounds, landing-page ambience), wants to fix a visible jump at the loop point, or needs to optimize a clip for web delivery — even if they just say "make this loop smoothly" or "compress this for the site". |
| when_to_use | When the user has a video that needs to loop without visible artifacts on the web (hero sections, backgrounds), or when the end-to-start transition is visible and needs a crossfade fix, or when optimizing video assets for web delivery (MP4 + WebM). Keywords — loop, video, background, hero, seamless, crossfade, encode, webm, mp4, ffmpeg, compress video, optimize video. For audio loops use `/audio-loop` (sibling — parallel architecture, loudness + gapless FLAC + Web Audio snippet). Skip for audio processing, cuts/trimming beyond looping, or motion-graphics work. |
| argument-hint | <input.mp4> [options] — e.g. /video-loop hero.mp4 -d 1.5 |
| allowed-tools | Bash(ffmpeg *) Bash(ffprobe *) Bash(command *) Bash(bash *) Bash(stat *) Read |
| license | MIT |
| metadata | {"author":"coroboros","sources":["ffmpeg.org"]} |
Video Loop
Create a seamless looping background video from any source clip. A crossfade blends the last and first frames so the <video loop> transition is invisible, then the pipeline encodes web-optimized MP4 + WebM.
All ffmpeg work happens in scripts/video-loop.sh — this skill validates inputs, optionally helps pick a good fade duration, invokes the script, and turns the script's summary into a human-readable report.
Parameters
| Flag | Default | Description |
|---|
-d <seconds> | 1.5 | Crossfade duration in seconds |
-q <crf> | 26 | H.264 CRF — 18 = high quality, 28 = smaller file |
-w <crf> | 32 | VP9 WebM CRF |
-o <dir> | Same as input | Output directory |
-p | off | Also extract a poster frame (first frame as JPEG) |
-C | off | Disable the crossfade — optimize and encode only (-n accepted as a deprecated alias) |
No -s/-S save-mode flag. Unlike media-cluster siblings (/audio-loop, /markitdown), video-loop outputs are web assets (MP4 / WebM / poster) the user drops directly into their site's video directory. No downstream skill consumes video files via -f, so the ~/.agents/output/<skill>/<project>/ convention would add ceremony without enabling anything — -o <dir> is the direct path.
Workflow
1. Validate tools
Confirm ffmpeg and ffprobe are available: command -v ffmpeg ffprobe. If either is missing, stop and ask the user to install (macOS: ! brew install ffmpeg, Debian/Ubuntu: ! sudo apt install ffmpeg). Never auto-install.
2. Analyze loop quality (optional but recommended)
Before committing to a crossfade, extract the first and last frames and compare them — this is the one step in the pipeline that genuinely benefits from the model's visual reasoning: