r/Python • u/Better-Birthday-754 • 27m ago
News ClipForge – turn long YouTube videos and streams into vertical 9:16 clips with burned-in subtitles
Hi r/Python! I stream on Kick and never had time to cut clips for TikTok/Shorts, so I built a desktop app that does it for me. It's free and MIT licensed.
**Repo:** https://github.com/RenatoAlexanderTI/clip-forge
![ClipForge UI] (ui-image)
## What My Project Does
You paste a YouTube link, choose clip length and how many clips you want, and ClipForge:
- **Finds the most "viral" moments** using Higgsfield's video analysis (via its MCP server) and returns a suggested title/description for each one
- **Downloads only those segments** with `yt-dlp --download-sections` (not the whole 2-hour VOD)
- **Reframes to 9:16** with ffmpeg: facecam on top + gameplay below, or a blurred background if there's no facecam
- **Transcribes with whisper.cpp** (`large-v3-turbo`) and burns in subtitles using one of 4 styles (TikTok, Hormozi-style keyword highlight, Minimal, "Beast")
- Exports `.srt` files for editing in CapCut and a summary file with titles and descriptions
If you already know the timestamps, you can skip the AI part and just type them in.
**Some technical bits that were fun to build:**
- **Standard library only on the backend** (`urllib`, `http.server`, `subprocess`, `threading`). The only dependency is `pywebview` for the native window.
- **Minimal MCP client** (JSON-RPC 2.0 over Streamable HTTP, including SSE responses) written from scratch
- **OAuth 2.1 with PKCE + dynamic client registration**, with a local callback server, so users sign in with their own account. Tokens refresh automatically.
- **Subtitles** are generated as ASS files with per-style animations (`\t` scale pops, color cycling, highlighted keywords)
- **UI** is a single HTML file (no build step, no CDN) talking to Python through `pywebview`'s JS API. It falls back to a local HTTP server and your browser with `--browser`.
## Target Audience
- Streamers and YouTubers who want to repurpose long videos into Shorts/TikToks/Reels without paying for a subscription clipping service
- Python devs interested in ffmpeg automation, whisper.cpp, MCP or OAuth PKCE in a desktop app
It's a working tool I use for my own streams, but it's still young: **Windows-only for now**, and the automatic moment detection needs a Higgsfield account with credits (manual timestamps work without it).
## Comparison
- **vs. Opus Clip / Vizard / similar SaaS:** those are paid subscriptions, upload your whole video to their servers and often add watermarks on free tiers. ClipForge runs locally, only downloads the segments it needs and has no watermark.
- **vs. doing it by hand in CapCut:** it automates finding the moments, cropping, transcribing and styling, and still gives you `.srt` files if you want to fine-tune.
- **vs. a plain whisper + ffmpeg script:** it adds the moment detection, facecam-aware layout, subtitle styles and a GUI, so non-programmers can use it too.
## Feedback welcome
I'd love feedback on the code structure (it's currently one ~1,100-line `clipforge.py` and I'm thinking about splitting it), cross-platform support (macOS/Linux) and ideas for better local moment detection (audio peaks, chat activity…).
Issues and PRs are open. Thanks for reading!