Think you need brand-new cameras to run modern computer vision? Think again. Whether it’s a CCTV setup, a workshop camera, or even your smartphone, your current hardware is all you need.
All you need to do is stream video frames from your existing camera into a Roboflow Workflow (via RTSP or similar protocols), then apply any of the latest computer vision models that Roboflow offers.
-
Clone this repository:
git clone https://github.com/Neurl-LLC/roboflow-04.git cd roboflow-04 -
Create a workflow on Roboflow, or simply clone this example workflow.
-
Create a
.envfile with the following environment variables:ROBOFLOW_API_KEY="YOUR_ROBOFLOW_API_KEY" WORKSPACE_NAME="YOUR_WORKSPACE_NAME" WORKFLOW_ID="YOUR_WORKFLOW_ID" VIDEO_REFERENCE="YOUR_RTSP_LINK"
-
Install dependencies:
pip install -r requirements.txt
-
Run the producer script (handles inference):
python producer.py
-
Run the consumer script (handles display):
python consumer.py
Don’t have an IP camera handy? No problem. You can simulate one using MediaMTX and FFmpeg.
-
Start the MediaMTX server:
./mediamtx
-
Stream a sample video to the MediaMTX server with FFmpeg:
ffmpeg -re -stream_loop -1 -i Street_Walk.mp4 -c copy -f rtsp rtsp://127.0.0.1:8554/mystream
This makes the sample video available at:
rtsp://127.0.0.1:8554/mystream
Use this RTSP link as your VIDEO_REFERENCE in the .env file.
✅ That’s it. You now have AI-powered computer vision running on your existing cameras with no new hardware required.