Onvif camera added to Unifi Protect

cdf1982

n3wb
Mar 11, 2021
13
10
Italy
Good morning!

I'm helping a person who owns Hikvision cameras and wanted to add them to their Unifi Protect via the recently added Onvif support.

I wonder if other Ubiquiti users here have noticed the following issue:

- Before the integration in Unifi Protect, the Onvif cameras' RTSP stream can be opened by a third party app.

- Once those cameras are connected to Unifi Protect via Onvif, they work there but cannot be streamed anymore with other apps.

- There's a catch: if the third party app is already open and streaming before adding the cameras to Unifi Protect, the streaming keeps working. But then, quitting the app and relaunching it doesn't work anymore.

My hunch considering the "catch" above is that the Unifi system is monopolising all available streams when adding a camera, but it's odd because Hikvisions are usually pretty generous in terms of concurrent streams, and I don't really see why Protect would need more than one open (unless there's a bug in the new implementation). I obviously might be mistaken, and I should point out I have zero personal experience with Unifi products.

Thanks!
 
Hello,

Replying to try and gain more traction!
I am also having the same issue in which I am unable to access the ONVIF camera's RTSP stream after adopting the camera into Unifi Protect (v. 5.0.34).

I have done some experimenting with changing the RTSP port from default (554) to another random port (i.e. 8554) after the camera has been adopted into Unifi Protect. I was able to view the RTSP stream in VLC, but this resulted in the stream dying in Protect.
I understand that Unifi Protect does RTSP streaming a different way but generating an RTSP link in the camera's advanced settings, but this setting is missing for 3rd Party ONVIF cameras.

My suspicion is that Unifi is blocking all other streams for some security reason.

Does anyone have theories or explanations for this problem?

Thanks
 
Hello,

Replying to try and gain more traction!
I am also having the same issue in which I am unable to access the ONVIF camera's RTSP stream after adopting the camera into Unifi Protect (v. 5.0.34).

I have done some experimenting with changing the RTSP port from default (554) to another random port (i.e. 8554) after the camera has been adopted into Unifi Protect. I was able to view the RTSP stream in VLC, but this resulted in the stream dying in Protect.
I understand that Unifi Protect does RTSP streaming a different way but generating an RTSP link in the camera's advanced settings, but this setting is missing for 3rd Party ONVIF cameras.

My suspicion is that Unifi is blocking all other streams for some security reason.

Does anyone have theories or explanations for this problem?

Thanks

Unifi Protect don't block RTSP streaming (because it can't)..

But integration with Unifi Protect eats a lots of resources on each camera (2 RTSP streams - main & sub stream)..
Cheaper / older cams have very limited power to support more..
 
  • Like
Reactions: Flintstone61
I just got all 12 of my cameras which consists of Dahua Turrets, PTZ, Amcrests, Amcrest doorbell, all hooked up and adopted to the UNVR. All these cameras range from model years 2017 up to 2023.

At the same time the cameras are also feeding separately into an Intel NUC running Blue Iris to give me a full live feed on a LCD monitor so I can watch live what goes on. Blue Iris is not recording. Just the UNVR. When I double tap on my touch screen LCD, blue Iris will switch from sub stream to main stream and expand the full width of the monitor. No issues.

All works beautifully now.

Not sure if this makes a difference but I am using a UDM Pro and a Pro layer 3 switch as the main traffic router with 4 VLANs. The cameras are on its own VLAN. The UNVR also on its own. With layer 3 routing I set up firewall rules to let the camera talk to the UNVR and vice versa but never go up to the UDM main router to the WAN.
 
  • Like
Reactions: Flintstone61
I will try tonight for you guys and report back. Run stream on my Protect iOS app from cellular connection. Run stream live on a desktop computer using VLC Media Player from LAN. Also run stream from the Intel NUC to Blue Iris.
 
  • Like
Reactions: Mike A.
Reporting back. No issues with streaming UNVR to Blue Iris, to mobile cellular using Teleport VPN and recording to UNVR at the same time.

Of course though, I am using all Dahua or Dahua-oem cameras, not Hikvision.
 
Thanks @MakeItRain!

It would be interesting if other Hikvision Users test this integration.

As far as my personal experience with Hikvision goes, their cameras can serve up to 4 / 5 concurrent streams, so I wouldn't think the fact that Protect is taking 2 for itself, as mentioned by @steve1225, should justify the behavior, but maybe it depends on the camera model at play here, it would certainly be an explanation.
 
Last edited:
  • Like
Reactions: Flintstone61
Just in case others find this thread, the Hikvision cameras were also serving streams to other devices, so there is no issue with Protect, we were just hitting the maximum number of concurrent streams Hikvisions could serve. Thanks, this was very useful for debugging purposes, I appreciate your help!
 
  • Like
Reactions: Flintstone61
If you hit this issue, check in your camera settings to see if you have a maximum number of concurrent connections setting.
I have Dahua camera's added to Protect, and by default they had a maximum of 10 concurrent connections set by default. Not sure if other apps do this, but each stream seems to act as a connection. The Dahua's I have are 3 streams, so that seems to act like 3 connections.
Just something to maybe check.