Skip to main content

LAN Cameras (RTSP / ONVIF)

Aegis AI can connect to any IP camera on your local network. Open ⚙️ Settings → Cameras → Security Cameras → Surveillance tab.

There are three ways to add a camera:

MethodBest For
ONVIF Device DiscoveryModern ONVIF-compliant cameras (fastest)
Network Device ScannerOlder cameras or non-ONVIF devices
Manual Camera AdditionWhen you know the RTSP URL

Click + Add Camera to reveal the three options.


Method 1: ONVIF Device Discovery

ONVIF discovery uses WS-Discovery multicast to find cameras on your network automatically. It is the fastest method — typically completes in 5–10 seconds.

How It Works

  1. Click Scan. Aegis sends a WS-Discovery multicast probe to 239.255.255.250:3702.
  2. ONVIF-compliant devices respond with their service endpoints.
  3. For each responding device, Aegis enriches the data: it queries the camera's ONVIF service to retrieve the manufacturer, model, firmware version, serial number, capabilities, media profiles, and — most importantly — the RTSP stream URLs.
  4. Discovered devices appear as cards showing IP, manufacturer, model, and stream count.

Discovery Progress Stages

The progress indicator steps through:

StageDescription
initializingPreparing the ONVIF probe
sending_probeMulticast probe sent to 239.255.255.250:3702
listeningWaiting for device responses
response_receivedA device responded
device_foundDevice identified with basic info (IP, MAC, hostname)
enrichingQuerying the device for capabilities and stream URLs
stream_urls_foundRTSP stream URLs retrieved
completedDiscovery finished; enrichment continues in background

Advanced Settings

Expand Advanced Settings to access:

Network Interface Selector

If your computer has multiple network interfaces (Ethernet + WiFi), select which interface to use for discovery. Default: Auto-detect (Recommended).

ONVIF multicast only reaches devices on the same network segment as the selected interface. If you don't see your cameras, try a different interface.

ONVIF Credentials

Most cameras respond to discovery without authentication. Add credentials only if your cameras require them for retrieving stream URLs during enrichment.

Device Card Details

Click Details on a discovered device to see:

FieldDescription
IPCamera's IP address
MACHardware address (used for IP change tracking)
HostnameNetwork name
Manufacturere.g. Amcrest, Hikvision, Dahua
Modele.g. IP2M-841B-V3
FirmwareFirmware version (if available)
Serial NumberDevice serial (if available)
ONVIF VersionsSupported ONVIF protocol versions
CapabilitiesSupported features (media, PTZ, events, imaging, etc.)
Media ProfilesAvailable profiles with resolution and frame rate
RTSP StreamsList of discovered stream URLs

Click Show Endpoints to open the ONVIF Service Endpoint Tree — a hierarchical view of all ONVIF services, capabilities, and device info. You can copy individual values or the entire tree as JSON.

Automatic IP Change Detection

When a camera's IP address changes (common with DHCP), Aegis detects it during discovery by matching the MAC address. If a previously added camera shows up at a new IP, Aegis automatically updates the stored IP and shows a notification:

Camera "Front Door" IP address updated from 192.168.68.108 to 192.168.68.115

Persisted Scan Results

ONVIF scan results are persisted to disk and survive app restarts. When you return to the ONVIF scanner, previously discovered devices are loaded automatically.


Method 2: Network Device Scanner

The Network Scanner finds all devices on your network — not just ONVIF cameras. It identifies potential cameras by scanning ports and analyzing services.

Scan Configuration

SettingOptionsDefault
Network Range192.168.68.0/24, 192.168.1.0/24, 192.168.0.0/24, 10.0.0.0/24, 172.16.0.0/24192.168.68.0/24
Max Concurrent Hosts10 (Conservative), 20 (Balanced), 50 (Aggressive), 100 (Very Fast)20

Scan Phases

PhaseDescription
Ping scanDiscover live hosts on the network
ARP scanARP-based host detection (finds devices that don't respond to ping)
Port scanScan common ports: 554 (RTSP), 80/443 (web), 8080, 8554, etc.
Vendor analysisIdentify device manufacturer and model via MAC address lookup and web interface
CompletionScan complete

Progress shows: hosts discovered, potential cameras found, percentage, and estimated time remaining.

Device Classification

Each device is assigned a confidence level:

ConfidenceMeaning
HighDevice has RTSP ports open and camera-like indicators (shown first)
MediumDevice has some camera indicators but unclear classification
LowGeneric network device, unlikely to be a camera

Use the All toggle to show or hide low-confidence devices.

What's Detected Per Device

  • Open ports — TCP ports that responded
  • RTSP availability — whether port 554/8554 is open
  • Web interface — whether the device has an HTTP control panel
  • Camera indicators — evidence the device is a camera (RTSP response, web page title, vendor MAC prefix)
  • Brand detection — manufacturer identified automatically by MAC address prefix

Method 3: Manual Camera Addition

If you already know your camera's RTSP URL, add it directly.

Required Fields

FieldExample
Camera NameFront Door Camera
RTSP URLrtsp://192.168.1.100:554/cam/realmonitor?channel=1&subtype=0

Optional Fields

FieldPurpose
Manufacturere.g. Hikvision — used for display only
Modele.g. DS-2CD2143
UsernameRTSP authentication username
PasswordRTSP authentication password

The URL is validated against the format rtsp://.... The IP is extracted automatically.

Save Modes

  • Save Immediately (default, recommended) — camera is added to the system and appears in Monitor immediately
  • Add to List — cameras are collected in a list and saved when you click Save All (batch mode)

Stream Verification and Preview

After discovering a camera (via ONVIF or Network Scanner), click Verify to open the Stream Verification & Preview modal.

The Stream URL Problem

This is the most common issue. ONVIF discovery and network scanning often return multiple RTSP stream URLs for a single camera — for example, 3–5 URLs for different profiles or sub-streams. These URLs all look valid, but typically only one actually works as a live stream.

Why? Cameras expose multiple media profiles (e.g. main stream at 1080p, sub-stream at 720p, mobile stream at 480p). Each has a different RTSP path. But many cameras only allow a limited number of concurrent RTSP connections, or certain profiles may be disabled in the camera's own configuration. The result: you have a list of plausible URLs, but only one or two will produce actual video.

How Aegis Solves This

The Stream Verification modal tests every URL sequentially using the built-in stream proxy. Here's what happens:

  1. Aegis injects your credentials into each URL (e.g. rtsp://user:pass@192.168.68.108:554/...).
  2. Each URL is tested by connecting to the camera and waiting for a stream response.
  3. URLs are tested one-by-one with a 500ms delay between each test to avoid overwhelming the camera.
  4. Results are shown in real-time:
    • Green checkmark — stream connected, showing resolution and codec
    • Red X — stream failed (with error message)
    • Spinner — currently testing
  5. The first working URL is auto-selected.

For ONVIF devices: when you enter credentials and click away, Aegis automatically starts testing all discovered URLs (auto-test mode).

For Network Scanner devices: Aegis detects the camera brand by MAC address and generates brand-specific RTSP URL patterns. For example, Amcrest cameras use /cam/realmonitor?channel=1&subtype=0, Hikvision uses /Streaming/Channels/101, etc.

Live Preview

Once a URL passes verification, a live preview starts automatically. The preview shows:

  • Live video from the camera
  • Resolution, codec, and FPS info

Adding the Camera

After verification:

  1. Optionally rename the camera (defaults to Manufacturer Model IP).
  2. Click Add Camera.
  3. The camera is saved with: selected RTSP URL, credentials, IP, MAC, manufacturer, and model.
  4. It appears in the Monitor grid immediately.

If a camera with the same IP or MAC already exists, it is replaced (not duplicated).


Managing Added Cameras

After cameras are added, they appear in the Surveillance Cameras list showing:

ElementDescription
Camera iconBlue camera icon with gradient border
NameEditable — click the pencil icon to rename inline
IP addressShown in monospace below the name
Settings buttonOpens the camera configuration modal
Delete buttonRemoves the camera (immediate, no confirmation)
Live indicatorGreen "Live" badge when streaming, "Offline" when not

Click the refresh button (top right) to reload the camera list.


Troubleshooting

IssueCauseSolution
ONVIF scan finds no devicesCamera not ONVIF-compliant, or on a different subnetTry Network Scanner instead. Verify the camera is on the same subnet.
Discovery finds the camera but no stream URLsEnrichment failed (camera requires authentication for stream URL retrieval)Add ONVIF credentials in Advanced Settings and re-scan.
Valid IP but no streamMultiple URLs returned, wrong one selectedOpen Stream Verification. Let Aegis test all URLs — only the one that produces video will show a green checkmark. Select that one.
Camera was working but stopped streamingCamera's IP changed (DHCP lease renewal)Re-run ONVIF scan. Aegis auto-detects the new IP by MAC address and updates the camera.
All URLs fail in verificationWrong credentialsDouble-check the username and password. Try the camera's web interface to verify credentials work.
Network scanner is slowSubnet is large or concurrency is lowIncrease Max Concurrent Hosts to 50 or 100. Use a /24 subnet (254 hosts), not /16.
Stream preview shows black videoCamera requires a specific codecCheck if the camera supports H.264. Some cameras default to H.265, which may need transcoding.

Common RTSP URL Patterns

If manual entry is needed, here are common patterns by manufacturer:

BrandCommon RTSP URL Pattern
Amcrestrtsp://<ip>:554/cam/realmonitor?channel=1&subtype=0
Hikvisionrtsp://<ip>:554/Streaming/Channels/101
Dahuartsp://<ip>:554/cam/realmonitor?channel=1&subtype=0
Reolinkrtsp://<ip>:554/h264Preview_01_main
TP-Linkrtsp://<ip>:554/stream1
Axisrtsp://<ip>:554/axis-media/media.amp
Generic ONVIFrtsp://<ip>:554/onvif1

Replace <ip> with your camera's IP address. Credentials are usually embedded as rtsp://user:pass@<ip>:554/....