VideoSummarizer is a tool that generates concise text summaries from videos by combining video and audio processing techniques. It uses advanced algorithms to extract key content, allowing users to quickly grasp the essence of a video without watching it in full. The tool features a user-friendly GUI powered by FastAPI and Uvicorn for easy interaction.
- Video and Audio Processing: Extracts meaningful information from both visual and audio components of a video.
- Text Summarization: Produces summaries in three lengths (
short,medium,detailed) using abstractive or extractive methods. - Web-Based GUI: Access the summarization tool through an intuitive interface served by Uvicorn.
- Customizable Output: Select summary length and type via the GUI or command line.
- Open Source: Licensed under the GNU General Public License v3.0, allowing free use, modification, and distribution.
-
Clone the Repository:
git clone https://github.com/H0sseini/VideoSummarizer.git cd VideoSummarizer -
Install Dependencies: Ensure Python 3.8+ is installed. Install required packages using:
pip install -r requirements.txt
Note: Requirements include
fastapi,uvicorn,torch,transformers,pymupdf,python-docx, and others. Checkrequirements.txtfor the full list. -
Download Pre-trained Model (Automatic): The tool uses the
facebook/bart-large-cnnmodel for summarization. The tool also useswhisper-modelsfor transcribing audio,clipmodel for the alignment of frames with texts, andblipmodel for the generation of narratives. There is no need to download these models manually; the app will download the necessary models during the first summarization and store them in the./app/models/folder.Warning: You may need to download around 12.5 GB of data during the first usage.
-
Install NLTK Data: The tool requires NLTK’s
punkttokenizer. Install it with:python -c "import nltk; nltk.download('punkt')"Again, the app downloads and installs the necessary files, and there is no need to use the manual method.
-
Launch the GUI: Start the FastAPI server with Uvicorn to access the web-based interface:
uvicorn frontend.app:app --host 0.0.0.0 --port 8000
Or, use Python if you didn't install uvicorn:
python -m uvicorn frontend.app:app --host 0.0.0.0 --port 8000
- The server will run on
http://localhost:8000.
- The server will run on
-
Access the GUI: Open your browser and navigate to
http://localhost:8000. The interface allows you to:- Upload a video file (e.g., MP4, AVI).
- View or copy the generated narrative and summary.
- Change the settings of the app.
-
Interact with the GUI: Follow the on-screen instructions to upload a video, configure settings, and generate summaries.
- Python 3.8 or higher
- Libraries:
fastapi,uvicorn,torch,transformers,pymupdf,python-docx,sumy,nltk, and others (seerequirements.txt)
This project is licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute this software, provided you comply with the license terms.
- GUI Not Loading: Ensure Uvicorn is running and the correct port (
8000) is accessible. Check for firewall issues. - Summarization Fails: Verify the video format is supported and the
bart-large-cnnmodel is downloaded. - Warnings About Input Length: If you see warnings like
"Your max_length is set to 300, but your input_length is only 3", ensure your video contains sufficient audio/text content. Short inputs may produce empty summaries.
For issues or suggestions, please open an issue on the GitHub repository.