This project provides real-time crowd analysis using a drone video feed. The stack consists of:
- MediaMTX: Local RTMP ingest & WebRTC streaming server.
- CSRNet-pytorch: Python backend for AI inference and stream info.
- Frontend: React application for visualization.
- Docker & Docker Compose
- Node.js & npm
- Python 3.9+
Run the helper script for your OS:
Mac/Linux:
./scripts/dev_up.shWindows (PowerShell):
./scripts/dev_up.ps1This will:
- Start MediaMTX in Docker (Background).
- Ask if you want to run Backend & Frontend (Foreground/New Windows).
./scripts/dev_up.shThis starts MediaMTX (RTMP Server), Backend, and Frontend.
Verification: After running the script, verify that the media server is up:
lsof -i :1935You should see mediamtx listening on port 1935.
- Connect your DJI drone to the Same Wi-Fi as your computer.
- Open the dashboard at
http://<YOUR_LAN_IP>:3000. - Copy the RTMP Ingest URL (e.g.,
rtmp://192.168.1.16:1935/dji). - Paste it into the DJI App (RTMP Streaming).
- Start Streaming.
Note on Backend Logs:
You may see warnings like [WARN] RTMP server not reachable... if the media server is not up yet. This is normal. The backend will retry automatically.
- Frontend: Open
http://localhost:3000(orhttp://<LAN_IP>:3000from another device). - Direct Player:
http://localhost:8889/dji
- 1935: RTMP Ingest (Input)
- 8889: WebRTC Playback (Output)
- 8000: Backend API
- 3000: Frontend
- No Video? Ensure DJI is sending H.264 video (not H.265).
- Connection Failed? Ensure Firewall allows ports 1935 and 8889.