Skip to content

Integrating with BlueIris

Neil Enns edited this page May 30, 2020 · 11 revisions

BlueIris security camera software and this project are an ideal match. Instead of cameras triggering alerts because spider webs floated in front of your cameras you can integrate BlueIris with this project and get local, reliable, AI motion detection for your security system.

To get a video overview of the general approach watch Build The BEST Security Camera NVR: Free Locally Processed AI Computer Vision with Blue Iris by The Hook Up. It inspired this project and these instructions borrow heavily from the configuration options shown in the video. Timestamped links to the relevant portion of the video are included at each applicable step in this guide.

These instructions are will walk you step by step through setting up a single camera so it can be triggered to record with a webRequest handler. Once you've set it up once you'll be happy you did it!

Note that these steps assume you already have your web cameras configured to provide an RTSP HD main stream and SD substream. Explaining how to do that for every camera on the market is beyond the scope of this guide, however you can see the steps for doing it on a common IP camera interface in The Hook Up's Video

The overall process

  1. Create a folder to store recorded footage from the security cameras
  2. Create a folder to store snapshots from the SD security cameras for AI analysis
  3. Configure the BlueIris webserver to accept local incoming requests from the AI system to trigger HD camera recording
  4. Configure SD cameras to record 24x7 and output probable motion snapshots when basic motion is detected
  5. Configure HD cameras to record when motion is detected by the AI system

The guide walks through these steps for configuring a single camera. Once you have a single camera working you'll repeat steps 4 and 5 for each additional camera you have in your system.

Creating a footage folder in BlueIris

These steps come directly from The Hook Up's video.

  1. Open the BlueIris General Settings > Clips and archiving tab.
  2. Create a new folder called surveillance. Limit the size to an amount and clip age that works for your hard drive setup and decide whether you want to delete or archive clips

Sample configuration that allocates 3000GB for storage, retains videos for up to one week, and deletes videos when required:

BlueIris surveillance footage folder configuration

Create a folder to store low-resolution (SD) snapshots

These steps come directly from The Hook Up's video. The low-resolution snapshots are used by the AI vision system to detect objects.

  1. Open the BlueIris General Settings > Clips and archiving tab.
  2. Click on the Aux 7 folder.
  3. Change the Folder to aiinput on one of your computer's drives.
  4. Limit the size to 1 GB and the retention time to 1 hour.
  5. Tap and hold on the Aux 7 name in the folder list and rename it to AiInput.

BlueIris snapshot folder configuration

Configure the BlueIris web server

These steps are based on The Hook Up's video with minor modifications.

  1. Open the BlueIris General Settings > Web server tab.
  2. Configure the port as you prefer. This guide assumes BlueIris is running on port 81.
  3. Check the Use UI3 for non-IE browsers. Don't worry, it works fine with Microsoft Edge :)
  4. Confirm the correct local IP address is shown in the Local, internal (LAN) access setting.
  5. Optionally configure external access (outside the scope of this guide).
  6. Click the Advanced... button
  7. Change the Require from: dropdown to Non-LAN only.
  8. Uncheck Use secure session keys and login page.
  9. Add your local IP address range to the Limit IP addresses: field, for example ^192.168.1.*. Note the caret at the front of the IP address, which is required.

Web server configuration

Web server advanced configuration

The above configuration will allow the AI trigger system to call BlueIris to initiate recording without requiring a username or password. Since the password-free access is limited to only internal IP addresses it is reasonable to leave it in this configuration long-term.

If you prefer it is possible to require a username and password via the URL used to trigger recording, however it is more complicated to configure and hard to troubleshoot. Get the system working with the above setup first to ensure everything works end-to-end then decide if it's worth adjusting the configuration to require a plain-text username and password in the URL.

Configure SD cameras to record 24x7 and produce probable motion snapshots

These steps assume you are using a network IP camera such as those from Hikvision, although they will work with any camera that's capable of integrating with BlueIris. There are a lot of steps but don't worry. They're all straightforward and once you've set up one SD camera you can use the copy settings feature in BlueIris to duplicate the configuration for your remaining cameras.

Part 1: Create the camera with initial settings

These steps are based on The Hook Up's video

  1. Go to Add new camera.
  2. Provide a descriptive name, e.g. Front Door SD.
  3. Provide a short name, e.g. FrontDoorSD. The short name will be used to identify the camera's snapshot images in the AI system configuration so make it identifiable and easy to remember for use later.
  4. Select Network IP as the type.
  5. Check Enable motion detector. This motion detection is used to create snapshot images of suspected motion. The AI system will analyze images captured by this to determine if meaningful objects actually caused the motion detection.
  6. Check Direct to disk recording (no re-encoding).

SD camera initial settings

Part 2: Set the network IP camera configuration options

These steps are based on The Hook Up's video.

  1. Enter the IP address for camera in the Address box.
  2. Enter the User and Password for the camera if required.
  3. Enter the path to the substream for the camera into Main stream field. It may seem backwards but this must be the low resolution substream for the camera and it must go into the Main stream field. The intention is to configure a permanent low-resolution stream that can record 24x7 and produce candidate images for the AI system.

The Find/inspect... button is useful during this part of the setup to test connectivity to the camera. If you paste the entire URL to the camera feed into the box in step 1 and then click Find/inspect... after step 2 BlueIris will attempt to connect to the camera and will auto-populate the Make, Model, and Main stream fields for you.

SD camera IP network settings

Part 3: Configure basic motion detection to trigger candidate image generation

These steps are based on The Hook Up's video. The motion detected by these settings will not directly trigger HD stream recording: it only provides the candidate image for the AI system to detect objects that should actually trigger HD recording.

  1. Open the Trigger tab for the camera.
  2. Click the Configure... button for Motion sensor.
  3. Set Min. duration to 0.5.
  4. Optionally adjust the Min. object size and Min. contrast sliders to be more sensitive.
  5. Disable Advanced object detection. This will get done in the AI system instead.
  6. Click Ok to return to the Trigger tab.
  7. Uncheck Capture an alert list image.
  8. Set the Break time to 4 seconds.

SD camera trigger motion settings

SD camera trigger settings

Part 4: Configure the camera to record 24x7 and output candidate images

These steps are based on The Hook Up's video.

  1. Open the Record tab for the camera.
  2. Change the Video dropdown to Continuous.
  3. Check the JPEG snapshot each (mm:ss) option.
  4. Change the time period to 5 seconds.
  5. Change the JPEG snapshot folder to aiinput.
  6. Check the Only when triggered option.
  7. Uncheck the Include JPEGs on All Clips & timeline option.

SD camera record settings

Part 5: Disable alerts on the camera

These steps are based on The Hook Up's video.

  1. Open the Alerts tab for the camera.
  2. Change the Fire when dropdown to Never.

SD camera alerts settings

Part 6: Verify recording, image generation, and then take a break!

At this point your first SD camera should be configured correctly. Verify that:

  1. BlueIris shows the live video feed
  2. Images are output to the aiinput folder if you walk in front of the camera

If it works congratulations! Take a break before proceeding to set up the HD feed. If it didn't work go back and double-check all the settings, paying close attention to the URL entered for the camera feed.

Configure HD cameras to record high resolution footage on AI motion detection

These steps assume you are using a network IP camera such as those from Hikvision, although they will work with any camera that's capable of integrating with BlueIris.

Part 1: Create the HD camera with initial settings

These steps are based on The Hook Up's video

  1. Go to Add new camera.
  2. Provide a descriptive name, e.g. Front Door HD.
  3. Provide a short name, e.g. FrontDoorHD.
  4. Select Network IP as the type.
  5. Do not check Enable motion detector. It should stay off as the AI system will handle detecting and triggering motion for the HD camera.
  6. Check Direct to disk recording (no re-encoding).

HD camera initial settings

Part 2: Set the HD network IP camera configuration options

These steps are based on The Hook Up's video with an important additions to improve CPU usage.

  1. Enter the IP address for the camera in the Address box.
  2. Enter the User and Password for the camera if required.
  3. Enter the path to the main for the camera into Main stream field.
  4. Enter the path to the substream for the camera into the Sub stream field. If your version of BlueIris doesn't have this field then upgrade to a newer version. It's well worth it for the CPU usage improvements!

The Find/inspect... button is useful during this part of the setup to test connectivity to the camera. If you paste the entire URL to the camera feed into the box in step 1 and then click Find/inspect... after step 2 BlueIris will attempt to connect to the camera and will auto-populate the Make, Model, and Main stream fields for you.

HD camera IP network settings

Part 3:Set up the HD camera trigger options

These steps are based on The Hook Up's video.

  1. Check the Capture an alert list image box.

Easy!

HD camera trigger settings

Part 4: Set up the HD camera recording options

These steps are based on The Hook Up's video.

  1. Select When triggered in the Video dropdown. The trigger will come from the AI system.
  2. Check the Pre-trigger video buffer and set the duration to at least 5 seconds.

HD camera record settings

Part 5: Verify the HD camera works

At this point the HD camera should be set up correctly. Verify you see a low-resolution feed when the camera is in the grid view of BlueIris but that it switches to the high-resolution feed when you open the camera's feed full-screen.

If it didn't work go back and double-check all the settings, paying close attention to the URL entered for the camera feed.

Then verify you can trigger the camera via a web request. Open a web browser and navigate to the camera's trigger URL, which looks like http://192.168.1.170:81/admin?trigger&camera=FrontDoorHD. Replace the ip address, port, and HD camera name with your configuration's values. If the configuration is correct you will receive a response similar to this:

signal=green
profile=1
lock=0
camera=Front Door - HD

If you get authorization errors verify everything from configure the BlueIris web server was done correctly.

Remember the trigger URL: it's the value you need for the uri property when configuring the AI system's webRequest handler.