At present this method requires use of the Terminal. However if you are using a client machine that has Node.js installed you can run the file there too, no extra dependencies required.

A Quick Explanation

Within the Shinobi root directory there is a folder called "tools", here you can find a command line script that generates a configuration set from a base file and a listing of camera stream URLs. The file is named "createMonitorsJsonFromTxt.js".

Here is a link to the script we will be using for this tutorial : https://gitlab.com/Shinobi-Systems/Shinobi/-/raw/master/tools/createMonitorsJsonFromTxt.js?ref_type=heads

To use this script you can open command line and run the following :

cd /home/Shinobi/tools
node ./createMonitorsJsonFromTxt.js MONITOR_BASE.json PLAIN_LIST.txt
  • MONTIOR_BASE.json would be a complete config you want to use as a base for each new monitor added. Easiest way to get this is to open Monitor Settings for a monitor you have already configured and do an Export from the bottom right menu.
  • PLAIN_LIST.txt would be a simple txt file with stream urls. each stream url would be on a new line.

An example of PLAIN_LIST.txt is as shown below :

rtsp://username:password@host_ip_1:554/h264
rtsp://username:password@host_ip_2:554/h264

A Configuration Set has been Generated

  1. Now that you have a configuration set generated you may copy this file over to the PC where you will open the dashboard for Shinobi. If you are running the script on that machine already then move on to the next step.
  2. Open the Shinobi Dashboard.
  3. Open the Monitors tab and open the menu in the bottom right.
  4. Select Import and a window will appear where you can upload the Configuration Set JSON that was generated.
  5. When you press Import it will start loading the configurations. Depending on the number of configurations this may take some time so please be patient when waiting for this to complete.
  6. One by one you will see each Monitor becoming active (assuming each provided Stream URL is correct and compatible with the MONITOR_BASE.json provided).

Enjoy!