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
juancarlos.cavero c1c6e23607 fix: use eu-west-3 as default AWS region for S3 public URLs
Fixes avatar images not loading in production when AWS_REGION env var
is not set. The bucket is in eu-west-3 but the default was us-east-1,
causing S3 PermanentRedirect errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:24:46 +01:00
dashboard feat: AI Shorts low-cost mode, UGC gallery, universal business support 2026-03-19 20:29:23 +01:00
fonts Update hooks, fix captions, and ignore uploads 2026-01-23 14:53:57 +01:00
.dockerignore added generate clips from video with gemini 2025-12-19 16:00:44 +01:00
.env.example feat: AI Shorts low-cost mode, UGC gallery, universal business support 2026-03-19 20:29:23 +01:00
.gitignore feat(seo): Implement GEO and SEO optimizations for clip generator keywords 2026-03-11 12:50:17 +01:00
app.py feat: AI Shorts low-cost mode, UGC gallery, universal business support 2026-03-19 20:29:23 +01:00
churchil_queen_vertical.gif feat: Add error handling and logging to video processing script for improved robustness 2025-08-19 12:58:39 +02:00
churchil_queen_vertical_short.gif chore: Update README to reflect project name change to AutoCrop-Vertical and add demo GIF 2025-08-19 13:32:46 +02:00
CLAUDE.md Add ElevenLabs voice dubbing and improve project setup 2026-01-23 20:24:15 +01:00
docker-compose.yml Update hooks, fix captions, and ignore uploads 2026-01-23 14:53:57 +01:00
Dockerfile added youtube studio 2026-02-20 01:11:27 +01:00
editor.py improved video edit with AI 2025-12-24 02:15:07 +01:00
hooks.py Update hooks, fix captions, and ignore uploads 2026-01-23 14:53:57 +01:00
LICENSE Add ElevenLabs voice dubbing and improve project setup 2026-01-23 20:24:15 +01:00
main.py added youtube studio 2026-02-20 01:11:27 +01:00
README.md feat: AI Shorts low-cost mode, UGC gallery, universal business support 2026-03-19 20:29:23 +01:00
requirements.txt added video ugc generator 2026-03-15 20:41:35 +01:00
s3_uploader.py fix: use eu-west-3 as default AWS region for S3 public URLs 2026-03-19 21:24:46 +01:00
saasshorts.py feat: AI Shorts low-cost mode, UGC gallery, universal business support 2026-03-19 20:29:23 +01:00
subtitles.py Add session recovery and subtitle customization UI 2026-03-07 19:49:27 +01:00
thumbnail.py Fix silent thumbnail generation failure and switch to gemini-3.1-flash 2026-03-09 18:13:17 +01:00
translate.py Add ElevenLabs voice dubbing and improve project setup 2026-01-23 20:24:15 +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

OpenShorts.app

License: MIT Open Source PRs Welcome

Free & open source AI video platform with 3 tools in one: Clip Generator, AI Shorts (UGC videos with AI actors), and YouTube Studio. Self-hosted with Docker. No watermarks, no limits.

OpenShorts Demo

Video Tutorial: How it works

OpenShorts Tutorial

Click the image above to watch the full walkthrough.


3 Tools in 1 Platform

1. Clip Generator

Turn long YouTube videos or local uploads into viral-ready 9:16 shorts for TikTok, Instagram Reels, and YouTube Shorts.

Clip Generator

2. AI Shorts (UGC Video Creator)

Generate marketing videos with AI actors for any product or business. No camera, no studio, no influencer budget. Just describe your product or paste a URL.

AI Shorts Setup

  • Two cost modes: Low Cost ($0.65/video) and Premium ($2/video)
  • Works for any business: SaaS, restaurants, e-commerce, coaching, local businesses
  • AI-generated actors with lip-sync, voiceover, b-roll, and TikTok-style subtitles
  • Choose from a shared avatar gallery or upload your own photo
  • Publish directly to TikTok, Instagram, and YouTube

3. YouTube Studio

Complete free AI YouTube toolkit: thumbnails, titles, descriptions, and direct publishing.

YouTube Studio

  • AI thumbnail generator with face overlay
  • 10 viral title suggestions with refinement chat
  • Auto-generated descriptions with chapter timestamps
  • One-click publish to YouTube

All generated videos and avatars are saved to a public gallery with SEO pages for each video.

UGC Gallery

  • Public gallery page with hover-to-play (/gallery)
  • Individual SEO video pages with og:video meta tags (/video/{id})
  • JSON-LD structured data for search engines
  • Avatar gallery with prompt history

Key Features

Clip Generator

  • Viral Moment Detection: Google Gemini 3.0 Flash analyzes transcripts and scene boundaries to detect 3-15 high-potential moments
  • Smart 9:16 Cropping: Dual-mode AI reframing — TRACK mode (MediaPipe + YOLOv8 face tracking) and GENERAL mode (blurred background)
  • Auto Subtitles: faster-whisper with word-level timestamps, styled and burned into clips
  • AI Voice Dubbing: ElevenLabs integration for 30+ languages with voice cloning
  • Hook Text Overlays: AI-generated attention-grabbing text overlays
  • AI Video Effects: Gemini-generated FFmpeg filters for professional effects

AI Shorts Pipeline

  1. Analyze: Scrape website URL + web research, or generate from manual description
  2. Script: AI writes viral scripts (hook - problem - solution - CTA format)
  3. Actor: Generate AI actors with Flux 2 Pro or select from shared gallery
  4. Voice: ElevenLabs TTS voiceover (English/Spanish, male/female)
  5. Video: Talking head generation (Hailuo 2.3 Fast img2video + VEED Lipsync)
  6. B-roll: AI-generated visuals with Ken Burns effect
  7. Composite: FFmpeg final assembly with subtitles and hook overlays
  8. Publish: Direct posting to TikTok, Instagram Reels, YouTube Shorts via Upload-Post

YouTube Studio

  • AI-powered title generation with 10 viral options
  • Interactive refinement chat for titles
  • AI thumbnail generation with custom face + background
  • Auto descriptions with chapter timestamps from Whisper transcript
  • Direct YouTube publishing via Upload-Post

Social Publishing

  • One-click posting to TikTok, Instagram Reels, and YouTube Shorts
  • Schedule posts for later
  • Upload-Post integration with async uploads

Infrastructure

  • S3 cloud backup (private bucket for clips, public bucket for gallery/avatars)
  • SEO gallery pages served by FastAPI with JSON-LD structured data
  • Shared avatar gallery across all users
  • Async job queue with configurable concurrency

Requirements

  • Docker & Docker Compose
  • Google Gemini API Key (Free — get it here) — required for all AI features
  • fal.ai API Key (Pay-per-use) — required for AI Shorts (actor generation, video, lip-sync)
  • ElevenLabs API Key (Free tier) — required for voiceover/dubbing
  • Upload-Post API Key (Optional, free tier) — for direct social posting

Getting Started

1. Clone

git clone https://github.com/your-username/OpenShorts.git
cd OpenShorts

2. Configure (optional)

cp .env.example .env
# Edit .env with your AWS keys for S3 backup

3. Launch

docker compose up --build

4. Open Dashboard

Navigate to http://localhost:5175

  1. Go to Settings and enter your API keys (Gemini, fal.ai, ElevenLabs, Upload-Post)
  2. Clip Generator: Paste a YouTube URL or upload a video to generate viral shorts
  3. AI Shorts: Describe your product or paste a URL to generate UGC marketing videos
  4. YouTube Studio: Generate thumbnails, titles, and descriptions for YouTube
  5. UGC Gallery: Browse all generated videos and avatars

Technical Pipeline

Clip Generator

  1. Ingest — YouTube download (yt-dlp) or local upload
  2. Transcribe — faster-whisper with word-level timestamps
  3. Detect — PySceneDetect for scene boundaries
  4. Analyze — Gemini identifies 3-15 viral moments (15-60s each)
  5. Extract — FFmpeg precise clip cutting
  6. Reframe — AI vertical cropping with subject tracking
  7. Effects — Subtitles, hooks, AI video effects
  8. Publish — S3 backup + Upload-Post social distribution

AI Shorts

  1. Analyze — Website scraping + Gemini web research (or manual description)
  2. Script — Gemini generates viral scripts with segments
  3. Actor — Flux 2 Pro portrait generation (or gallery/upload)
  4. Voice — ElevenLabs TTS voiceover
  5. Video — Hailuo 2.3 Fast img2video + VEED Lipsync (Low Cost) or Kling Avatar v2 (Premium)
  6. B-roll — Flux 2 Pro image generation + Ken Burns effect
  7. Composite — FFmpeg assembly with ASS subtitles and hook overlays
  8. Gallery — Upload to public S3 with metadata for SEO pages
  9. Publish — Upload-Post to TikTok, Instagram, YouTube

Tech Stack

Layer Technology
Backend Python 3.11, FastAPI, google-genai, faster-whisper, ultralytics (YOLOv8), mediapipe, opencv-python, yt-dlp, FFmpeg, httpx
Frontend React 18, Vite 4, Tailwind CSS 3.4
AI APIs Google Gemini, fal.ai (Flux, Hailuo, VEED, Kling), ElevenLabs
Infrastructure Docker + Docker Compose, AWS S3
Publishing Upload-Post API (TikTok, Instagram, YouTube)

Environment Variables

Server-side (.env):

Variable Description
AWS_ACCESS_KEY_ID AWS access key for S3
AWS_SECRET_ACCESS_KEY AWS secret key
AWS_REGION AWS region (default: us-east-1)
AWS_S3_BUCKET Private bucket for clip backup
AWS_S3_PUBLIC_BUCKET Public bucket for gallery/avatars
MAX_CONCURRENT_JOBS Concurrent processing limit (default: 5)

Client-side (encrypted in localStorage):

Key Description
GEMINI_API_KEY Google Gemini — required
FAL_KEY fal.ai — required for AI Shorts
ELEVENLABS_API_KEY ElevenLabs — required for voiceover/dubbing
UPLOAD_POST_API_KEY Upload-Post — optional, for social posting

Security & Performance

  • Non-Root Execution: Containers run as dedicated appuser
  • Concurrency Control: Semaphore-based job queue (MAX_CONCURRENT_JOBS)
  • Auto-Cleanup: Automatic purging of old jobs (1h retention)
  • Encrypted Keys: API keys encrypted client-side, never stored server-side
  • Upload Validation: Image uploads validated for format and minimum size
  • File Limits: 2GB upload limit protection

Social Media Setup (Upload-Post)

  1. Register: app.upload-post.com/login
  2. Create Profile: Go to Manage Users
  3. Connect Accounts: Link TikTok, Instagram, and/or YouTube
  4. Get API Key: Navigate to API Keys
  5. Use in OpenShorts: Paste the key in Settings

Contributions

Contributions are welcome! Whether it's adding new AI models, improving the lip-sync pipeline, or building new features — feel free to open a PR.

License

MIT License. OpenShorts is yours to use, modify, and scale.