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.

What it solves

This tool turns any long YouTube video into several short, vertical clips (9:16) ready for TikTok, Reels, or Shorts. It replaces paid services like Opus Clip or Vidyo.ai that charge monthly subscriptions and cap how many minutes you can process. Here it's free and open source: you only pay for the underlying API usage (or run everything locally), there are no per-clip credits, no watermarks, and you can edit the highlight-ranking logic yourself.

How it works

The pipeline has a few steps. First it downloads the video (via MuAPI in API mode, or yt-dlp in local mode). Then it transcribes the audio to a timestamped transcript using Whisper (cloud or local faster-whisper). An LLM classifies the content type (podcast, tutorial, etc.) and then scans the transcript through a "virality framework" — looking for hooks, emotional peaks, opinion bombs, revelations, conflict, quotable lines, story peaks, and practical value. Each candidate highlight gets a score from 0–100, a hook sentence, and a one-line reason. Overlapping highlights are deduplicated by score, the top N are selected, and each is auto-cropped to the requested aspect ratio (default 9:16) using MuAPI's auto-crop or local OpenCV face tracking. Long videos over 30 minutes are chunked into 20-minute overlapping pieces so nothing is missed. Output is a list of mp4 URLs (or local paths) plus metadata.

Who it’s for

Creators, agencies, and developers who want to repurpose long-form YouTube content into short clips without paying for a subscription service. It's also for developers who want to build their own clipping pipeline: the tool is MIT-licensed, can be imported as a Python library, and exposes a CLI with JSON output for automation.

Highlights

  • Free and open source alternative to Opus Clip, Vidyo.ai, Klap, and similar tools
  • Two modes: API mode (fast, uses MuAPI) or local mode (runs offline except for the LLM call)
  • Virality-aware highlight selection with scores, hooks, and reasons for each clip
  • Works with any aspect ratio (9:16, 1:1, etc.) and any resolution
  • Batch processing via a simple xargs command over a list of URLs
  • JSON output for downstream automation
  • Self-hostable and white-label friendly (MIT license, importable as a Python library)
  • Smart deduplication of overlapping highlights and long-video chunking

Related

  • Project
  • Project
  • Project
  • Project
  • Project