π AI-based Video Processing & Analysis System with Django, Celery, WebSockets, OpenAI GPT-4, Whisper, OCR, and YOLOv8 for video transcript generation, object detection, speech-to-text, and AI-powered chat.
β Upload & Process Videos β Extract audio, text, and objects
β Real-time Progress Updates β WebSockets for instant feedback
β AI Chat β Ask questions about the processed video
β Multi-user API Key Support β Users enter their own OpenAI API key
β Database Storage β Save transcripts & analysis reports
β WebSocket-powered Chat β Realtime AI Q&A
β Download Reports β Transcripts & analysis reports available
βββ video_analysis_project/
β βββ dump.rdb
β βββ requirements.txt
β βββ yolov8n.pt
β βββ db.sqlite3
β βββ README.md
β βββ database.env
β βββ docker-compose.yml
β βββ manage.py
β βββ celery_tasks.py
β βββ app/
β β βββ video_processing.py
β β βββ tasks.py
β β βββ models.py
β β βββ database.py
β β βββ chat_processor.py
β β βββ consumers.py
β β βββ apps.py
β β βββ admin.py
β β βββ routing.py
β β βββ tests.py
β β βββ urls.py
β β βββ views.py
β βββ config/
β β βββ asgi.py
β β βββ celery.py
β β βββ settings.py
β β βββ urls.py
β βββ Dockerfile/
β βββ staticfiles/
β β βββ styles.css
β β βββ script.js
β β βββ admin/
β β β βββ css/
β β β βββ js/
β β β β βββ admin/
β β β β βββ vendor/
β β β βββ img/
β β β β βββ gis/
β β βββ rest_framework/
β β β βββ css/
β β β βββ js/
β β β βββ docs/
β β β β βββ css/
β β β β βββ js/
β β β β βββ img/
β β β βββ img/
β β β βββ fonts/
β βββ static/
β β βββ styles.css
β β βββ script.js
β βββ templates/
β β βββ index.html
β β βββ reports.html
β βββ media/
β β βββ progress.json
β β βββ transcripts/
β β β βββ Screen Recording 2025-02-08 at 9.49.34PM.mov_transcript.txt
β β β βββ Screen Recording 2025-02-13 at 2.04.42AM.mov_transcript.txt
β β βββ analysis/
β β β βββ Screen Recording 2025-02-13 at 2.04.42AM.mov_analysis.txt
β β β βββ Screen Recording 2025-02-08 at 9.49.34PM.mov_analysis.txt
β β βββ frames/
β β βββ uploads/
β β β βββ Screen Recording 2025-02-08 at 9.49.34PM.mov
β β β βββ Screen Recording 2025-02-13 at 2.04.42AM.mov
β β βββ chunks/
β β βββ audio/
git clone https://github.com/sachinarora/video_analysis_project.git
cd video_analysis_project
python3 -m venv venv
source venv/bin/activate # On Windows: venv\ScriptsοΏ½ctivate
pip install -r requirements.txt
- DB Name:
postgres
- User:
postgres
- Password:
password
Update DATABASES
in config/settings.py
:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '5432',
}
}
python manage.py makemigrations
python manage.py migrate
redis-server
celery -A config worker --loglevel=info
daphne -b 0.0.0.0 -p 8000 config.asgi:application
Method | Endpoint | Description |
---|---|---|
POST | /upload_video/ |
Upload & process a new video |
GET | /progress/ |
Get real-time processing progress |
POST | /chat/ |
Ask AI questions about the video |
GET | /reports/ |
View past analysis reports |
- Open
http://127.0.0.1:8000/
- Click Upload Video β Select a
.mp4
file - Processing starts & progress is updated in real-time
- WebSockets update UI dynamically
- Shows current processing step: "Extracting Audio", "Running OCR" etc.
- Enter an OpenAI API Key
- Use chat box to ask "What objects are in this video?", etc.
- AI responds using transcript, OCR, & detected objects
- Once processing is complete, download:
- Transcript (
media/transcripts/
) - Analysis Report (
media/analysis/
)
- Transcript (
π§ Email: sachnaror@gmail.com π GitHub: github.com/sachnaror π Website: https://about.me/sachin-arora
π Happy Coding! π¬π‘
First, stop existing processes, run:
pkill -f runserver
pkill -f redis
pkill -f celery
### and then..
redis-server &
python manage.py runserver &
celery -A config worker --loglevel=info &
brew services restart redis
python manage.py makemigrations python manage.py migrate
celery -A config worker --loglevel=info
daphne -b 0.0.0.0 -p 8000 config.asgi:application
