Self-hosted Opus Clip alternative — reels.biba.live
Real-world failure: 'Ansambel Saša Avsenika - ŽENA ME TEPE'
- Refren starts with 'Žena me tepe' at 78.0s
- Scribe's segment boundary: word 'Žena' was end of previous segment (73.9-78.2s)
while new segment 'tepe, mi prazni žepe' started at 78.3s
- Claude picked clip start = 78.3s (segment boundary)
- Fade-in 0.4s on vocal start = inaudible 'Že-'
- User hears: '...na me tepe' (cut)
Three-part fix:
1. PROMPT: instruct Claude to start clip ~0.3s BEFORE first chorus word
(not exactly at it). Concrete example with timing math.
2. POST-LLM EXTENSION: scan corrected_segments for boundary cases:
- If clip start falls MID-segment → extend back to segment start - 0.2s
- If a previous segment ended within 0.5s of clip start → check if its
last word might actually be the first chorus word, extend back to it
- Uses word-level timestamps when available (Scribe provides these)
3. FADE-IN: was 0.4s when starting on vocal — too long, audibly cuts first
word. Reduced to 0.05s (just click prevention, not audible). Still 0.2s
for instrumental intros where fade is musically appropriate.
Now 'Žena' will be heard fully — clip starts at ~77.5-77.7s, word starts
at 78.0s, plenty of buffer.
|
||
|---|---|---|
| app | ||
| scripts | ||
| templates | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
| requirements.txt | ||
Reels Clipper · biba.live
Self-hosted Opus Clip alternativa za FOLX TV / PTC. Pretvori 16:9 video v 9:16 reels/shorts/tiktok format z auto face tracking, podnapisi (sl/de/en) in avto-detekcijo refrena v glasbenih pesmih.
Features
- 📤 Drag & drop upload (do 2 GB)
- 📺 YouTube URL paste (yt-dlp)
- 🎯 Smart reframe: track (face follow), center, blur (za glasbo)
- 🎵 Auto-chorus detection (Whisper + energy hibrid)
- 📝 Burned-in podnapisi (faster-whisper, multi-jezik)
- 🎨 3 stili podnapisov: reels, yellow (MrBeast), minimal
- 🔐 HTTP Basic Auth
- 📊 Real-time progress (Server-Sent Events)
- 📦 Docker / Coolify ready
Quick start (lokalno)
docker compose up --build
# odpri http://localhost:8000
Default login: sebastjan / nastavi AUTH_PASS v .env.
Coolify deploy
- V Coolify ustvari nov projekt → Docker Compose iz tega repoja
- Domena:
reels.biba.live - Env vars:
AUTH_USER=sebastjan AUTH_PASS=<močno geslo> MAX_UPLOAD_MB=2000 - Volume
reels_datase ustvari avtomatsko - Deploy → Coolify postavi Traefik reverse proxy + SSL via Let's Encrypt
Pipeline
Upload / YouTube
↓
[ yt_download.py ] ← samo če YouTube
↓
[ find_chorus.py ] ← samo če auto_chorus=true (Whisper + RMS analiza)
↓
[ reframe.py ] ← 16:9 → 9:16 (track / center / blur)
↓
[ subtitle.py ] ← Whisper transkripcija + burn-in
↓
reel.mp4
API
POST /api/upload— multipart file upload, vrnejob_idPOST /api/youtube— JSON{url, mode, lang, ...}POST /api/process— start processing za uploaded jobGET /api/jobs— list vsehGET /api/jobs/{id}— statusGET /api/stream/{id}— SSE stream progressGET /api/download/{id}— final reelDELETE /api/jobs/{id}— pobriši
Dependencies
- FFmpeg (system)
- faster-whisper (transkripcija)
- OpenCV (face detection)
- yt-dlp (YouTube)
- FastAPI + uvicorn (server)