AI YouTube Shorts Generator: A Self-Hosted Clipping Pipeline with Editable Highlights
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.
At a glance
- What is it?
- This open-source Python tool turns long YouTube videos into vertical shorts using LLM highlight ranking and Whisper transcription. It offers both a cloud API mode and a local mode, but the real trade-off is control versus setup complexity.
- Who is it for?
- Adopt this if you are a developer or creator who wants to avoid per-clip SaaS fees, needs to customize the highlight algorithm, or wants batch processing and JSON output. Skip it if you lack Python skills or expect a zero-config tool, because local mode requires ffmpeg, an LLM API key, and model downloads.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What This Tool Actually Replaces
The project targets the paid clipping services that turn long YouTube videos into vertical shorts. Services like Opus Clip, Vidyo.ai, Klap, and SubMagic charge monthly subscriptions between $20 and $300 and often cap the minutes you can process. This repository offers a free, open-source pipeline that runs on your own machine or server. The intended users are creators, agencies, and developers who want to avoid per-clip credits and watermarks. The README emphasizes that you get full control over the highlight algorithm, which is a black box in commercial tools. For a developer, that means you can inspect and modify the scoring logic, something no SaaS will allow.
Two Modes, One Downstream Output
The tool has two operating modes, controlled by the --mode flag. The default is api mode, which uses a service called MuAPI for downloading, transcription, cropping, and highlight ranking. The alternative is local mode, which runs entirely on your machine using yt-dlp, faster-whisper, and ffmpeg or OpenCV. In local mode, only the LLM highlight ranking step is remote, requiring an OpenAI or Gemini API key. Both modes produce the same output shape: a set of ranked short clips with associated scores, hooks, and reasons. This design means you can prototype with the API and later switch to local mode without changing your downstream code, as long as the output format matches.
How Highlight Selection Works
The highlight detection is not a simple keyword search. The README describes a virality-aware framework that ranks clips based on hooks, emotional peaks, opinion bombs, revelation moments, conflict, quotable lines, story peaks, and practical value. Each highlight comes with a viral score, an opening hook line, and a one-sentence explanation of why it works. This is a meaningful departure from generic 'interesting moment' detection. The scoring criteria are editable because the code is open source, which is the core advantage over commercial black boxes. However, the README does not detail the exact prompt or scoring weights. If you want to customize the algorithm, you will need to read the source code yourself.
Getting It Running: Commands and Config
Installation follows a standard Python workflow. Clone the repository, create a virtual environment with Python 3.10 or later, and install dependencies from requirements.txt. For local mode, you also install requirements-local.txt. You then create a .env file with the relevant keys. For API mode, set MUAPI_API_KEY. For local mode, set LLM_PROVIDER to openai or gemini, plus the corresponding API key and optionally the model name. The defaults are gpt-4o-mini for OpenAI and gemini-2.5-flash for Gemini. You can also set LOCAL_WHISPER_MODEL to tiny, base, small, medium, or large-v3, and LOCAL_WHISPER_DEVICE to auto, cpu, or cuda. The basic command is python main.py "https://www.youtube.com/watch?v=VIDEO_ID" for API mode, or add --mode local for local processing. Local mode writes shorts to ./output/short_01.mp4 and so on.
Long Videos, Deduplication, and Cropping
Three features address common clipping pain points. Videos over 30 minutes are automatically chunked with overlap, so the transcript and highlight detection do not miss content at boundaries. A smart dedupe step collapses overlapping highlights by score, which prevents near-duplicate clips from appearing in the final set. For cropping, API mode uses MuAPI's auto-crop, while local mode runs OpenCV face tracking with motion smoothing. This is a critical difference: the quality of the vertical crop in local mode depends on OpenCV's face tracking, which may fail for videos with no faces or heavy motion. The README does not specify how the crop handles non-face content, so test with your own footage.
The Catch: API Dependency and Setup Burden
The biggest limitation is that the default API mode is not fully self-hosted. It depends on MuAPI, a third-party service, for download, transcription, and cropping. The README says you pay only for API usage, but it does not list prices. That means the 'free' claim applies to the software, not the cloud operations. Local mode removes that dependency but shifts the burden to your hardware and an LLM API key. Running faster-whisper with a large model on CPU will be slow; the README suggests using CUDA if available, but that requires a compatible GPU. For a creator who just wants quick clips, setting up ffmpeg, downloading Whisper models, and configuring environment variables may be more friction than paying a monthly subscription.
Alternatives and the Real Difference
The obvious alternative is the commercial SaaS tools this project mimics. Opus Clip and Klap offer a polished user interface, no installation, and managed processing. The difference in approach is that those tools hide the highlight algorithm and charge per minute or per month. This project gives you the source code and a CLI, so you can batch process a list of URLs with xargs, as the README mentions. Another alternative is building your own pipeline from yt-dlp, faster-whisper, and an LLM directly. That gives you maximum control but requires you to write the glue code yourself. This project already provides that glue, which is its value. However, if you want a pure local, no-LLM solution, neither this project nor the SaaS tools fit, because the highlight ranking always requires an LLM call.
Maintenance, License, and Upgrade Cost
The repository has no releases listed, and the last push was in September 2026, so it appears actively maintained. The license is listed as unknown in the metadata, but the README badge says MIT licensed. That discrepancy is a red flag: do not assume MIT until you check the LICENSE file in the repository. If it is MIT, you can import it as a Python library and embed it in commercial products, as the README claims. The upgrade cost is moderate: because the tool wraps external APIs (MuAPI, OpenAI, Gemini), any change to those APIs could break the pipeline, and you would need to update your local code. The local dependencies, faster-whisper and OpenCV, are stable but large. For a developer, the maintenance cost is mostly in tracking API changes and adjusting the highlight prompts if the quality drifts.
Editorial conclusion
Adopt this if you are a developer or creator who wants to avoid per-clip SaaS fees, needs to customize the highlight algorithm, or wants batch processing and JSON output. Skip it if you lack Python skills or expect a zero-config tool, because local mode requires ffmpeg, an LLM API key, and model downloads. Before committing, verify the MuAPI pricing and data handling for API mode, and test local mode on a short video to confirm the output quality and processing time on your hardware.
Community notes