haziqahmedqasmi/PeakCut
AI clipping for long videos and live streams. Self-hosted, bring your own AI key.
PeakCut is a free, open-source tool that turns long videos or live streams into short, vertical clips with captions, ready to post on social media. You run it on your own computer or server and bring your own AI key (or none at all).
What it does:
- Clip from any video – Paste a YouTube, Twitch, or Kick link (or upload a file). It transcribes the audio, asks an AI to pick the most engaging moments, then renders each clip in 9:16 with word-by-word captions in one of three styles.
- Live clipping – Records a stream into a rolling buffer and clips highlights in real time, using loudness, chat activity, and the transcript.
- Workspaces per creator – Keep separate channels, clip settings, posting rules, and activity logs for each creator you clip.
- Posting – Connect YouTube, Instagram, and TikTok in one click, then queue or auto-post finished clips with spacing and daily caps.
- No sign-in on your own computer – It opens straight into the dashboard. On a shared server, you can turn on accounts (
PEAKCUT_ACCOUNTS=1) for email or Google sign-in and an admin dashboard. - Your own AI – Works with Gemini, OpenAI, Grok, Groq, OpenRouter, Claude, a local model via Ollama, or any OpenAI-compatible service. If you don't provide a key, clips are picked by loudness alone.
Quick start:
- Requires Python 3.10+ and
ffmpeg. - Clone the repo,
pip install -r requirements.txt, then runpython -m studio.server. - Open
http://127.0.0.1:8765– no sign-in. Go to Settings, AI to choose your AI service and paste your key. - The first start downloads a speech model (~480 MB) automatically.
AI settings:
- Set provider, model, and key in the dashboard or via
.env(e.g.,PEAKCUT_AI_PROVIDER=gemini,PEAKCUT_AI_MODELS=gemini-2.5-flash,PEAKCUT_AI_KEY=...). - A fast, cheap model is recommended; a one-hour video takes about four requests.
- Speech-to-text runs locally, so audio never leaves your machine.
Settings & storage:
- Everything is configured via environment variables (see
.env.example). Key ones:PEAKCUT_AI_PROVIDER/MODELS/KEY,PEAKCUT_ACCOUNTS,GOOGLE_CLIENT_ID/SECRET(for Google sign-in and YouTube), SMTP settings, andPEAKCUT_DATA(where videos, clips, and the database live, default./data). - The Settings, Storage page shows the data folder, lets you move it, and stops new videos if the drive is nearly full.
Admins:
- Only relevant when accounts are on. Grant admin via
python -m studio.admin grant you@example.com(alsorevoke,list). The admin dashboard is at/admin.
Under the hood:
- Built with FastAPI (server), plain HTML/CSS/JS (web),
ffmpegandyt-dlpfor video,sherpa-onnxwith the Parakeet model for transcription. - Data is per-user: SQLite on your computer, PostgreSQL on a server; videos and clips in each user's folder.
Updating:
- Checks GitHub once a minute; shows a notice when a new version is available. Update with
git pull && pip install -r requirements.txt(ordocker compose up -d --buildfor Docker). Your data and keys are untouched.
Deployment:
DEPLOY.mdcovers a single-server Docker setup with PostgreSQL and automatic HTTPS via Caddy. Rundocker compose up -d --build.
Load handling:
- Per-user queues, resource monitoring, and no hard limits unless you set them. Request sizes are capped to prevent abuse.
Security:
- With sign-in off, it listens only on
127.0.0.1and refuses cross-site requests. Passwords are salted scrypt hashes; sessions are random tokens stored hashed; cookies are HTTP-only. Routes always identify users from the session, never from the request.
Responsible use:
- Only clip videos you have permission to use, and follow the terms of the sites you fetch from and post to.
License: MIT, with caption fonts under the SIL Open Font License.
Related
- Project
- Project
- Project
- Project