A web application that analyzes YouTube videos and allows users to ask questions about the video content through a chatbot interface.
- Kevin Binu Thottumkal
- Jeesmon Cherian
- Desmond Zhu
- YouTube Video Analysis: Paste a YouTube URL to analyze video content
- AI Chatbot: Ask natural language questions about the analyzed video
- Video Timestamps: Navigate through key moments in the video
- Video Player: Embedded YouTube player with timestamp navigation
- Modern UI: Beautiful, responsive interface built with Next.js and Tailwind CSS
- FastAPI Backend: Scalable backend for video processing and AI interactions
VideoMind-AI/
├── frontend/ # Next.js frontend application
│ ├── src/
│ │ ├── app/ # Next.js app router
│ │ └── components/ # React components
│ │ ├── VideoAnalyzer.tsx
│ │ ├── VideoDisplay.tsx
│ │ ├── VideoTimestamps.tsx
│ │ └── Chatbot.tsx
│ ├── public/ # Static assets (icons, images)
│ ├── package.json # Frontend dependencies
│ ├── tsconfig.json # TypeScript config
│ └── ...
├── backend/ # FastAPI backend application
│ ├── main.py # Main FastAPI application
│ ├── pdf_generator.py # PDF generation logic
│ ├── requirements.txt # Python dependencies
│ ├── setup.bat # Windows setup script
│ ├── setup.sh # Unix/Linux setup script
│ ├── generated_pdfs/ # Temporary PDF storage
│ └── README.md # Backend documentation
├── videomind_chrome_extension/ # Chrome extension for VideoMind
│ ├── manifest.json # Chrome extension manifest
│ ├── content.js # Content script
│ ├── background.js # Background script
│ ├── content.css # Extension styles
│ ├── icon16.png # Extension icon (16x16)
│ ├── icon48.png # Extension icon (48x48)
│ └── icon128.png # Extension icon (128x128)
├── .gitignore
├── README.md
└── package-lock.json
-
Navigate to backend directory:
cd backend -
Create environment file: Create a
.envfile in the backend directory:GEMINI_API_KEY=your_gemini_api_key_here
Get your Gemini API key from: https://makersuite.google.com/app/apikey
-
Create the virtual machine to download the dependencies in:
python -m venv venv
-
Activate the virtual machine:
venv\Scripts\activate.bat # Windows source venv/bin/activate # Unix/Linux
-
Download dependencies:
pip install -r requirements.txt - Start the server:
python main.pyThe backend will be available at http://localhost:8001
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will be available at http://localhost:3000
POST /analyze_video- Analyze a YouTube video and generate summaryPOST /chat- Process chat queries about a videoPOST /timestamps- Generate navigable timestamps for a videoGET /health- Health check endpoint
- VideoAnalyzer: Handles YouTube URL input, validation, and analysis workflow
- VideoDisplay: Embedded YouTube player with timestamp navigation
- VideoTimestamps: Displays clickable timestamps for video navigation
- Chatbot: AI-powered chat interface for video questions
- Open the application in your browser at
http://localhost:3000 - Paste a valid YouTube video URL in the input field
- Click "Analyze Video" to process the video
- View the generated summary, video player, and timestamps
- Ask questions about the video content using the chatbot
- Click timestamps to navigate to specific moments in the video
- Next.js 14 - React framework with app router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- React Hooks - State management and side effects
- FastAPI - Modern Python web framework
- Google Gemini AI - AI-powered video analysis and chat
- YouTube Transcript API - Video transcript extraction
- Pydantic - Data validation and serialization
- Uvicorn - ASGI server
-
"uvicorn not recognized" error:
- Make sure you've run the setup script and activated the virtual environment
- Try:
pip install uvicorn[standard]
-
CORS errors:
- Ensure the backend is running on
http://localhost:8001 - Check that CORS is properly configured in the backend
- Ensure the backend is running on
-
API key errors:
- Verify your Gemini API key is correctly set in the
.envfile - Check that the API key is valid and has sufficient quota
- Verify your Gemini API key is correctly set in the
-
Video analysis fails:
- Ensure the YouTube video has captions/transcripts enabled
- Check that the video URL is valid and accessible
- Backend logs: Check the terminal where the backend is running
- Frontend logs: Check the browser console (F12)
- Network issues: Use browser dev tools to inspect API requests