---
name: clip-stitch
description: Concatenate a folder of video clips into one MP4 with optional crossfade, fade-to-black, or hard-cut transitions. Auto-normalizes resolution / framerate / SAR so mismatched source clips merge cleanly. Order by filename, mtime, or shuffle. Optional uniform clip duration (--per-clip) for rhythmic edits. Use when the user has a folder of clips and asks to "stitch", "concat", "join", "merge these clips", "build a reel from this folder", or wants a quick montage.
---


# clip-stitch

Folder of clips → one MP4. ffmpeg under the hood, but smart about mismatched resolutions and framerates.

## Hard-cut concat

```bash
python3 ~/.claude/skills/clip-stitch/scripts/stitch.py --input ~/clips --output reel.mp4
```

## Crossfade between every clip

```bash
python3 ~/.claude/skills/clip-stitch/scripts/stitch.py --input ~/clips --output reel.mp4 \
  --transition crossfade --transition-duration 0.5
```

## Trim every clip to N seconds (rhythmic montage)

```bash
python3 ~/.claude/skills/clip-stitch/scripts/stitch.py --input ~/clips \
  --per-clip 1.5 --transition crossfade --transition-duration 0.2
```

## Shuffle order

```bash
python3 ~/.claude/skills/clip-stitch/scripts/stitch.py --input ~/clips --order shuffle
```

## Force resolution / framerate

```bash
python3 ~/.claude/skills/clip-stitch/scripts/stitch.py --input ~/clips \
  --width 1080 --height 1920 --fps 30
# 9:16 reel at 30fps, regardless of source clips
```

## Add a soundtrack

```bash
python3 ~/.claude/skills/clip-stitch/scripts/stitch.py --input ~/clips \
  --audio song.mp3 --mute-clips
# replaces clip audio with song.mp3, trims music to video length
```

## Flags

- `--input` — folder of clips
- `--output` — output file (default `<folder>_stitched.mp4`)
- `--transition` — `cut` (default), `crossfade`, `fade-black`, `fade-white`
- `--transition-duration` — seconds (default 0.4)
- `--per-clip` — trim each clip to N seconds (default: keep full)
- `--order` — `name` (default), `mtime`, `shuffle`
- `--width` / `--height` / `--fps` — force normalization (default: match first clip)
- `--audio` — replacement soundtrack file
- `--mute-clips` — mute original clip audio (use with `--audio`)
- `--recursive` — descend into subfolders

## How transitions work

Crossfade and fade-black use ffmpeg's `xfade` filter. Each clip overlaps the next by `--transition-duration` seconds. Audio crossfades alongside via `acrossfade`.

## Pairs well with

- `gif-board` — preview clips before stitching to pick the order
- `clip-trim` — trim before stitching for tight edits
- `beatcut` — produce beat-cut clips, then stitch them
- `loudness-fix` — master the final stitched audio
