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
2026-02-20 01:11:27 +01:00
dashboard added youtube studio 2026-02-20 01:11:27 +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 added youtube studio 2026-02-20 01:11:27 +01:00
.gitignore added youtube studio 2026-02-20 01:11:27 +01:00
app.py added youtube studio 2026-02-20 01:11:27 +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 Add ElevenLabs voice dubbing and improve project setup 2026-01-23 20:24:15 +01:00
requirements.txt Update hooks, fix captions, and ignore uploads 2026-01-23 14:53:57 +01:00
s3_uploader.py Update hooks, fix captions, and ignore uploads 2026-01-23 14:53:57 +01:00
subtitles.py Add ElevenLabs voice dubbing and improve project setup 2026-01-23 20:24:15 +01:00
thumbnail.py added youtube studio 2026-02-20 01:11:27 +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

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

📺 Video Tutorial: How it works

OpenShorts Tutorial

Click the image above to watch the full walkthrough.


✨ 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 & Tracking (New V2 Engine):

    • Dual-Mode Strategy: Automatically detects scene composition to apply the best framing strategy.
      • TRACK Mode (Single Subject): Uses MediaPipe Face Detection + YOLOv8 fallback for ultra-fast, robust subject tracking. Features a "Heavy Tripod" stabilization engine that eliminates jitter and unnatural movements, providing smooth, cinematic reframing. Includes Speaker Identification to stick to the active speaker and avoid erratic switching.
      • GENERAL Mode (Groups/Landscapes): For scenes with multiple people or no clear subject, it automatically switches to a professional blurred-background layout, preserving the full width of the original shot while filling the 9:16 vertical space.
    • Intelligent Scene Analysis: Pre-scans every scene to determine the optimal strategy before processing.
  3. ☁️ Automated S3 Backup:

    • Silent Background Upload: Once clips are generated, they are automatically uploaded to an AWS S3 bucket.
    • Seamless Integration: Operates in the background without affecting processing logs or UI performance.
  4. 📲 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.
  5. 🎙️ AI Voice Dubbing:

    • ElevenLabs Integration: Translate your clips to 30+ languages with AI-powered voice dubbing.
    • Voice Cloning: Preserves the original speaker's voice characteristics in the new language.
    • Auto-Subtitles: Automatically generates subtitles in the dubbed language.
  6. 🎨 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).
  • ElevenLabs API Key (Optional, for AI voice dubbing. Get it here).

📲 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.

☁️ AWS S3 Setup (Optional)

To enable automatic backup of your clips to S3:

  1. Environment Variables: Set the following in your .env file or system environment:
    • AWS_ACCESS_KEY_ID: Your AWS access key.
    • AWS_SECRET_ACCESS_KEY: Your AWS secret key.
    • AWS_REGION: (Optional) Defaults to us-east-1.
    • AWS_S3_BUCKET: (Optional) Defaults to openshorts.app-clips.
  2. Bucket: Clips are uploaded to the specified bucket automatically after generation.

🚀 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. Backup: Automated silent upload of clips and metadata to AWS S3.
  7. 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.