frigate: fix live transcode (hevc_cuvid+resize), add live stream selectors, two-way talk (onvif+opus+webrtc), enable cam audio, remove license_plate label

This commit is contained in:
2026-07-08 16:01:03 +00:00
parent e895db3246
commit 72bc44859f
+118 -44
View File
@@ -1,3 +1,6 @@
database:
path: /nvme_db/frigate.db
# Global Birdseye Settings # Global Birdseye Settings
birdseye: birdseye:
enabled: false enabled: false
@@ -14,34 +17,30 @@ auth:
- 192.168.88.0/24 - 192.168.88.0/24
- 172.16.0.0/12 - 172.16.0.0/12
- 127.0.0.1 - 127.0.0.1
proxy: proxy:
default_role: viewer default_role: viewer
header_map: header_map:
user: Remote-User user: Remote-User
role: Remote-Role role: Remote-Role
mqtt: mqtt:
enabled: true enabled: true
host: 192.168.88.39 host: 192.168.88.39
user: mqtt-user user: mqtt-user
password: jogiocsi password: jogiocsi
# go2rtc stream layout:
#
# ALL cameras use H.265 (HEVC) on the main stream. Chrome/Firefox cannot play
# H.265 via MSE, so each camera has two go2rtc streams:
#
# camera_h265 = native H.265 from camera (stable go2rtc native RTSP connection)
# → used by Frigate ffmpeg for RECORDING (stream copy, keeps H.265 quality)
# camera = H.264 transcoded via "ffmpeg:camera_h265#video=h264"
# ffmpeg reads from go2rtc's localhost re-stream (not directly from camera)
# → used by Frigate for LIVE VIEW in browser (Chrome can play H.264)
# → reading from localhost avoids EOF crashes seen with direct camera connections
#
# All cameras:
# camera_sub = sub-stream → used for DETECTION only (low-res, efficient)
go2rtc: go2rtc:
webrtc:
candidates:
- 192.168.88.41:8555
- stun:8555
ffmpeg:
bin: /usr/lib/ffmpeg/7.0/bin/ffmpeg
# Uses your GTX 1050 Ti to transcode H.265 to browser/Linux-friendly H.264
h264: -c:v h264_nvenc -preset p1 -tune ll -b:v 2M -maxrate 2M -bufsize 4M
streams: streams:
# --- Native H.265 connections (stable, used for recording) --- # --- Native H.265 connections (stable ingest from cameras) ---
front_driveway_h265: front_driveway_h265:
- rtsp://admin:Jogiocsi1211@192.168.88.105:554/h264Preview_01_main - rtsp://admin:Jogiocsi1211@192.168.88.105:554/h264Preview_01_main
front_right_h265: front_right_h265:
@@ -54,23 +53,36 @@ go2rtc:
- rtsp://admin:Jogiocsi1211@192.168.88.104:554/h264Preview_01_main - rtsp://admin:Jogiocsi1211@192.168.88.104:554/h264Preview_01_main
shop_h265: shop_h265:
- rtsp://admin:Jogiocsi1211@192.168.88.103:554/h264Preview_01_main - rtsp://admin:Jogiocsi1211@192.168.88.103:554/h264Preview_01_main
# --- H.264 transcoded (browser-compatible live view) ---
# ffmpeg reads from go2rtc's localhost re-stream, not directly from camera.
# This avoids the EOF crashes seen when ffmpeg connects directly to Reolink cameras.
front_driveway:
- "ffmpeg:front_driveway_h265#video=h264"
front_right:
- "ffmpeg:front_right_h265#video=h264"
deck:
- "ffmpeg:deck_h265#video=h264"
back_yard:
- "ffmpeg:back_yard_h265#video=h264"
front_yard:
- "ffmpeg:front_yard_h265#video=h264"
shop:
- "ffmpeg:shop_h265#video=h264"
# --- Sub (low-resolution) streams for detection only --- # --- H.264 transcoded streams (Live view & Linux browser-compatible playback) ---
# --- Fully stabilized pipelines under go2rtc -> streams ---
front_driveway:
- "exec:/usr/lib/ffmpeg/7.0/bin/ffmpeg -hide_banner -v error -hwaccel cuvid -hwaccel_output_format cuda -c:v hevc_cuvid -resize 3840x1080 -rtsp_transport tcp -i rtsp://127.0.0.1:8554/front_driveway_h265 -c:v h264_nvenc -preset p1 -tune ll -b:v 6M -maxrate 6M -bufsize 12M -g 40 -c:a copy -rtsp_transport tcp -f rtsp {{output}}"
- "ffmpeg:front_driveway#audio=opus"
- "onvif://admin:Jogiocsi1211@192.168.88.105:8000"
front_right:
- rtsp://127.0.0.1:8554/front_right_h265
- "ffmpeg:front_right#audio=opus"
- "onvif://admin:Jogiocsi1211@192.168.88.100:8000"
deck:
- rtsp://127.0.0.1:8554/deck_h265
- "ffmpeg:deck#audio=opus"
- "onvif://admin:Jogiocsi1211@192.168.88.101:8000"
back_yard:
- rtsp://127.0.0.1:8554/back_yard_h265
- "ffmpeg:back_yard#audio=opus"
- "onvif://admin:Jogiocsi1211@192.168.88.102:8000"
front_yard:
- rtsp://127.0.0.1:8554/front_yard_h265
- "ffmpeg:front_yard#audio=opus"
- "onvif://admin:Jogiocsi1211@192.168.88.104:8000"
shop:
- rtsp://127.0.0.1:8554/shop_h265
- "ffmpeg:shop#audio=opus"
- "onvif://admin:Jogiocsi1211@192.168.88.103:8000"
# --- Sub streams for object detection ---
front_driveway_sub: front_driveway_sub:
- rtsp://admin:Jogiocsi1211@192.168.88.105:554/h264Preview_01_sub - rtsp://admin:Jogiocsi1211@192.168.88.105:554/h264Preview_01_sub
front_yard_sub: front_yard_sub:
@@ -85,7 +97,11 @@ go2rtc:
- rtsp://admin:Jogiocsi1211@192.168.88.103:554/h264Preview_01_sub - rtsp://admin:Jogiocsi1211@192.168.88.103:554/h264Preview_01_sub
ffmpeg: ffmpeg:
hwaccel_args: preset-nvidia-h264 hwaccel_args: preset-nvidia
global_args:
- -threads
- '2' # Cap each ffmpeg process to 2 CPU threads — prevents 12+ processes from
# competing across both NUMA nodes. GPU handles the heavy lifting anyway.
record: record:
enabled: true enabled: true
@@ -127,36 +143,57 @@ lpr:
model_size: small model_size: small
known_plates: known_plates:
Joe: Joe:
- "ABC1234" - ABC1234
Cynthia: Cynthia:
- "ABC4567" - ABC4567
Wesley: Wesley:
- "XYZ9876" - XYZ9876
replace_rules: replace_rules:
- pattern: "-" - pattern: '-'
replacement: "" replacement: ''
- pattern: " " - pattern: ' '
replacement: "" replacement: ''
cameras: cameras:
front_driveway: front_driveway:
enabled: true enabled: true
ui: ui:
order: 1 order: 1
live:
streams:
High (Transcode): front_driveway
Low (Detect): front_driveway_sub
ffmpeg: ffmpeg:
output_args:
record: -vf scale_cuda=3840:1080 -f segment -segment_time 10
-segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v h264_nvenc
-preset p1 -b:v 4M -maxrate 4M -bufsize 8M -c:a aac -b:a 64k -ar 16000
inputs: inputs:
# Sub stream → detect only (low-res, efficient)
- path: rtsp://127.0.0.1:8554/front_driveway_sub - path: rtsp://127.0.0.1:8554/front_driveway_sub
roles: [detect] roles: [detect]
# Native H.265 stream → record (best quality, stream copy)
- path: rtsp://127.0.0.1:8554/front_driveway_h265 - path: rtsp://127.0.0.1:8554/front_driveway_h265
roles: [record] roles: [record]
input_args:
- -hwaccel
- cuda
- -hwaccel_output_format
- cuda
- -avoid_negative_ts
- make_zero
- -fflags
- +genpts+discardcorrupt
- -rtsp_transport
- tcp
- -timeout
- '10000000'
- -use_wallclock_as_timestamps
- '1'
detect: detect:
width: 1536 width: 1536
height: 432 height: 432
fps: 5 fps: 5
objects: objects:
track: [person, car, dog, cat, license_plate] track: [person, car, dog, cat]
notifications: notifications:
enabled: true enabled: true
zones: zones:
@@ -172,11 +209,16 @@ cameras:
enabled: true enabled: true
ui: ui:
order: 2 order: 2
live:
streams:
High (4K Native): front_yard
Low (Detect): front_yard_sub
ffmpeg: ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs: inputs:
- path: rtsp://127.0.0.1:8554/front_yard_sub - path: rtsp://127.0.0.1:8554/front_yard_sub
roles: [detect] roles: [detect]
# Native H.265 stream → record (best quality, stream copy)
- path: rtsp://127.0.0.1:8554/front_yard_h265 - path: rtsp://127.0.0.1:8554/front_yard_h265
roles: [record] roles: [record]
detect: detect:
@@ -192,7 +234,13 @@ cameras:
enabled: true enabled: true
ui: ui:
order: 6 order: 6
live:
streams:
High (Native): front_right
Low (Detect): front_right_sub
ffmpeg: ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs: inputs:
- path: rtsp://127.0.0.1:8554/front_right_sub - path: rtsp://127.0.0.1:8554/front_right_sub
roles: [detect] roles: [detect]
@@ -213,7 +261,13 @@ cameras:
enabled: true enabled: true
ui: ui:
order: 4 order: 4
live:
streams:
High (4K Native): deck
Low (Detect): deck_sub
ffmpeg: ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs: inputs:
- path: rtsp://127.0.0.1:8554/deck_sub - path: rtsp://127.0.0.1:8554/deck_sub
roles: [detect] roles: [detect]
@@ -236,7 +290,13 @@ cameras:
enabled: true enabled: true
ui: ui:
order: 5 order: 5
live:
streams:
High (4K Native): back_yard
Low (Detect): back_yard_sub
ffmpeg: ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs: inputs:
- path: rtsp://127.0.0.1:8554/back_yard_sub - path: rtsp://127.0.0.1:8554/back_yard_sub
roles: [detect] roles: [detect]
@@ -259,11 +319,16 @@ cameras:
enabled: true enabled: true
ui: ui:
order: 3 order: 3
live:
streams:
High (4K Native): shop
Low (Detect): shop_sub
ffmpeg: ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs: inputs:
- path: rtsp://127.0.0.1:8554/shop_sub - path: rtsp://127.0.0.1:8554/shop_sub
roles: [detect] roles: [detect]
# Native H.265 stream → record (best quality, stream copy)
- path: rtsp://127.0.0.1:8554/shop_h265 - path: rtsp://127.0.0.1:8554/shop_h265
roles: [record] roles: [record]
detect: detect:
@@ -280,3 +345,12 @@ cameras:
enabled: true enabled: true
version: 0.17-0 version: 0.17-0
semantic_search:
enabled: false
model_size: small
face_recognition:
enabled: true
model_size: small
classification:
bird:
enabled: true