This guide will walk through the steps required to port an RTSP stream into the DNNNode using Core Services v3 and Sighthound Mobility Service.
- Formatting RTSP Stream URL
As most IP cameras have login requirements for connections to the RTSP stream, you will need to format the RTSP stream URL in the following way:
rtsp://<username>:<password>@<ipAddress>/<path>
For example, an Avigilon camera with the login of u:admin, pw:admin, IP:192.168.1.123 would have the following RTSP URL:
rtsp://admin:[email protected]/defaultPrimary?streamType=u
- Connection RTSP in Web UI
The Core Services 3.x container comes with an ‘RTSP’ page for nodes, rather than the ‘Liveview’ page that is used for DNNCams.
Here, you can enter your formatted RTSP stream URL and choose the corresponding codec, h264 or h265, and click CONNECT. After instructing the device to CONNECT, the stream should populate in the empty area below the CONNECT button and provide a message, as shown below:
If you’re having troubles connecting to the RTSP stream from the RTSP page, we recommend trying to connect via VLC instead. In VLC, you can try to connect using the same formatted URL and the ‘Open Network Stream’ option. VLC will provide more thorough error messages in the case that you cannot connect to the RTSP stream.
Once the RTSP connection has been established within the Web UI, we can move on to the Mobility Configuration.
- Connecting RTSP Stream to Data Acquisition Container
The data acquisition container is used to pull frames from the RTSP stream that will later be used in the Mobility Service configuration. If Data Acquisition is not configured, there will be an empty frame in the Mobility Service configuration page.
Navigate to the Sighthound Platform and login to your account. From the devices page, choose your DNNNode from the list to open the Device Details page for your Node.
Under the services panel, locate ‘BAI Data Acquisition v3’ and click on the great icon to open its configuration page.
In the Data Acquisition configuration page, choose the proper codec, set the input type to rtsp, and enter the formatted RTSP URL in the Input Source field. Make sure that image uploads are turned on and set the Crontab Direct Entry to ‘* * * * *’. This tells the container to upload an image every minute, so an image should populate in the next few minutes.
After entering the configuration, scroll down to the bottom and select ‘Save and Export Settings’
The Data Acquisition container will now upload a frame from the RTSP stream on the next Crontab trigger (the next minute in this case). You can refresh the Device Page until you see the image come up at the top left of the page after a few minutes..
- Connecting RTSP Stream via Mobility Configuration.
Under the services panel, locate ‘Sighthound ObjectDetector’ or ‘Sighthound Mobility Services’ and click on the gear icon in it’s row to open the configuration page. *Note- Only Mobility/ObjectDetector releases v6 and later will have Node support.*
Now, scroll down to the bottom to find the ‘Edit Mobility Service Configuration’ panel. Here, choose ‘Yolo’ for the model type, then choose your desired streaming codec, h264 or h265, and make sure ‘Input Type’ is set to ‘rtsp’. Next, enter the same formatted RTSP URL from above into the ‘Input Source’ field. An example is shown below:
After entering your configuration, click ‘Update Config Specs’ and then the ‘Save Config’ at the top of the screen. This will save the configuration, telling the device to use Mobility Services with your desired RTSP stream as an input.
The last step is to set up your Mobility Service virtual sensors, as explained in detail on the Sighthound Mobility Service documentation page.