DEV Community

How to Self-Host PeakCut (Open-Source AI Video Clipper) on Windows & Docker with Ollama

If you publish long-form YouTube videos, podcasts, or Twitch/Kick streams, turning them into vertical 9:16 Shorts/Reels usually means paying $15-$29/mo for a cloud SaaS clipper.

Recently I started self-hosting PeakCut - an open-source FastAPI + yt-dlp + sherpa-onnx + FFmpeg video clipper that runs without a GPU and even supports a rolling buffer for live streams.

Because PeakCut is relatively new and doesn't have a standalone documentation site yet, I documented the exact Windows, Docker, and Ollama gotchas I hit - and put together a free client-side .env & install script generator at PeakCut.org.

Why PeakCut Stands Out Among Open-Source Clippers

Compared to other GitHub clippers like OpenShorts and SupoClip (full breakdown: PeakCut vs OpenShorts vs SupoClip):

  • Zero GPU required: Transcription runs locally on CPU via sherpa-onnx (~480MB model downloaded on first start).
  • Flexible AI backend: Bring your own API key (Gemini Flash, OpenAI, Claude, Grok, OpenRouter) or point it to a local Ollama model for $0/month.
  • Live stream rolling buffer: Clip Twitch, Kick, and YouTube Live streams while they're still live.
  • Built-in Docker Compose + Caddy HTTPS: Ready for a $5-$10/mo CPU VPS.

Gotcha #1: Windows sherpa-onnx Path Crashes & FFmpeg PATH

On Windows 10/11, cloning into C:\Users\Your Name\Desktop\... (paths with spaces or >260 chars) frequently causes sherpa-onnx native library loading errors.

Clone straight into a short root folder (C:\peakcut) and install dependencies via winget:

winget install -e --id Python.Python.3.11
winget install -e --id Git.Git
winget install -e --id Gyan.FFmpeg

Close & reopen PowerShell so PATH refreshes, then:

git clone https://github.com/haziqahmedqasmi/PeakCut.git C:\peakcut
cd C:\peakcut
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python -m studio.server

PeakCut Studio launches at http://127.0.0.1:8765. Full PowerShell troubleshooting notes are in the PeakCut Windows Install Guide.

Gotcha #2: Running 100% Free & Offline with Ollama

PeakCut reads its official provider configuration from .env:

PEAKCUT_AI_PROVIDER=ollama
PEAKCUT_AI_MODELS=qwen2.5:14b
PEAKCUT_PORT=8765

If you're running PeakCut inside Docker Compose while Ollama runs on your host machine, localhost:11434 inside the container won't reach the host. Expose Ollama on your host interface and map host.docker.internal:

export OLLAMA_HOST=0.0.0.0
# docker-compose.yml (under services.app)
extra_hosts:
  - "host.docker.internal:host-gateway"

For hardware sizing (qwen2.5:14b vs llama3.1:8b) and test commands, check the PeakCut + Ollama Local LLM Guide.

Gotcha #3: Enabling Caddy Auto-HTTPS & Admin Accounts in Docker

PeakCut's official docker-compose.yml ships with PostgreSQL and a Caddy TLS profile (own-https):

PEAKCUT_DOMAIN=clip.yourdomain.com
POSTGRES_PASSWORD=change_me_strong_password
PEAKCUT_ACCOUNTS=1
COMPOSE_PROFILES=own-https

After docker compose up -d --build, register your account in the web UI and grant admin permissions via CLI:

docker compose exec app python -m studio.admin grant y**@example.com

Free Client-Side Config Generator & Cost Calculator

If you want to skip hand-editing .env files or estimating Gemini/OpenAI token costs vs cloud SaaS subscriptions, I built a zero-tracking static community hub here: 👉 PeakCut.org - 1-Click Setup Generator, BYOK Calculator & Error Diagnostics

Let me know in the comments if you're running PeakCut with a smaller local Ollama model or hit any other yt-dlp / FFmpeg edge cases!

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.