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.
Click the image above to watch the full walkthrough.
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 & 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.
- Dual-Mode Strategy: Automatically detects scene composition to apply the best framing strategy.
-
☁️ 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.
-
📲 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.
-
🎙️ 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.
-
🎨 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.
-
📺 YouTube Studio (Full Publishing Pipeline):
- AI Title Generation: Upload a video and let Gemini analyze the transcript to suggest viral, SEO-optimized titles with AI-ranked top picks.
- Title Refinement Chat: Iteratively refine suggested titles via a built-in chat interface — ask for more clickbait, different tone, etc.
- AI Thumbnail Generation: Generate professional thumbnails with optional face overlay, custom background, and extra creative instructions.
- AI Description with Chapters: Automatically generates a YouTube description with chapter timestamps derived from the Whisper transcript.
- One-Click YouTube Publishing: Publish the final video with its title, thumbnail, and description directly to YouTube via Upload-Post integration.
- Manual Mode: Skip video analysis and enter your own title to jump straight to thumbnail generation.
- 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).
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.
To enable automatic backup of your clips to S3:
- Environment Variables: Set the following in your
.envfile or system environment:AWS_ACCESS_KEY_ID: Your AWS access key.AWS_SECRET_ACCESS_KEY: Your AWS secret key.AWS_REGION: (Optional) Defaults tous-east-1.AWS_S3_BUCKET: (Optional) Defaults toopenshorts.app-clips.
- Bucket: Clips are uploaded to the specified bucket automatically after generation.
The easiest way to run OpenShorts is using Docker Compose.
git clone https://github.com/your-username/OpenShorts.git
cd OpenShortsdocker compose up --buildOpen 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!
- 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.
- Backup: Automated silent upload of clips and metadata to AWS S3.
- Distribution: One-click posting via Upload-Post API.
- YouTube Studio: Full publishing pipeline — AI titles, thumbnails, descriptions with chapters, and direct YouTube upload.
- 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 are welcome! Whether it's adding new AI models or improving the cropping engine, feel free to open a PR.
MIT License. OpenShorts is yours to use, modify, and scale.

