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
2025-12-20 04:59:38 +01:00
dashboard reafactor readme added instructions and texts 2025-12-20 04:59:38 +01:00
videos added docker compose, and youtube url process 2025-12-19 13:47:23 +01:00
.dockerignore added generate clips from video with gemini 2025-12-19 16:00:44 +01:00
.DS_Store added generate clips from video with gemini 2025-12-19 16:00:44 +01:00
.gitignore ignore cache 2025-12-19 20:31:52 +01:00
app.py reafactor readme added instructions and texts 2025-12-20 04:59:38 +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
docker-compose.yml added front-end and backend 2025-12-19 17:59:03 +01:00
Dockerfile added more security to dockerfile 2025-12-19 18:24:57 +01:00
main.py fix yt-dlp error in prod 2025-12-19 22:42:53 +01:00
README.md reafactor readme added instructions and texts 2025-12-20 04:59:38 +01:00
requirements.txt added upload to social networks and change to fast-whisper 2025-12-19 20:30:13 +01:00

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.

OpenShorts Demo


✨ Key Features

OpenShorts leverages state-of-the-art AI to handle the entire content lifecycle:

  1. 🧠 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.
  2. ✂️ 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.
  3. 📲 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.
  4. 🎨 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).

📲 Social Media Setup (Upload-Post)

To enable direct posting, follow these steps:

  1. Login/Register: app.upload-post.com/login
  2. Create Profile: Go to Manage Users and create a user profile.
  3. Connect Accounts: In the same section, connect your TikTok, Instagram, or YouTube accounts to that profile.
  4. Get API Key: Navigate to API Keys and generate your key.
  5. Use in OpenShorts: Paste the API Key and select your Profile in the dashboard.

Upload-Post Setup Guide


🚀 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

  1. Enter your Gemini API Key.
  2. (Optional) Enter your Upload-Post API Key to enable social sharing.
  3. Paste a YouTube URL or Upload a Video.
  4. Click "Generate Clips" and watch the magic happen!

🏗️ Technical Pipeline

  1. Ingestion: Downloads YouTube videos via yt-dlp or handles local uploads.
  2. Transcription: faster-whisper converts audio to text in seconds.
  3. AI Intelligence: Gemini reads the transcript and selects periods of high interest.
  4. Extraction: FFmpeg precisely cuts the selected segments.
  5. Reframing: AI-powered visual tracking crops clips to vertical format.
  6. Distribution: One-click posting via Upload-Post API.

🔒 Security & Performance

  • Non-Root Execution: Containers run as a dedicated appuser for 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.