This project is an application that allows users to upload videos, extract subtitles, and search through subtitles to find relevant video frames based on natural language queries. The backend is built with Django and Django REST framework, and the frontend is built with React.
- Upload videos (less than 3 minutes)
- Extract subtitles from uploaded videos
- Search subtitles using natural language queries
- Display video frame based on search results
- Backend: Django, Django REST framework
- Frontend: React, Axios
- Database: SQLite (can be swapped with any other database)
- Other Tools: Docker, ffmpeg (for subtitle extraction)
-
Clone the repository:
git clone https://github.com/codeldorado/video-caption-search.git cd video-caption-search/backend
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Navigate to the frontend directory:
cd ../frontend
-
Install the dependencies:
npm install
-
Start the development server:
npm start
-
Build and run the Docker containers:
docker-compose up --build
-
Upload a Video:
- Go to the frontend, and use the upload component to upload a video file.
-
Search Subtitles:
- Enter a natural language query in the search bar to find relevant video frames.
- Video Upload:
POST /api/videos/
- Search Subtitles:
POST /api/videos/<video_id>/search/