RTSP manual configuration
  • I think I’ve searched fully and not found an answer to my issue as follows:

    I recently purchased two Ubiquiti G3 cameras to test them out. I like them and want to replace my existing mix of Foscam and D-Link cameras with them.

    SecuritySpy works perfectly using the Ubiquiti UniFi profile when the cameras are in Standalone mode, but it doesn’t allow full control of features such as lens distortion correction and firmware update. Ubiquiti offers a free management tool that adds those features as well as providing a CCTV solution, but it's not as good as SecuritySpy in CCTV functionality.

    In short I want to manage the cameras through UniFi Video, but pull the live stream into SecuritySpy to perform motion detection, record etc.

    I can view a managed camera RTSP stream in VLC no problem, but SecuritySpy times out when I try to set the stream up manually. When it’s being managed the camera is given a 25 character hexadecimal ID with a suffix of _1 _2 etc for its available resolutions as the RTSP request.

    I can set up a manual stream successfully to a camera in Standalone mode (where the request is “s0”, and I can’t see where I’m going wrong in the setup when it’s managed as all I am doing is changing the request, so am I missing something or is there a maximum length for the RTSP request in SS by any chance? I don’t believe I can edit the request that UniFi Video sets for the camera.

    Thanks in advance,

    Fen
  • Hi Fen,

    The maximum length of the request string is 127 characters, so it doesn't sound like you should be getting close to this limit.

    I'm not familiar with the camera's "standalone" vs. "managed" modes - could you please explain how this works?

    What is the "managed" URL you are using in VLC?

    When you set this up in SecuritySpy, what exactly is error that is reported? Select "Open Log" from the File menu in SecuritySpy to check the log file.
  • Hi,

    Thanks for confirming - I was part hoping it was a request length issue and part not (on the basis that might not be easy to work around).

    To answer your questions:

    Out of the box the UniFi G3 cameras are set to pick up an address by DHCP, and the Ubiquiti UniFi profile can connect to them on their assigned IP address and stream video with no other configuration.

    Pointing a browser at the camera's IP address opens a management interface (like other cameras I've used) and some settings can be adjusted as well as time zone etc. being configurable. This mode is named "Standalone" within the interface as each camera is set up through its individual web interface.

    Ubiquiti also provides an NVR application called UniFi Video as a free download, which runs silently and can be controlled from within a browser connected to the app. It finds UniFi cameras on the same subnet and they can be adopted by the app at which time their status changes to "managed". Once managed settings can be standardised across multiple cameras, firmware can be automatically updated and several more settings that are not available in the camera's web interface are exposed (saturation, brightness, image orientation, turn off lens distortion correction etc.) They can also be overlaid on a "map" which is effectively an image or satellite picture of the physical site, which will dynamically show if any cameras detect motion (by changing the colour of the fan representing their field of view from green to red).

    Once a camera is being managed by UniFi Video the mode changes in its web interface (to "UniFi Video") and fewer settings are available.

    From within UniFi Video a standard RTSP port for all managed cameras is configured (default is 7447, the RTSP default port (554?) is not available, presumably as it is being used by UniFi Video). Each individual camera can have an RTSP feed enabled on this port in one of more of three resolutions, and each resolution is given an RTSP URL (which cannot be edited) in the format:

    rtsp://192.168.20.20:7447/5adede05e4b096b258e7ba98_0 (for 1920x1080 feed. Lower resolutions have _1 and _2 suffices)

    Using that URL in VLC I can stream real time video from the managed camera.

    Breaking it apart to provide the IP address, port and request in SS however fails.
    I am using the format RTSP TCP (video and audio), but I have tried the other options also.

    The log entry when it fails is:

    "01/05/2018 21:27:14: Error communicating with the network device "Network camera". 4.2.3,70900,800 Failed to obtain video frame from network device. The operation timed out. "

    In summary, the only documented difference between Standalone and Managed mode is that the RTSP port is specified (as 7447, but configurable) and the request becomes a relatively lengthy hexadecimal number in managed mode versus Standalone using the default RTSP port and a request of (I believe) S0.
  • Thanks for the detailed explanation, this is all very interesting.

    A timeout error usually indicates that either the address or the port has been specified incorrectly in SecuritySpy. It sounds like you are doing everything right, but please double-check the following:

    - Enter the address as 192.168.20.20

    - Enter the RTSP port to 7447 (note there are two port boxes: one for HTTP and one for RTSP - make sure it's the RTSP one that you are setting).

    - Set the Profile to Manual configuration.

    - Set the Format to RTSP TCP.

    - As the Request, enter 5adede05e4b096b258e7ba98_0

    Then click the "Apply Preferences" button, and SecuritySpy will attempt to connect.

    If it still doesn't work, please check the log again for any error messages.
  • Hi,

    You were spot on - it's the address.

    I was assuming I should connect direct to the camera and had blinded myself to the fact that the IP address in the URL is that of the UniFi Video server, not the camera. Now I have spotted that error it works.

    Thanks for the consideration you gave the issue and getting to the resolution that was staring me in the face - I just feel bad it was a mistake on my part in the first place.

    I am now very happy with the setup - the UniFi cameras are much better than any of the others I have been using to date and with the ability to manage them through their native application but still access the far richer features of SecuritySpy as the NVR it's the best of both worlds.

    Fen
  • Hi Fen, great to hear you managed to find the solution, and thanks for reporting back, I'm sure this will be helpful for other users.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!