Transform YouTube videos and local video files into intelligent, searchable knowledge using OpenAI Whisper, LangChain, ChromaDB, and Mistral AI.
AI Video Assistant is an end-to-end Retrieval-Augmented Generation (RAG) application that transforms YouTube videos and local video files into searchable knowledge.
The application automatically extracts audio from a YouTube URL or a local video file, transcribes speech using OpenAI Whisper, generates semantic embeddings with Sentence Transformers, stores them in ChromaDB, and enables intelligent question answering using LangChain and Mistral AI.
Instead of manually watching long videos, users can quickly:
- Read AI-generated summaries
- View complete transcripts
- Extract action items
- Identify key decisions
- Find open questions
- Chat with the video using natural language
- π₯ Analyze YouTube videos using a URL
- π Analyze local video files (MP4, AVI, MOV, MKV, etc.)
- ποΈ Automatic speech-to-text transcription using OpenAI Whisper
- βοΈ Audio extraction and preprocessing
- π AI-generated structured summaries
- π·οΈ Automatic title generation
- π Extract action items
- π Identify key decisions
- β Detect open questions
- π§ Generate semantic embeddings
- π Store embeddings in ChromaDB
- π Retrieval-Augmented Generation (RAG)
- π¬ Context-aware conversational AI
- π¨ Interactive Streamlit interface
flowchart TD
A[User]
A --> B1[YouTube URL]
A --> B2[Local Video File]
B1 --> C[Download Audio using yt-dlp]
B2 --> D[Extract Audio using FFmpeg]
C --> E[Audio Processing]
D --> E
E --> F[OpenAI Whisper]
F --> G[Transcript]
G --> H[Sentence Transformer Embeddings]
H --> I[ChromaDB Vector Store]
A --> J[Ask Question]
J --> K[LangChain Retriever]
K --> I
I --> L[Relevant Transcript Chunks]
L --> M[Mistral AI]
M --> N[Context-Aware Answer]
N --> A
User Input
β
ββββββββββββββ΄βββββββββββββ
β β
βΌ βΌ
YouTube URL Local Video File
β β
βΌ βΌ
Download Audio Extract Audio
yt-dlp FFmpeg
β β
ββββββββββββββ¬βββββββββββββ
βΌ
Audio Processing
β
βΌ
Whisper Transcription
β
βΌ
Transcript
β
βΌ
Sentence Transformer
Embeddings
β
βΌ
ChromaDB
β
βΌ
User Question
β
βΌ
Semantic Retrieval
β
βΌ
Relevant Transcript
β
βΌ
Mistral AI LLM
β
βΌ
Context-Aware Answer
| Category | Technologies |
|---|---|
| Programming Language | Python 3.11 |
| Frontend | Streamlit |
| Speech Recognition | OpenAI Whisper |
| Audio Processing | yt-dlp, FFmpeg, Pydub |
| Embeddings | Sentence Transformers |
| Vector Database | ChromaDB |
| RAG Framework | LangChain |
| LLM | Mistral AI |
| Deep Learning | PyTorch |
AI-Video-Assistant/
β
βββ assets/
β βββ banner.png
β βββ dashboard.png
β βββ summary.png
β βββ chat.png
β βββ rag_answer.png
β
βββ core/
β
βββ utils/
β
βββ downloads/
β
βββ vector_db/
β
βββ app.py
βββ main.py
βββ requirements.txt
βββ .env.example
βββ README.md
Analyze a YouTube URL or a local video file.
The application automatically:
- Downloads or extracts audio
- Transcribes speech
- Generates summaries
- Extracts insights
- Builds a searchable knowledge base
Generate professional summaries containing:
- Key insights
- Important concepts
- Practical implications
- Final takeaways
Interact with your video using natural language.
The application retrieves relevant transcript chunks from ChromaDB before generating accurate answers with Mistral AI.
Every answer is grounded in the video's transcript, providing context-aware and reliable responses.
git clone https://github.com/yourusername/AI-Video-Assistant.git
cd AI-Video-AssistantWindows
python -m venv venv
venv\Scripts\activateLinux / macOS
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtDownload and install FFmpeg.
Verify installation:
ffmpeg -versionCreate a .env file.
MISTRAL_API_KEY=your_api_key
SARVAM_API_KEY=your_api_keystreamlit run app.pyhttps://www.youtube.com/watch?v=XXXXXXXX
Windows
C:\Users\Heet\Videos\lecture.mp4
Linux/macOS
/home/user/videos/lecture.mp4
Click Analyze.
The application will automatically:
- Extract audio
- Generate transcript
- Create AI summary
- Extract action items
- Identify key decisions
- Detect open questions
- Build a vector database
- Enable conversational AI
- π Multi-language transcription
- π€ Speaker diarization
- β±οΈ Timestamp-based transcript navigation
- π PDF summary export
- πΎ Download transcript and chat history
- π€ Multiple LLM support
- βοΈ Cloud deployment
- π User authentication
- πΊ Playlist and batch video processing
- π± Responsive mobile interface
Contributions are welcome!
-
Fork the repository
-
Create a new branch
git checkout -b feature-name- Commit your changes
git commit -m "Add new feature"- Push your branch
git push origin feature-name- Open a Pull Request
Heet Patel
- GitHub: https://github.com/heet88
- LinkedIn: https://linkedin.com/in/heet247
β If you found this project useful, please consider giving it a star!




