Documentation

Your Cameras. Anywhere. Instantly.

ONVIF Camera Auto-Discovery

ONVIF Camera Discovery

ONVIF (Open Network Video Interface Forum) is a standard protocol that allows cameras and video management systems to communicate. TheRelay can automatically discover ONVIF-compatible cameras on your network and extract their stream URLs.

What is ONVIF

  • Industry standard for IP cameras
  • Enables camera discovery on network
  • Retrieves stream information automatically
  • Supported by most modern cameras
  • No manual URL construction needed

When to Use ONVIF

  • Adding modern IP cameras to TheRelay
  • Want to avoid manual URL configuration
  • Bulk adding multiple cameras
  • Camera brand has ONVIF support
  • Network allows device discovery

5-Step ONVIF Discovery Process

Step 1: Open TheRelay Dashboard

Log into your TheRelay Dashboard and navigate to the Agents section. Select the agent where you want to add cameras.

Step 2: Access Camera Discovery

Click the "Discover Cameras" or "ONVIF Discovery" button. This initiates a network scan from your agent.

Step 3: Wait for Discovery Scan

The agent will scan your local network for ONVIF-compatible devices. This typically takes 15-30 seconds depending on network size. You'll see a progress indicator during the scan.

Step 4: Review Discovered Cameras

A list of discovered cameras will appear with the following information:

  • Camera name or model
  • IP address
  • Manufacturer
  • Available stream profiles

Step 5: Select and Add Cameras

Review the list and select which cameras you want to add. You can choose:

  • Individual cameras to add
  • Which stream profile to use (main/sub)
  • Confirm camera credentials if prompted
  • Click "Add Selected" to complete

ONVIF Discovery Requirements

Network Requirements

  • Agent must be on the same network segment as cameras (no firewall blocking)
  • ONVIF discovery uses UDP multicast on port 3702
  • Ensure UDP multicast is enabled on your network
  • Some corporate networks may block multicast - contact IT if discovery fails

Camera Requirements

  • Camera must support ONVIF protocol
  • Camera must be powered on and connected to network
  • Camera must have ONVIF service enabled (usually default)
  • Camera must be reachable from the agent

Agent Requirements

  • TheRelay Agent must be installed and running
  • Agent must have network access to camera subnet
  • Agent must be online and connected to TheRelay cloud

Troubleshooting ONVIF Discovery

No Cameras Found

  • Verify cameras are powered on and connected to network
  • Check if ONVIF is enabled in camera settings
  • Confirm agent and cameras are on same network subnet
  • Check if firewall is blocking UDP port 3702
  • Try manually adding cameras with known RTSP URLs instead

Discovery Timeout

  • Network may be experiencing delays
  • Try running discovery again
  • Check if network is congested
  • Restart agent if discovery repeatedly fails

Camera Found but Cannot Connect

  • ONVIF discovery found the camera but credentials may be wrong
  • Try manual addition with corrected credentials
  • Check camera username and password
  • Some cameras require special ONVIF user account

Partial Stream Information

  • Some older ONVIF cameras may not report all stream profiles
  • If available profile doesn't work, manually add with different stream path
  • Consult camera manufacturer documentation for stream URLs

After Discovery - Next Steps

Verify Streams

After adding cameras via ONVIF discovery:

  1. Check dashboard - cameras should appear within seconds
  2. Verify stream status shows "Connected" or "Active"
  3. Click camera to view live stream
  4. Test different endpoints (WebRTC, RTSP, HLS)

Configure Access Control

Set up tokens and access control for your cameras:

  • Create tokens to restrict stream access
  • Set token expiration if needed
  • Share tokens only with authorized users

Monitor Performance

Keep an eye on stream health:

  • Monitor bitrate and CPU usage
  • Check reconnection stats in agent dashboard
  • Review logs for any errors or disconnections