An Open Source video surveillance management system for people making this world a safer place.

Overview

Kerberos Open Source

Kerberos Open Source Kerberos Open Source Twitter Widget Kerberos Open Source

Build Status

PkgGoDev Coverage Status Coverage Status Kerberos Open Source

License: MIT

Kerberos.io - video surveillance

Docker Hub | Documentation | Website

Kerberos Open source (v3) is a cutting edge video surveillance management system made available as Open Source under the MIT License. This means that all the source code is available for you or your company, and you can use, transform and distribute the source code; as long you keep a reference of the original license. Kerberos Open Source (v3) can be used for commercial usage (which was not the case for v2). Read more about the license here.

Work In Progress

Kerberos Open Source (v3) is not yet released, and is actively developed. You can follow the progress on our project board and review our designs at Figma. Feel free to give any feedback.

Previous releases

This repository contains the next generation of Kerberos.io, Kerberos Open Source (v3), and is the successor of the machinery and web repositories. A switch in technologies and architecture has been made. This version is still under active development and can be followed on the develop branch and project overview.

Read more about this at the FAQ below.

Introduction

Kerberos.io is a cutting edge video surveillance system with a strong focus on user experience, scalability, resilience, extension and integration. Kerberos.io provides different solutions, but from a high level point of view it comes into two flavours: Kerberos Open Source and Kerberos Enterprise. The main differences, very brief, between Open Source and Enterprise are described below. Both Kerberos Open Source and Kerberos Enterprise can be extended and integrated with Kerberos Storage and/or Kerberos Cloud.

Kerberos Open Source

  • Installation in seconds (Kerberos Etcher, Docker, Binaries).
  • Simplified and modern user interface.
  • Multi architecture (ARMv7, ARMv8, amd64, etc).
  • Multi camera support: IP Cameras (MJPEG/H264), USB cameras, Raspberry Pi Cameras.
  • Single camera per instance (e.g. One Docker container per camera).
  • Cloud integration through Webhooks, MQTT, etc.
  • Cloud storage through Kerberos Cloud.
  • MIT License

Kerberos Enterprise

  • Installation on top of Kubernetes (K8S).
  • Camera support for IP camera only (RTSP/H264).
  • Massive horizontal scaling, thanks to Kubernetes.
  • Management of multiple Kerberos Agents through a single pane of glass.
  • Low memory and CPU intensive.
  • Modular and extensible design for building own extensions and integrations (e.g. a video analytics platform).
  • Commercial licensed and closed source.

How it works: A world of Agents 🕵🏼‍♂️

Kerberos.io applies the concept of agents. An agent is running next to or on your camera, and is processing a single camera feed. It applies motion based recording and make those recordings available through a user friendly web interface. Kerberos Open Source allows you to connect to other cloud services or custom applications. Kerberos Open Source is perfect for personal usage and/or is a great tool if you only have a couple of surveillance cameras to be processed.

If you are looking for a solution that scales with your video surveillance or video analytics well, Kerberos Enterprise might be a better fit.

Installation

Kerberos Open Source will ship in different formats: Docker, binary, snap, KiOS. Version 3 is still in active development right now, and not yet released.

Run and develop

Kerberos Open Source is divided in two parts a machinery and web. Both parts live in this repository in their relative folders. For development or running the application on your local machine, you have to run both the machinery and the web as described below. When running in production everything is shipped as only one artifact, read more about this at Building for production.

Web

The web is a React project which is the main entry point for an end user to view recordings, a livestream, and modify the configuration of the machinery.

git clone https://github.com/kerberos-io/opensource
cd web
yarn start

This will start a webserver and launches the web app on port 3000.

Machinery

The machinery is a Golang project which delivers two functions: it acts as the Kerberos Agent which is doing all the heavy lifting with camera processing and other kinds of logic, on the other hand it acts as a webserver (Rest API) that allows communication from the web (React) or any other custom application. The API is documented using swagger.

You can simply run the machinery using following commands.

git clone https://github.com/kerberos-io/opensource
cd machinery
go run main.go run mycameraname 8080

This will launch the Kerberos Agent and run a webserver on port 8080. You can change the port by your own preference.

Building for Production

Running Kerberos Open Source in production only require a single binary to run. Nevertheless, we have two parts, the machinery and the web, we merge them during build time. So this is what happens.

Web

To build the Kerberos Open Source web app, you simply have to run the build command of yarn. This will create a build directory inside the web directory, which contains a minified version of the React application. Other than that, we also move this build directory to the machinery directory.

cd web
yarn build

Machinery

Building the machinery is also super easy 🚀 , by using go build you can create a single binary which ships it all; thank you Golang. After building you will endup with a binary called main, this is what contains everything you need to run Kerberos Open Source.

Remember the build step of the web part, during build time we move the build directory to the machinery directory. Inside the machinery web server we reference the build directory. This makes it possible to just a have single web server that runs it all.

cd machinery
go build

Building for Docker

Inside the root of this opensource repository, you will find a Dockerfile. This file contains the instructions for building and shipping Kerberos Open Source. Important to note is that start from a prebuild base image, kerberos/debian-opencv-ffmpeg:1.0.0. This base image contains already a couple of tools, such as Golang, FFmpeg and OpenCV. We do this for faster compilation times.

By running the docker build command, you will create the Kerberos Open Source Docker image. After building you can simply run the image as a Docker container.

docker build -t kerberos/opensource .
docker run -p 8080:8080 --name mycamera -d kerberos/opensource

FAQ

1. Why a mono repo?

We have noticed in the past (v1 and v2) splitting the repositories (machinery and web), created a lot of confusion within our community. People didn't understand the different versions and so on. This caused a lack of collaboration, and made it impossible for some people to collaborate and contribute.

Having a mono repo, which is well organised, simplifies the entry point for new people who would like to use, understand and/or contribute to Kerberos Open Source.

2. Why a change in technologies?

In previous versions (v1 and v2) we used technologies like C++, PHP and BackboneJS. 7 years ago this was still acceptable, however time has changed and new technologies such as React and Golang became very popular.

Due to previous reason we have decided to rebuild the Kerberos Open Source technology from scratch, taking into account all the feedback we acquired over the years. Having these technologies available, we will enable more people to contribute and use our technology.

3. What is the difference with Kerberos Enterprise?

We started the developments of Kerberos Enterprise a year ago (January, 2020), our focus here was scalability, and fast development and easy deployment. We noticed that with technologies such as Golang and React, we can still provide a highly performant video surveillance system.

Kerberos Open Source will use the same technology stack, and some code pieces, of Kerberos Enterprise which we have already build. We have a very clear now, of how a well developed and documented video surveillance system needs to look like.

4. When are we going to be able to install the first version?

We plan to ship the first version by the end of Q1, afterwards we will add more and more features as usual.

5. Change in License

Kerberos Open Source (v3) is now available under the MIT license.

Contributors

This project exists thanks to all the people who contribute.

Comments
  • Save num of changes to filename, update a lot of dependencies and fix compiling develop branch

    Save num of changes to filename, update a lot of dependencies and fix compiling develop branch

    **This is an updated version of #37 and #38 **

    This is the first implementation of the recording data being sent as a metadata struct, so it could be applied to the output filename of the recording.

    I have also updated a lot of go and javascript (yarn/npm) dependencies.

    I made Dockerfile to use node16 - since it's the latest LTS supported version aswell as some other improvements.

    Each commits has quite well described commit message

    With this commit I'm also updating develop branch to the current code state in master, so there will be no issues later on when merging this.

    There are no changes in the code I've made since #37 I just resolved the conflicts caused by adding another commit to the original develop branch and recreated the PR

    opened by olokos 5
  • panic: invalid memory pointer on nil pointer dereference after #39

    panic: invalid memory pointer on nil pointer dereference after #39

    image

    {"level":"info","msg":"FindMotion: Number of changes detected:9455","time":"2022-08-18T12:17:22+02:00"}
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x227a00]
    
    goroutine 66 [running]:
    github.com/kerberos-io/joy4/format/mp4.(*Muxer).WriteHeader(0x0, {0x24101b0, 0x1, 0x1})
            /go/pkg/mod/github.com/kerberos-io/[email protected]/format/mp4/muxer.go:154 +0x18
    github.com/kerberos-io/agent/machinery/src/capture.HandleRecordStream(0x24a6910, 0x273ec00, 0x2700360, {0x24101b0, 0x1, 0x1})
            /go/src/github.com/kerberos-io/agent/machinery/src/capture/main.go:256 +0x6f4
    created by github.com/kerberos-io/agent/machinery/src/components.RunAgent
            /go/src/github.com/kerberos-io/agent/machinery/src/components/Kerberos.go:109 +0x974
    
    

    Last night it was pitch black when I was working on this, so there was nothing to detect, but now I came to dead docker container, with the reason behind it listed above.

    The screenshot and the text logs are exactly the same, just provided them in both forms, so ez copy paste and easy to read at the same time, thanks to colors on ss.

    I will investigate this, but it's related to joy4, which I noticed that @thomasqp did write a comment on top of some of the files that it needs to be updated/changed, I'm not sure myself, but I will look into this.

    opened by olokos 4
  • What is happening on port 80?

    What is happening on port 80?

    I am running 7 Podman containers, which all stream to Kerberos Cloud.

    When locking down my CCTV VLAN and firewall, I noticed that the kerberos.io containers attempt connections to the following hosts:

    | IP Address | Protocol | Port | |:----------------------|:------------:|--------| | 159.65.215.225 | TCP | 1883 | |172.67.133.190 | TCP | 443 | |104.155.97.237 | TCP | 443 | |34.79.161.171 | TCP | 80 |

    Now TCP Port 443 is not in question - I assume that kerberos.io containers push their streams via 443 to the above two servers. 1883 is MQTT and Port 80 is unencrypted HTTP!

    My questions are as follows:

    1. Why are the containers connecting to 34.79.161.171 over port 80? What is this connection being used for?
    2. What is MQTT port 1883 being used for specifically?

    FYI, I have been unable to find these answers in the documentation, faq, or list of resolved issues.

    opened by Obezyana33 4
  • Creating designs in Figma

    Creating designs in Figma

    Started creating some designs in Figma, for the different pages. Any help is welcome! You can always give feedback on the designs by opening below link, and creating an account at Figma, once signed in you can write comments.

    https://www.figma.com/file/PpjFz2GGX6ZaWyIzef6mqT

    • [x] Create Login page https://www.figma.com/file/PpjFz2GGX6ZaWyIzef6mqT/Open-Source?node-id=57%3A0

    • [x] Create Home page

    • [x] Create Media page

    • [x] Create Settings page

    • [x] Create Profile page

    enhancement help wanted 
    opened by cedricve 4
  • First implementation of recording data message being saved to filename + lots of dependency updates

    First implementation of recording data message being saved to filename + lots of dependency updates

    This is the first implementation of the recording data being sent as a metadata struct, so it could be applied to the output filename of the recording.

    I have also updated a lot of go and javascript (yarn/npm) dependencies.

    I made Dockerfile to use node16 - since it's the latest LTS supported version aswell as some other improvements.

    Each commits has quite well described commit message

    With this commit I'm also updating develop branch to the current code state in master, so there will be no issues later on when merging this.

    opened by olokos 3
  • Improve recorded videos dasboard counter

    Improve recorded videos dasboard counter

    Implemented new util function, which gets count of only .mp4 extension. This solves the problem of folders being counted as recordings on the dashboard.

    opened by olokos 2
  • Fix prerecording timing

    Fix prerecording timing

    With this change, the prerecording time is actually working as expected, with prerecording delay, then motion then postrecording delay.

    Since motionCursor := queue.Latest() was used, the prerecording delay was counted since the last frame received, instead of the first frame for this motion event.

    Changing it back to motionCursor := queue.Oldest() actually allowed to get video data before the motion event happened, not right after it happened.

    opened by olokos 2
  • Live Stream/View Framerate

    Live Stream/View Framerate

    I'm running the latest Kerberos.io Agent via Docker on an Ubuntu 20 Server VM minimal install. That VM has 4 cores and 8GB of RAM dedicated. I was able to connect my S3VC PoE IP Camera via RTSP using the primary RTSP stream. The Steam is set to 3MP resolution with 20fps H265.

    I have the Streaming Framerate set in the Agent to 20fps to match the RTSP stream.

    The clips captured via Motion Detection in the Agent playback at the expected framerate, but the live view on the dashboard and the Stream provided via the Agent run at about 1/2fps, not even 1fps. I have tried dumbing down the RTSP stream to 1280x720 H264 and it still only runs about 1/2fps on the Live Stream. My plan was to plug several of the Live Streams from multiple cameras into a simple HTML Table to be able to view them all live simultaneously, but at this rate the Live Stream is running, this is not going to be viable.

    Is there something I'm missing?

    What logs can I pull to assist in troubleshooting?

    Thanks!

    opened by tokenwizard 2
  • Agent not displaying rpi camera on pi4 b and kios issues

    Agent not displaying rpi camera on pi4 b and kios issues

    Raspberry Pi 4 Model B 4GB KiOS will not run without replacing fixup4.dat and start4.elf with Bullseye files. Once running, KiOS dashboard does not show a stream of the rpi camera (v 2.1) Camera confirmed working on rpi OS. I'm guessing this has to do with the change in the board architecture and camera commands. Do you intend to release a Pi 4 B/rpi camera compatible version?

    opened by tpolitza 2
  • CORS related deprecation (May 2021)

    CORS related deprecation (May 2021)

    I noticed I was getting a CORS rejection... i.e. web origin localhost:3000 rejects usage of machinery origin localhost:8080

    ..and then I saw a deprecation dated for today's date regarding CORS

    Here's the deprecation message:

    scheduler.development.js:298 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.

    opened by nargetdev 2
  • Add french translation

    Add french translation

    Added translation for french, should help to complete https://github.com/kerberos-io/agent/issues/47 issue.
    Kudos for the evolution of the project :tada:

    opened by robdsource 1
  • Installed using Advanced Install (now unable to uninstall)

    Installed using Advanced Install (now unable to uninstall)

    It looks I am having issues related to the advanced install procedure, that is still serving the kerberos agent application through port 8080. I am not sure how to uninstall this, and what service is serving the kerberos agent application.

    I followed the installation procedure backwards, and uninstalled and rm -rf a bunch of created directories during the advanced installation process, but for some reason it is still serving the kerberos agent login at https://IP:8080. I tried systemctl stop nginx and that didn't work. It is still serving the kerberos service.

    Curious how one might troubleshoot this?

    opened by russmcg 2
  • Installed Kerberos on RPI4 using Docker (Machinery Not Running Issue)

    Installed Kerberos on RPI4 using Docker (Machinery Not Running Issue)

    I followed this guide on the Kerberos.io documentation, and for some reason the Web is Running, but the Machinery is Not Running.

    https://cedricverst.medium.com/kerberos-io-on-docker-19b25fa7efd1

    I am pulling in a RTSP stream, that works over VLC so I know the connection is good there. However, the RTSP stream link that I put in the IP Camera setting isn't being detected. I'm pretty sure it is due to the Machinery not running.

    Curious how I go about troubleshooting the Machinery, and how to start it?

    I also don't know where to find the Kerberos logs to troubleshoot.

    Any help would be greatly appreciated.

    opened by russmcg 9
  • No Live View and Motion Dectetions when Continuous recording enabled

    No Live View and Motion Dectetions when Continuous recording enabled

    Hello,

    When Continuous recording is enabled, Live View is not working for me, also I think Motion Dectetions it should remain active even is Continuous recording is ON.

    agent-outdoor

    opened by nurio-felix 2
  •  Error when I try compile Machinery

    Error when I try compile Machinery

    Please I need your help. I use Linux Ubuntu 20.4

    When I try compile/run de machinery with "go run main.go run mycameraname 8080" like your example I got this message.

    github.com/kerberos-io/joy4/cgo/ffmpeg

    /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libavresample.a(resample.o): undefined reference to symbol '[email protected]@GLIBC_2.2.5' /usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

    github.com/kerberos-io/joy4/cgo/ffmpeg

    ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go: In function ‘wrap_avcodec_decode_audio4’: ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:7:9: warning: ‘avcodec_decode_audio4’ is deprecated [-Wdeprecated-declarations] 7 | return avcodec_decode_audio4(ctx, frame, got, &pkt); | ^~~~~~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:4: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3047:5: note: declared here 3047 | int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, | ^~~~~~~~~~~~~~~~~~~~~ ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go: In function ‘wrap_avresample_convert’: ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:10:9: warning: ‘avresample_convert’ is deprecated [-Wdeprecated-declarations] 10 | return avresample_convert(avr, (void *)out, outsize, outcount, (void *)in, insize, incount); | ^~~~~~ In file included from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:451:5: note: declared here 451 | int avresample_convert(AVAudioResampleContext *avr, uint8_t **output, | ^~~~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avcodec_encode_audio2’: cgo-gcc-prolog:153:2: warning: ‘avcodec_encode_audio2’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:4: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3688:5: note: declared here 3688 | int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, | ^~~~~~~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avresample_alloc_context’: cgo-gcc-prolog:287:2: warning: ‘avresample_alloc_context’ is deprecated [-Wdeprecated-declarations] In file included from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:194:25: note: declared here 194 | AVAudioResampleContext *avresample_alloc_context(void); | ^~~~~~~~~~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avresample_free’: cgo-gcc-prolog:302:2: warning: ‘avresample_free’ is deprecated [-Wdeprecated-declarations] In file included from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:258:6: note: declared here 258 | void avresample_free(AVAudioResampleContext **avr); | ^~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avresample_get_out_samples’: cgo-gcc-prolog:320:2: warning: ‘avresample_get_out_samples’ is deprecated [-Wdeprecated-declarations] In file included from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:403:5: note: declared here 403 | int avresample_get_out_samples(AVAudioResampleContext *avr, int in_nb_samples); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avresample_open’: cgo-gcc-prolog:339:2: warning: ‘avresample_open’ is deprecated [-Wdeprecated-declarations] In file included from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:214:5: note: declared here 214 | int avresample_open(AVAudioResampleContext *avr); | ^~~~~~~~~~~~~~~

    github.com/kerberos-io/joy4/cgo/ffmpeg

    ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.go: In function ‘ffinit’: ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.go:7:9: warning: ‘av_register_all’ is deprecated [-Wdeprecated-declarations] 7 | av_register_all(); | ^~~~~~~~~~~~~~~ In file included from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.go:5: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1955:6: note: declared here 1955 | void av_register_all(void); | ^~~~~~~~~~~~~~~

    github.com/kerberos-io/joy4/cgo/ffmpeg

    ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/video.go: In function ‘wrap_avcodec_decode_video2’: ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/video.go:14:9: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations] 14 | return avcodec_decode_video2(ctx, frame, got, &pkt); | ^~~~~~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/video.go:11: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here 3096 | int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, | ^~~~~~~~~~~~~~~~~~~~~ ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/video.go: In function ‘wrap_avcodec_decode_video2_empty’: ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/video.go:18:9: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations] 18 | return avcodec_decode_video2(ctx, frame, got, &pkt); | ^~~~~~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/video.go:11: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here 3096 | int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, | ^~~~~~~~~~~~~~~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avcodec_encode_video2’: cgo-gcc-prolog:115:2: warning: ‘avcodec_encode_video2’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/[email protected]/cgo/ffmpeg/video.go:11: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3729:5: note: declared here 3729 | int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,

    opened by alexandrefreitasp 0
  • Translation web UI (additional languages)

    Translation web UI (additional languages)

    We are currently translating the Kerberos Agent UI. Find a list of the translations we are currently focusing on, feel free to add more languages if you are willing to contribute.

    Languages can be found in the public folder. If your language is missing, create a new directory with the language 2 letter code, copy the translation.json file from the en folder, and start translating.

    • [x] Dutch
    • [x] English
    • [x] French (by @robdsource)
    • [x] German (by @TeeTeufel)
    • [ ] Italian
    • [ ] Spanish
    • [ ] Portuguese
    • [ ] Polish
    • [ ] Arabic
    enhancement help wanted 
    opened by cedricve 3
  • Continuous recording: panic: runtime error: invalid memory address or nil pointer dereference

    Continuous recording: panic: runtime error: invalid memory address or nil pointer dereference

    Hello,

    I am trying enable "Continuous recording" but no success. Every time I enable container crash. I am using docker +docker compose instead of kubernetes.

    docker-compose.yml

    version: '3'
    
    services:
      kerberos-agent:
        image: 'kerberos/agent-dev:arch-amd64-a67c84a'
        restart: always
        container_name: 'kerberos-camera1'
        hostname: 'kerberos-camera1'
        ports:
          - '8080'
        volumes:
          - "./agent/config:/home/agent/data/config"
          - "./agent/recordings:/home/agent/data/recordings"
    
        labels:
          - 'traefik.enable=true'
          - 'traefik.http.routers.kerberos-camera1.rule=Host(`kerberos-camera1.domain.tld`)'
          - 'traefik.http.routers.kerberos-camera1.entrypoints=websecure'
          - 'traefik.http.routers.kerberos-camera1.tls=true'
          - 'traefik.http.routers.kerberos-camera1.tls.certresolver=leresolver'
          - 'traefik.http.services.kerberos-camera1.loadbalancer.server.port=8080'
    
      kerberos-vault:
        image: 'kerberos/vault:latest'
        restart: always
        container_name: 'kerberos-vault'
        hostname: 'kerberos-vault'
        ports:
          - '80'
          - '8081'
        volumes:
          - "./vault:/vault"
        environment:
          - GIN_MODE=release
          - STORAGE_API_URL=kerberos-vault-api.domain.tld
          - KERBEROS_LOGIN_USERNAME=root
          - KERBEROS_LOGIN_PASSWORD=pass
          - MONGODB_HOST=kerberos-mongo
          - MONGODB_DATABASE_CREDENTIALS=admin
          - MONGODB_USERNAME=root
          - MONGODB_PASSWORD=pass
          - MONGODB_DATABASE_STORAGE=KerberosStorage
        labels:
          - 'traefik.enable=true'
          - 'traefik.http.routers.kerberos-vault.rule=Host(`kerberos-vault.domain.tld`)'
          - 'traefik.http.routers.kerberos-vault.entrypoints=websecure'
          - 'traefik.http.routers.kerberos-vault.tls=true'
          - 'traefik.http.routers.kerberos-vault.tls.certresolver=leresolver'
          - "traefik.http.routers.kerberos-vault.service=kerberos_vault"
          - 'traefik.http.services.kerberos_vault.loadbalancer.server.port=80'
          - 'traefik.http.routers.kerberos-vault-api.rule=Host(`kerberos-vault-api.domain.tld`)'
          - 'traefik.http.routers.kerberos-vault-api.entrypoints=websecure'
          - 'traefik.http.routers.kerberos-vault-api.tls=true'
          - 'traefik.http.routers.kerberos-vault-api.tls.certresolver=leresolver'
          - "traefik.http.routers.kerberos-vault-api.service=kerberos_vault_api"
          - 'traefik.http.services.kerberos_vault_api.loadbalancer.server.port=8081'
    
      kerberos-mongo:
        image: 'mongo:4.4.16'
        container_name: 'kerberos-mongo'
        hostname: 'kerberos-mongo'
        ports:
          - 27017
        volumes:
          - ./mongodb:/data/db
        environment:
          - MONGO_INITDB_ROOT_USERNAME=root
          - MONGO_INITDB_ROOT_PASSWORD=pass
    
    volumes:
      kerberos-data:
    
    networks:
      default:
          name: cluster-net
          external: true
    

    Docker Logs:

    [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
    
    [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
     - using env:   export GIN_MODE=release
     - using code:  gin.SetMode(gin.ReleaseMode)
    
    [GIN-debug] GET    /debug/pprof/             --> github.com/gin-gonic/gin.WrapF.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/cmdline      --> github.com/gin-gonic/gin.WrapF.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/profile      --> github.com/gin-gonic/gin.WrapF.func1 (3 handlers)
    [GIN-debug] POST   /debug/pprof/symbol       --> github.com/gin-gonic/gin.WrapF.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/symbol       --> github.com/gin-gonic/gin.WrapF.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/trace        --> github.com/gin-gonic/gin.WrapF.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/allocs       --> github.com/gin-gonic/gin.WrapH.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/block        --> github.com/gin-gonic/gin.WrapH.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/goroutine    --> github.com/gin-gonic/gin.WrapH.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/heap         --> github.com/gin-gonic/gin.WrapH.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/mutex        --> github.com/gin-gonic/gin.WrapH.func1 (3 handlers)
    [GIN-debug] GET    /debug/pprof/threadcreate --> github.com/gin-gonic/gin.WrapH.func1 (3 handlers)
    {"level":"info","msg":"RunAgent: opening RTSP stream","time":"2022-09-08T16:10:58+01:00"}
    [GIN-debug] GET    /swagger/*any             --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (4 handlers)
    [GIN-debug] GET    /config                   --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func1 (4 handlers)
    [GIN-debug] POST   /config                   --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func2 (4 handlers)
    [GIN-debug] POST   /api/login                --> github.com/appleboy/gin-jwt/v2.(*GinJWTMiddleware).LoginHandler-fm (4 handlers)
    [GIN-debug] GET    /api/dashboard            --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func3 (4 handlers)
    [GIN-debug] POST   /api/latest-events        --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func4 (4 handlers)
    [GIN-debug] GET    /api/days                 --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func5 (4 handlers)
    [GIN-debug] GET    /api/stream               --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func6 (4 handlers)
    [GIN-debug] GET    /api/config               --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func7 (4 handlers)
    [GIN-debug] POST   /api/config               --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func8 (4 handlers)
    [GIN-debug] GET    /api/restart              --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func9 (4 handlers)
    [GIN-debug] GET    /api/stop                 --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func10 (4 handlers)
    [GIN-debug] POST   /api/hub/verify           --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func11 (4 handlers)
    [GIN-debug] POST   /api/persistence/verify   --> github.com/kerberos-io/agent/machinery/src/routers/http.AddRoutes.func12 (4 handlers)
    [GIN-debug] GET    /file/*filepath           --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (9 handlers)
    [GIN-debug] HEAD   /file/*filepath           --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (9 handlers)
    [GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
    Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
    [GIN-debug] Listening and serving HTTP on :8080
    {"level":"info","msg":"ControlAgent: Number of packets read 0","time":"2022-09-08T16:10:58+01:00"}
    {"level":"info","msg":"ConfigureMQTT: Set broker uri ","time":"2022-09-08T16:10:59+01:00"}
    {"level":"info","msg":"ConfigureMQTT: Set username xxx","time":"2022-09-08T16:10:59+01:00"}
    {"level":"info","msg":"ConfigureMQTT: Set password xxx","time":"2022-09-08T16:10:59+01:00"}
    {"level":"error","msg":"HandleHeartBeat: (400) Something went wrong while sending to Kerberos Hub.","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"HandleLiveStreamHD: Waiting for peer connections.","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"HandleRecordStream: Start continuous recording ","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"WriteToTrack: listing codecs.","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"WriteToTrack: codec - H264 found.","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"H264","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"WriteToTrack: codec - PCM_ALAW found.","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"PCM_ALAW","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"WriteToTrack: not using a transcoder.","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"ProcessMotion: Continuous recording, so no motion detection.","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"HandleStream: packet size 176627","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"Recording started","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"HandleRecordStream: composing recording","time":"2022-09-08T16:11:02+01:00"}
    {"level":"info","msg":"HandleRecordStream: write header","time":"2022-09-08T16:11:02+01:00"}
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x6196a0]
    
    goroutine 30 [running]:
    github.com/kerberos-io/joy4/format/mp4.(*Muxer).WriteHeader(0xc000034050?, {0xc00046eaa0?, 0x242?, 0xc00041eec0?})
            /go/pkg/mod/github.com/kerberos-io/[email protected]/format/mp4/muxer.go:154 +0x20
    github.com/kerberos-io/agent/machinery/src/capture.HandleRecordStream(0xc00003c620?, 0xc0001e6000, 0xc0005d6070, {0xc00046eaa0, 0x2, 0x2})
            /go/src/github.com/kerberos-io/agent/machinery/src/capture/main.go:194 +0x18fb
    created by github.com/kerberos-io/agent/machinery/src/components.RunAgent
            /go/src/github.com/kerberos-io/agent/machinery/src/components/Kerberos.go:125 +0x8ef
    

    Please, can you help figure out?

    opened by nurio-felix 11
Releases(v1.0.0-beta)
  • v1.0.0-beta(Sep 8, 2022)

    This is a first beta release of the new Kerberos Agent 🔥🔥🔥🔥. Still a lot of work todo, but this is what it's currently capable of:

    1. Connect an IP camera with H264 stream
    2. Proxy an Raspi Camera or USB camera through rtsp-simple-server; we are working to get this in a single side car.
    3. Dashboard page which returns key metrics and KPI's.
    4. Recording overview page, shows recordings from recent to oldest
    5. Settings page to modify the agent's behaviour: a. General settings: camera name, timezone, offline mode (disable all outgoing traffic). b. Camera: support of H264 stream, ONVIF settings (still WIP) c. Recording: motion or continuous recording, pre- and post recording options, auto-clean feature to manage storage, fragmented recordings for HLS. d. Streaming: WEBRTC support for Kerberos Hub and low-res streaming with MQTT to Kerberos Hub. e. Conditions: Multi region of interest, time conditions (2 regions per dag) and external condition (WIP). d. Persistence: Live connection to Kerberos Hub, option to store recordings directly into Kerberos Hub or in Kerberos Vault.
    6. Cross compiled Docker images for AMD64, ARM64 and ARMv7. We will add more in future.

    More features will be added in the next weeks (check out the issues tracking and project board).

    • We will add Storj, MinIO connectors directly in the agent.
    • Bring back the integration option when motion is detected (MQTT, Script, Webhook, etc).
    • We will ship more binaries, currently only ship a Docker container, we will bring back to Balena, Snap, etc (also considering to rebuild KiOS - not sure though).
    Source code(tar.gz)
    Source code(zip)
  • v0.0.1-alpha(Jun 25, 2022)

    First release of the Kerberos Agent (headless), which includes a base template for future work. The frontend (ui) is build with React, and the backend (machinery) is build with Golang. For the time being only the back-end is complete, the front-end only includes a mockup and working login page. Further integration with the back-end will be added in the next weeks. Please note that this version of the agent is already used by Kerberos Factory in the enterprise suite.

    1. A working backend (machinery) is added which only support IP cameras (RTSP) for the moment, a more complete list of features:
    • IP camera (RTSP)
    • Live streaming over MQTT and WEBRTC (TURN/STUN)
    • Conditional motion based recording (Region and time)
    • Continuous recording
    • Cloud upload to Kerberos Hub using hub credentials
    • Fragmented recordings
    1. A basic frontend was added to illustrate the direction of the UI. Currently only a working login page is added, but some other pages (mockups were added)
    • Dashboard page will show basic overview of the agent
    • Media page will show an overview page of the recordings
    • Settings page will allow to configure the agent accordingly

    Assets

    Docker image is compiled for AMD64, ARMv7 and ARM64.

    https://hub.docker.com/layers/agent/kerberos/agent/2c577c4/images/sha256-820a422fc06fa67c854448ec03d9a601d578cf6565a8b03a1983cb6e72348dc4?context=explore

    Source code(tar.gz)
    Source code(zip)
Owner
Kerberos.io
Video surveillance and video analytics for people and enterprises making this world a safer and smarter place.
Kerberos.io
EdgeLog is a lightweight log management system, and Agent is a part of EdgeLog system

EdgeLog is a lightweight log management system, and Agent is a part of EdgeLog system. It is installed on host machine and its main duty is to collect host program log statics.

null 3 Oct 10, 2022
An open-source and enterprise-level monitoring system.

Falcon+ Documentations Usage Open-Falcon API Prerequisite Git >= 1.7.5 Go >= 1.6 Getting Started Docker Please refer to ./docker/README.md. Build from

Open-Falcon 7k Nov 18, 2022
Hidra is a tool to monitor all of your services without making a mess.

hidra Don't lose your mind monitoring your services. Hidra lends you its head. ICMP If you want to use ICMP scenario, you should activate on your syst

null 8 Nov 8, 2022
Distributed simple and robust release management and monitoring system.

Agente Distributed simple and robust release management and monitoring system. **This project on going work. Road map Core system First worker agent M

StreetByters Community 30 Nov 17, 2022
Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds

Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds

Jason Kulatunga 2.1k Nov 21, 2022
A hello world project with NES.css and Netlify Functions

A hello world project powered by NES.css and Netlify Functions. The frontend part is a simple HTML page showing a progress bar. The input is received

Jang Rush 0 Jan 9, 2022
Open source framework for processing, monitoring, and alerting on time series data

Kapacitor Open source framework for processing, monitoring, and alerting on time series data Installation Kapacitor has two binaries: kapacitor – a CL

InfluxData 2.2k Nov 18, 2022
Open Source Supreme Monitor Based on GoLang

Open Source Supreme Monitor Based on GoLang A module built for personal use but ended up being worthy to have it open sourced.

SneakyKiwi 18 Nov 4, 2022
Open Source Software monitoring platform tools.

ByteOpen Open Source Software monitoring platform tools. Usage Clone the repo to your own go src path cd ~/go/src git clone https://code.byted.org/inf

Ye Xia 2 Nov 21, 2021
An open source Pusher server implementation compatible with Pusher client libraries written in GO

Try browsing the code on Sourcegraph! IPÊ An open source Pusher server implementation compatible with Pusher client libraries written in Go. Why I wro

Claudemiro 359 Nov 23, 2022
Cloudinsight Agent is a system tool that monitors system processes and services, and sends information back to your Cloudinsight account.

Cloudinsight Agent 中文版 README Cloudinsight Agent is written in Go for collecting metrics from the system it's running on, or from other services, and

cloudinsight-backup 368 Nov 3, 2022
System resource usage profiler tool which regularly takes snapshots of the memory and CPU load of one or more running processes so as to dynamically build up a profile of their usage of system resources.

Vegeta is a system resource usage tracking tool built to regularly take snapshots of the memory and CPU load of one or more running processes, so as to dynamically build up a profile of their usage of system resources.

Kartik 8 Jan 16, 2022
Changelog management tool, avoid merge conflicts and generate markdown changelogs.

chalog This is chalog, a changelog management tool. With chalog you can manage your project's changelog in a simple markdown format, split across mult

Jamie Thompson 6 Jul 7, 2022
Gowl is a process management and process monitoring tool at once. An infinite worker pool gives you the ability to control the pool and processes and monitor their status.

Gowl is a process management and process monitoring tool at once. An infinite worker pool gives you the ability to control the pool and processes and monitor their status.

Hamed Yousefi 40 Nov 10, 2022
Go-logging-logrus - Learn how to log management in golang with logrus

Learn how to logging in golang with logrus How to run this project git clone htt

Vandy Ahmad 0 Jan 19, 2022
The open telemetry framework

DISCONTINUATION OF PROJECT This project will no longer be maintained by Intel. Intel will not provide or guarantee development of or support for this

Intel SDI 1.8k Nov 19, 2022
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

The open-source platform for monitoring and observability. Grafana allows you to query, visualize, alert on and understand your metrics no matter wher

Grafana Labs 52.4k Nov 20, 2022
A golang implementation of the Open Pixel Control protocol

__ ___ ___ _____ ___ /'_ `\ / __`\ _______ / __`\/\ '__`\ /'___\ /\ \L\ \/\ \L\ \/\______\/\ \L\ \ \ \L\ \/\ \__/ \ \

Kelly 18 Jul 3, 2022
The Prometheus monitoring system and time series database.

Prometheus Visit prometheus.io for the full documentation, examples and guides. Prometheus, a Cloud Native Computing Foundation project, is a systems

Prometheus 45.5k Nov 20, 2022