A Streamlit-based web app that summarizes YouTube videos into structured reports or notes using:
- Google Gemini AI for summarization
- YouTubeTranscriptApi for transcript fetching
- Faster-Whisper for audio transcription (fallback when no transcript)
- yt-dlp for audio downloading
- ReportLab for generating PDF reports
- ✔ Summarizes entire YouTube videos into structured reports (Introduction, Main Points, Key Takeaways)
- ✔ Supports videos without subtitles using Whisper transcription
- ✔ Handles long transcripts with chunking + merging
- ✔ Downloads PDF notes with clean formatting
- ✔ Displays video info and thumbnail
- ✔ Uses Streamlit for UI
- Python 3.10+ (Recommended)
- Streamlit (Frontend UI)
- Google Generative AI (Gemini) for summarization
- Faster-Whisper for speech-to-text
- yt-dlp for audio download
- YouTubeTranscriptApi for captions
- ReportLab for PDF generation
AI-Exam-System/
├── main.py
├── requirements.txt
├── README.md
├── LICENSE
└── .gitignore
git clone https://github.com/EbrahimAR/Youtube-Video-Summarizer.git
cd youtube-video-summarizerpython -m venv venv
source venv/bin/activate # For Linux/Mac
venv\Scripts\activate # For Windowspip install -r requirements.txtYou need a Gemini API key from Google AI Studio.
Add it as:
- Environmental Variable:
(Windows Powershell)
export GEMINI_API_KEY="your_api_key_here"
setx GEMINI_API_KEY "your_api_key_here"
OR
- Streamlit Secrets:
Create
.streamlit/secrets.toml:GEMINI_API_KEY = "your_api_key_here"
- Run the script:
streamlit run main.py
- ✅ Detailed Report – Creates a structured summary (Introduction, Main Points, Key Takeaways)
- ✅ PDF Export – Save summaries as a PDF
- ✅ Whisper Fallback – Handles videos without captions
- ✅ Gemini AI Integration – For high-quality summarization
- Add UI option for summary style (Detailed Report / Bullet Notes)
- Support multiple languages
- Add audio-only mode for podcasts
Ebrahim Abdul Raoof
This project is licensed under the MIT License. See LICENSE for details.