Skip to content

SBrophy-dev/clip-chimp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clip Chimp

watch less, clip more

Turn 2‑hour videos and streams into platform‑ready shorts — entirely on your own machine.

Clip Chimp watches long videos, finds the clip‑able moments, trims them to a strong hook, and exports them for YouTube, TikTok, Instagram, Twitter/X, and Facebook — with optional burned‑in captions. No subscriptions, no uploads to anyone's cloud, no per‑minute bills, no watermarks.

License: MIT Local‑first Node React ffmpeg

Clip Chimp demo

Why Clip Chimp

Cloud clip tools charge a monthly fee, put your footage on someone else's servers, cap your minutes, and stamp watermarks on the free tier. Clip Chimp does the whole pipeline — download, transcribe, find highlights, cut, reframe, caption, export — on your own hardware. The only thing you install alongside it is ffmpeg and, for the smart highlight finder, a local model server (LM Studio).

  • 🔒 Private & local — your video never leaves your machine.
  • 💸 Free forever — no accounts, no API keys, no per‑export charges.
  • 🎬 Built for long content — designed around 2‑hour VODs, podcasts, and streams (uploads up to 20 GB).
  • 📱 Every platform in one batch — export any selection of clips × formats at once.
  • 🔤 Auto‑captions — word‑synced, CapCut‑style karaoke subtitles burned straight into the clip.
  • 🧠 Understands the content — a local language model reads the transcript and scouts genuinely clip‑worthy moments, not just loud spikes.

How it works

 video file / URL
        │
        ▼
 ┌───────────┐   ┌────────────┐   ┌───────────────────┐   ┌────────────────┐
 │  ingest   │ → │ transcribe │ → │   "watching" pass  │ → │   editor mode  │
 │ (yt-dlp / │   │ (whisper)  │   │  local model reads │   │  review, trim, │
 │  ffprobe) │   │            │   │  transcript, finds │   │  export multi- │
 └───────────┘   └────────────┘   │  the highlights    │   │  format clips  │
                                  └───────────────────┘   └────────────────┘
  1. Ingest — paste a URL (yt‑dlp downloads it) or point at a local file. ffprobe reads the metadata and a thumbnail is generated.
  2. Watching — audio is extracted and transcribed locally, then the transcript is fed through a local language model (Gemma via LM Studio) in overlapping windows. Each window is scouted for self‑contained, hook‑y moments; candidates are deduped, ranked, and snapped to sentence boundaries. No transcription engine installed? Clip Chimp falls back to audio‑energy + scene‑change heuristics — great for hype moments in streams.
  3. Editor mode — review the clip list against the player, nudge in/out points, retitle, then queue any selection of clips × formats.
  4. Export — ffmpeg renders each clip into the chosen presets and (optionally) burns in captions.

Screenshots

Library / dashboard — live dependency status, drop in a URL or file Analysis — real‑time progress as the video is watched
Dashboard Analysis
Findings & editor — scored clips, trim controls, live caption preview Export queue — one batch, every format, downloadable
Findings Export

Export presets

Clip Chimp maps each clip into the target frame with the right strategy per platform:

Preset Ratio Reframe For
YouTube 16:9 · 1080p fit (letterbox) YouTube, Facebook
Shorts / TikTok / Reels 9:16 · 1080×1920 blurred‑pad Shorts, TikTok, Reels
Vertical — center crop 9:16 · 1080×1920 center crop Shorts, TikTok, Reels
Square 1:1 · 1080 center crop Instagram, Facebook
Twitter / X 16:9 · 720p fit Twitter/X

Auto‑captions

When a clip was transcribed with a Whisper engine, Clip Chimp captures word‑level timing and can render styled, word‑synced subtitles directly into each clip via ffmpeg's libass filter. A live preview in the editor shows the exact look and animation before you export.

  • Cues — short 3–5 word chunks that break on pauses and sentence ends (the punchy short‑form look).
  • Size — scales with output resolution so vertical clips get bigger type.
  • Colours — text, outline, and (for karaoke) the highlight colour.
  • Font — Arial, Impact, Verdana, Trebuchet MS, Georgia, Tahoma, Comic Sans MS.
  • Position — bottom / center / top, kept inside the safe area.
  • Animation — none, fade, pop/scale, slide‑up, or karaoke (each word sweeps to the highlight colour as it's spoken — the Hormozi/CapCut style).
  • UPPERCASE toggle.

Engineering highlights

The interesting parts, for anyone reading the source:

  • Windowed transcript analysis with structured output — the transcript is chunked into overlapping windows so the model always has context on both sides of a moment. Responses are constrained to a JSON schema, then candidates are deduplicated by footage overlap (clips sharing >35% of their span are the same moment; the higher‑scored one wins) and snapped to sentence boundaries before length clamping. See server/src/pipeline/highlight.js.
  • Graceful degradation — transcription auto‑detects the best available engine (faster‑whisper → whisper.cpp → openai‑whisper), and with no engine at all the pipeline falls back to a signal‑based finder: smoothed RMS loudness above the 85th percentile, spaced a clip‑length apart and snapped to detected scene cuts. See server/src/lib/transcribe.js.
  • Real‑time job pipeline — long‑running ingest/analyze/export jobs stream progress to the UI over Server‑Sent Events, so the browser shows per‑window analysis progress and per‑clip render status live. See server/src/jobs.js.
  • Media engineering — a per‑preset ffmpeg render graph handles aspect‑ratio remapping (letterbox / center‑crop / blurred‑pad), while captions are compiled to .ass with per‑style animation tags (\fad, \t, \move, \kf) driven by word‑level timing. See server/src/pipeline/export.js and captions.js.
  • Solid HTTP plumbing — video is served with Range‑request support for instant seeking in the editor, uploads stream to disk (20 GB cap), and export downloads are path‑sandboxed against traversal.
  • Clean monorepo — npm workspaces split a stateless Express API from a React 19 + Vite front end, wired together with a single npm run dev.

Tech stack

Layer Tech
Backend Node 20+, Express, Multer, ES modules, Server‑Sent Events
Frontend React 19, Vite
Media ffmpeg / ffprobe, libass subtitles
Ingest yt‑dlp
Transcription faster‑whisper · whisper.cpp · openai‑whisper (auto‑detected)
Highlight finder Gemma via LM Studio (local, OpenAI‑compatible endpoint)

Requirements

Tool Purpose Status
Node 20+ app runtime required
ffmpeg + ffprobe all video work required, on PATH
LM Studio + a Gemma model the highlight finder required for smart analysis (http://localhost:1234)
yt‑dlp URL ingest optional, on PATH
faster‑whisper (pip install faster-whisper) transcription optional but strongly recommended

Also supported for transcription: whisper.cpp (whisper-cli on PATH + CLIPCHIMP_WHISPER_MODEL=path/to/model.bin) or the openai‑whisper CLI.

Quick start

git clone https://github.com/SBrophy-dev/clip-chimp.git
cd clip-chimp
npm install
npm run dev

Start LM Studio and load a Gemma model (with its local server running) for smart highlight detection; without it, Clip Chimp still works using the signal‑based fallback.

Configuration

All configuration is via environment variables — nothing is required to get started.

Variable Default Meaning
CLIPCHIMP_PORT 4747 API port
LMSTUDIO_BASE http://localhost:1234/v1 local model endpoint (OpenAI‑compatible)
LMSTUDIO_MODEL (auto: first Gemma) force a specific model id
CLIPCHIMP_WHISPER_SIZE base whisper model size for faster‑whisper / openai‑whisper
CLIPCHIMP_WHISPER_MODEL (unset) GGML model path for whisper.cpp

Sanity‑check the highlight finder against a fabricated transcript:

npm run test:analyzer -w server

Project layout

server/   Express API — ingest, jobs (SSE progress), analyze + export pipelines
  src/lib/        ffmpeg, LM Studio, whisper, yt-dlp wrappers
  src/pipeline/   highlight finder, analyze + export orchestration, captions
web/      React (Vite) UI — library, editor, export queue
showcase/ screenshots + demo
data/     your library, transcripts, clips, exports (gitignored — stays local)

Roadmap

  • Burned‑in captions from word‑level timing
  • Customizable caption look (size, colour, font, position, animations, karaoke)
  • Saveable caption style presets / brand kits
  • Smart reframing for portrait crops (face / subject tracking)
  • Vision pass: sample frames for no‑speech content
  • Direct per‑platform upload integrations
  • Electron / Tauri desktop shell

Contributing

Issues and pull requests are welcome. Clip Chimp is a personal project shared openly — if you build something on top of it, I'd love to hear about it.

License

MIT — free to use, modify, and distribute.

About

Turn long videos and streams into platform-ready short-form clips — locally, for free. ffmpeg-powered, with word-synced burned-in captions.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors