| dashboard | ||
| videos | ||
| .dockerignore | ||
| .DS_Store | ||
| .gitignore | ||
| app.py | ||
| churchil_queen_vertical.gif | ||
| churchil_queen_vertical_short.gif | ||
| docker-compose.yml | ||
| Dockerfile | ||
| main.py | ||
| README.md | ||
| requirements.txt | ||
OpenShorts.app 🚀🎬
OpenShorts is an all-in-one open-source solution to automate the creation and distribution of viral vertical content. It transforms long YouTube videos or local files into high-potential short clips optimized for TikTok, Instagram Reels, and YouTube Shorts.
📺 Video Tutorial: How it works
Click the image above to watch the full walkthrough.
✨ Key Features
OpenShorts leverages state-of-the-art AI to handle the entire content lifecycle:
-
🧠 Viral Moment Detection:
- Faster-Whisper: High-speed, CPU-optimized transcription and word-level timestamps.
- Google Gemini 2.0 Flash: Advanced AI analysis to identify the 3-15 most viral moments based on hooks and engagement potential.
- Automatic Copywriting: Generates SEO-optimized titles and descriptions for all platforms.
-
✂️ Smart AI Cropping:
- YOLOv8 + OpenCV: intelligent subject tracking that keeps people/faces centered in the 9:16 frame.
- Dynamic Letterboxing: Automatically handles multiple subjects to preserve context when they are far apart.
-
📲 Direct Social posting:
- Upload-Post Integration: Share your generated clips directly to TikTok, Instagram, and YouTube with a single click.
- Profile Selector: Manage multiple social accounts easily through the dashboard.
-
🎨 Modern Web Dashboard:
- Real-time Progress: Watch clips appear as they are generated with a live results feed.
- Log Streaming: Follow the technical process with real-time log updates.
- Responsive Design: A premium, dark-mode glassmorphism interface.
🛠️ Requirements
- Docker & Docker Compose.
- Google Gemini API Key (Get it for free here).
- Upload-Post API Key (Optional, for direct social posting. Free tier available, no credit card required).
📲 Social Media Setup (Upload-Post)
To enable direct posting, follow these steps:
- Login/Register: app.upload-post.com/login
- Create Profile: Go to Manage Users and create a user profile.
- Connect Accounts: In the same section, connect your TikTok, Instagram, or YouTube accounts to that profile.
- Get API Key: Navigate to API Keys and generate your key.
- Use in OpenShorts: Paste the API Key and select your Profile in the dashboard.
🚀 Getting Started
The easiest way to run OpenShorts is using Docker Compose.
1. Setup
git clone https://github.com/your-username/OpenShorts.git
cd OpenShorts
2. Launch the Application
docker compose up --build
3. Access the Dashboard
Open your browser and navigate to:
http://localhost:5173
- Enter your Gemini API Key.
- (Optional) Enter your Upload-Post API Key to enable social sharing.
- Paste a YouTube URL or Upload a Video.
- Click "Generate Clips" and watch the magic happen!
🏗️ Technical Pipeline
- Ingestion: Downloads YouTube videos via
yt-dlpor handles local uploads. - Transcription:
faster-whisperconverts audio to text in seconds. - AI Intelligence: Gemini reads the transcript and selects periods of high interest.
- Extraction: FFmpeg precisely cuts the selected segments.
- Reframing: AI-powered visual tracking crops clips to vertical format.
- Distribution: One-click posting via Upload-Post API.
🔒 Security & Performance
- Non-Root Execution: Containers run as a dedicated
appuserfor security. - Concurrency Control: Configurable job queue (
MAX_CONCURRENT_JOBS). - Auto-Cleanup: Automatic purging of old jobs and temporary files.
- File Limits: Built-in protection against oversized uploads.
🤝 Contributions
Contributions are welcome! Whether it's adding new AI models or improving the cropping engine, feel free to open a PR.
📄 License
MIT License. OpenShorts is yours to use, modify, and scale.

