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:
| Method | Best For |
|---|---|
| ONVIF Device Discovery | Modern ONVIF-compliant cameras (fastest) |
| Network Device Scanner | Older cameras or non-ONVIF devices |
| Manual Camera Addition | When 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
- Click Scan. Aegis sends a WS-Discovery multicast probe to
239.255.255.250:3702. - ONVIF-compliant devices respond with their service endpoints.
- 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.
- Discovered devices appear as cards showing IP, manufacturer, model, and stream count.
Discovery Progress Stages
The progress indicator steps through:
| Stage | Description |
|---|---|
initializing | Preparing the ONVIF probe |
sending_probe | Multicast probe sent to 239.255.255.250:3702 |
listening | Waiting for device responses |
response_received | A device responded |
device_found | Device identified with basic info (IP, MAC, hostname) |
enriching | Querying the device for capabilities and stream URLs |
stream_urls_found | RTSP stream URLs retrieved |
completed | Discovery 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:
| Field | Description |
|---|---|
| IP | Camera's IP address |
| MAC | Hardware address (used for IP change tracking) |
| Hostname | Network name |
| Manufacturer | e.g. Amcrest, Hikvision, Dahua |
| Model | e.g. IP2M-841B-V3 |
| Firmware | Firmware version (if available) |
| Serial Number | Device serial (if available) |
| ONVIF Versions | Supported ONVIF protocol versions |
| Capabilities | Supported features (media, PTZ, events, imaging, etc.) |
| Media Profiles | Available profiles with resolution and frame rate |
| RTSP Streams | List 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
| Setting | Options | Default |
|---|---|---|
| Network Range | 192.168.68.0/24, 192.168.1.0/24, 192.168.0.0/24, 10.0.0.0/24, 172.16.0.0/24 | 192.168.68.0/24 |
| Max Concurrent Hosts | 10 (Conservative), 20 (Balanced), 50 (Aggressive), 100 (Very Fast) | 20 |
Scan Phases
| Phase | Description |
|---|---|
| Ping scan | Discover live hosts on the network |
| ARP scan | ARP-based host detection (finds devices that don't respond to ping) |
| Port scan | Scan common ports: 554 (RTSP), 80/443 (web), 8080, 8554, etc. |
| Vendor analysis | Identify device manufacturer and model via MAC address lookup and web interface |
| Completion | Scan complete |
Progress shows: hosts discovered, potential cameras found, percentage, and estimated time remaining.
Device Classification
Each device is assigned a confidence level:
| Confidence | Meaning |
|---|---|
| High | Device has RTSP ports open and camera-like indicators (shown first) |
| Medium | Device has some camera indicators but unclear classification |
| Low | Generic 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
| Field | Example |
|---|---|
| Camera Name | Front Door Camera |
| RTSP URL | rtsp://192.168.1.100:554/cam/realmonitor?channel=1&subtype=0 |
Optional Fields
| Field | Purpose |
|---|---|
| Manufacturer | e.g. Hikvision — used for display only |
| Model | e.g. DS-2CD2143 |
| Username | RTSP authentication username |
| Password | RTSP 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:
- Aegis injects your credentials into each URL (e.g.
rtsp://user:pass@192.168.68.108:554/...). - Each URL is tested by connecting to the camera and waiting for a stream response.
- URLs are tested one-by-one with a 500ms delay between each test to avoid overwhelming the camera.
- Results are shown in real-time:
- ✅ Green checkmark — stream connected, showing resolution and codec
- ❌ Red X — stream failed (with error message)
- ⏳ Spinner — currently testing
- 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:
- Optionally rename the camera (defaults to
Manufacturer Model IP). - Click Add Camera.
- The camera is saved with: selected RTSP URL, credentials, IP, MAC, manufacturer, and model.
- 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:
| Element | Description |
|---|---|
| Camera icon | Blue camera icon with gradient border |
| Name | Editable — click the pencil icon to rename inline |
| IP address | Shown in monospace below the name |
| Settings button | Opens the camera configuration modal |
| Delete button | Removes the camera (immediate, no confirmation) |
| Live indicator | Green "Live" badge when streaming, "Offline" when not |
Click the refresh button (top right) to reload the camera list.
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| ONVIF scan finds no devices | Camera not ONVIF-compliant, or on a different subnet | Try Network Scanner instead. Verify the camera is on the same subnet. |
| Discovery finds the camera but no stream URLs | Enrichment failed (camera requires authentication for stream URL retrieval) | Add ONVIF credentials in Advanced Settings and re-scan. |
| Valid IP but no stream | Multiple URLs returned, wrong one selected | Open 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 streaming | Camera'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 verification | Wrong credentials | Double-check the username and password. Try the camera's web interface to verify credentials work. |
| Network scanner is slow | Subnet is large or concurrency is low | Increase Max Concurrent Hosts to 50 or 100. Use a /24 subnet (254 hosts), not /16. |
| Stream preview shows black video | Camera requires a specific codec | Check 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:
| Brand | Common RTSP URL Pattern |
|---|---|
| Amcrest | rtsp://<ip>:554/cam/realmonitor?channel=1&subtype=0 |
| Hikvision | rtsp://<ip>:554/Streaming/Channels/101 |
| Dahua | rtsp://<ip>:554/cam/realmonitor?channel=1&subtype=0 |
| Reolink | rtsp://<ip>:554/h264Preview_01_main |
| TP-Link | rtsp://<ip>:554/stream1 |
| Axis | rtsp://<ip>:554/axis-media/media.amp |
| Generic ONVIF | rtsp://<ip>:554/onvif1 |
Replace <ip> with your camera's IP address. Credentials are usually embedded as rtsp://user:pass@<ip>:554/....