Skip to content
Castreon
Channels

ONVIF cameras and WebRTC direct from the camera

Updated 18 Oct 2026

Two helpers for IP cameras: discovery over ONVIF — Castreon looks for the cameras on the network and gives you the correct RTSP address, without you looking it up in the manual — and WebRTC direct from the camera, for the lowest latency in the browser.

Available from Castreon 1.7.0. Discovery over ONVIF: the Pro and Enterprise editions. WebRTC direct from the camera: the Enterprise edition (like WebRTC). Adding a camera by its RTSP address stays in all plans — see IP cameras (RTSP).

Finding cameras over ONVIF

  1. Channels → new channel (or Edit), under Sources, Type → IP camera (RTSP).
  2. Fill in User and Password — the camera's.
  3. Find cameras (ONVIF) → Search the network. Within a few seconds the cameras that answered appear, with their name and model. Choose one.
  4. Read the profiles. Castreon shows the camera's profiles — usually a main stream and a secondary one — with codec, resolution and frames per second. The most suitable H.264 profile is marked recommended; for H.265 you see the browser warning.
  5. Use puts the profile's RTSP address into the source field. Then Test the camera and Save.

If the password is already saved on the source, the empty field uses the saved one. The password does not appear in responses, in the log or in the RTSP address put into the field.

Search the network works only if the Castreon server is on the same local network as the cameras: the cameras answer a multicast message, which does not cross routers. On a server in a data centre or on another network, type the camera's IP directly (with the port, if it is not 80) and press Read the profiles.

The camera's clock: if the camera's time differs a lot from the server's, the panel tells you. Castreon takes the difference into account when authenticating, but it is best to switch on NTP in the camera.

What it means technically

Discovery uses WS-Discovery (Probe on 239.255.255.250:3702), and reading uses the standard ONVIF services: the camera's time, device information, the Media service, the profiles and the stream address (GetStreamUri). Authentication is HTTP Digest or, on older cameras, WS-UsernameToken.

How much is verified: the implementation follows the ONVIF specification (Core and Media) and has been tried with a camera simulated from the specification's examples and with an independent ONVIF client — not yet on a physical camera. If a camera does not answer properly, the RTSP address from the manual always works.

Common problems

  • “No ONVIF camera answered”: another network / subnet, ONVIF switched off in the camera (on many cameras it has to be switched on and a separate ONVIF user created) or multicast blocked by a switch / firewall. Type the camera's IP.
  • “The camera refused the user name or password”: check the camera's ONVIF user and its clock.
  • The camera gives no address for a profile: use another profile or the address from the manual.

WebRTC direct from the camera

Normally, WebRTC starts from the channel's stream (after the source is read and the channel is processed). With Direct from camera, WebRTC reads the camera directly, over a second RTSP connection — latency drops by everything the channel's processing adds.

  1. The channel's first enabled source must be IP camera (RTSP).
  2. Under Outputs, at WebRTC, tick Direct from camera and Save.

How it behaves:

  • H.264 without B-frames is copied, without re-encoding. H.265 or H.264 with B-frames is re-encoded to H.264 (CPU).
  • A single quality (no quality choice in the player).
  • The camera must accept two RTSP connections at the same time (the channel and WebRTC).
  • When the channel switches to a backup source, when the camera stops answering or when the option is switched off, viewers reconnect by themselves to the channel's stream — they always see what is on air. After a camera failure, Castreon waits one minute before trying the camera directly again.
  • The channel page, under WebRTC, shows direct from camera while it is in use.

Tested end to end with a real RTSP server and a simulated camera (H.264 copied, H.264 with B-frames re-encoded, Opus audio), not with a physical camera.

Privacy

Cookies & local storage

Strictly necessary cookies are always active. Analytics and marketing use Google services and only start if you accept them — until then nothing is sent to Google. You can withdraw your consent here at any time.

Strictly necessary

Without them, sign-in, forms and your chosen language don’t work. They don’t require consent (§ 25(2) no. 2 TDDDG).

Always active
Name Purpose Duration Type
castreon-session Keeps your session: sign-in and chosen language 2 hours, renewed on every visit Cookie
XSRF-TOKEN Protects forms against forged requests 2 hours, renewed on every visit Cookie
remember_web_… Only if you tick “Remember me” at sign-in Until you sign out, max. 400 days Cookie
__cf_bm Cloudflare: tells visitors and bots apart, only when traffic is being checked 30 minutes Cookie · Cloudflare
castreon:consent Remembers your cookie choice 12 months Local storage
theme Customer account appearance: light, dark or system Until you change it Local storage

Analytics

Google Analytics 4 (Google Ireland Ltd.): which pages are visited, where visits come from and on which type of device — with pseudonymous identifiers, without storing your IP address. Helps us improve the website.

Name Purpose Duration Type
_ga Google Analytics: recognises the visitor (pseudonymous ID) 13 months Cookie · Google Analytics
_ga_VHWQRPHPEF Google Analytics: keeps the state of the visit 13 months Cookie · Google Analytics

Marketing

Google Ads (Google Ireland Ltd.): measures whether visits from Google ads lead to a trial or a plan, and allows Castreon ads to be shown on other websites (remarketing).

Name Purpose Duration Type
_gcl_au, _gcl_aw Google Ads: links the visit to the ad click (conversions) 90 days Cookie · Google Ads
IDE, test_cookie Google Ads: remarketing and ad measurement, on Google domains (doubleclick.net) Up to 13 months Cookie · Google (third party)