This system uses CrewAI's multi-agent architecture to transform YouTube videos into concise, professional summaries with minimal user input. Perfect for researchers, students, and professionals who need to quickly extract valuable information from video content.
The YouTube Video Summarizer automates the entire process of:
- Extracting the complete transcript from any YouTube video
- Cleaning and preprocessing the raw transcript
- Creating a professional, well-structured summary
- Evaluating the summary for accuracy and completeness
- Generating a PDF document of the approved summary
All with just one command and a YouTube URL!
YouTube URL → Extract Transcript → Preprocess → Summarize → Evaluate → Generate PDF
- Input: User provides a YouTube video URL
- Extraction: System pulls the complete transcript from the video
- Preprocessing: Raw transcript is cleaned and formatted
- Summarization: AI generates a comprehensive, structured summary
- Evaluation: Summary is assessed for quality and completeness
- Output: Approved summaries are saved as both Markdown and PDF
This project uses a specialized team of 5 AI agents, each with a dedicated role:
- Task: Extract the complete transcript from a YouTube video
- Input: YouTube URL
- Output: Raw transcript text (saved to
transcript.md) - Tools:
youtube-transcript-api
- Task: Clean and prepare the transcript for summarization
- Input: Raw transcript from Agent 1
- Output: Cleaned, well-formatted text
- Process: Removes timestamps, repetitions, filler words, and fixes formatting issues
- Task: Generate a comprehensive, well-structured summary
- Input: Preprocessed transcript from Agent 2
- Output: Professional summary with headings, sections, and key points
- Features: Creates markdown formatting, proper structure, and logical organization
- Task: Assess summary quality and accuracy
- Input: Original transcript and generated summary
- Output: Approved summary (saved to
summary.md) or rejection message - Quality Standard: Only approves summaries scoring 7/10 or higher
- Task: Convert the approved markdown summary to a professional PDF
- Input:
summary.mdfile - Output:
summary.pdfin the project directory - Tools:
markdown-pdflibrary
-
Clone the repository:
git clone https://github.com/AbdooMohamedd/Multi-Agent-YouTube-Summarizer-System.git cd Multi-Agent-YouTube-Summarizer-System
-
Create and activate a virtual environment:
python -m venv venv .\venv\Scripts\Activate.ps1 -
Install dependencies:
pip install -r requirements.txt -
Set up your OpenAI API key:
- Create a
.envfile in the root directory - Add your API key:
OPENAI_API_KEY=your_api_key_here
- Create a
Run the system with the following command:
python .\src\youtube_video_summarizer\main.py --url "https://www.youtube.com/watch?v=OKuu2BVfMhM"We've successfully tested the system on this YouTube video: https://www.youtube.com/watch?v=OKuu2BVfMhM
The summary and PDF were automatically generated and saved to the project directory.
You can find the generated PDF at: youtube_video_summarizer/summary.pdf
Here's a preview of the generated PDF:
Generated PDF Preview
For each video, the system produces:
transcript.md- The raw transcript extracted from the videosummary.md- The cleaned, professionally formatted summarysummary.pdf- A PDF version of the summary for easy sharing
- Python Version: 3.10+
- Key Dependencies:
- CrewAI for the multi-agent architecture
- OpenAI API for summarization and evaluation
- youtube-transcript-api for transcript extraction
- markdown-pdf for PDF generation
This project is licensed under the MIT License - see the LICENSE file for details.
- CrewAI for the multi-agent framework
- OpenAI for the language processing capabilities
- YouTube API for transcript access
For questions or feedback, please open an issue on the GitHub repository or contact the project maintainer.
