Kerberos Agent - RTSP Simple Server not able to connect to device

Hello, I’m working on the Kerberos Agent project, and looking how to include rtsp-simple-server in our fleet deployment. The purpose of rtsp-simple-server is to translate an RPi camera or USB camera into a valid RTSP h264 stream, that can be leveraged by the Kerberos Agent.

We are currently consolidating our work in this GitHub repository, but do not managed to access the host devices. We are running in privileged mode, but still can’t make it work. This approach works perfectly in a traditional Docker deployment. Keen to see this working in Balena.

We have an issue open here → Raspberry Pi and USB Camera support through rtsp-simple-server · Issue #1 · kerberos-io/balena-agent · GitHub
This would describe the issue a bit more.


I am working with rtsp-simple-server too (with IP cameras not a RPI camera) and I looked at your repo. It looks like you rasp-simple-server.yml is missing a large part of the configuration at the beginning of the file. I would look there first. You may also need ffmpeg to convert to RTSP too.

Thanks for the response ! :wink: Well the fact is that it will inherit from the default config, and overrides the parts you have defined in the custom config (-> balena-agent/rtsp-simple-server.yml at main · kerberos-io/balena-agent · GitHub).

The thing is that from the logs, we see that it tries to create and establish the connect with both RPi camera and USB Camera (/dev/video0), but it fails connecting. I believe something is missing, which exposes the onboard devices and some host directories; but not sure.

See following logs:

I managed get it working for the USB camera, in the end the rtsp-simple-server project was missing the ffmpeg library, so I had to include a custom image, which you can now find here.

For the RPI Camera, there are still some issues as I’ll need to bind specific folders of the file system (which is not allowed by balena).

docker run --network=host \
-d --privileged \
--tmpfs /dev/shm:exec \
-v /usr:/usr:ro \
-v /lib:/lib:ro \
-v /run/udev:/run/udev:ro \
-v $PWD/rtsp-simple-server.yml:/rtsp-simple-server.yml \