haziqahmedqasmi/PeakCut

★ 1,738⑂ 547

AI clipping for long videos and live streams. Self-hosted, bring your own AI key.

About haziqahmedqasmi/PeakCut

haziqahmedqasmi/PeakCut is an open-source project on GitHub, mainly written in Python. AI clipping for long videos and live streams. Self-hosted, bring your own AI key. It currently holds 1,738 stars and 547 forks with 54 open issues, and was last pushed on 2026-11-20 (repository created 2026-11-14).

Project Overview

AI Homed tracks it on the Today's Trending board.

GitHub Repository Details

Repository haziqahmedqasmi/PeakCut · default branch main · size 959 KB · watchers 16 · source: GitHub REST API and repository README

README

PeakCut

Turn long videos and live streams into captioned vertical clips, ready to post. Free and open source: run it on your own computer or server, with your own AI key.

Paste a YouTube, Twitch or Kick link (or upload a file) and PeakCut finds the moments worth clipping, cuts them to 9:16, adds word-by-word captions and a hook, and can post them to your connected accounts. It can also record a creator's live stream and clip the highlights while the stream is still running.

What it does

renders each one with captions in one of three styles. and the transcript. spacing and daily caps (see DEPLOY.md for the one-time setup). (PEAKCUT_ACCOUNTS=1) for email or Google sign-in and an admin dashboard. speaks the OpenAI chat format. No key at all also works: clips are then picked by loudness.

Quick start

You need Python 3.10 or newer and ffmpeg. On Windows: winget install Gyan.FFmpeg. On a Mac: brew install ffmpeg. On Linux: sudo apt install ffmpeg. PeakCut finds it by itself and tells you in the dashboard if it is missing.

Put PeakCut in a short folder that stays put: C:\peakcut on Windows, ~/peakcut on a Mac or Linux. Not inside a temporary folder or an AI assistant's workspace: those get cleaned up, and on Windows a folder that deep stops the speech model from loading (Windows can't open files whose full path is over 260 characters). If an AI assistant installs it for you, it should ask you where to put it first (AGENTS.md tells it to).

On Windows:

git clone  C:\peakcut
cd C:\peakcut

On a Mac or Linux:

git clone  ~/peakcut
cd ~/peakcut
pip install -r requirements.txt

Start the server:

python -m studio.server

The first start downloads the speech model by itself (about 480 MB, once).

Open http://127.0.0.1:8765. There is no sign-in: it opens straight into the dashboard. Go to Settings, AI, choose your AI service, paste your key and press Save and test (see Choose your AI).

Choose your AI

PeakCut needs a chat model that can return JSON. The easy way is in the dashboard: Settings, AI. Pick the service, paste your key, press Find models to choose from the service's own list, then Save and test. The key is kept in the data folder on your machine and is never shown again.

If you prefer a file (or run a server), the same three things can go in .env. What is saved in the dashboard wins:

PEAKCUT_AI_PROVIDER=gemini
PEAKCUT_AI_MODELS=gemini-2.5-flash
PEAKCUT_AI_KEY=your-key-here

| PEAKCUT_AI_PROVIDER | Service | Where to get a key | |---|---|---| | gemini | Google Gemini | https://aistudio.google.com/apikey | | openai | OpenAI | https://platform.openai.com/api-keys | | xai | Grok (xAI) | https://console.x.ai | | groq | Groq | https://console.groq.com/keys | | openrouter | OpenRouter (many models, one key) | https://openrouter.ai/keys | | anthropic | Claude | https://console.anthropic.com | | ollama | A model on your own machine, no key | https://ollama.com | | custom | Any OpenAI-compatible address: also set PEAKCUT_AI_BASE_URL | |

service's current list. Several ids separated by commas are tried in order, which gives you a fallback. tokens each video took.

Videos in Arabic

PeakCut hears English by default. To clip videos in Arabic, add the Arabic speech model once in Settings → Speech models (about 107 MB), or choose Arabic under Options when adding a video and PeakCut offers to download it. Set a creator's language on their Setup page so their live recordings use it too. It understands Modern Standard Arabic and everyday dialects, and the AI turns English words said in between back into English. Captions on the clips are in English.

Settings

Everything is set through environment variables, normally in a .env file next to this README. .env.example lists every setting with a short explanation. The ones that matter first:

| Setting | What it is for | |---|---| | PEAKCUT_AI_PROVIDER, PEAKCUT_AI_MODELS, PEAKCUT_AI_KEY | The AI that picks clips and writes titles (or set it in the dashboard) | | PEAKCUT_ACCOUNTS | 1 makes everyone sign in. Use it on any server other people can reach | | GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET | Optional: Sign in with Google, and connecting YouTube | | PEAKCUT_SMTP_*, PEAKCUT_MAIL_FROM | Optional: confirmation and password emails | | PEAKCUT_DATA | Where videos, clips and the database are kept (default ./data) |

.env, the secrets/ folder and all user data are ignored by git. Keep keys there, never in the code.

Admins

This only matters with accounts switched on (PEAKCUT_ACCOUNTS=1); without them you are the owner and can do everything. An account is an admin only when the database says so. No email address is special in the code and no web request can change a role. Do it on the machine that runs PeakCut:

python -m studio.admin grant you@example.com

revoke and list work the same way. The admin dashboard is at /admin and answers "not found" to everyone else.

How it is built

| Part | What it is | |---|---| | studio/ | The server: FastAPI, the clip pipeline, live recording, accounts | | studio/ai.py | The only file that talks to an AI service. Add a provider here | | web/ | The pages: landing, sign-in, the app, the admin dashboard (plain HTML, CSS and JavaScript, no build step) | | tests/ | Tests that run against a throwaway copy of the app | | deploy/, Dockerfile, docker-compose.yml | One-server deployment with PostgreSQL and automatic HTTPS |

Video work is done with ffmpeg and yt-dlp. Speech is transcribed with sherpa-onnx and NVIDIA's Parakeet model (English) and FastConformer Arabic model, both released by NVIDIA under the Creative Commons Attribution 4.0 licence (CC-BY-4.0). The Arabic model was converted for sherpa-onnx with tools/export_arabic_model.py. Data is kept per user: accounts in the database (SQLite on your own computer, PostgreSQL on a server), videos and clips in each user's own folder. AGENTS.md is a short map of the code for contributors and AI coding assistants.

Where your videos and clips are kept

Everything PeakCut keeps is in one folder: videos, clips, recordings, creators, settings and the speech model. By default it is the data folder inside PeakCut. Settings, Storage shows the folder and how much room its drive has, opens it in one click, and lets you move it to another drive: choose the new folder, and PeakCut moves everything there the next time it starts. If the drive is nearly full, PeakCut says so and stops taking new videos until there is room. (PEAKCUT_DATA in .env still works and takes priority.)

Updating

PeakCut checks GitHub once a minute while it runs. When a newer version is out, the dashboard shows a notice within a minute or two (no restart needed), with what changed and how to update: ask your AI coding assistant to do it (the notice has a sentence to paste), or run git pull && pip install -r requirements.txt in the PeakCut folder and restart it (with Docker: git pull && docker compose up -d --build). Your .env, keys and clips are not touched. Only the two commit ids are sent to GitHub; set PEAKCUT_UPDATE_CHECK=0 to turn the check off.

Deploy

DEPLOY.md walks through a single server with Docker: the app, PostgreSQL, and Caddy for HTTPS.

docker compose up -d --build

How it behaves under load

straight from memory. while there is room, wait briefly when it is nearly full, and continue the moment it frees up. .env. Five videos can be sent at once. Request sizes are always capped, so junk can't fill the memory.

Tests

python tests/run.py

This starts a copy of the app on a spare port with an empty temporary data folder, runs the permission, abuse and queue tests against it, then removes it. It needs no keys and never touches real data.

Security

and only answers to its own address. Do not expose it to the internet that way: turn accounts on. public issue.

Using it responsibly

Clip videos you made, or have permission to use. You are responsible for the rights to what you download, clip and post, and for following the terms of the sites you fetch from and post to.

Licence

MIT. Caption fonts in studio/fonts/ (Anton, Archivo Black, Poppins) are under the SIL Open Font License; the licence texts are in the same folder.

GitHub Stars & Activity

1,738Stars
547Forks
54Open issues
PythonLanguage

GitHub Popularity

GitHub stars1,738
Forks547
Open issues54
Primary languagePython
LicenseMIT
Stars gained today0
Created2026-11-14
Last pushed2026-11-20

Trending History

Weekly boardrank #91 · ▲ 0 stars

Related AI Projects

1

mvanhorn / last30days-skill

Python★ 73,326⑂ 6,477▲ 790 stars
→
2

jingyaogong / minimind

Python★ 69,370⑂ 9,058▲ 828 stars
→
3

HKUDS / CLI-Anything

Python★ 63,464⑂ 5,767▲ 783 stars
→
4

wshobson / agents

Python★ 42,840⑂ 4,534▲ 48 stars
→
5

agentscope-ai / agentscope

Python★ 36,554⑂ 3,910▲ 78 stars
→
6

Tracer-Cloud / opensre

Python★ 14,743⑂ 1,986▲ 438 stars
→
7

zhouxiaoka / autoclip

Python★ 14,301⑂ 2,202▲ 908 stars
→
8

SWE-agent / mini-swe-agent

Python★ 10,007⑂ 1,362▲ 43 stars
→

More AI Rankings