# Clipify

从长视频中自动提取精彩片段，切成独立短视频，支持 16:9→9:16 竖版转制和逐字字幕烧录。...

- Repository: https://github.com/ZJU-REAL/Easel (4293 stars)
- Category: Media
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add ZJU-REAL/Easel --skill clipify -g -a claude-code -y`
Codex: `npx skills add ZJU-REAL/Easel --skill clipify -g -a codex -y`
Cursor: `npx skills add ZJU-REAL/Easel --skill clipify -g -a cursor -y`
Gemini CLI: `npx skills add ZJU-REAL/Easel --skill clipify -g -a gemini-cli -y`

## Description

从长视频中自动提取精彩片段，切成独立短视频，支持 16:9→9:16 竖版转制和逐字字幕烧录。 当用户说"视频切片""提取精彩片段""长视频切短""切成短视频""高光剪辑""逐字字幕""转竖版短视频"时使用。 和 video-highlights 的区别：clipify 专做英文口播找笑点+动态人脸 pan；video-highlights 更通用（中文/直播皆可），静态转竖版更稳。

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Clipify

Find the funniest moments in a video, cut them as standalone clips, optionally reformat 16:9 → 9:16 (face-pan or split-screen), and burn opus-style word-by-word captions.

## Inputs

- A video file path (the user will provide it; otherwise ask)
- Optional: requested format (9:16, 16:9, 1:1), if not given, ask after candidates are picked
- Optional: subtitle style preference, if not given, ask before captioning

## Tooling (use only the fastest path)

- **Whisper:** `whisper --model tiny.en --word_timestamps True --output_format json` (≈10× faster than `small.en`; quality fine for English). For non-English: `--model base` (drop `--language`).
- **ffmpeg:** hardware decode is optional and platform-specific, use `-hwaccel auto`, or omit it (macOS: `videotoolbox`; Linux: `vaapi`/`cuda`/none). Add `-preset ultrafast` for renders. Use `-c:v libx264 -crf 20` for the final master.
- **Numpy** for audio alignment (FFT cross-correlation). No scipy/cv2 needed.
- **Scripts:** `<skill-dir>/scripts/` (where `<skill-dir>` is the directory containing this SKILL.md, typically `~/.claude/skills/clipify/`)
  - `analyze.py`, speaker timeline from two ROI motion files
  - `build_pan.py`, ffmpeg crop x-expression with hard cuts
  - `build_ass.py`, opus-style ASS captions from whisper JSON
  - `audio_align.py`, find offset of a sub-clip in a longer source

Working dir: `/tmp/clipify/` (mkdir at start, leave artifacts for debugging).

---

## Workflow

### Step 1, Find the funniest parts

```bash
mkdir -p /tmp/clipify
ffmpeg -y -i "$VIDEO" -vn -ac 1 -ar 16000 /tmp/clipify/audio.wav
whisper /tmp/clipify/audio.wav --model tiny.en --word_timestamps True --output_format json --output_dir /tmp/clipify --language en
```

Read the resulting JSON (or `.txt`) and pick 3, 5 candidate clips. Funny signals to scan for:

The rest: https://github.com/ZJU-REAL/Easel/blob/HEAD/skills/builtin/clipify/SKILL.md
