Opus Clip's worst nightmare is a Python script
An open-source pipeline that turns long YouTube videos into vertical shorts by asking an LLM what actually goes viral.

What it does Feed it a YouTube URL (or local file) and it spits out ranked, auto-cropped 9:16 clips ready for TikTok, Reels, or Shorts. Under the hood: Whisper transcription, an LLM scoring moments by “hook moments, emotional peaks, opinion bombs, revelation moments, conflict, quotable lines, story peaks, and practical value,” then vertical reframing via either a hosted API or local OpenCV face-tracking.
The interesting bit
The virality framework is fully exposed and editable in highlights.py — not a black-box SaaS algorithm. You can tweak what counts as viral, swap between OpenAI and Gemini for ranking, and even run mostly offline (--mode local) with only the LLM call leaving your machine. It also auto-chunks videos over 30 minutes with overlap so long-form content doesn’t get shortchanged.
Key highlights
- Dual-mode architecture: fast API path via MuAPI, or local path with
yt-dlp+faster-whisper+ffmpeg - Each clip gets a 0-100 viral score, a hook sentence, and a one-line explanation of why it should perform
- Smart deduplication collapses overlapping highlights by score
- JSON output (
--output-json) for full pipeline automation - MIT licensed, importable as a Python library (
generate_shorts(...))
Caveats
- Default API mode leans on MuAPI, a commercial service the repo promotes fairly heavily (it’s also the project’s apparent business model)
- Local mode still requires an LLM API key; there’s no fully offline option for highlight ranking
- The README mentions
gpt-5-minifor API-mode LLM ranking, which doesn’t exist — likely a typo for GPT-4o mini or similar
Verdict Worth a look if you’re a creator, agency, or developer who wants clip generation without subscription lock-in and doesn’t mind some API key juggling. Skip it if you need a fully offline, zero-API solution or if you trust your own taste more than an LLM’s idea of “opinion bombs.”
Frequently asked
- What is SamurAIGPT/AI-Youtube-Shorts-Generator?
- An open-source pipeline that turns long YouTube videos into vertical shorts by asking an LLM what actually goes viral.
- Is AI-Youtube-Shorts-Generator open source?
- Yes — SamurAIGPT/AI-Youtube-Shorts-Generator is an open-source project tracked on heatdrop.
- What language is AI-Youtube-Shorts-Generator written in?
- SamurAIGPT/AI-Youtube-Shorts-Generator is primarily written in Python.
- How popular is AI-Youtube-Shorts-Generator?
- SamurAIGPT/AI-Youtube-Shorts-Generator has 4.3k stars on GitHub and is currently cooling off.
- Where can I find AI-Youtube-Shorts-Generator?
- SamurAIGPT/AI-Youtube-Shorts-Generator is on GitHub at https://github.com/SamurAIGPT/AI-Youtube-Shorts-Generator.