Security Cameras
I put up my first camera in 2017. Since then, I’ve gone through several different NVR’s. The first two were QNAP offerings: Surveillance Station, and then QVR Pro when that was released in 2018. After that, I switched to Blue Iris and Deepstack for the AI object detection. That was my setup for many years, until recently when I switched to Frigate. So far, Frigate is the closest to what I actually wanted in an NVR, and, in a way, has made my system feel new again.
The setup however, hasn’t been entirely pain free, but that is partly my choice of putting it on a Windows machine instead of the recommended bare metal Linux environment. I’d like to get hardware acceleration enabled, and I think I can with my setup, but it’s proving to be more involved than I’d like. I am using an Intel i5 9600K processor. With two OpenVino Detectors configured and four cameras, each detector response time is averaging anywhere from 11ms to 18ms.
Here are my config files:
Docker compose:
services:
frigate:
container_name: frigate
restart: unless-stopped
stop_grace_period: 30s # allow enough time to shut down the various services
image: ghcr.io/blakeblackshear/frigate:0.15.2
cap_add:
- CAP_PERFMON
privileged: true # this may not be necessary for all setups
shm_size: "1536mb" # update for your cameras based on calculation above
devices:
#In WSL, the GPU device is accessed via the character device /dev/drx, while for native Linux OS it is accessed via /dev/dri.
#- https://docs.openvino.ai/2025/get-started/install-openvino/configurations/configurations-intel-gpu.html#wsl-install
- /dev/dxg
- /dev/dri/card0
- /dev/dri/renderD128
volumes:
- /usr/lib/wsl:/usr/lib/wsl
- /etc/localtime:/etc/localtime:ro
- C:\docker\frigate\config:/config
- D:\Frigate\:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
# - "8971:8971"
- "5000:5000"
- "1984:1984"
# - "5001:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "password"
#vMESA_LOADER_DRIVER_OVERRIDE: "vgem"
LD_LIBRARY_PATH: "/usr/lib/wsl/lib"
LIBVA_DRIVER_NAME: "d3d12"
LIBVA_DRIVERS_PATH: "/usr/lib/x86_64-linux-gnu/dri"
Frigate Config.yaml:
version: 0.16-0
#semantic_search:
# enabled: true
# reindex: false
# model_size: small
database:
path: /config/frigate.db
mqtt:
enabled: true
host: 192.168.2.112
port: 1883
topic_prefix: frigate
client_id: frigate
# user: frigate
# password: '{FRIGATE_MQTT_PASSWORD}'
#detectors:
# cpu1:
# type: cpu
# num_threads: 3
detectors:
ov_0:
type: openvino
device: GPU
ov_1:
type: openvino
device: GPU
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
path: /openvino-model/ssdlite_mobilenet_v2.xml
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
go2rtc:
streams:
driveway: rtsp://username:password@192.168.5.200:88/videoMain
driveway_sub: rtsp://username:password@192.168.5.200:88/videoSub
sideyard: rtsp://username:password@192.168.5.201:88/videoMain
sideyard_sub: rtsp://username:password@192.168.5.201:88/videoSub
backyard: rtsp://username:password@192.168.5.202:88/videoMain
backyard_sub: rtsp://username:password@192.168.5.202:88/videoSub
record:
enabled: true
retain:
days: 7
mode: motion
alerts:
retain:
days: 30
detections:
retain:
days: 30
snapshots:
enabled: true
clean_copy: true
timestamp: false
crop: true
retain:
default: 20
objects:
person: 30
#ffmpeg:
# hwaccel_args: preset-vaapi
#output_args:
# record: preset-record-generic-audio-aac
detect:
fps: 10
width: 1280
height: 720
enabled: true
logger:
default: debug
cameras:
driveway:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/driveway_sub
input_args: preset-rtsp-restream
roles:
- detect
- path: rtsp://127.0.0.1:8554/driveway
input_args: preset-rtsp-restream
roles:
- record
objects:
track:
- person
- dog
- cat
- bicycle
- car
- face
detect:
enabled: true
stationary:
interval: 50
threshold: 25
record:
enabled: true
retain:
days: 10
mode: motion
alerts:
retain:
days: 30
mode: motion
detections:
retain:
days: 30
mode: motion
motion:
mask:
- 0,0,1,0,1,0.122,0.233,0.221,0,0.253
threshold: 25
contour_area: 12
improve_contrast: false
zones:
driveway_z1:
coordinates:
0.268,0.505,0.469,0.362,0.776,0.387,0.698,1,0.219,0.995,0.137,0.546
inertia: 4
loitering_time: 0
objects:
- cat
- dog
- person
sideyard:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/sideyard_sub
input_args: preset-rtsp-restream
roles:
- detect
- path: rtsp://127.0.0.1:8554/sideyard
input_args: preset-rtsp-restream
roles:
- record
objects:
track:
- person
- dog
- cat
detect:
enabled: true
record:
enabled: true
retain:
days: 7
mode: motion
motion:
mask:
- 0.002,0.004,0.992,0,1,0.107,0,0.111
threshold: 16
contour_area: 13
improve_contrast: false
zones:
sideyard_z1:
coordinates: 0,0.515,0.285,0.25,0.68,0.233,1,0.475,1,1,0.006,0.994
loitering_time: 0
inertia: 3
backyard:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/backyard_sub
input_args: preset-rtsp-restream
roles:
- detect
- path: rtsp://127.0.0.1:8554/backyard
input_args: preset-rtsp-restream
roles:
- record
objects:
track:
- person
- dog
- cat
detect:
enabled: true
width: 1280
height: 720
fps: 5
record:
enabled: true
retain:
days: 7
mode: motion
motion:
mask:
- 0,0,0.668,0,0.667,0.076,0,0.121
threshold: 18
contour_area: 13
improve_contrast: false