A modern web application that analyzes YouTube videos using AI to extract transcripts, identify key topics, and provide intelligent insights with timestamps.
- 🎥 Video Analysis - Extract key frames and analyze visual content from YouTube videos
- 📝 Transcription - Generate accurate transcripts and identify key topics discussed
- 🤖 AI Insights - Get intelligent summaries and insights powered by Google Gemini AI
- ⏱️ Timestamped Topics - View topics with precise timestamps for easy navigation
- 🔄 Robust Error Handling - Automatic retry logic with fallback models for reliable AI responses
- 🎨 Modern UI - Beautiful dark-themed interface built with Tailwind CSS and Radix UI
- Next.js 15.1.7 - React framework with App Router
- React 19 - Latest React features
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS framework
- Google Gemini AI - Multimodal AI for video analysis
- YouTube Transcript - Transcript extraction
- Radix UI - Accessible component primitives
- React Hook Form - Form management
- Zod - Schema validation
- Node.js 18+ and npm/yarn/pnpm
- Google Gemini API key (Get one here)
- Clone the repository
git clone https://github.com/yourusername/Multimodal-Video-Analysis.git
cd Multimodal-Video-Analysis- Install dependencies
npm install
# or
yarn install
# or
pnpm install- Set up environment variables
Create a .env.local file in the root directory:
GOOGLE_API_KEY=your_google_gemini_api_key_here- Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev- Open your browser
Navigate to http://localhost:3000 to see the application.
Multimodal-Video-Analysis/
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ ├── video-analysis/ # Video analysis API endpoint
│ │ │ └── video-chat/ # Video chat API endpoint
│ │ ├── config/
│ │ │ └── env.ts # Environment variable validation
│ │ ├── page.tsx # Main page component
│ │ └── YouTubeInput.tsx # YouTube input component
│ └── utils/
│ ├── geminiClient.ts # Gemini AI client with retry logic
│ └── logger.ts # Custom logging utility
├── public/ # Static assets
├── package.json
└── README.md
Analyzes a YouTube video and returns topics with timestamps.
Request Body:
{
"videoUrl": "https://www.youtube.com/watch?v=..."
}Response:
{
"result": "{\"topics\": [{\"timestamp\": \"00:00:00\", \"topic\": \"Introduction\"}]}"
}- Input: User provides a YouTube video URL
- Transcript Extraction: The app fetches the video transcript using the YouTube Transcript API
- AI Analysis: The transcript is sent to Google Gemini AI for analysis
- Topic Extraction: AI identifies key topics and assigns timestamps
- Display: Results are displayed in a user-friendly format with timestamps
| Variable | Description | Required |
|---|---|---|
GOOGLE_API_KEY |
Your Google Gemini API key | Yes |
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run format- Format code with Prettier
The easiest way to deploy this Next.js app is using Vercel:
- Push your code to GitHub
- Import your repository on Vercel
- Add your
GOOGLE_API_KEYenvironment variable - Deploy!
This Next.js application can be deployed on any platform that supports Node.js:
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
- Google Gemini for the AI capabilities
- Next.js for the amazing framework
- Radix UI for accessible components
For questions or suggestions, please open an issue on GitHub.
Made with ❤️ using Next.js and Google Gemini AI