Skip to content

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 and open google translation library googletrans for translation.

License

Notifications You must be signed in to change notification settings

adamofarch/video_parser

Repository files navigation

Overview

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.

Technologies Used

  • 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.

Features

  • 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.

Installation

  1. Clone the Repository:

    git clone https://github.com/adamofarch/video_parser.git
    cd video_parser
    
  2. Create and Activate a Virtual Environment:

    python -m venv venv
    source venv/bin/activate
    
  3. Install Dependencies:

    pip install -r requirements.txt
    
  4. 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.

  5. Run Migrations:

    python manage.py migrate
    
  6. Start the Development Server:

    python manage.py runserver
    
  7. Start the Redis Server according to your system(If using systemd, use the command below) :

    sudo systemctl start redis 
    
  8. Start Celery Worker:

    celery -A video_parser worker -l INFO
    

Usage

  1. Upload a Video:

    • Navigate to the home page and upload a video file.
    • The video will be processed asynchronously and subtitles will be extracted.
  2. Search Subtitles:

    • Enter a keyword in the search form to find the corresponding timestamps in the video where the keyword appears in the subtitles.

Backend Capabilities

  • 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.

Contributing

Feel free to open issues or submit pull requests for improvements or bug fixes.

Special thanks to our fellow contributor Kajal Pal

License

This project is licensed under the MIT License.

About

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 and open google translation library googletrans for translation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •