Transform YouTube videos into concise, insightful summaries powered by Google Gemini AI
π Quick Start β’ β¨ Features β’ π Documentation β’ π€ Contributing
YouTube Video Summarizer is an AI-powered web application that automatically extracts transcripts from YouTube videos and generates comprehensive summaries using Google's Gemini 1.5 Flash model. Perfect for researchers, students, content creators, and anyone who wants to quickly understand video content without watching the entire video.
- π Smart Transcript Extraction - Multiple fallback methods ensure reliability
- π€ AI-Powered Summarization - Google Gemini 1.5 Flash generates intelligent summaries
- πΊ Video Preview - Embedded YouTube player for context
- πΎ Export Summaries - Download summaries as text files
- π Manual Fallback - Always works even when auto-extraction fails
- β‘ One-Click Setup - Platform-specific installation scripts
- π¨ Clean Interface - Modern Streamlit-powered web UI
- π± Responsive Design - Works on desktop and mobile
- π URL Validation - Smart YouTube URL format detection
- π Progress Indicators - Real-time processing status
- π Multi-Method Extraction - YouTube API β LangChain β Manual input
β οΈ Error Handling - Comprehensive error messages and recovery- π― Rate Limiting - Built-in API quota management
- π Secure Configuration - Environment-based API key management
- Python 3.8 or higher
- Google API key (free tier available)
- Internet connection
git clone https://github.com/yourusername/youtube-video-summarizer.git
cd youtube-video-summarizer- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy the generated key
Create a .env file in the project root:
GOOGLE_API_KEY="your_actual_google_api_key_here"- Windows: Double-click
setup_and_run.bat - Linux/Mac: Run
bash setup_and_run.sh
# Install dependencies
pip install -r requirements.txt
# Run the application
streamlit run app.pyOpen your browser and navigate to: http://localhost:8501
graph TB
A[YouTube URL Input] --> B[URL Validation]
B --> C[Video ID Extraction]
C --> D[Transcript Extraction]
D --> E[YouTube API]
E --> F{Success?}
F -->|Yes| G[AI Processing]
F -->|No| H[LangChain Fallback]
H --> I{Success?}
I -->|Yes| G
I -->|No| J[Manual Input]
J --> G
G --> K[Gemini 1.5 Flash]
K --> L[Generated Summary]
L --> M[Display Results]
M --> N[Download Option]
| Component | Technology | Version |
|---|---|---|
| Frontend | Streamlit | 1.28+ |
| AI Model | Google Gemini | 1.5 Flash |
| Backend | Python | 3.8+ |
| API Integration | LangChain | Latest |
| Video Processing | YouTube Transcript API | 0.6.0+ |
| Environment | python-dotenv | 1.0.0+ |
streamlit>=1.28.0
python-dotenv>=1.0.0
langchain>=0.1.0
langchain-community>=0.0.20
langchain-google-genai>=1.0.0
youtube-transcript-api>=0.6.0
requests>=2.31.0- β 15 requests/minute
- β 1,500 requests/day
- β 1M tokens/month
- β Perfect for personal use!
- Launch the application
- Paste a YouTube URL (e.g.,
https://www.youtube.com/watch?v=dQw4w9WgXcQ) - Click "π Summarize Video"
- Wait for processing (usually 10-30 seconds)
- View the AI-generated summary
- Download the summary if needed
- Manual Transcript Input: If auto-extraction fails, paste transcript manually
- Multiple Video Formats: Supports various YouTube URL formats
- Batch Processing: Process multiple videos in sequence
π API Key Issues
Problem: "GOOGLE_API_KEY not configured" error
Solutions:
- Ensure
.envfile exists in project root - Verify API key is correctly set without quotes issues
- Get a new key from Google AI Studio
- Check for extra spaces or special characters
πΊ No Transcript Found
Problem: "No transcripts found" error
Solutions:
- Ensure video has captions/subtitles enabled
- Try with a different public video
- Use the manual transcript input option
- Check if video is region-restricted
π§ Installation Issues
Problem: Package installation failures
Solutions:
# Update pip first
pip install --upgrade pip
# Install with specific versions
pip install streamlit==1.28.0 langchain-google-genai==1.0.0
# Use virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
pip install -r requirements.txtπ Network Issues
Problem: Connection timeouts or network errors
Solutions:
- Check internet connection
- Try different video (some may be geo-blocked)
- Wait and retry (YouTube API temporary issues)
- Use VPN if regional restrictions apply
We welcome contributions! Please see our Contributing Guidelines for details.
# Clone repository
git clone https://github.com/yourusername/youtube-video-summarizer.git
cd youtube-video-summarizer
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
# Install development dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Run tests
pytest tests/
# Run application
streamlit run app.py- Check existing issues
- Create a new issue
- Use appropriate issue template
- Provide detailed information and steps to reproduce
This project is licensed under the MIT License - see the LICENSE file for details.
- Google AI for the powerful Gemini 1.5 Flash model
- Streamlit for the amazing web framework
- LangChain for AI integration capabilities
- YouTube Transcript API for reliable transcript extraction
- Contributors who help improve this project
- π Documentation
- π Issue Tracker
- π¬ Discussions
- π§ Email Support
