Jump to content

Kerberos.io video surveillance installation on Armbian


Recommended Posts

UPDATE 11-FEB-2017: Version 2.2.0 is released: now including video recording in stead of only images and also a privacy option to black out areas that may not be filmed.

UPDATE 09-FEB-2017: Version 2.2.1 is released: memory leak(s) fixed and in some cases video stopped recording. This should be fixed now. Download via this page.

 

Kerberos.io (link) is a relative new video surveillance program focusing mainly on the Raspberry Pi. In collaboration with the owner of the github project I managed to get it working on my Orange Pi Plus and PCDuino3 nano using Armbian (Debian Jessie) and a Logitech UVC compatible USB webcam. It consists of 2 modules: the Machinery module and Web module. The machinery module was very Raspberry Pi specific, but is now updated and can also run with very little extra effort on Armbian. The Web module runs without any modification.
 
Follow the instructions below and you should be able to install or compile it. Kerberos.io is very fast and has a modern interface. Furthermore it is (IMHO) a very nice alternative for zoneminder and motion.It also provides a videostream on a webpage.
 
Follow the instructions below and share your comments, ideas etc.

 

Method 1 (easy) - Install on Armbian Debian Jessie.

Follow the instructions on the dedicated Armbian page (link). Here you will find an Armbian precompiled .deb armhf package. Further installation / configuration options can be found on the Kerberios.io webpages.

 

Method 2 (advanced) - Compiling the machinery and web module on Armbian Debian Jessie.

Install the following packages: sudo apt-get install pkg-config libavcodec-dev libavformat-dev libswscale-dev

Follow the instructions on this page (link). Further installation / configuration options can be found on the Kerberios.io webpages.

 

 

In all cases: please note that you must alter the camera configuration: default it comes with the Raspberry Pi camera that you probably won't have!

Link to comment
Share on other sites

This is awesome! So if I copy those files for rpi-cam first i could use the .deb from the website? Which one, for Rpi3 or Rpi2?  Could you perhaps host the needed rpi camera files somewhere?

 

What do you think hardware-vise, would a 512mb Ram H3 orange take it? Or is 1gb required?

Link to comment
Share on other sites

 can you also show how to use this with the orangepi camera if possible?

 

My orangepi camera is not working anymore: the connector is defective I think. However: to my humble knowledge the orange pi camera is functioning as an ordinary USB camera: therefore if you install the program as described (make sure you define the 'USBCamera' in the config file) and select an existing resolution of the OPI cam I guess that it should work.

Link to comment
Share on other sites

This is awesome! So if I copy those files for rpi-cam first i could use the .deb from the website? Which one, for Rpi3 or Rpi2?  Could you perhaps host the needed rpi camera files somewhere?

 

What do you think hardware-vise, would a 512mb Ram H3 orange take it? Or is 1gb required?

 

I think it will run on 512 mb without problems, especially if you install a non-desktop version. My OPI+ runs with desktop version of Armbian and Kerberos.io and Motion together using approx 350 MB of RAM.

 

I still have to test if the .deb file + RPI libraries work. I guess it will, but am not sure. Compiling is quite easy and makes sure it will work.

 

I will have a look if I can post the libraries here: they are only needed for compiling and running, but are actually not used because there is no such thing as a raspicam under Armbian. But please give me some time. I will try to have a look in the weekend.

Link to comment
Share on other sites

Yes I did. I duplicated the videostream (using vloopback and ffmpeg) from /dev/video0 to /dev/video1 and /dev/video2. I had defined 2 camera's in Kerberos.io: 1 USB on /dev/video1 and had Motion running at the same time on /dev/video2.

 

Subsequently I took de IP stream from Motion and used it successfully as second camera (however, picture / videdo was the same of course since vloopback duplicated the cam on /dev/video0).

 

So it is pseudo-IP camera, but the concept works.

Link to comment
Share on other sites

sudo wget https://github.com/k...armhf-2.1.0.deb
dpkg -i download/v2.1.0/rpi3-machinery-kerberosio-armhf-2.1.0.deb

looks like it should be;

sudo wget https://github.com/k...armhf-2.1.0.deb

dpkg -i rpi3-machinery-kerberosio-armhf-2.1.0.deb

we didnt change directories, please also use <> for code, as it will not shorten addresses. 

 

 

I also made it even easier to get those files that are required by kerbereros

sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/raw/master/libavformat.so.56
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libcontainers.so
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libmmal.so
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libmmal_components.so
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libmmal_core.so
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libmmal_util.so
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libmmal_vc_client.so
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libswscale.so.3
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libvchiq_arm.so
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libvcos.so
sudo wget https://github.com/Tom-Neverwinter/kerberosiolibs/blob/master/libvcsm.so

mv libavformat.so.56 /etc/opt/kerberosio/config
mv libcontainers.so /etc/opt/kerberosio/config
mv libmmal.so /etc/opt/kerberosio/config
mv libmmal_components.so /etc/opt/kerberosio/config
mv libmmal_core.so /etc/opt/kerberosio/config
mv libmmal_util.so /etc/opt/kerberosio/config
mv libmmal_vc_client.so /etc/opt/kerberosio/config
mv libswscale.so.3 /etc/opt/kerberosio/config
mv libvchiq_arm.so /etc/opt/kerberosio/config
mv libvcos.so /etc/opt/kerberosio/config
mv libvcsm.so /etc/opt/kerberosio/config

Yes this code is ugly ^^^ (but I want to make 8+ of these things)

if I commit the config and camera.xml files and this will be even easier

 

Two small changes to setting up the board for ease of use and later on when it should record timestamps;

dpkg-reconfigure tzdata

nmtui-connect SSID

finally installation just in case; 

nand-sata-install

I attempted to;

sudo modprobe gc2035

sudo modprobe vfe_v4l2

to get the orangepi onboard camera to show up but it hangs so :(

lsusb only shows;

Bus 008 Device 002: ID 06a3:8021 Saitek PLC Eclipse II Keyboard
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 046d:c01b Logitech, Inc. MX310 Optical Mouse
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 
after the first attempt I could no get the ngix server to even start and it seems it does need some of those files.
 

attempt #2

THIS IS BROKEN, DEPRECIATED SCRIPT!;

curl -sL https://deb.nodesource.com/setup | sudo bash - 
sudo apt-get install git nginx php5-cli php5-fpm php5-gd php5-mcrypt php5-curl nodejs

The ability to reboot is also lost somewhere in here or I am running a different version causing conflicts.

 

If you could post a working image that would be much more useful. use win32 diskimager to clone the card

Link to comment
Share on other sites

Hi Tom,

 

Please hold your horses. A new version is on the way and will be released on a short notice. The author of Kerberosio has implemented some steps to see if the code runs on a Raspberry Pi. If not (when running e.g. Armbian) the libraries and Raspberry Pi Cam are skipped automatically. Compiling will even be easier: the only difference for Armbian is that the libraries for compiling OpenCV are needed. I have prepared a special Armbian page that will be put on the Kerberos.io site.

 

Also video recording is implemented now, and a new privacy feature that blacks out areas that e.g. may not be filmed due to privacy regulations. I have the beta already up and running on Armbian.

 

Then about your camera: it seems like you have another problem. It should show up when typing lsusb anyway, regardless if you have loaded gc2035 / vge_v4l2 or not. I have the same problem with my Orange Pi plus: I suspect the connector of my board, since I already tried 3 camera's. It worked in the past... Therefore I bought a Logitech C270: not expensive (available under 20 Euro) and works out of the box: no module loading necessary. UVC is loaded automatically. Resolution is up to 1280x960 at 5 fps.

 

Furthermore weird that you get conflicts: did you start with a fresh install? I've compiled on 3 different boards with fresh Armbian installations yesterday evening... A working image is on it's way: as soon as it is released by the owner of Kerberos.io... But as usual: it's ready when it's done, and it is done when it's ready!

 

However, you can try a Raspberry Pi 3 image. Instructions can be found on the website of Kerberos.io (link). This is how I started, and should run if you install libav-tools and the Raspberry Pi libraries. Note that this version does not record video yet.

Link to comment
Share on other sites

Version 2.2.0 is released! Please go to the Kerberos.io website (link) for detailed instructions. This is a dedicated Armbian page.

Can't run kerberosio in Armbian Xenial 5.25 i installed everything from the instructions:

kerberosio: error while loading shared libraries: libavcodec.so.56: cannot open shared object file: No such file or directory

but it is there:

libavcodec-ffmpeg.so.56 => /usr/lib/arm-linux-gnueabihf/libavcodec-ffmpeg.so.56 (0xb5e75000)

I am not sure what this mean:

~$ sudo ldconfig -v | grep libavcodec.so
/sbin/ldconfig.real: Path `/lib/arm-linux-gnueabihf' given more than once
/sbin/ldconfig.real: Path `/usr/lib/arm-linux-gnueabihf' given more than once
/sbin/ldconfig.real: /lib/arm-linux-gnueabihf/ld-2.23.so is the dynamic linker, ignoring

        libavcodec-ffmpeg.so.56 -> libavcodec.so

ffmpeg is from standard repos:

ffmpeg version 2.8.10-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100

Maybe i have to compile it from source. I miss vdpau and libx265 for example. Or to try to install libavcodec from ubuntu-restricted-extras/libavcodec-extra?

Link to comment
Share on other sites

I've tried Ubuntu: for now it seems to be a no-go. Compiling of the machinery module works fine, but the web module is a showstopper: refer to the spoiler. So please stick to a clean install of Debian Jessie!

 

Maybe referring to another repository can solve this, but your mileage may vary. Please be careful when doing this! Again: this kind of stuff should preferably be done on a dedicated board anyway, so why not install Debian?

 

 

root@pcduino3nano:~# sudo apt-get install nginx php5-cli php5-fpm php5-gd php5-mcrypt php5-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-fpm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
php7.0-cli

Package php5-mcrypt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-gd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-cli' has no installation candidate
E: Package 'php5-fpm' has no installation candidate
E: Package 'php5-gd' has no installation candidate
E: Package 'php5-mcrypt' has no installation candidate
E: Unable to locate package php5-curl
root@pcduino3nano:~#

 

Link to comment
Share on other sites

so why not install Debian?

No particular reason. Just had Ubuntu at hand. Machinery module installs in my case, but can't start with above error. I didn't reach to web module, just try to execute kerberosio. Is web module necessary for machinery module to execute? Anyway, i will try Debian.

Link to comment
Share on other sites

Isn't the Orange Pi camera present as /dev/video0 then? Otherwise maybe replicate the stream with vloopback... That worked for me as well...

If you select USBCamera in the config file and set the device number of /dev/videoX where X is your device number, it should be there.

 

Or doesn't your Orange Pi camera appear in the list when you issue the lsusb command? It works with motion using /dev/video0 as well, that I know for sure.

Link to comment
Share on other sites

I've tried Ubuntu: for now it seems to be a no-go.

 

Sorry, but it's exactly the other way around. Using PHP5 in 2017 is an absolute no-go: 

Better try to get this stuff running with PHP7 instead and update instructions later. :)

Link to comment
Share on other sites

I know the PHP5 branch is EOL. First objective was to get it running at all. Initially it did not run at all on Armbian due to the fact that the software assumed it was running on a Raspberry Pi. I guess PHP7 will be the next challenge. Will ask the owner of Kerberos.io.... And of course do some fiddling myself...

Link to comment
Share on other sites

Actually, I was able to install kerberos.io onto armbian ubuntu server running on Banana PI M.  I did not remember the exact steps. I'd definitely installed php-7.0.

There was also some issue with the .so libraries (it is referring libs which have different naming, something with the version .56 in the name as I recall), I've just created the links to existing libs.

 

I was able to configure the IP camera, but I'm not satisfied with the event detection and video recording.

I'm suspecting the reason is the stream quality and the video processing performance.

I'm trying to enable the hw-assisted decoding but have some troubles (see https://forum.armbian.com/index.php?/topic/4060-hw-accelerated-video-decodingencoding-on-bpi-m/)

 

 

Link to comment
Share on other sites

  • Igor unpinned this topic

Hello everyone who has experience with kerberos.io.

 

I use mjpg_streamer on my pi. It works fine.


I thought I can define my stream as <IPCamera> input, but it does not work.

 

My settings:

<IPCamera>
    <url type="text">http://test:test@192.168.63.35:8080/?action=stream</url>
    <frameWidth type="number">1280</frameWidth>
    <frameHeight type="number">720</frameHeight>
    <delay type="number">100</delay>
    <angle type="number">90</angle>
</IPCamera>

 

With http://test:test@192.168.63.35:8080/?action=stream i have the stream on my browser.
This definitly work.

 

Im looking for some log-files, but i couldn't find some useful things.

 

Any ideas?

Link to comment
Share on other sites

Hello,

I'm trying to install kerberosio on armbian jessie (opi lite), but:

1. There is no *deb package on github (anyone knows why?)

2. When I try to compile, it throws up with errors and the installer even has problems with downloading libav from github (as far as I know it can't download file when there is simple github.com address without www prefix)

Did anyone tried to install kerberosio on armbian last weeks? 

 

There is no version for orange on etcher, am I right?

greetings

Scaevola

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines