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

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.

Owner
Kerberos.io
Video surveillance and video analytics for people and enterprises making this world a safer and smarter place.
Kerberos.io
Comments
  • Problem creating a filemkdir  open .data/snapshots/.test permission denied

    Problem creating a filemkdir open .data/snapshots/.test permission denied

    When I start my containers using Docker Compose I receive the following errors in the log:

    $ docker compose --file /srv/kerberos-agent/docker-compose.yml logs
    ka-garage-south  | {"level":"fatal","msg":"Problem creating a file: open ./data/snapshots/.test: permission denied","time":"2022-12-19T20:37:39+01:00"}
    ka-garage-south  | {"level":"fatal","msg":"Problem creating a file: open ./data/snapshots/.test: permission denied","time":"2022-12-19T20:37:42+01:00"}
    ka-garage-north     | {"level":"fatal","msg":"Problem creating a file: open ./data/snapshots/.test: permission denied","time":"2022-12-19T20:37:39+01:00"}
    ka-garage-north     | {"level":"fatal","msg":"Problem creating a file: open ./data/snapshots/.test: permission denied","time":"2022-12-19T20:37:42+01:00"}
    

    Here is my sanitised docker-compose.yml configuration:

    $ docker compose --file /srv/kerberos-agent/docker-compose.yml config
    name: kerberos-agent
    services:
      ka-garage-north:
        container_name: ka-garage-north
        environment:
          AGENT_AUTO_CLEAN: "true"
          AGENT_AUTO_CLEAN_MAX_SIZE: "102400"
          AGENT_CAPTURE_CONTINUOUS: "false"
          AGENT_CAPTURE_FRAGMENTED: "false"
          AGENT_CAPTURE_FRAGMENTED_DURATION: "8"
          AGENT_CAPTURE_IPCAMERA_RTSP: rtsp://[user]:[pass]@192.168.1.84:554/cam/realmonitor?channel=1&subtype=0
          AGENT_CAPTURE_IPCAMERA_SUB_RTSP: rtsp://[user]:[pass]@192.168.1.84:554/cam/realmonitor?channel=1&subtype=1
          AGENT_CAPTURE_MAXLENGTH: "600"
          AGENT_CAPTURE_PIXEL_CHANGE: "150"
          AGENT_CAPTURE_POSTRECORDING: "40"
          AGENT_CAPTURE_PRERECORDING: "20"
          AGENT_KEY: ""
          AGENT_MQTT_PASSWORD: ""
          AGENT_MQTT_URI: tcp://195.168.1.95:1883
          AGENT_MQTT_USERNAME: ""
          AGENT_NAME: garage-north
          AGENT_OFFLINE: "false"
          AGENT_PASSWORD: [password]
          AGENT_TIMEZONE: America/Edmonton
          AGENT_USERNAME: admin
        hostname: [hostname]
        image: kerberos/agent:latest
        networks:
          default: null
        ports:
        - mode: ingress
          target: 80
          published: "8083"
          protocol: tcp
        restart: unless-stopped
        user: 1000:1000
        volumes:
        - type: bind
          source: /srv/kerberos-agent/garage-north/config
          target: /home/agent/data/config
          bind:
            create_host_path: true
        - type: bind
          source: /media/nvr/kerberos/garage-north/recordings
          target: /home/agent/data/recordings
          bind:
            create_host_path: true
      ka-garage-south:
        container_name: ka-garage-south
        environment:
          AGENT_AUTO_CLEAN: "true"
          AGENT_AUTO_CLEAN_MAX_SIZE: "102400"
          AGENT_CAPTURE_CONTINUOUS: "false"
          AGENT_CAPTURE_FRAGMENTED: "false"
          AGENT_CAPTURE_FRAGMENTED_DURATION: "8"
          AGENT_CAPTURE_IPCAMERA_RTSP: rtsp://[user]:[pass]@192.168.1.83:554/cam/realmonitor?channel=1&subtype=0
          AGENT_CAPTURE_IPCAMERA_SUB_RTSP: rtsp://[user]:[pass]@192.168.1.83:554/cam/realmonitor?channel=1&subtype=1
          AGENT_CAPTURE_MAXLENGTH: "600"
          AGENT_CAPTURE_PIXEL_CHANGE: "150"
          AGENT_CAPTURE_POSTRECORDING: "40"
          AGENT_CAPTURE_PRERECORDING: "20"
          AGENT_KEY: ""
          AGENT_MQTT_PASSWORD: ""
          AGENT_MQTT_URI: tcp://195.168.1.95:1883
          AGENT_MQTT_USERNAME: ""
          AGENT_NAME: garage-south
          AGENT_OFFLINE: "false"
          AGENT_PASSWORD: [password]
          AGENT_TIMEZONE: America/Edmonton
          AGENT_USERNAME: admin
        hostname: [hostname]
        image: kerberos/agent:latest
        networks:
          default: null
        ports:
        - mode: ingress
          target: 80
          published: "8082"
          protocol: tcp
        restart: unless-stopped
        user: 1000:1000
        volumes:
        - type: bind
          source: /srv/kerberos-agent/garage-south/config
          target: /home/agent/data/config
          bind:
            create_host_path: true
        - type: bind
          source: /media/nvr/kerberos/garage-south/recordings
          target: /home/agent/data/recordings
          bind:
            create_host_path: true
    networks:
      default:
        name: kerberos-agent_default
    

    The mount points for these two services are as follows:

    $ docker container inspect ka-garage-south -f '{{range .Mounts}}{{.Type}}:{{.Source}}:{{.Destination}}{{println}}{{ end }}'
    bind:/srv/kerberos-agent/garage-south/config:/home/agent/data/config
    bind:/media/nvr/kerberos/garage-south/recordings:/home/agent/data/recordings
    
    $ docker container inspect ka-garage-east -f '{{range .Mounts}}{{.Type}}:{{.Source}}:{{.Destination}}{{println}}{{ end }}'
    bind:/srv/kerberos-agent/garage-east/config:/home/agent/data/config
    bind:/media/nvr/kerberos/garage-east/recordings:/home/agent/data/recordings
    

    I am running the services under User idsvc:

    $ id $user
    uid=1000(idsvc) gid=1000(idsvc) groups=1000(idsvc),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),104(input),106(render),108(netdev),995(docker),997(gpio),998(i2c),999(spi)
    

    Before starting the containers I ran the following commands:

    $ mkdir /srv/kerberos-agent/garage-north /srv/kerberos-agent/garage-north/config
    $ mkdir /srv/kerberos-agent/garage-south /srv/kerberos-agent/garage-south/config
    $ sudo chown idsvc:idsvc /srv/kerberos-agent/ -R
    $ sudo chmod 777 /srv/kerberos-agent/ -R
    
    $ mkdir /media/nvr/kerberos/garage-north
    $ mkdir /media/nvr/kerberos/garage-south
    $ sudo chown idsvc:idsvc /media/nvr/kerberos/ -R
    $ sudo chmod 777 /media/nvr/kerberos -R
    

    The file permissions for the /home/agent/data/config mount look like this:

    $ ls -la /srv/kerberos-agent/garage-north/
    total 12
    drwxrwxrwx 3 idsvc idsvc 4096 Dec 19 11:32 .
    drwxrwxrwx 7 idsvc idsvc 4096 Dec 19 12:30 ..
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:56 config
    $ ls -la /srv/kerberos-agent/garage-north/config/
    total 8
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:56 .
    drwxrwxrwx 3 idsvc idsvc 4096 Dec 19 11:32 ..
    $ ls -la /srv/kerberos-agent/garage-south/
    total 12
    drwxrwxrwx 3 idsvc idsvc 4096 Dec 19 11:32 .
    drwxrwxrwx 7 idsvc idsvc 4096 Dec 19 12:30 ..
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:56 config
    $ ls -la /srv/kerberos-agent/garage-south/config/
    total 8
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:56 .
    drwxrwxrwx 3 idsvc idsvc 4096 Dec 19 11:32 ..
    

    The file permissions for the /home/agent/data/recordings mount look like this:

    $ ls -la /media/nvr/kerberos/garage-north/
    total 16
    drwxrwxrwx 4 idsvc idsvc 4096 Dec 19 12:37 .
    drwxrwxrwx 7 idsvc idsvc 4096 Dec 19 11:32 ..
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:56 recordings
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:37 snapshots
    $ ls -la /media/nvr/kerberos/garage-north/recordings/
    total 8
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:56 .
    drwxrwxrwx 4 idsvc idsvc 4096 Dec 19 12:37 ..
    
    $ ls -la /media/nvr/kerberos/garage-south/
    total 16
    drwxrwxrwx 4 idsvc idsvc 4096 Dec 19 12:37 .
    drwxrwxrwx 7 idsvc idsvc 4096 Dec 19 11:32 ..
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:56 recordings
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:37 snapshots
    $ ls -la /media/nvr/kerberos/garage-south/recordings/
    total 8
    drwxrwxrwx 2 idsvc idsvc 4096 Dec 19 12:56 .
    drwxrwxrwx 4 idsvc idsvc 4096 Dec 19 12:37 ..
    

    My versions for reference:

    $ docker --version
    Docker version 20.10.21, build baeda1f
    $ docker compose version
    Docker Compose version v2.12.2
    

    I have tried adding user: 1000:1000 to the services entries in the compose file, running the docker compose elevated, and I am stuck.

    What incredibly obvious thing have I missed?

  • Recordings saved with no file type

    Recordings saved with no file type

    Problem

    I cannot view recordings in Kerberos Agent.

    I get this error: error

    After downloading the recording, it is saved as "video" with no file extension.

    I can see and watch the recordings just fine in my Kerberos Hub

    Troubleshooting Done

    • Updating docker image kerberos/agent:latest.
    • Removed passing of volumes from host to container.

    Host Specs

    • Ubuntu 20.04 VM
  • Connection resetting from agent to USB Camera (transformed to RTSP stream)

    Connection resetting from agent to USB Camera (transformed to RTSP stream)

    I have an USB camera on my Lenovo laptop (running Fedora 35 Linux) and I ran RTSP Simple server according to this guide https://github.com/kerberos-io/camera-to-rtsp to expose it via RTSP as a container.

    The command I used is: podman run --rm --name rtsp-server --network=host -d --privileged -v $PWD/rtsp-simple-server.yml:/rtsp-simple-server.yml kerberos/rtsp-simple-server

    File rtsp-simple-server.yml changed according to the doc, added lines:

    paths:
           usbcam:
            runOnInit: ffmpeg -f v4l2 -i /dev/video0 -preset ultrafast -c:v libx264 -f rtsp rtsp://<MY_IP>:$RTSP_PORT/$RTSP_PATH
            runOnInitRestart: yes 
    

    The server is working and I can connect to the camera using VLC and see live video without any interruptions.

    Then I ran agent using latest docker image using this command: podman run --rm --name kerberos -p 8081:80 -d kerberos/agent:latest

    Both containers are running on the same host (Lenovo with Fedora).

    The agent is working and accessible via port 8081, and I can successfully add camera in agent UI using URL rtsp://<MY_IP>:8554/usbcam - if I click Verify connection it saying Camera settings are successfully verified. However, the Live view doesn't work - it shows nothing (only button Configure connection).

    Also in the dashboard the message in IP camera frame is flipping from "Connected" to "Disconnected"

    If I enable Continuous recording - then recording is happening - I see files available in Recordings - and each file has length 16-20 sec. It means agent can connect to the camera and do recordings, but looks like the connection is interrupting.

    In rtsp-simple-server container I see following log messages:

    2022/12/01 01:22:12 INF [RTSP] [conn <MY IP>:36654] opened
    2022/12/01 01:22:12 INF [RTSP] [session 250958557] created by <MY IP>:36654
    2022/12/01 01:22:12 INF [RTSP] [session 250958557] is reading from path 'usbcam', with TCP, 1 track (H264)
    2022/12/01 01:22:36 INF [RTSP] [conn <MY IP>:36654] closed (read tcp <MY IP>:8554-><MY IP>:36654: read: connection reset by peer)
    2022/12/01 01:22:36 INF [RTSP] [session 250958557] destroyed (not in use)
    

    Looks like the connection between agent and rtsp server is resetting each ~20 sec.

    But this is not happening for VLC connection, it stays for any period of time, for example, if I open streaming in VLC:

    2022/12/01 01:31:08 INF [RTSP] [conn <MY IP>:39496] opened
    2022/12/01 01:31:08 INF [RTSP] [session 284726513] created by <MY IP>:39496
    2022/12/01 01:31:08 INF [RTSP] [session 284726513] is reading from path 'usbcam', with UDP, 1 track (H264)
    

    It stays forever and finish only when I stop streaming in VLC with this message in logs:

    2022/12/01 01:44:35 INF [RTSP] [session 284726513] destroyed (teared down by 1<MY IP>:39496)
    2022/12/01 01:44:35 INF [RTSP] [conn <MY IP>:39496] closed (EOF)
    

    Also I noticed in Agent container logs that machinery is restarting constantly:

    {"level":"info","msg":"ProcessMotion: Motion detection enabled.","time":"2022-12-01T02:02:37+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 3","time":"2022-12-01T02:02:40+01:00"}
    {"level":"info","msg":"HandleStream: packet size 129966","time":"2022-12-01T02:02:41+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 4","time":"2022-12-01T02:02:45+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 4","time":"2022-12-01T02:02:50+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 4","time":"2022-12-01T02:02:55+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 4","time":"2022-12-01T02:03:00+01:00"}
    {"level":"info","msg":"Main: Restarting machinery.","time":"2022-12-01T02:03:00+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 4","time":"2022-12-01T02:03:00+01:00"}
    {"level":"info","msg":"Main: Restarting machinery.","time":"2022-12-01T02:03:00+01:00"}
    {"level":"info","msg":"RunAgent: waiting 3 seconds to make sure everything is properly closed.","time":"2022-12-01T02:03:01+01:00"}
    {"level":"info","msg":"Successfully Opened config.json from opensource","time":"2022-12-01T02:03:04+01:00"}
    {"level":"info","msg":"RunAgent: opening RTSP stream","time":"2022-12-01T02:03:04+01:00"}
    {"level":"info","msg":"RunAgent: opened RTSP stream","time":"2022-12-01T02:03:04+01:00"}
    {"level":"info","msg":"RunAgent: SetMaxGopCount was set with: 10","time":"2022-12-01T02:03:04+01:00"}
    {"level":"info","msg":"ConfigureMQTT: not starting as running in Offline mode.","time":"2022-12-01T02:03:04+01:00"}
    {"level":"info","msg":"HandleRecordStream: Start motion based recording ","time":"2022-12-01T02:03:04+01:00"}
    {"level":"info","msg":"ProcessMotion: Motion detection enabled.","time":"2022-12-01T02:03:04+01:00"}
    {"level":"info","msg":"HandleStream: packet size 84577","time":"2022-12-01T02:03:06+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 5","time":"2022-12-01T02:03:07+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 5","time":"2022-12-01T02:03:12+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 5","time":"2022-12-01T02:03:17+01:00"}
    {"level":"info","msg":"ControlAgent: Number of packets read 5","time":"2022-12-01T02:03:22+01:00"}
    {"level":"info","msg":"Main: Restarting machinery.","time":"2022-12-01T02:03:22+01:00"}
    {"level":"info","msg":"RunAgent: waiting 3 seconds to make sure everything is properly closed.","time":"2022-12-01T02:03:23+01:00"}
    

    Troubleshooting Done docker image kerberos/agent:latest I tried to run agent on separate RPI4 host - and I'm having the same issue (USB camera on Lenovo Laptop and agent on RPI) - connection resetting after ~20 sec.

    Host Specs: Lenovo T260 with Fedora 36 + podman + USB camera Agent tested also on RPI4 with Ubuntu 22.04

  • 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

  • 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.

  • New Kerberos Agent: Plans for USBCamera and Raspberry PI camera

    New Kerberos Agent: Plans for USBCamera and Raspberry PI camera

    The new agent currently only supports a valid H264 stream (we plan to have H265 support). In the past (previous open source agent) we supported native integrations for USBCameras (v4l2) and Raspberry Pi Cameras (mmal), however this was very intensive to make sure the integrations are fully working. On top of that we required a different codebase for each camera.

    To overcome this and make it easier to support cameras we are moving to a H264/H265 support only, this would mean that we will make a RTSP wrapper for USBCameras and Raspberry PI camera. So far this isn't documented properly, but we plan to ship an additional Docker container that will run next to the Kerberos Agent container.

    Current work-a-round looks like this:

    USB Camera

    We rely on the rtsp-simple-server project, this allows us to run a RTSP server to which we can publish a stream and subscribe to from the Kerberos Agent. You can run the RTSP server as following.

    docker run -d --network=host aler9/rtsp-simple-server
    

    Above command will run the server in host mode and run as a deamon in background. Next we can use ffmpeg to inject the /dev/video1 or /dev/videox (you have to lookup the id) into the RTSP container. Notice that you'll need to add -c:v libx264 which will transcode the stream to H264, if your camera isn't outputting H264 but JPEG; this will require some compute.

    ffmpeg -f v4l2 -i /dev/video1 -preset ultrafast -b:v 600k  -c:v libx264 -f rtsp rtsp://localhost:8554/mystream
    

    Launch the Kerberos Agent and make sure to set the RTSP connection to rtsp://localhost:8554/mystream. You should see the stream coming up, and connected to Kerberos Hub. You will notice that all features are properly working just like if you would have connect to a real IP camera.

    Raspberry Pi camera

    The process is similar as above, make sure you first run the rtsp-simple-server container.

    docker run -d --network=host aler9/rtsp-simple-server
    

    Instead of using the ffmpeg command we can now use the libcamera library in a similar way. The benefit of the Raspberry Pi camera is that it comes with an H264 stream already, so no need to do any transcoding, only thing that happens is to send it into the RTSP server.

    libcamera-vid -t 0 --inline -o - | ffmpeg -i pipe: -c copy -f rtsp rtsp://localhost:8554/mystream
    

    Going next (need help)

    The idea is to bundle this in a single container where you can just pass in some arguments with the type of camera you are target and which deviceID (/dev/video0, /dev/video1, etc). This container would then run next to the Kerberos Agent, on which the Kerberos Agent will read from the stream.

    We are start the project here, feel free to collaborate on the Camera to RTSP repo.

    Why does this matter

    Converting any camera to a RTSP stream will make our code base much easier, and at the same time will allow us to work on features that are more important. We will handle any camera as a RTSP camera, by transforming the camera stream to a valid RTSP stream using the side container.

    Once doing that we have a single integration and same capabilities such as H264 or H265 encoded recordings, livestreaming over MQTT and WEBRTC.

  • 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.

  • 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

  • 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.

  • When used a different approach the agent crashes

    When used a different approach the agent crashes

    Below are logs provided for this issue https://pastebin.com/Lir44J3g

    This happens when booting the OS and apparently now agent crashes completely if the stream isn't yet ready. Previously the agent handled nicely the situation where the stream was not yet ready, now it crashes instead.

    I think it would be nice to resolve this so just about any approach works perfectly, even if the suggested one is truly the best one.

  • 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?

  • Improvement: Setting the timetable based on the sunlight automatically

    Improvement: Setting the timetable based on the sunlight automatically

    So I see that there's a timetable, which is really nice, but I think it would be much more useful, if it could be set automatically based on daytime and sun position.

    So if there's no sun up, no light for the camera it's pointless to record recordings that aren't really usable.

    https://github.com/kelvins/sunrisesunset I've seen this library, it's been last updated in 2017 so I'm not sure.

    Also this library takes the geolocation coordinates instead of timezone, I'm not really sure what would be the cleanest way to get the coordinates, without calling external APIs?

  • Improvement: Auto-refresh the recordings page

    Improvement: Auto-refresh the recordings page

    I see that the main panel website is being refreshed with latest events, live as they happen.

    Maybe the same could be done to recordings page? http://localhost/media

    Possibly with a toggle, so it could be optionally enabled and not bother those who don't want it to live update?

  • Webpanel mobile layout is buggy

    Webpanel mobile layout is buggy

    image image

    Also, it's impossible to hide the sidebar, tapping on it does nothing and this makes the website hard to use on mobile if not impossible, without switching to PC mode.

  • Home assistant integration

    Home assistant integration

    Should be beneficial to create a HA integration for Kerberos Agents and/or Kerberos Vault. Showing some statistics (number of recordings), a livestream, alerts, etc. https://www.home-assistant.io/integrations/

    How to build an integration for HA: https://developers.home-assistant.io/docs/creating_component_index/

  • Raspberry Pi Zero - ARMv6 image not available

    Raspberry Pi Zero - ARMv6 image not available

    Hi, thanks for your wonderful product. I've tried to install Kerberos Agent through docker and everything seems to work until I try to get to the interface. The client (firefox in my case) says it's unable to connect to the server. I've installed the agent on a raspberry pi Zero with the latest Raspberry Pi OS lite version. I can access the pi through ssh. the command I entered to launch the service is: sudo docker run -p 80:80 --name kerberos0 -d kerberos/agent:latest Maybe I must add that I've encountered this warning, maybe related: WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/arm/v6) and no specific platform was requested

    Thanks in advance.

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.

Oct 10, 2022
An open-source and enterprise-level monitoring system.
 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

Jan 1, 2023
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

Nov 8, 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

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

Jan 1, 2023
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

Jan 9, 2022
Distributed simple and robust release management and monitoring system.
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

Nov 17, 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

Dec 26, 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.

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

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

Jan 3, 2023
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

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.
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.

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

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.

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.

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

Jan 19, 2022
The open telemetry framework
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

Dec 27, 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 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

Jan 3, 2023
A golang implementation of the Open Pixel Control protocol

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

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

Dec 31, 2022