Anil-matcha /AI-Youtube-Shorts-Generator

Open-source alternative to Opus Clip, Vidyo.ai, Klap & SubMagic. Turn long-form YouTube videos into viral 9:16 shorts using LLM highlight detection, Whisper transcription, and auto vertical cropping — free, no watermarks, no per-clip credits.

★ 6,103⑂ 1,109👁 60⑃ 38● 46▤ 0
PythonMITCreated 2024-06-28www.vadoo.tv/ai-youtube-shorts-generator
+34
日增长
6,103
stars
1,109
forks
60
watchers
38
prs
46
issues
0
releases

README

AI YouTube Shorts Generator




The open-source alternative to Opus Clip, Vidyo.ai, Klap, SubMagic, 2short.ai, and other AI clipping tools. Drop in any long-form YouTube video and get back ranked, viral-ready 9:16 shorts — for free, with no per-clip credits, no watermarks, and full control over the highlight algorithm.

Built for creators, agencies, and developers who don't want to pay $20–$300/month or be capped on minutes processed. Uses GPT-class LLM highlight detection and Whisper transcription to extract the most viral-worthy moments and auto-crop them vertically for TikTok, Reels, and Shorts.


▶  Watch: Seedance 2.5 Flash API: Nearly 2x Faster, 34% Cheaper (How to Use It) 

 Building your own Opus Clip–style SaaS? Skip the infra and ship on the same APIs that power this repo:
 - AI Clipping API — end-to-end clip selection + render
 - Auto-Crop API — vertical reframing only

!longshorts


  
    
  


 🎨 Explore 50+ more open-source AI apps →

 Why Use This Instead of Opus Clip / Vidyo.ai / Klap?

| | This repo | Opus Clip / Vidyo.ai / Klap / SubMagic |
|---|---|---|
| Price | Free + open source (pay only for API usage) | $20–$300/month subscriptions |
| Per-clip credits | None — process unlimited videos | Monthly minute caps, overage fees |
| Watermarks | Never | On free tiers |
| Highlight algorithm | Fully editable virality framework | Black box |
| Output format | Any aspect ratio, any resolution | Locked presets |
| Batch processing | xargs an entire URL list | Manual upload one-by-one |
| JSON / API output | Built-in (--output-json) | Limited or paid tier only |
| Self-hostable | Yes — runs on your machine or server | SaaS only, your videos sit on their servers |
| White-label / embeddable | Yes — MIT licensed, import as Python lib | No |

 Features

- 🎬 YouTube In, Vertical Out: Hand it any YouTube URL — get back N viral-ready 9:16 mp4s
- 🔀 Two Modes — API (fast) or Local (offline): Default --mode api uses MuAPI for download/transcription/cropping; --mode local runs entirely on your machine with yt-dlp, faster-whisper, and ffmpeg/opencv, and lets you pick OpenAI or Gemini for highlight ranking
- 🤖 Virality-Aware Highlight Selection: Clips ranked on hooks, emotional peaks, opinion bombs, revelation moments, conflict, quotable lines, story peaks, and practical value — not just generic "interesting"
- 📈 Score + Hook + Reason for Every Clip: Each highlight comes with a viral score, an opening hook line, and a one-sentence explanation of why it works
- 🎤 Whisper Transcription, Your Choice: Cloud (/openai-whisper via MuAPI) or local (faster-whisper, CPU or CUDA) — same downstream output shape
- 🧩 Long-Video Aware: Videos over 30 minutes are auto-chunked with overlap so nothing gets missed
- ♻️ Smart Dedupe: Overlapping highlights are collapsed by score so you never get two near-duplicate clips
- 🎯 Smart Vertical Crop: API mode uses MuAPI's auto-crop; local mode runs OpenCV face tracking with motion smoothing
- 📱 Any Aspect Ratio: 9:16 for 

Top issues

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON