Overview


If the bridge script starts but your camera does not appear as Live in AegisGates, this guide will help you identify and fix the problem.


Step 1 — Check the Terminal for Error Messages


When the bridge script fails, it prints an error message. Common errors and fixes:

Error MessageLikely CauseFix
Connection refused or timed outWrong camera IP or RTSP portCheck your RTSP URL and camera IP address
401 UnauthorizedWrong RTSP username or passwordRe-enter credentials — check camera admin panel
Invalid API keyWrong or expired AegisGates API keyCopy API key again from the Cameras page
No module named cv2Missing Python packageRun pip install opencv-python
Failed to connect to aegisgates.comNo internet accessCheck outbound internet on port 443

Step 2 — Test Your RTSP Stream First


Before troubleshooting the bridge script, confirm your camera's RTSP stream works by opening it in VLC Media Player:

  • Open VLC

  • Go to Media → Open Network Stream

  • Enter your RTSP URL, e.g.: rtsp://admin:[email protected]:554/stream

  • Click Play


If VLC shows your camera's video, the RTSP stream is working. If VLC cannot connect, the problem is with the camera or network — not the bridge script.


Step 3 — Check Your RTSP URL Format


RTSP URLs follow this pattern:

rtsp://username:password@camera-ip:port/path

Common mistakes:

  • Wrong port — most cameras use 554, but some use 8554 or 1935
  • Missing stream path — check your camera's manual for the correct path (e.g. /stream1, /ch0/stream0, /live)
  • Special characters in password — if your password contains @ or /, it may break the URL. Try changing your camera password to letters and numbers only.

Step 4 — Firewall and Network Issues


  • Make sure no firewall is blocking the camera's RTSP port on your local network
  • The bridge script connects outbound to aegisgates.com on port 443 — ensure this is not blocked
  • If you are on a corporate or managed network, ask your IT team to allow outbound HTTPS traffic

Step 5 — Re-run Setup with a Fresh Config


If you are not sure what is saved in your current config.json, the simplest fix is to delete it and re-run setup:

  • Stop the bridge script

  • Delete config.json from the script folder

  • Run python bridge_script.py again

  • Enter your settings carefully when prompted



Still Not Working?


Email us at [email protected] with:

  • The exact error message from the terminal
  • Your operating system
  • Your camera make and model