Self-hosted Opus Clip alternative — reels.biba.live
Go to file
Sebastjan Artič 91cc03658d Multi-upload batch queue + Telegram notifications
Changes:

1. Frontend multi-upload:
   - File input now has 'multiple' attribute, drag-drop accepts multiple
   - File queue list with per-file artist/title preview + remove button
   - 'Pošlji vse' uploads sequentially (one at a time to avoid network saturation)
   - Each file gets same batch_id for Telegram batch summary
   - After upload, queue clears, jobs appear in right sidebar

2. Backend queue worker:
   - New _queue_worker() background thread processes 'queued' jobs sequentially
   - Only 1 job at a time to keep openclaw stable (avoid CPU/RAM thrash)
   - FIFO order by created_at
   - Auto-starts on app startup after job resume

3. Job submission flow change:
   - /api/process and /api/youtube no longer call background.add_task directly
   - Just mark status='queued', queue worker picks up
   - This means upload completes fast, processing happens in background
   - User can close browser, jobs continue

4. Telegram notifications (FOLX Alerts bot):
   - Per-job: 'Reel pripravljen: Lady Gaga - Abracadabra (29s, 30 MB)'
   - Per-job failed: 'Reel ni uspel: <name> + error message'
   - Batch summary: 'Batch končan: 10/10 reels pripravljeni' (only if >1 in batch)
   - Uses existing TELEGRAM_TOKEN + TELEGRAM_CHAT_ID env vars
   - app/telegram.py module with notify_job_done(), notify_job_failed(),
     notify_batch_complete()

5. batch_id field:
   - Added to Job model + StartJobIn pydantic
   - Saved during upload + process
   - Used to count batch progress and trigger summary notification

User experience:
- Drag 20 videos at once
- Click 'Pošlji'
- Close browser, go grab coffee
- Telegram sends 'Reel pripravljen' for each
- After all done: 'Batch končan: 20/20 reels pripravljeni' summary
- Open app to download all
2026-04-29 15:12:38 +00:00
app Multi-upload batch queue + Telegram notifications 2026-04-29 15:12:38 +00:00
scripts Multi-upload batch queue + Telegram notifications 2026-04-29 15:12:38 +00:00
templates Multi-upload batch queue + Telegram notifications 2026-04-29 15:12:38 +00:00
.env.example Initial: reels clipper app 2026-04-28 15:28:22 +00:00
.gitignore Initial: reels clipper app 2026-04-28 15:28:22 +00:00
docker-compose.yml Initial: reels clipper app 2026-04-28 15:28:22 +00:00
Dockerfile Add Deno runtime for yt-dlp YouTube nsig challenge solving 2026-04-28 16:05:09 +00:00
README.md Initial: reels clipper app 2026-04-28 15:28:22 +00:00
requirements.txt ACRCloud auto-recognition: never block uploads, fall back to fingerprinting 2026-04-29 14:24:53 +00:00

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

  1. V Coolify ustvari nov projekt → Docker Compose iz tega repoja
  2. Domena: reels.biba.live
  3. Env vars:
    AUTH_USER=sebastjan
    AUTH_PASS=<močno geslo>
    MAX_UPLOAD_MB=2000
    
  4. Volume reels_data se ustvari avtomatsko
  5. 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, vrne job_id
  • POST /api/youtube — JSON {url, mode, lang, ...}
  • POST /api/process — start processing za uploaded job
  • GET /api/jobs — list vseh
  • GET /api/jobs/{id} — status
  • GET /api/stream/{id} — SSE stream progress
  • GET /api/download/{id} — final reel
  • DELETE /api/jobs/{id} — pobriši

Dependencies

  • FFmpeg (system)
  • faster-whisper (transkripcija)
  • OpenCV (face detection)
  • yt-dlp (YouTube)
  • FastAPI + uvicorn (server)