This article assumes your Shinobi is installed in the default location /home/Shinobi and using Ubuntu 17.10.1.

Getting logs from the camera process

Click the Triangle icon on the stream window to reveal the temporary log stream. If you would like to save the logs for a better look you can do the following steps.

  1. Open Monitor Settings for the pesky camera. The wrench icon.
  2. Switch to Advanced view.
  3. Scroll down to Logging.
  4. Set to Warning and enable Save to SQL.
  5. Wait a few moments or until problem strikes.
  6. Click your Username in the top left then Logs.

Be careful not to forget that this is on after diagnosis. It may produce many log rows with many being useless information.

Getting logs from the Shinobi (camera.js) process

Open Terminal and run the following

pm2 logs --lines 100

Does the camera stream work in other applications?

Let's assume you have the correct stream URL. Try to run the stream in one of the following applications.

  • VLC - media player by VideoLAN Organization -
  • FFprobe - Stream analyzer included with FFmpeg and is meant to be used on command line. Shinobi has  GUI that can be accessed by clicking your username in the top left, then Probe.

The camera does not work in VLC or FFprobe

  1. Verify the network status of the camera.
    • You should be able to open the camera's IP Address in a web browser.
    • If your camera is connected by Ethernet then you should be able to see a light blinking (or solid if idle) on your internet router or network switch.
  2. Verify connection status by opening a Web Browser and navigating to the IP Address of your camera.
  3. Verify the type of stream coming from your camera by opening the internal settings.
    • Check for whether it is MJPEG or H.264. If possible to set H.264 then you should do for that.
    • If you are using H.265 you can set the Video Codec in the Stream section to Auto or libx264.
  4. Verify the stream URL of your camera.

The camera works in one or both of these applications but not in Shinobi

Please put the hammer away and try each of the following.

  • Turn off all other applications that are accessing the streams, like ZoneMinder or VLC.
  • Check the connection information. See below.
  • Check your version of FFmpeg or swap it for another build. See below.
  • Check your file system permissions. See below.

Checking the Connection Information

In the Connection section try a combination of the following suggested option changes.

  • Set Skip Ping to Yes, if still not working you should switch it to No.
  • Set Automatic to No and turn Force Port to Yes.
  • Try the Web Port of the Camera in the Port field if you are using the RTSP port. Web port is the port you use to open the camera's internal settings from a web browser. The default Web Port is 80. The default RTSP port is 554. Leave Protocol as it is.

Check FFmpeg and Swap it for a static version

Open Terminal and run the following to see the version of FFmpeg. The Version number will be at the top of the output.

ffmpeg -version

If not at least version 3 or above then you need to update. There are three ways to achieve this.

  • Update your repositories to download the newest ffmpeg.
  • Install a static build with NPM.
    • Enter the Shinobi directory and run the following
cd /home/Shinobi
npm install ffmpeg-static

To uninstall the NPM static build and use the build just run the following.

cd /home/Shinobi
npm uninstall ffmpeg-static

Check file system permissions

Run the following commands to ensure your directories are accessible by Shinobi.

sudo chmod -R 755 /dev/shm/streams
sudo chmod -R 755 /home/Shinobi/videos

More info you might want to look at