Disconnects every 6 seconds with Hikvision camera
Hello - I have just added a Hikvision camera to my personal camera system (the other units are Dahuas). This is Hikvision model DS-2CD2032, with the ONVIF profile selected in SecuritySpy. All seems generally fine, with no apparent issues during setup, except for one thing: when using the iOS app to view the camera streams, the camera connection to the Hikvision unit appears to fail on a regular, six-second cycle. At those times I receive the camera symbol with the red x, and then after a few moments the connection reestablishes, then fails, and the cycle repeats.
The issue persists across two iOS devices that I'm using (iPhone, iPad). I noted a discussion here (http://www.bensoftware.com/forum/discussion/641/camera-loses-connection-and-reconnecting-every-minute#Item_44) and tried switching the camera profile as noted, without any change in behavior. I also applied the generic Hikvision profile, in which case the camera connection went down and stayed down.
What I have noted, however, is that when I have ONVIF profile selected and the SecuritySpy preference pane open, and the Hikvision camera actively selected under the "cameras" tab (as when making adjustments to the specific camera's settings), the problem disappears and the connection remains constant for the iOS devices. As soon as I select another camera or dismiss the preferences pane entirely, the problem recurs. The other cameras continue to operate normally at all times.
This is running SecuritySpy 4.1.6. Thanks for any suggestions.
- Edward
The issue persists across two iOS devices that I'm using (iPhone, iPad). I noted a discussion here (http://www.bensoftware.com/forum/discussion/641/camera-loses-connection-and-reconnecting-every-minute#Item_44) and tried switching the camera profile as noted, without any change in behavior. I also applied the generic Hikvision profile, in which case the camera connection went down and stayed down.
What I have noted, however, is that when I have ONVIF profile selected and the SecuritySpy preference pane open, and the Hikvision camera actively selected under the "cameras" tab (as when making adjustments to the specific camera's settings), the problem disappears and the connection remains constant for the iOS devices. As soon as I select another camera or dismiss the preferences pane entirely, the problem recurs. The other cameras continue to operate normally at all times.
This is running SecuritySpy 4.1.6. Thanks for any suggestions.
- Edward
Comments
-
Hi Edward,
This is rather strange! In the iOS app settings, try turning off H.264 streaming. Does that have any effect on the problem?
Also - is this the screen in the iOS app that shows the list of cameras, or when viewing one particular camera after tapping on it in this list (or both)? -
Hi Ben - Thanks for your immediate follow-up.
The serial-disconnects issue arose solely in the iOS app screen showing the list of available cameras. When viewing the Hikvision camera's live feed after selecting it from the camera list, the feed had no disconnects.
After posting my question, I continued to try different settings via the iOS app. I initially had the iOS app's toggles for the C M and A functions on the Hikvision camera "off" during early setup. As soon as I activated Motion Capture ("M") on the individual camera view, there were no more serial disconnects when I returned to the iOS app camera list. Similarly, activating Actions ("A") resolves the issue, as well. Also, with both "M" and "A" active, the disconnects are likewise gone. When activating continuous capture ("C"), alone, the disconnects persist.
It's my default to have motion capture and actions "on," so effectively I don't have the issue any longer. But I definitely can re-create the serial disconnects, at 6-second intervals, if I turn both off.
The connections to the Dahua cameras don't exhibit any similar issues, just the Hikvision.
So, please feel free to disregard, but I'll be glad to provide any additional information that might help if you need to check further.
With that in mind, I did just now toggle off the H.264 streaming (which was set to WAN only). There was no change in behavior -- with M and A off for the Hikvision camera, the 6-second disconnects returned. Also, I experienced the serial disconnects both from within the local network and when accessing the camera list via the 'net.
Thanks again - I really appreciate SecuritySpy and all the work that goes into it.
- Edward -
Hi Edward,
Thanks for the info. Do you happen to have the "Decompress incoming frames only when required" option enabled in the General Preferences in SecuritySpy? This could cause what you are seeing, and turning it off should resolve the problem.
Using this option can save CPU usage, but can have some undesirable effects like the one you are seeing. When SecuritySpy doesn't need to decompress frames (for example for display to the screen, or performing motion detection, or delivering via the web server) it stops decompressing the incoming video stream. When a frame is next required (e.g. the iOS app requests a frame), SecuritySpy then has to wait for the next key frame in the stream from the camera in order to continue decompressing the stream and make frames available again.
So depending how often the key frames are present in the stream, there may be quite a significant delay before SecuritySpy can then deliver the frame to the iOS app, causing the iOS app to display a broken stream icon.
Another solution would be to change the key frame rate in the camera's video stream settings so that it sends a key frame more frequently (try between 1-2 seconds).
-
Yes, in fact I do have SecuritySpy set to decompress incoming frames only when required. Your explanation makes perfect sense.
Thanks!
