This project is a Django-based web application that allows users to upload videos, extract subtitles from the videos using ccextractor
binary, and perform keyword searches within the extracted subtitles. The application leverages Celery for asynchronous task processing.
- Django: Web framework for building the application.
- Celery: Asynchronous task queue for processing video files and subtitle extraction.
- ccextractor: Tool for extracting subtitles from video files.
- Google Translation: Library for translating the subtitles to different languages.
- Video Upload: Users can upload video files through the web interface.
- Subtitle Extraction: Extracts subtitles from uploaded videos asynchronously using Celery and
ccextractor
. - Translation of subtitles: Traslating subtitles into langugaes requied.
- Keyword Search: Allows users to search for keywords within the subtitles and returns corresponding timestamps.
- Scalability: Utilizes Celery for handling multiple video processing tasks concurrently.
-
Clone the Repository:
git clone https://github.com/adamofarch/video_parser.git cd video_parser
-
Create and Activate a Virtual Environment:
python -m venv venv source venv/bin/activate
-
Install Dependencies:
pip install -r requirements.txt
-
Install ccextractor binary:
- Note: It is highly recommended build ccextractor from source, You can Follow the Compilation Instructions
- Note for Arch Users: You can also install ccextractor from AUR using your favourite AUR helper
Follow the Installation guide on CCExtractor/ccextractor to install on your operating system.
-
Run Migrations:
python manage.py migrate
-
Start the Development Server:
python manage.py runserver
-
Start the Redis Server according to your system(If using systemd, use the command below) :
sudo systemctl start redis
-
Start Celery Worker:
celery -A video_parser worker -l INFO
-
Upload a Video:
- Navigate to the home page and upload a video file.
- The video will be processed asynchronously and subtitles will be extracted.
-
Search Subtitles:
- Enter a keyword in the search form to find the corresponding timestamps in the video where the keyword appears in the subtitles.
- Asynchronous Processing: Leveraging Celery, the application can handle multiple video uploads and subtitle extraction tasks concurrently, ensuring a responsive user experience.
- Efficient Searching: Storing subtitles in allows for fast keyword searches, providing users with quick and accurate results.
Feel free to open issues or submit pull requests for improvements or bug fixes.
Special thanks to our fellow contributor Kajal Pal
This project is licensed under the MIT License.