Hello everyone,
I’m running Home Assistant on a Raspberry Pi 4 (8GB) with an SSD and have recently set up Frigate, which I’m really enjoying so far. I also have a Coral TPU, and I’ve allocated 256MB of video memory in config.txt
.
However, Frigate is reporting “Front has high FFMPEG CPU usage” for my only configured camera (“Front”). Before I start adding more cameras, I’d like to optimise my setup and reduce CPU usage where possible.
Here’s what Frigate reports for CPU usage:
And here’s my current Frigate configuration:
mqtt:
host: core-mosquitto
user: ********
password: ********
topic_prefix: frigate
detectors:
coral:
type: edgetpu
device: usb
ffmpeg:
hwaccel_args: preset-rpi-64-h264
output_args:
record: preset-record-generic-audio-copy
go2rtc:
streams:
front:
- rtsp://192.168.72.151:554/s0
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
- dog
- car
cameras:
front:
detect:
# width: 1920
# height: 1080
fps: 5
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front
roles:
- detect
- record
zones:
Front_Yard:
coordinates:
0.846,0.352,0.443,0.003,0.254,0.001,0.002,0.235,0.001,0.666,0.157,0.999,0.82,0.999
loitering_time: 0
Roadway:
coordinates: 0.997,0.585,0.995,0.003,0.45,0,0.853,0.356,0.848,0.4
loitering_time: 1
inertia: 3
motion:
mask: 0.001,0.034,0.175,0.038,0.175,0,0.001,0.001
threshold: 30
contour_area: 10
improve_contrast: true
review:
alerts:
required_zones: Front_Yard
detections: {}
version: 0.15-1
record:
enabled: true
retain:
days: 14
mode: all
Does anyone have any tips or best practices for lowering FFMPEG CPU usage on a Raspberry Pi? Any advice would be greatly appreciated!
Thanks in advance!