I have done quite a lot of work recently on my home surveillance setup. My old setup with FOSCAM is..old. So, I decided that I should do an overhaul of the entire setup.
These are the items on the checklist
- Replace the FOSCAM.
- Rewire my cables
- Upgrade my ZoneMinder
My FOSCAM was a 640×480 camera. At the time I installed it, it was the best and the most reasonable for my budget. Now for the same price I can get a better camera. I got myself a pair of cameras from China, which cost me about SGD $100 each. The cameras can do 720p and H.264. These are the 2 main criteria I look for when hunting for camera.
For my cabling, I bought a small 12cm x 12cm weatherproof encasement. What I had previously was just electrical tapes. Over time, the electrical tapes start to wear off and water got into the UTP connectors. Miraculously, the camera did not short and continue functioning. Anyway I still had to fix it.
This is how it looks like after installation. The cables are in the waterproofed box. One last thing to do is probably to seal all the openings with silicon.
For my neighbour’s privacy, I won’t show the video footage. :) And in case you are wondering, I have spoken with my neighbour before installing the previous camera. This is probably something to note for HDB flat dwellers. It’s sometimes inevitable that your neighbour’s door and their activities are all caught on camera. So, please talk to your neighbours before installing the cameras to make sure there’s no misunderstanding.
My ZoneMinder, running since 2009 and hasn’t been upgraded since. It’s time to upgrade and leverage on the newer features like libvlc and newer ffmpeg libraries. On top of that, I tested ZoneMinder on Digital Ocean’s SSD VMs. The results are pretty good, considering that I’m doing 25 frames per second with the smallest of their VM instance.
Some installation notes here that I would like to share.
1. Garbled image when using ffmpeg to get the RTSP stream. I was struggling with this when I started out with my new camera. There was no error from zma. The problem was lost frames but no matter how I tinkered with the settings on the camera, the problem still persisted. Later I found out by trial and error that if I left the Maximum FPS and Alarm Maximum FPS blank, the problem would be resolved. I don’t think this is a problem with ZoneMinder though. I suspect that it’s the camera that’s sending out certain frames wrongly.
2. As a result of the garbled image, I tried to use the new libvlc feature. VLC plays the stream fine with no problems so technically libvlc would work fine and it did, except for a little issue. If I set the stream to anything other that grayscale, zma fails. The problem was with libjpeg-turbo. I was rushing to get the new camera up so I did not dig further into it. I just went with grayscale until I solved problem 1 and used ffmpeg instead.
I’m satisfied with the end result as of now, except the bit that I can’t use libvlc. This will be another TODO, but left for later. Will update again if I get that bit fixed.