AI-powered, auto-synced captions for YouTube Shorts. Removes the manual captioning pain β built on FastAPI + Whisper + FFmpeg for real-time caption generation.
- β‘ Direct YouTube Shorts support β paste any link, get captioned video
- π§ OpenAI Whisper β accurate transcription with natural pacing
- πͺΆ Micro-captions (2β3 words) β timed for natural rhythm
- π§Ή Auto cleanup β punctuation normalization and overlap fixes
- π¨ Styled burn-in captions β crisp white text with dynamic highlights
- π§ Face-aware positioning β captions adapt to visual composition
git clone https://github.com/<your-username>/CaptionGen.git cd CaptionGen
python3 -m venv .venv source .venv/bin/activate # (Windows: .venv\Scripts\activate)
pip install -r requirements.txt
cd api
uvicorn main:app --host 0.0.0.0 --port 8000 --reloadThen open your browser at:
http://127.0.0.1:8000
| Step | Action | Output |
|---|---|---|
| 1 | Paste a YouTube Shorts URL | Video fetched automatically |
| 2 | Whisper transcribes + timestamps | Clean .srt generated |
| 3 | FFmpeg burns captions | outputs/videos/<title>_captioned.mp4 |
| 4 | View & download in browser | Cinematic captions, ready to post |
- FastAPI β backend + static serving
- Whisper (OpenAI) β transcription engine
- FFmpeg β caption rendering
- yt-dlp β YouTube fetcher
- pysrt β SRT generation and formatting
- Vision-based caption placement (CLIP / VideoLLaMA)
- Real-time upload preview
- Custom caption templates per brand
This project is licensed under the MIT License . You are free to use, modify, and distribute it with attribution.