← ClaudeAtlas

face-track-reframelisted

Reframe/crop a video to a different aspect ratio while keeping the speaker's face centered and never cut off, using dynamic face tracking. The crop window follows the face across the whole clip (handles a person who moves within the frame). TRIGGER on Hebrew: 'תחתוך סרטון', 'התאם יחס וידאו', 'תהפוך סרטון לעומד', 'סרטון אופקי לעומד', 'שהפנים לא ייחתכו', 'מעקב פנים', 'להתאים את הסרטון ליחס של השאר', 'crop ליחס עומד'. English: 'reframe video', 'crop video to portrait', 'horizontal to vertical', 'make this 9:16', 'keep the face in frame', 'face tracking crop', 'fit aspect ratio'. Use when a video's aspect ratio must change (e.g. landscape -> 9:16 portrait) without losing the face. NOT for editing montages (event-recap-video), NOT for generating video (video-production).
hiyabh/claude-video-skills · ★ 1 · Code & Development · score 62
Install: claude install-skill hiyabh/claude-video-skills
# Face-Tracking Video Reframe Crop a video to a target aspect ratio so it matches other clips (e.g. a horizontal 848x384 clip into a 9:16 portrait), while a **dynamic crop window tracks the speaker's face** — the face stays centered and is never cut off, even as the person moves. This solves the problem a static center-crop can't: when the face drifts left/right (or up/down) over the clip, a fixed window clips it at the edges. Here the window follows the detected face on a smoothed path. ## Requirements - `ffmpeg` + `ffprobe` on PATH - Python with `opencv-python` and `numpy` - check: `python -c "import cv2, numpy"` — if it fails: `pip install opencv-python numpy` ## How to Use The script does everything (detect → smooth track → crop → scale → mux original audio). ```bash python ~/.claude/skills/face-track-reframe/reframe.py INPUT [options] ``` Run it from the folder containing the video (so relative output lands there), or pass absolute paths. On Windows PowerShell, quote paths with Hebrew/spaces. ### Options | Option | Default | Meaning | |---|---|---| | `-o, --output` | `<name>_reframe.mp4` | output path | | `--aspect W:H` | `9:16` | target ratio, e.g. `4:5`, `1:1`, `16:9` | | `--size WxH` | (derived) | exact output resolution — use to match other clips byte-for-byte (e.g. `464x848`) | | `--smooth SEC` | `0.6` | tracking smoothing window; raise for steadier motion, lower to track faster | | `--crf N` | `18` | x264 quality (lower = better/larger) | ### Recommend