Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

kaushal07wick/Captions

Repository files navigation

🧒 CaptionGen

AI-powered, auto-synced captions for YouTube Shorts. Removes the manual captioning pain β€” built on FastAPI + Whisper + FFmpeg for real-time caption generation.

βš™οΈ Features

  • ⚑ 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

πŸš€ Local Development

1. Clone the repo

git clone https://github.com/<your-username>/CaptionGen.git
cd CaptionGen

2. Create and activate a virtual environment

python3 -m venv .venv
source .venv/bin/activate # (Windows: .venv\Scripts\activate)

3. Install dependencies

pip install -r requirements.txt

4. Run the FastAPI server

cd api
uvicorn main:app --host 0.0.0.0 --port 8000 --reload

Then open your browser at:

http://127.0.0.1:8000

🧩 Example Workflow

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

🧱 Stack

  • FastAPI β€” backend + static serving
  • Whisper (OpenAI) β€” transcription engine
  • FFmpeg β€” caption rendering
  • yt-dlp β€” YouTube fetcher
  • pysrt β€” SRT generation and formatting

🧭 Next Version

  • Vision-based caption placement (CLIP / VideoLLaMA)
  • Real-time upload preview
  • Custom caption templates per brand

βš–οΈ License

This project is licensed under the MIT License . You are free to use, modify, and distribute it with attribution.

About

Automatic Caption Generation for YT shorts and raw videos.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /