We have already created a raspberry pi based network camera and then a network camera display
unit. It’s now time to look at suitable options for an NVR or network video recorder,
in case you want to store the video feed. This video will demonstrate two NVR options
– one running on the Raspberry Pi and another running on a computer, so let’s dive in!
For the Raspberry Pi, the obvious choice was using the motioneyeOS. We have previously
installed this on a pi zero, and I was not too happy with the performance back then,
so I decided to try it with a Pi 3. The first step was downloading the correct image for
the board. Then flashing it to the microSD card using etcher. Instead of using WiFi for
the network connection, I decided to plug the board directly to my router, using an
ethernet cable. I then inserted the microSD card and powered it ON. The board IP address
was obtained using the angryIP scanner. I then logged into motioneyeOS by using a web
browser and typing in the IP address. The default username is admin with no password,
so I logged in using that.
For the cameras, I decided to use the rpi zero camera and the ESP32-CAM board camera
we built in the previous videos. I powered them ON and tested the video feeds using VLC.
Once I knew they were working, I simply had to add them to motioneyeOS. You can do that
by either clicking this link or by navigating to this section and adding a camera. I selected
network camera as the type, entered the stream link and waited for it to detect the camera.
I then selected the UDP option and added the camera. As you can see, the live stream is
visible and we can then configure the settings as we like. I decided to leave the settings
to the default values to see how it performs. The frame rates are pretty low for my liking
but I did not want to overload the system.
Next up, I decided to add the ESP32-CAM stream. I opened up the new camera option, selected
the Simple MJPEG Camera option and added the IP address. Remember that the ESP32-CAM board
captures a series of images and this makes up the video. I added the camera and it too
showed up in motioneyeOS. One thing to note is that the motionEYEOS cannot carry out any
motion detection, image capturing or video recording since it is a MJPEG stream. You
will only be able to view the ESP32-CAM stream.
Next, I decided to test the motion detection and capturing system. Since we can only do
this on the raspberry pi camera, I went ahead and updated the settings for it. First, we
had to enable motion detection, and then adjust the movie settings. I increased the quality
so that we capture the best quality video possible. I left all the other settings to
their default values.
Once done, I applied the settings and began testing it out. The stream for camera 2 was
lost and it did not reconnect by itself. I did not wait to fix this as we are not interested
in that stream. It’s easy to see that the video stream is still not good enough as there
are a lot of unwanted artefacts. I then opened up the video file section for the RPI camera
and sure enough, it detected the motion and captured a file for us. I downloaded it onto
my local system and played it back using VLC. Needless to say, I’m not too happy with
the outcome. Perhaps you would need to lower the stream resolution and framerate to get
better performance, but I don’t really see the point in having a security system that
uses a very low resolution and low frame rate. Perhaps I am doing something wrong here, so
if you have managed to obtain better performance using at least a 720P video stream then do
leave a comment to let me and others know what needs to be changed.
I then looked at 3 other options to run on the raspberry pi. The first was zoneminder,
which is another popular alternative. I didn’t install this as it wasn’t exactly straight
forward and it needed a fair amount of tweaking to get it working. The reviews for the motion
detection capabilities were also not that great. The next one was Kerberos. Installing
this was super simple though it was still sluggish and also supported one stream per
instance. Lastly, I tried running Shinobi, which is
fairly new. This seemed promising but getting the camera streams up and running was tricky
and I did not manage to do this successfully.
Either way, I’m not convinced that the raspberry pi has enough processing power to carry out
decoding, motion detection, and storage of multiple HD streams. If I do find something
promising, then I will be sure to make a video on it, so do subscribe to stay updated.
If you are looking to create a simple NVR for surveillance purposes, then I would highly
recommend using iSpy. It is a free surveillance software that runs on Windows. The home page
claims that it is the world’s leading open source surveillance system and after testing
it out, I believe them. It has a ton of features and even allows you to view your cameras remotely,
through a subscription service.
I downloaded and installed the software, which was very straightforward. The first thing
I had to do was add a camera by selecting the FFMPEG tab, entering the URL and then
selecting AUTO for the RTSP mode. I pressed the Test button and it stated that it was
connected to the camera, so I clicked OK. It then gave me the settings window, and I
simply updated the camera name and hit OK. Next, I added the ESp32-CAM stream in a similar
way, by selecting MJPEG and entering the IP address. The stream opened up quickly enough.
You can also drag and resize the streams as per your liking, which is not bad.
I wanted to test out the motion detection and recording capabilities so we would have
to access the camera settings. You can do that by right clicking the stream, or by using
the options that appear when you hover over the stream. I left the framerate to its default
values and opened up the motion detection tab. You can limit the motion detection to
particular zones or you can use the full video stream. The zone limiting feature is useful
if you have moving objects or trees. Limiting the zone will help prevent false triggers
in that case. I then set it to record when motion is detected and that is all that was
needed to be done.
The software allows you to carry out motion detection on an MJPEG stream so I went ahead
and adjusted the settings for the ESP32CAM stream before testing it out. You’ll notice
that the video streams are much smoother than motioneyeOS. Once motion is detected, the
system will automatically capture and save the files to your system. They will also show
up in the window below and you can right click them to explore the various options.
Alternatively, you can also right click the stream and select the Show files option which
will display the files in the File explorer window. From there, you can simply play it
back. The recordings for both the streams are very smooth and this was using the default
settings. There are numerous options that you can change and tweak to make a custom
system. These are available both for individual video streams and for the application itself,
so do check out the documentation if you decided to use this.
Overall, the performance is pretty good and you have so many useful options that it would
make sense to use something like this for a home surveillance system. I’m more than
happy with the simple camera display system I built in the last video and I will be using
that one.
So that’s pretty much it for this video. I will update the playlist with related videos
as I cover them. Don’t forget to like, share and subscribe as it helps massively with the
YouTube algorithm. Thank you for watching, and I will see you in the next one!