Skip to main content

Frigate NVR for RockChip

Frigate is an NVR project designed specifically for Home Assistant. It can fully leverage local hardware compute and use AI models for real-time object detection, recognition, and classification in surveillance video (for example, distinguishing pedestrians, vehicles, and pets).

tip

Home Assistant is currently the world's most popular open-source smart home control center.

For more details, refer to the official documentation or the official Chinese documentation.

This document shows how to deploy this project on Radxa boards powered by RK3588.

Install the OS

Frigate officially recommends Debian 12 (Bookworm). Follow the installation guide for your device first.

Then you can proceed with the following steps using either the desktop UI or SSH remote access.

VSCode is recommended. You can refer to VS Code Remote SSH Development to connect to the board.

Install Docker

Frigate is deployed as containers. Refer to Install Docker and install Docker on the device before continuing.

Install Frigate

Create the initial directory structure.

Device
mkdir frigate && cd frigate
mkdir storage config && touch docker-compose.yml

Paste the following content into docker-compose.yml.

Device
services:
frigate:
container_name: frigate
restart: unless-stopped
stop_grace_period: 30s
image: docker.cnb.cool/frigate-cn/frigate:stable-rk # This image is for RK hardware. Different hardware platforms use different images.
volumes:
- ./config:/config
- ./storage:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
security_opt:
- apparmor=unconfined
- systempaths=unconfined
devices:
- /dev/dri
- /dev/dma_heap
- /dev/rga
- /dev/mpp_service
ports:
- '8971:8971'
- '8555:8554' # RTSP stream. Host port 8555 is used instead of 8554 because port 8554 is needed later for simulated streaming. If you do not need simulation, you can use 8554 directly.
tip

Frigate provides different container variants for different hardware platforms. You can explore other platform deployments if needed.

Now start Frigate with the command below.

Run it in the directory containing docker-compose.yml.

Device
docker compose up -d

After Frigate starts successfully, the frontend service will be available at https://your_device_ip:8971.

Check the board IP address:

Device
hostname -I

Replace your_device_ip with the first IP shown above, then open the URL in your browser.

View the login account and password with:

Device
docker logs frigate

The log may be long. If you cannot find credentials, use Ctrl + F in the VSCode terminal and search for keywords like admin.

Then use the frontend Configuration Editor to adjust settings.

tip

If you have not logged in for more than 24 hours, Frigate may require password login again. It is recommended to update your password from the account menu at the bottom-left.

Simulated streaming

If you do not yet have an IP camera (if you do, use it directly), simulating a stream with FFmpeg + MediaMTX is a good way to validate the setup.

Follow these steps.

MediaMTX

Device
mkdir mediamtx && cd mediamtx
wget https://github.com/bluenviron/mediamtx/releases/download/v1.16.0/mediamtx_v1.16.0_linux_arm64.tar.gz
tar -xvf mediamtx_v1.16.0_linux_arm64.tar.gz
./mediamtx

This starts an RTSP server in the current terminal and waits for incoming stream data.

Open a new terminal, then use FFmpeg to push the stream.

FFmpeg

Device
sudo apt install ffmpeg

Prepare a video file. This guide uses a public video from the Hugging Face dataset KAI-KratosAI/Street-videos.

Device
wget https://huggingface.co/datasets/KAI-KratosAI/Street-videos/resolve/0d33ede195de1fc061723d5dfa4623b30162af66/041896fb-20da-4625-9455-195172efc4d5.mp4_041896fb-20da-4625-9455-195172efc4d5.mp4#t=0.001
mv 041896fb-20da-4625-9455-195172efc4d5.mp4_041896fb-20da-4625-9455-195172efc4d5.mp4 test.mp4
ffmpeg -re -stream_loop -1 -i test.mp4 -c copy -f rtsp rtsp://localhost:8554/mystream

Parameter explanation:

  • -re: Read at native speed. Without this, FFmpeg may push data too fast and the stream appears as fast-forward.
  • -stream_loop -1: Loop video indefinitely, useful for Frigate testing.
  • -i test.mp4: Input video file.
  • -c copy: Copy codecs without re-encoding, minimizing CPU usage.
  • -f rtsp: Output RTSP format.
  • rtsp://localhost:8554/mystream: Stream URL. mystream is the stream ID.

Then modify the configuration in the frontend UI:

Then you should be able to see the live camera feed on the homepage.

Enable AI model

First ensure you are running a Linux distribution with Rockchip BSP kernel 5.10 or 6.1 and required drivers (especially rkvdec2 and rknpu):

Device
uname -r
# 5.10.x-rockchip or 6.1.x-rockchip; the -rockchip suffix is important
ls /dev/dri
# by-path card0 card1 renderD128 renderD129; renderD128 (VPU) and renderD129 (NPU) should be present
sudo cat /sys/kernel/debug/rknpu/version
# RKNPU driver: v0.9.2 or later

Then update the configuration in the frontend UI:

mqtt:
enabled: false

detectors:
rknn_0:
type: rknn
num_cores: 3

model: # required
# Model name (auto-downloaded) or path to a custom .rknn model file
# Optional values:
# - frigate-fp16-yolov9-t
# - frigate-fp16-yolov9-s
# - frigate-fp16-yolov9-m
# - frigate-fp16-yolov9-c
# - frigate-fp16-yolov9-e
# Or a full in-container path to your yolo_model.rknn file
# Refer to official docs for more model configuration details
path: frigate-fp16-yolov9-t
model_type: yolo-generic
width: 320
height: 320
input_tensor: nhwc
labelmap_path: /labelmap/coco-80.txt

# ffmpeg:
# hwaccel_args: preset-rkmpp # <----- these two lines are optimization settings from official docs, but may conflict with FFmpeg push streaming, so they are disabled here

go2rtc:
streams:
camera:
- rtsp://your_device_ip:8554/mystream # <----- replace with your device IP
- 'ffmpeg:back#video=h264#hardware'

cameras:
name_of_your_camera: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://your_device_ip:8554/mystream # <----- The stream you want to use for detection
roles:
- detect
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 848
height: 464

detect:
enabled: true
version: 0.16-0

Refer to official documentation for additional model configuration options.

Restart Frigate after the modification.

You have now successfully deployed Frigate on RK3588.

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0