Skip to content

princeofscale/VerticalVideoGenerator

Repository files navigation

VerticalVideoGen

CI codecov Python License: MIT Stars

Convert any YouTube video into ready-to-post TikTok, YouTube Shorts, and Instagram Reels clips — with AI-selected highlights, burned-in subtitles, and vertical reframing.

Demo GIF coming soon. To record your own: run uv run python run.py process "URL" -v, then capture the terminal with Terminalizer or Asciinema.

Features

  • AI highlight detection — selects the most viral moments using LLM scoring (Claude, GPT-4o, DeepSeek)
  • 5 subtitle styles — default, MrBeast, Hormozi, minimal, word-pop (burned in via libass)
  • 4 reframe modes — center crop, blur-zoom background, letterbox, smart face-detect
  • Batch processing — process a list of URLs from a file
  • Single-pass FFmpeg — cut + reframe + subtitles in one encode (~3× faster than separate passes)
  • Multi-platform — TikTok (9:16), YouTube Shorts (9:16), Instagram Reels (9:16)
  • Configurable — watermark, duration limits, clip count, language, CRF quality

How it works

graph LR
    A[YouTube URL] --> B[yt-dlp\nDownload]
    B --> C[Whisper\nTranscription]
    C --> D[LLM\nHighlight Analysis]
    D --> E[Highlight\nSelection]
    E --> F[Single-pass FFmpeg\ncut + reframe + subtitles]
    F --> G[Thumbnail\nGeneration]
    G --> H[metadata.json]
    H --> I[📁 clips/\n📁 thumbnails/]
Loading

Quick start

# 1. Install
git clone https://github.com/princeofscale/VerticalVideoGenerator
cd VerticalVideoGenerator
uv sync
cp VerticalVideoGen/.env.example VerticalVideoGen/.env
# Fill in at least one API key in .env (see below)

# 2. Process a video
uv run python run.py process "https://youtube.com/watch?v=..."

# 3. Batch process
uv run python run.py batch urls.txt

API keys

The tool needs one LLM provider for highlight analysis and one for transcription:

Service Variable Used for
Groq GROQ_API_KEY Whisper transcription (fast, free tier)
Anthropic ANTHROPIC_API_KEY Claude highlight analysis
OpenAI OPENAI_API_KEY GPT-4o highlight analysis
Pollinations POLLINATIONS_API_KEY Free LLM fallback

Minimum viable setup: GROQ_API_KEY + POLLINATIONS_API_KEY (both have free tiers).

Options

Flag Default Description
--platforms tiktok Target platforms (tiktok, youtube_shorts, reels)
--max-clips 5 Maximum clips per source video
--style default Subtitle style
--language auto Source language (e.g. en, ru)
--no-subtitles Disable burned-in subtitles
--no-reframe Disable vertical reframing
--no-thumbnails Disable thumbnail generation
--smart-reframe Face-aware reframing (requires pip install mediapipe opencv-python)
--letterbox Fit inside frame with black padding
--verbose Detailed logs

Subtitle styles

ID Look
default White text with black outline
mrbeast Bold yellow Impact — MrBeast style
hormozi Centered white, no shadow — Hormozi style
minimal Clean thin Helvetica
word_pop One word at a time — OpusClip style

Output

VerticalVideoGen/output/
└── <video_id>/
    ├── clips/
    │   └── tiktok/
    │       ├── clip_000.mp4
    │       └── clip_001.mp4
    ├── thumbnails/
    ├── <video_id>_transcript.json
    ├── <video_id>.srt
    └── metadata.json

Requirements

  • Python 3.11+
  • uv or pip
  • ffmpeg in PATH (with libass for subtitle rendering)

Contributing

See CONTRIBUTING.md. Issues and PRs are welcome.

License

MIT — see LICENSE.

About

Generate ready-to-publish vertical clips for TikTok, YouTube Shorts, and Instagram Reels.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors