I’ve been running them in containers, but now one of them doesn’t start. Anyway I need to start from scratch.
Can someone tell me, should I update the system or not?
I’ve been running them in containers, but now one of them doesn’t start. Anyway I need to start from scratch.
Can someone tell me, should I update the system or not?
If You are using radxa-os then update it using rconfig (there are some issues with packages when it’s done via apt). Since Armbian support NPU it may worth to try with it,
here it’s documented for opi5+ and coral, You may find this useful:
https://codingfield.com/blog/2024-01/install-frigate-in-proxmox-on-orangepi5plus/
Or save yourself some trouble and use Armbian or Joshua’s Ubuntu
Thanks I was sitting on radxa-os and I was using rconfig, but it was causing so much issues… I didn’t know that others support NPU and it is what I need, I will try armbian then! Maybe will be easier, as radxa-os gives me headaches.
The guide you provided is from Jan 2024, not sure why they went with coral TPU as RK3588 got nice NPU, anyway I managed to sort NPU yesterday but after docker restart it started crashing etc. Also Frigate does come with nice image for rock chips:
the one that ends with - rk is optimised for this NPU
Remember that ARM is not x86. At this point, don’t expect mainline ffmpeg to support the Rockchip VPU. Your options are ffmpeg-rockchip or just using jellyfin’s ffmpeg. Just install it and alias/link as ffmpeg
Check the download options and pick your poison… likely anything but radxa official is better supported… Joshua stopped supporting / armbian is always there and if you like arch linux / Kwankius installer is the best option
Thanks! I went with armbian as Joshua’s ubuntu us no longer updated.
Anyway, looks like everything(so far) is working withotu any issues on the armbian, I am surprised that radxa’s debian is so bad… But at least I got my system working and can start doing the right stuff.
Its like this: u dont buy an lenovo laptop asus acer hp and expect all of them to give u their own version of windows… Radxa provides and you tweak it… but everyone uses armbian thats also the reason why they are more relaxed… cause at the end of the day the Pull Requests goes to armbian.
Of course I do not expect them, moreover I do not expect them to maintain the drivers, however, if radxa is supplying us os, at least they should make sure that we are not loosing Ethernet drivers after restart and our fan is not doing 120% in idle
yeah armbian is the way to go from now for me I was disappointed initially but now I am getting happy with the device. Just need to understood how to move the system to the nvme
Armbian provides script to do that, armbian-install or something like that, it will do most job for You, updating SPI to right image, move system etc. If Your nvme is compatible enough and there is some power for it then it should just boot.
If You find armbian useful You can post guide for others what is up to date in 2025 with frigate and rock 5b. I hope You will get all needed stuff to work as expected. Armbian has own issues and don’t be surprised if something will be broken just on update, but for sure it’s solid base to get somewhere
BTW: opensource Rockchip NPU driver is expected in linux 6.18
This will make at least few things easier
Joloxx9, Many thanks for keeping this post updated with your progress; it’s a huge help for the rest of us newbies.
What update do you expect? I’ve said that I’ve movwd to armbian as it is working out of the box.
I run the Rock 5B with Frigate, here are my install instructions.
Install RadaxOS debian 12 bookworm image.
Don’t do apt upgrade
to update the debian system, instead to update do;
rsetup
Then from the menu select System->System Update
.
Disable Desktop booting, so it boots to CLI only.
sudo systemctl set-default multi-user.target
reboot
Install common tools
apt install net-tools build-essential dnsutils
Install dependencies
sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
Add Dockers GPG Key
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Add docker APT repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Update APT repo information
sudo apt update
Install docker
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-buildx-plugin
Add user to docker for permission access
sudo usermod -aG docker rock
Logout and log back in SSH session.
Verify installation as user
docker run hello-world
Create a root project directory for frigate, I did this under the rock
linux user.
mkdir ~/frigate
cd ~/frigate
Create frigate directory structure
mkdir storage config && touch docker-compose.yml
Edit the docker-compose.yml and set contents;
services:
frigate:
container_name: frigate
restart: unless-stopped
stop_grace_period: 30s
image: ghcr.io/blakeblackshear/frigate:stable-rk
shm_size: "1024mb"
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config:/config
- ./storage:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "8554:8554" # RTSP feeds
security_opt:
- apparmor=unconfined
- systempaths=unconfined
devices:
- /dev/dri
- /dev/dma_heap
- /dev/rga
- /dev/mpp_service
Start frigate with;
docker compose up -d
Get admin password generated from logs;
docker logs frigate
Go to web interface on port 8971
, ie: https://<rock5b ip address>:8971
Edit the frigate configuration in the Web UI and setup the cameras and object detectors.
Used config of;
mqtt:
enabled: false
ffmpeg:
hwaccel_args: preset-rk-h264
detectors:
rknn1:
type: rknn
num_cores: 3
rknn2:
type: rknn
num_cores: 3
rknn3:
type: rknn
num_cores: 3
model:
# name of model (will be automatically downloaded) or path to your own .rknn model file
# possible values are:
# - deci-fp16-yolonas_s
# - deci-fp16-yolonas_m
# - deci-fp16-yolonas_l
# - /config/model_cache/your_custom_model.rknn
path: deci-fp16-yolonas_s
# width and height of detection frames
width: 320
height: 320
# pixel format of detection frame
# default value is rgb but yolo models usually use bgr format
input_pixel_format: bgr
# shape of detection frame
input_tensor: nhwc
# needs to be adjusted to model, see below
labelmap_path: /labelmap.txt
#
# configure your camera streams here
#
version: 0.15-1
Create a systemd service so frigate starts on boot.
Create file /etc/systemd/system/frigate.service
with contents;
[Unit]
Description=Frigate NVR
Requires=docker.service
After=docker.service network-online.target
Wants=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/rock/frigate
User=rock
Group=rock
# If you use Docker Compose v2 plugin:
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
Enable;
sudo systemctl daemon-reload
sudo systemctl enable frigate.service
Reboot and test.
Thanks for those,
have You measured power consumption and load of those? How much cameras do You have?
I have 3x 2k cameras, 3 streams 2k + 3x low quality streams for object detection, everything with HW acceleration and with ffmpeg codec h264, NPU usage is roughly 20-30%, CPU ffmpeg on the other hand is 5%.
I will paste my config later on.
I only run two 4k cameras with CPU load around 18%. I have never measured power consumption so not sure about that.
If you install ffmpeg and switch to HW acceleration then you would have lower cpu usage.
I guess that frigate should work on smaller previews? What kind of stream do both of You have now?
Power consumption should be important thing to consider with 24/7 stuff, bsp kernel idles at 1.5W, edge at about 4W, but this may be not that important when cpu has some constant workload. For sure hardware acceleration/npu should help with those, especially face detection. I’m curious how much this will take power for those tasks.
I am not afraid about power consumption, my unraid server eats too much anyway.
Thisnis my config:
3x 2k live previewnand low res streams dor frigate AI detection which is only set to test that it is working, I nead reconfigure it anyway