IP Camera Connections

Details on the five major steps to configure and deploy Blue Iris.
1. Connecting IP cameras.
2. Configuring your home or office network for Remote Access via a web browser or the phone apps.
3. Setting up Storage and Recordings.
4. Creating Triggers and Alerts.
5. Creating Schedules and Profiles
Post Reply
varghesesa
Posts: 28
Joined: Thu Jul 11, 2019 9:52 pm

IP Camera Connections

Post by varghesesa » Wed Jan 27, 2021 10:53 pm

Introduction
This document outlines the steps to connect IP Cameras successfully to Blue Iris (BI).

If you prefer to watch the webinar associated with this article, checkout our YouTube channel. Webinar name: Camera Connections and Streams.

More and more cameras are coming out with higher and higher resolutions (> 2MP). These cameras often provide two and sometimes three streams. The reason for the multiple streams is so camera vendors can provide better images and clarity (high resolution, more network bandwidth) and also provide a good user experience for remote access (mobile phones, web interfaces). This tension between higher resolutions and good user experience has resulted in cameras providing multiple streams.

The below steps explain how to connect cameras to BI with a single stream or multiple streams. If you have an older camera, multiple streams may not be available. For example, cameras with a resolution of 1 MP or less usually do not have or require dual streams. Most networks can support <1MP resolution cameras.

How Blue Iris leverages the different streams
The biggest advantage of sub streams is the drastic drop in CPU usage for the same cameras. This savings is largely attributed to using the sub stream for live view in the all camera (mosaic) view which is the common view on most displays. By leveraging the sub stream at a much lower resolution, the decoding and displaying of the stream is much easier on the CPU. In addition, a significantly reduced amount of RAM is used on a per camera basis.

Specifically, in Blue Iris the main stream is used for:
  • direct to disc recording so playback and evidence gathering is in high resolution
  • single-camera live viewing and recording playback so if a user is focused on one particular camera, he/she has the clearest view possible
  • audio recording
The sub stream is used for everything else:
  • multiple-camera view (mosaic view)
  • motion detection
  • alert snapshots etc
Network IP Camera Configuration Dialog
IP Config.png
IP Config.png (91.3 KiB) Viewed 2520 times

Follow basic steps below to connect your IP cameras.


Step 0: Confirm cameras are connected to the network.
The easiest way to connect cameras to the network is to follow the manufacturer's installation instructions. To test whether the cameras are connected properly:
  • Many cameras come with an app. Follow the manufacturer instructions to connect your camera to your phone/app. If the camera is connected to the network properly, then the app should work and you should be able to see the video from the camera.
  • Many cameras also come with a web interface. If so, identify the below settings and try to login to the camera via a browser. FYI, many older cameras need Internet Explorer (Flash) to connect and see the camera video via the web interface. The web interface is the best test to confirm network setup. A web interface is also a very good indication the camera manufacturer allows third party integration.
    • IP address
    • Username
    • Password

Step 1: Hit Find / Inspect button
Devices on the network use various standard protocols such as WS-Discovery and UPnP (Universal Plug N Play) to let other devices know they exist on the network for connectivity. If your router also supports these protocols, then it is possible for BI to find these devices (unlikely and not recommended due to lack of security). Most users start with Step 2.

Provide the username / password of the camera and select Find/Inspect.

FindInspect.png
FindInspect.png (76.23 KiB) Viewed 2507 times

The Find/Inspect button will discover all cameras and/or devices existing on the network that support the above stated protocols.
NetworkDiscovery.png
NetworkDiscovery.png (92.84 KiB) Viewed 2506 times
Select the camera you want added to BI and BI will take care of the rest.

Step 2
If the camera is not discovered by Find/Inspect, continue providing more information. Provide the IP Address in addition to the username/password for the camera. Hit Find/Inspect. If the camera supports ONVIF on port 80 or 8999 (default), BI will establish an ONVIF connection.

If you do not know the IP address of the camera, three easy ways to find the IP address.
  • If the camera comes with a mobile app, the app may provide the IP address.
  • Login to your router. The router table lists all the devices on your network.
  • Advanced Port Scanner is a great tool for scanning the network and finding cameras with the available ports on the camera . See tutorial for details
Step2.png
Step2.png (174.07 KiB) Viewed 2352 times

ONVIF
ONVIF is a standard protocol that allows third party software such as BI to gain access to capabilities from a camera for use within BI such as PTZ and/or audio controls. Some cameras use port 80 or 8999 for ONVIF. If an ONVIF connection were possible through either port, Find/Inspect would pull available ONVIF functionality. Below is a sample response from the camera when an ONVIF connection is established.

Key information gathered via ONVIF to make connecting to cameras easy:
  • RTSP URI(s): Probably the most important piece of information. This tells BI how to get access to the video from the camera. Without this information no video feeds will appear.
  • PTZ settings. Almost always part of a camera's ONVIF implementation these settings make it easy for 3rd party solutions to get access to the PTZ controls of a camera.
  • Audio. Not frequently shared via ONVIF, however a great bonus to connect to a camera's microphone or speaker if available.
iCamera_ONVIF1.PNG
iCamera_ONVIF1.PNG (17.26 KiB) Viewed 2351 times
iCamera_ONVIF2.PNG
iCamera_ONVIF2.PNG (24.64 KiB) Viewed 2351 times
iCamera_ONVIF3.PNG
iCamera_ONVIF3.PNG (12.41 KiB) Viewed 2351 times
iCamera_ONVIF4.PNG
iCamera_ONVIF4.PNG (11.88 KiB) Viewed 2351 times
If an ONVIF connection were made, the RTSP URL for the Main and Sub streams should be provided and populated in list boxes below. If the Main substream is only provided, it is often easy to guess the Sub stream based on the Main stream. The difference between the main stream path and the sub stream path will often be a single digit such as "stream0" to "stream1" or a word change such as "main" to "sub".
iCamera_IPUserPass_RTSP_Substream_filled.PNG
iCamera_IPUserPass_RTSP_Substream_filled.PNG (201.37 KiB) Viewed 2341 times
Hit OK and the camera should connect.

ONVIF Gotcha!
It turns out camera vendors are adding another layer of security to their ONVIF controls. The ONVIF ports may be open by default. However, the amount of information available through the port can be limited until security permissions are set on the camera. In the Hikvision example below, access to the ONVIF capabilities were limited until we added the user account used by BI into the ONVIF user list with admin privileges.
ONVIF-gotcha.png
ONVIF-gotcha.png (70.83 KiB) Viewed 2340 times

Axis cameras also have this functionality. The username/password placed in BI needs to be an ONVIF account in order to pull in the ONVIF features.


RTMP Gotcha
99% of cameras only support the RTSP protocol. On occasion, a vendor will support RTSP and RTMP. Reolink is one such vendor and the RTMP protocol seems to provide a healthier stream.
Checkout the Reolink Gotchas article for best practices on connecting Reolink cameras.


Step 2b. Still cannot connect!

Confirm IP Address / Username / Password for camera is correct
Double check the IP address and username/password are correct by hitting Ok on the Network IP config dialog and selecting the URL link in Camera settings -> Video tab. If the URL opens in a browser with the login screen for the camera, then you know the IP address is correct. If the camera home screen appears after attempting login with username/password, then you have confirmed the username/password are correct.

CheckIP.png
CheckIP.png (175.64 KiB) Viewed 2502 times

If the browser times out, this could either indicate the IP address is incorrect or Port 80 is not open on your camera. Foscam is one example of a vendor that tends to use another port. Foscam cameras tend to use port 88. The Status->Log will also let you know if BI cannot access the camera (see below).

IP address error.jpg
IP address error.jpg (171.93 KiB) Viewed 2076 times

If Port 80 is not accessible, this often means the camera is not open for 3rd party integration and can only be accessible via the proprietary phone app provided by the vendor. However, TP Link and perhaps others only provide a proprietary app interface. However, TP Link still provides access to the RTSP feed. This may be a good time to approach the camera vendor and ask how to connect the camera to 3rd party VMS systems using RTSP.



Step 3

At this point, you should have confirmed the IP address and username/password of the camera. However, an ONVIF connection was not available on the standard ports (80, 8999) or the camera does not support ONVIF.

Advanced Port Scanner is a popular tool to identify the IP address and ports available on a camera. This short three minute video on YouTube explains how to download/use Advanced Port Scanner. Our final attempt to make an ONVIF connection is to use Advanced Port Scanner to identify all the open ports on the camera. The RTSP port is either 554 or usually some permutation of 554, e.g. 8554. Fill in the RTSP port value accordingly.
Ports.png
Ports.png (172.99 KiB) Viewed 2346 times

Try all the remaining available ports for the ONVIF value. For each ONVIF value entered, hit Find/Inspect and see if BI can connect via ONVIF. If an ONVIF connection were made, select the appropriate streams for the Main and Sub from the adjacent list box as stated in Step 2.

At this point, you should have established an ONVIF connection or at least an RTSP connection, i.e. you should be seeing video.
If not, another good check is trying other third party players. VLC is the most popular. See if VLC, Tinycam pro, IP Cam Viewer, PotPlayer etc can connect to the camera. If others can, then BI should be able to do so as well.

If the cameras work using VLC, you may want to select the RTP/UDP option in the Advanced section. If your camera is not producing a stream in Blue Iris, yet works with the VLC software using the same RTSP video path, there’s a chance that VLC is using RTP/UDP.

Step 4

If you successfully connected your camera using ONVIF and all the PTZ controls (if you have a PTZ camera) are working fine, then there may not be a need for this step. Generic/RTSP for the Make/Model may meet your requirements.

However, if there is more functionality you want to extract from the camera or you just want to experiment and see what other functionality has been leveraged from the BI drivers, then continue with Step 4. See PTZ article to learn what other controls may be accessible via BI drivers. BI has been around for 20+ years. Over the years we have found ways to connect to cameras that do not have ONVIF and gain access to additional functionality provided by the cameras.

Another reason for Step 4 is the PTZ commands from the camera via ONVIF are ok, but there is more functionality which you would like to leverage. Maybe the Make / Model is in our BI list. The BI drivers may be even more robust because a past customer had the same request. Worth a shot to test.

Audio and other advanced functionality
Finally, cameras that support ONVIF share their capabilities such as PTZ allowing BI to access those capabilities without needing the user to do anything. However, camera vendors frequently share their PTZ capabilities but not Audio and other functionality. BI over the years, has reverse engineered many cameras to also provide those capabilities.

Choose the Make of the camera and try all the different models to see if any can make a connection to your camera. The Model listings with an * at the beginning of the name and those listed at the top of the list are often the correct choice. With each Make/Model selection, choose the OK button instead of Find/Inspect. Make sure the RTSP port value remains populated with the default 554 or the specific value provided by Advanced Port Scanner.
RTSP.png
RTSP.png (172.48 KiB) Viewed 2346 times

Step 5

If BI cannot connect, then you will need to review camera vendor documentation or conduct internet research in order to determine the correct values for a connection. BI needs the following pieces of information to connect to cameras successfully:
  • Camera IP Address
  • Camera username/password
  • Camera RTSP port
  • Camera Main and Sub stream URLs
This may be another good time to approach the camera vendor and ask how to connect the camera to 3rd party VMS systems using RTSP.

You can also submit a BI trouble ticket to see if we can figure out a connection. We would be happy to do some remote testing. To do so, please send a WAN address for this camera for testing purposes with necessary ports, usually just 80 and 554. Don't forget a temp login as well. If you put the camera on the internet we can take a look. This video explains how to provide WAN access to your camera. To be clear, we need direct access to the camera, not the BI web interface.

Connecting NVR/DVR
Connecting BI to your NVR or DVR is possible as well. A common request from customers is they purchased a single-vendor solution at first but now are growing their surveillance system with different vendors. They use BI to put all cameras under one management interface.

The following information is needed to connect a DVR/NVR to BI:
  • Does the NVR allow access to their channels (camera streams) via RTSP or RTMP?
  • If so, what is the URI convention for the streams? Check documentation.
    Hikvision example: /Streaming/channels/301 = channel 3/ stream 1
    Dahua example: /cam/realmonitor?channel=1&subtype=0
  • What ports are used?
    Http = 80 or other?
    ONVIF = 80 or 8999 or other?
    RTSP / RTMP = 554 or other?
ONVIF makes connecting cameras easy. However, finding ONVIF support on DVR/NVR systems are more rare. Thus, connecting DVR/NVR systems typically require more research with vendor and vendor documentation. Below is an example of connecting a Hikvision NVR.
Hikvision NVR.png
Hikvision NVR.png (107.45 KiB) Viewed 415 times
The Hikvision convention is 101/102.
101 = channel 1 (i.e. camera 1), stream 1 (i.e. main stream)
102 = channel 1, stream 2 (i.e. sub stream)

So connecting camera 2 from the Hikvision NVR would need the following settings: main stream = 201, sub stream = 202.

To get the Hikvision NVR connected, we had to research through the documentation (or reach out to vendor). Only through some investigation were we able to correctly identify the RTSP URI stream (/Streaming/channels/101 etc) and the RTSP port = 8554.

If you are still stuck, we would be happy to do some remote testing. Could you please send a WAN address for this camera for testing purposes with necessary ports, usually just 80 and 554 (RTSP) and 8999(ONVIF if available). Don't forget a temp login as well. If you put the DVR/NVR on the internet we can take a look. This video explains how to do so. To be clear, we need direct access to the DVR/NVR, not BI web interface.

Advanced Options
ip config - advanced options.PNG
ip config - advanced options.PNG (41.35 KiB) Viewed 253 times
Hit the Help button in the IP Config Dialog to understand the options. Deviate from the default settings with caution.


Final Thoughts
Connecting cameras and getting video from your cameras is a crucial first step. But you may not be done. The next step is to make sure the camera settings are optimized so they deliver a good experience (smooth, high quality stream) on BI. The Camera Stream Optimization article will show you the way.
viewtopic.php?f=11&t=2049

Next steps / Submitting a Ticket

ONVIF Device Manager (ODM)
At this point, if you cannot connect your camera, if you are technical, you can try to install/run ONVIF Device Manager to connect to the camera. This short seven minute YouTube video, ONVIF Device Manager - Software used to test IP cameras, explains how to use the software to connect to the cameras. Once connected, the device shows the RTSP URIs used to connect to the different video streams. With that information you should be able to input the same information into the BI IP Config Dialog to connect your camera.

For example, below is the RTSP URI of the camera determined by ODM.
ODM-URI.PNG
ODM-URI.PNG (118.57 KiB) Viewed 545 times

Based on the URI information, it is easy to now populate the IP Config Dialog as seen below:
ODM-ip config dialog.PNG
ODM-ip config dialog.PNG (105.32 KiB) Viewed 545 times


Remote testing
Alternatively, you can place the camera on the WAN/Internet for remote testing from BI support. We would be happy to do some remote testing.  Could you please send a WAN address for this camera for testing purposes with necessary ports, usually just 80 and 554 (RTSP) and 8999(ONVIF if available).  Don't forget a temp login as well. If you put the camera on the internet we can take a look.  This video explains how to do so. To be clear, we need direct access to the camera, not the BI web interface. 

A simple way to test if your camera is on the WAN is go to your cellphone -> turn off wifi -> and from the cell phone browser try to connect to the camera using the WAN IP Address and login.

In addition, provide the following information with the ticket.
  • Make/Model of the camera
  • Any issues you discovered while going through the steps.
    • Did you connect via Step1?
    • If you tried Step 2, did the camera have ONVIF? What information was imported via ONVIF?
      Did you confirm the IP Address, Username and Password for the camera are correct?
    • In Step 3, were you able to identify which ports are available on the camera? Based on the available ports, were you able to determine the RTSP port? ONVIF port? Http port?
    • In Step 4, did you end up using the BI drivers by setting the Make/Model? Or did you just keep the ONVIF settings?
Post Reply