Self-hosted, MIT-licensed video toolkit — turn long videos into 9:16 shorts with AI moment detection, subtitles and vertical reframing, plus a YouTube Studio and Postiz publishing, all in one Docker stack.
Find a file
pedro-bento 7592dbfd93
All checks were successful
CI / backend-tests (pull_request) Successful in 28s
CI / frontend-build (pull_request) Successful in 28s
chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets
- Remove skills/, examples/, ops/, .hallmark/, CLAUDE.md, docs/dsa-notice,
  unused demo gifs + demo video and the n8n SEO page/assets
- Untrack .opencode and ignore it (.opencode/, .pytest_cache/, .hallmark/)
- Fix all dangling references (README, cli, SEO pages/fallback, retention doc)
- Keep assets/watermark.png, docs/compliance, design.md, screenshots, cli
2026-10-04 20:13:51 +01:00
.github/workflows fix(publish): channel-by-id selection, DD/MM/YYYY scheduling, app-first boot (#1) 2026-10-04 20:07:42 +01:00
assets chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets 2026-10-04 20:13:51 +01:00
cli chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets 2026-10-04 20:13:51 +01:00
dashboard chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets 2026-10-04 20:13:51 +01:00
docs/compliance chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets 2026-10-04 20:13:51 +01:00
fonts chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
remotion chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
render-service chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
screenshots docs(readme): open with the stacked two-speaker layout, original beside the result 2026-08-26 22:31:05 +02:00
tests fix(publish): channel-by-id selection, DD/MM/YYYY scheduling, app-first boot (#1) 2026-10-04 20:07:42 +01:00
.dockerignore feat(cloud): bake bgutil 720p into image, profile menu, video-URL info, trial→pricing 2026-07-16 02:07:53 +02:00
.env.example chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets 2026-10-04 20:13:51 +01:00
.gitignore chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets 2026-10-04 20:13:51 +01:00
active_speaker.py feat(reframe): optional layouts, and a Gemini-picked layout per video 2026-07-31 13:28:45 +02:00
app.py fix(publish): channel-by-id selection, DD/MM/YYYY scheduling, app-first boot (#1) 2026-10-04 20:07:42 +01:00
camera_inset.py perf(pipeline): GPU cut, CPU VAD, cheap blur, hook+captions in one pass, 6 clip workers 2026-09-25 20:28:22 +02:00
clip_selection.py fix(selection): score every window and enforce the clip floor 2026-09-23 00:27:14 +02:00
design.md chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
docker-compose.e2e.local.yml chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
docker-compose.yml chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
Dockerfile chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
edit_builder.py feat: karaoke subtitles, deterministic Auto-Edit v2, emoji hooks, retries (PR #50 block 1) 2026-07-17 21:26:04 +02:00
editor.py fix(gemini): upload the source by handle, not by path 2026-09-21 03:56:59 +02:00
ffmpeg_utils.py chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
file_hosts.py chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
frame_sampler.py perf(pipeline): halve a job's CPU with byte-identical clips 2026-09-25 15:40:22 +02:00
free_tools.py chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
gemini_worker.py fix(selection): score every window and enforce the clip floor 2026-09-23 00:27:14 +02:00
hook_grounding.py fix(hooks): ground GENERAL stretches too when the video is a screencast 2026-09-01 02:18:21 +02:00
hooks.py feat(hooks): "edit hook" with a typeface picker; a preview that matches 2026-09-26 01:57:30 +02:00
layout_picker.py perf(render): burn the watermark in the reframe encode; read AV1 sources 2026-09-25 19:47:34 +02:00
layout_ranges.py feat(layouts): dashboard layout selector, layouts=none, ranges survive a fast recut 2026-08-25 15:45:19 +02:00
LICENSE chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
llm_backend.py feat(llm): run the moment picker on any OpenAI-compatible server (Ollama, vLLM, LM Studio) 2026-09-01 01:34:48 +02:00
main.py chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
media_auth.py fix: harden Postiz integration and align docs/CLI/n8n after review 2026-10-04 17:25:17 +01:00
NOTICE chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
panel_layout.py fix(ci): collect every test again — gate-first imports + the deps tests actually need 2026-08-04 00:07:29 +02:00
postiz.py fix: harden Postiz integration and align docs/CLI/n8n after review 2026-10-04 17:25:17 +01:00
punch_in.py fix(audio,punch): true-peak headroom and punch-in calibration 2026-07-31 13:28:46 +02:00
quality_probe.py fix(security): block tailnet SSRF, gate the quality probe, strip job secrets 2026-09-23 01:03:05 +02:00
README.md chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets 2026-10-04 20:13:51 +01:00
recut.py feat(layouts): dashboard layout selector, layouts=none, ranges survive a fast recut 2026-08-25 15:45:19 +02:00
reframe_v2.py perf(pipeline): GPU cut, CPU VAD, cheap blur, hook+captions in one pass, 6 clip workers 2026-09-25 20:28:22 +02:00
requirements.txt fix(publish): channel-by-id selection, DD/MM/YYYY scheduling, app-first boot (#1) 2026-10-04 20:07:42 +01:00
restoring_static.py fix: harden Postiz integration and align docs/CLI/n8n after review 2026-10-04 17:25:17 +01:00
scene_detection.py fix(gpu): stop jobs from filling the card (CUDA OOM at peak) 2026-09-22 22:42:52 +02:00
screencast_layout.py fix(gemini): upload the source by handle, not by path 2026-09-21 03:56:59 +02:00
security_utils.py fix(security): block tailnet SSRF, gate the quality probe, strip job secrets 2026-09-23 01:03:05 +02:00
split_layout.py perf(pipeline): halve a job's CPU with byte-identical clips 2026-09-25 15:40:22 +02:00
subtitles.py feat(mcp): caption presets and the new caption options in add_subtitles 2026-10-01 18:35:37 +02:00
thumbnail.py chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
transcribe_backends.py chore: rename OpenShorts to Clipwright 2026-10-04 18:07:07 +01:00
verify_aesthetic.py Update hooks, fix captions, and ignore uploads 2026-01-23 14:53:57 +01:00
verify_custom_hook.py Update hooks, fix captions, and ignore uploads 2026-01-23 14:53:57 +01:00
verify_hooks.py Update hooks, fix captions, and ignore uploads 2026-01-23 14:53:57 +01:00
watermarked.py refactor: remove cloud/ billing mode and flatten to self-hosted-only 2026-10-04 17:02:55 +01:00
yt_clients.py fix(proxy): refuse every YouTube URL that is not one video, by allowlist 2026-09-21 03:56:59 +02:00

Clipwright

Self-hosted, MIT-licensed video toolkit in one Docker stack:

  • Clip Generator — turn long videos (podcasts, webinars, streams, interviews) into viral-ready 9:16 shorts with AI moment detection, auto subtitles and smart vertical reframing.
  • YouTube Studio — AI titles, thumbnails and descriptions for YouTube.
  • Postiz publishing — post or schedule the results to TikTok, Instagram Reels and YouTube Shorts through your own self-hosted Postiz instance.

A two-person podcast and the vertical clip Clipwright makes of it

You run it on your own machine, bring your own API keys, and keep your source video on your infrastructure. No hosted service, no billing, no usage cap.

Fork

Clipwright is a fork of OpenShorts, renamed and trimmed to a self-hosted tool: the cloud/billing mode, AI Shorts/UGC, MCP/agent layer and Upload-Post publishing were removed, YouTube Studio was fixed, and publishing now goes through Postiz. Upstream copyright is preserved in LICENSE and NOTICE.

Requirements

  • Docker & Docker Compose
  • Google Gemini API key — free tier — used for moment detection, layouts, titles and thumbnails. Optional if you set LLM_BASE_URL.
  • A self-hosted Postiz instance — optional, only for publishing.

Quick start

git clone https://git.pbento.pt/pedro-bento/clipwright.git
cd clipwright
cp .env.example .env          # optional: Postiz server-side key
docker compose up --build

Open the dashboard at http://localhost:5175, go to Settings, and paste your keys (Gemini; Postiz is optional). Then:

  1. Clip Generator — upload a long video or paste a URL.
  2. YouTube Studio — generate titles, thumbnails and descriptions.
  3. Publish a finished clip to your connected Postiz channels.

Configuration

Server-side (.env):

Variable Purpose
GEMINI_API_KEY Gemini key used server-side (self-host). The dashboard can also send one per request.
LLM_BASE_URL / LLM_MODEL / LLM_API_KEY Point the moment picker at any OpenAI-compatible server (Ollama, vLLM, LM Studio…) to run without a Google key.
POSTIZ_URL / POSTIZ_API_KEY Your Postiz instance + API key, used when the dashboard does not send them.
MAX_CONCURRENT_JOBS Concurrent jobs (default 5).
MAX_FILE_SIZE_MB Upload cap in MB; 0 (default) is unlimited.

Client-side (stored encrypted in your browser): GEMINI_API_KEY, postiz_url, postiz_key_v1.

Run without a Google key (optional)

# .env
LLM_BASE_URL=http://host.docker.internal:11434/v1   # Ollama on the host
LLM_MODEL=qwen2.5:14b

Works with Ollama, LM Studio, vLLM, llama.cpp, LocalAI and OpenRouter. Use OLLAMA_CONTEXT_LENGTH=16384 or higher. The moment picker then runs locally; frame-based stages (layout picker, silent videos) still use Gemini if a key is present.

GPU acceleration (optional, NVIDIA)

The default image is CPU-only. With an NVIDIA card an 8-minute video clips in about a minute instead of 5–8. Install the NVIDIA Container Toolkit, then create docker-compose.override.yml:

services:
  backend:
    build:
      context: .
      args:
        GPU: "1"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu, video]

Publishing with Postiz

  1. Run Postiz yourself and connect TikTok, Instagram and/or YouTube inside it.
  2. Create a public API key in Postiz (Settings → Developers / Public API).
  3. In Clipwright Settings, enter your Postiz URL and key, then Test connection to list your channels.
  4. In the publish modal, tick the exact channel each clip should go to. Multiple channels per network are supported (for example two YouTube channels), so you pick the channel itself, not the platform, and schedule it with a DD/MM/YYYY date.

Clipwright uploads the clip to your Postiz instance and creates the post there; the platform tokens never leave your infrastructure.

API and webhooks

curl -X POST http://localhost:8000/api/process \
  -H "Content-Type: application/json" \
  -d '{"url": "https://youtube.com/watch?v=...", "acknowledged": true,
       "webhook_url": "https://your-server.com/hooks/clipwright"}'

Add webhook_url for exactly one callback when the job ends; with webhook_secret the body is signed X-Clipwright-Signature: sha256=…. Interactive docs are at /docs.

Tech stack

Python 3.11 · FastAPI · google-genai · faster-whisper · ultralytics (YOLOv8) · MediaPipe · FFmpeg · React 18 · Vite · Tailwind · Docker Compose.

License

MIT. Forked from OpenShorts; upstream copyright preserved in LICENSE and NOTICE.