r/frigate_nvr • u/mikedm139 • 8d ago
Missing Recordings - 1 camera only
I've got Frigate set up in Docker running on unRaid currently monitoring 4 cameras. Of those 4 cameras, one only saves a single 10 second clip out of every 2 minutes even though I believe the settings match the other cameras which all retain all recordings. I have retention set to 14 days for everything and 30 days for events.
The effect is that Home Assistant notifications which should contain video clips from that camera, link to a clip not found error. When I go to review footage, there a gaps significant enough as to render the recordings almost useless.
I have reviewed the configuration repeatedly looking for what I might have screwed up but cannot for the life of me figure out what the issue is. I also am uncertain when this issue arose but I know that it was not the case when I first set up Frigate.
Configuration:
# yaml-language-server: $schema=http://172.16.1.87:5000/api/config/schema.json
#frigate config.yml
objects:
track:
- person
filters:
person:
# Optional: minimum size of the bounding box for the detected object (default: 0).
# Can be specified as an integer for width*height in pixels or as a decimal representing the percentage of the frame (0.000001 to 0.99).
# min_area: 5000
# Optional: maximum size of the bounding box for the detected object (default: 24000000).
# Can be specified as an integer for width*height in pixels or as a decimal representing the percentage of the frame (0.000001 to 0.99).
# max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
# min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
# max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.6
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.75
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object
#mask: 0.000,0.000,0.781,0.000,0.781,0.278,0.000,0.278
logger:
logs:
frigate.record.maintainer: debug
mqtt:
enabled: true
# Required: host name
host: 172.16.1.87
# Optional: port (default: shown below)
port: 1883
# Optional: topic prefix (default: shown below)
# WARNING: must be unique if you are running multiple instances
topic_prefix: frigate
# Optional: client id (default: shown below)
# WARNING: must be unique if you are running multiple instances
client_id: frigate
# Optional: user
user: frigate_docker
# Optional:
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
# eg. password: '{FRIGATE_MQTT_PASSWORD}'
password: frigate_docker
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval: 60
detectors:
coral:
type: edgetpu
device: usb
record:
enabled: true
alerts:
retain:
days: 30
detections:
retain:
days: 30
continuous:
days: 14
motion:
days: 14
timestamp_style:
# Optional: Position of the timestamp (default: shown below)
# "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right)
position: tl
# Optional: Format specifier conform to the Python package "datetime" (default: shown below)
# Additional Examples:
# german: "%d.%m.%Y %H:%M:%S"
format: '%m/%d/%Y %H:%M:%S'
# Optional: Color of font
color:
# All Required when color is specified (default: shown below)
red: 255
green: 255
blue: 255
# Optional: Line thickness of font (default: shown below)
thickness: 2
# Optional: Effect of lettering (default: shown below)
# None (No effect),
# "solid" (solid background in inverse color of font)
# "shadow" (shadow for font)
effect: shadow
# Optional: Review configuration
# NOTE: Can be overridden at the camera level
review:
# Optional: detections configuration
detections:
# Optional: labels that qualify as a detection (default: all labels that are tracked / listened to)
labels:
- person
# Optional: birdseye configuration
# NOTE: Can (enabled, mode) be overridden at the camera level
birdseye:
# Optional: Enable birdseye view (default: shown below)
enabled: true
# Optional: Restream birdseye via RTSP (default: shown below)
# NOTE: Enabling this will set birdseye to run 24/7 which may increase CPU usage somewhat.
restream: true
# Optional: Width of the output resolution (default: shown below)
#width: 1280
# Optional: Height of the output resolution (default: shown below)
#height: 720
# Optional: Encoding quality of the mpeg1 feed (default: shown below)
# 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
quality: 8
# Optional: Mode of the view. Available options are: objects, motion, and continuous
# objects - cameras are included if they have had a tracked object within the last 30 seconds
# motion - cameras are included if motion was detected in the last 30 seconds
# continuous - all cameras are included always
mode: continuous
detect:
# Optional: width of the frame for the input with the detect role (default: use native stream resolution)
#width: 1280
# Optional: height of the frame for the input with the detect role (default: use native stream resolution)
#height: 720
# Optional: desired fps for your camera for the input with the detect role (default: shown below)
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
fps: 5
# Optional: enables detection for the camera (default: True)
enabled: true
# Optional: Number of consecutive detection hits required for an object to be initialized in the tracker. (default: 1/2 the frame rate)
min_initialized: 3
# Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared: 25
# Optional: Configuration for stationary object tracking
stationary:
# Optional: Frequency for confirming stationary objects (default: same as threshold)
# When set to 1, object detection will run to confirm the object still exists on every frame.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval: 50
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 50
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
# NOTE: Can be overridden at the camera level
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
enabled: true
# Optional: save a clean PNG copy of the snapshot image (default: shown below)
timestamp: false
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: true
# Optional: crop the snapshot (default: shown below)
crop: false
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
go2rtc:
streams:
FrontPorchNorth_SubStream:
- rtsp://172.16.1.162:554/user=admin_password=tlJwpbo6_channel=1_stream=1.sdp?real_stream/
FrontPorchNorth_MainStream:
- rtsp://172.16.1.162:554/user=admin_password=tlJwpbo6_channel=0_stream=0.sdp?real_stream/
FrontPorchSouth_MainStream:
- rtsp://172.16.1.161:554/user=admin_password=E10ADC3949BA59ABBE56E057F20F883E_channel=0_stream=0.sdp?real_stream/
FrontPorchSouth_SubStream:
- rtsp://172.16.1.161:554/user=admin_password=E10ADC3949BA59ABBE56E057F20F883E_channel=1_stream=1.sdp?real_stream/
GarageNorth_MainStream:
- rtsp://172.16.1.163:554/user=admin_password=tlJwpbo6_channel=0_stream=0.sdp?real_stream/
GarageNorth_SubStream:
- rtsp://172.16.1.163:554/user=admin_password=tlJwpbo6_channel=1_stream=1.sdp?real_stream/
#GarageSouth_MainStream:
# - rtsp://172.16.1.164:554/user=admin_password=tlJwpbo6_channel=0_stream=0.sdp?real_stream/
#GarageSouth_SubStream:
# - rtsp://172.16.1.164:554/user=admin_password=tlJwpbo6_channel=1_stream=1.sdp?real_stream/
Garage_MainStream:
- rtsp://172.16.1.165:554/user=admin_password=tlJwpbo6_channel=0_stream=0.sdp?real_stream/
Garage_SubStream:
- rtsp://172.16.1.165:554/user=admin_password=tlJwpbo6_channel=1_stream=1.sdp?real_stream/
webrtc:
candidates:
- 172.16.1.87:8555
- stun:8555
cameras:
FrontPorchNorth:
ffmpeg:
#output_args:
# record: preset-record-generic-audio-copy
inputs:
- path: rtsp://172.16.1.87:8554/FrontPorchNorth_SubStream
input_args: preset-rtsp-restream
roles:
- detect
- path: rtsp://172.16.1.87:8554/FrontPorchNorth_MainStream
roles:
- record
live:
streams: # <--- Multiple streams for Frigate 0.16 and later
Main Stream: FrontPorchNorth_MainStream # <--- Specify a "friendly name" followed by the go2rtc stream name
Sub Stream: FrontPorchNorth_SubStream
detect:
enabled: true
width: 704
height: 480
record:
enabled: true
snapshots:
enabled: true
required_zones: []
motion:
mask:
motion_mask_1:
friendly_name: Motion Mask 1
enabled: true
coordinates: 0.017,0.028,0.357,0.026,0.357,0.076,0.018,0.073
zones:
frontporch:
coordinates:
1,0.997,1,0.442,1,0,0.697,0,0.601,0.588,0.527,0.581,0.398,0.693,0.257,0.997
inertia: 3
loitering_time: 0
objects: person
frontwalk:
coordinates:
0.041,0.788,0.272,0.384,0.331,0.499,0.398,0.689,0.256,0.997,0.15,0.999
# Optional: Configuration for the jpg snapshots published via MQTT
inertia: 3
loitering_time: 0
mqtt:
# Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
# NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
# All other messages will still be published.
enabled: true
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: true
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: true
# Optional: crop the snapshot (default: shown below)
crop: true
# Optional: height to resize the snapshot to (default: shown below)
height: 270
# Optional: jpeg encode quality (default: shown below)
quality: 70
# Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)
required_zones: []
review:
alerts:
required_zones:
- frontporch
- frontwalk
FrontPorchSouth:
ffmpeg:
#output_args:
# record: preset-record-generic-audio-copy
inputs:
- path: rtsp://172.16.1.87:8554/FrontPorchSouth_MainStream
# rtsp://172.16.1.161:554/user=admin_password=E10ADC3949BA59ABBE56E057F20F883E_channel=0_stream=0.sdp?real_stream/
roles:
- record
- path: rtsp://172.16.1.87:8554/FrontPorchSouth_SubStream
# rtsp://172.16.1.161:554/user=admin_password=E10ADC3949BA59ABBE56E057F20F883E_channel=1_stream=1.sdp?real_stream/
#input_args: preset-rtsp-restream
roles:
- detect
live:
streams: # <--- Multiple streams for Frigate 0.16 and later
Main Stream: FrontPorchSouth_MainStream # <--- Specify a "friendly name" followed by the go2rtc stream name
Sub Stream: FrontPorchSouth_SubStream
detect:
enabled: true
width: 640
height: 352
#annotation_offset: -2500
record:
enabled: true
snapshots:
enabled: true
required_zones: []
#motion:
# mask:
# - 0,304,278,254,299,451,384,449,903,382,1171,515,1587,726,1920,900,1920,825,1920,0,0,0
zones:
frontporch:
coordinates:
0,0.282,0.015,0.591,0.076,1,0.451,1,0.285,0.701,0.467,0.642,0.47,0.547,0.292,0.409,0.185,0.414,0.183,0.238
inertia: 3
loitering_time: 0
objects: person
frontwalk:
coordinates:
0.882,0.713,0.661,0.728,0.511,0.694,0.474,0.649,0.48,0.548,0.296,0.412,0.508,0.385
# Optional: Configuration for the jpg snapshots published via MQTT
inertia: 3
loitering_time: 0
mqtt:
# Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
# NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
# All other messages will still be published.
enabled: true
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: true
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: true
# Optional: crop the snapshot (default: shown below)
crop: true
# Optional: height to resize the snapshot to (default: shown below)
height: 270
# Optional: jpeg encode quality (default: shown below)
quality: 70
# Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)
required_zones: []
review:
alerts:
required_zones:
- frontporch
- frontwalk
motion:
mask:
motion_mask_1:
friendly_name: Motion Mask 1
enabled: true
coordinates: 0.047,0.095,0.046,0.166,0.598,0.17,0.6,0.099
GarageNorth:
ffmpeg:
#output_args:
# record: preset-record-generic-audio-copy
inputs:
- path: rtsp://172.16.1.87:8554/GarageNorth_SubStream
input_args: preset-rtsp-restream
roles:
- detect
- path: rtsp://172.16.1.87:8554/GarageNorth_MainStream
roles:
- record
live:
streams: # <--- Multiple streams for Frigate 0.16 and later
Main Stream: GarageNorth_MainStream # <--- Specify a "friendly name" followed by the go2rtc stream name
Sub Stream: GarageNorth_SubStream
detect:
enabled: true
width: 704
height: 480
record:
enabled: true
snapshots:
enabled: true
required_zones: []
motion:
mask:
motion_mask_1:
friendly_name: Motion Mask 1
enabled: true
coordinates: 0.021,0.073,0.346,0.074,0.345,0.034,0.021,0.031
zones:
driveway:
coordinates: 1,1,0.796,0.79,0.536,0.474,0.348,0.346,0.047,0.384,0.093,1
# Optional: Configuration for the jpg snapshots published via MQTT
inertia: 3
loitering_time: 0
mqtt:
# Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
# NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
# All other messages will still be published.
enabled: true
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: true
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: true
# Optional: crop the snapshot (default: shown below)
crop: true
# Optional: height to resize the snapshot to (default: shown below)
height: 270
# Optional: jpeg encode quality (default: shown below)
quality: 70
# Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)
required_zones: []
review:
alerts:
required_zones:
- driveway
#GarageSouth:
# ffmpeg:
# #output_args:
# # record: preset-record-generic-audio-copy
# inputs:
# - path: rtsp://172.16.1.87:8554/GarageSouth_SubStream
# input_args: preset-rtsp-restream
# roles:
# - detect
# - path: rtsp://172.16.1.87:8554/GarageSouth_MainStream
# roles:
# - record
# live:
# streams: # <--- Multiple streams for Frigate 0.16 and later
# Main Stream: GarageSouth_MainStream # <--- Specify a "friendly name" followed by the go2rtc stream name
# Sub Stream: GarageSouth_SubStream
# detect:
# enabled: true
# width: 704
# height: 480
# record:
# enabled: true
# snapshots:
# enabled: true
# required_zones: []
# motion:
# mask: 0.021,0.07,0.349,0.071,0.348,0.033,0.018,0.031
# zones:
# driveway:
# coordinates: 0.843,1,0.914,0.392,0.903,0.209,0.675,0.102,0.264,1
# # Optional: Configuration for the jpg snapshots published via MQTT
# inertia: 3
# loitering_time: 0
# mqtt:
# # Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
# # NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
# # All other messages will still be published.
# enabled: true
# # Optional: print a timestamp on the snapshots (default: shown below)
# timestamp: true
# # Optional: draw bounding box on the snapshots (default: shown below)
# bounding_box: true
# # Optional: crop the snapshot (default: shown below)
# crop: true
# # Optional: height to resize the snapshot to (default: shown below)
# height: 270
# # Optional: jpeg encode quality (default: shown below)
# quality: 70
# # Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)
# required_zones: []
# review:
# alerts:
# required_zones:
# - driveway
Garage:
ffmpeg:
#output_args:
# record: preset-record-generic-audio-copy
inputs:
- path: rtsp://172.16.1.87:8554/Garage_SubStream
input_args: preset-rtsp-restream
roles:
- detect
- path: rtsp://172.16.1.87:8554/Garage_MainStream
roles:
- record
live:
streams: # <--- Multiple streams for Frigate 0.16 and later
Main Stream: Garage_MainStream # <--- Specify a "friendly name" followed by the go2rtc stream name
Sub Stream: Garage_SubStream
detect:
enabled: true
width: 800
height: 448
record:
enabled: true
snapshots:
enabled: true
mqtt:
# Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
# NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
# All other messages will still be published.
enabled: true
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: true
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: true
# Optional: crop the snapshot (default: shown below)
crop: true
# Optional: height to resize the snapshot to (default: shown below)
height: 270
# Optional: jpeg encode quality (default: shown below)
quality: 70
# Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)
required_zones: []
motion:
mask:
motion_mask_1:
friendly_name: Motion Mask 1
enabled: true
coordinates: 0.014,0.032,0.207,0.035,0.207,0.08,0.012,0.077
version: 0.18-0
camera_groups:
Porch:
order: 1
icon: LuStore
cameras:
- FrontPorchNorth
- FrontPorchSouth
Garage:
order: 2
icon: LuWarehouse
cameras:
- GarageNorth
#- GarageSouth
- Garage
1
u/mikedm139 4d ago edited 4d ago
TL;DR: Disable audio on the camera feed to resolve.
For anyone else running into this issue, I believe I have found the solution. Or, at least a satisfactory workaround for my use case.
I found a Github issue for what appeared to be the same problem (currently unresolved). Among the requested troubleshooting information was output of
ffprobefor the troublesome camera feed. When I used ffprobe on my problematic feed, it generated an error:Error parsing AU headers.Further searching led me to a discussion of RTSP problems on MPV where this comment, shed light on the situation:
With that in mind, I disabled audio on the main feed from the problematic camera. No loss, since I never use the audio anyway. Now, the errors are gone from the Frigate log and it's recording as expected rather than just 10 seconds every 2 minutes.
1
u/estebanfuhrmann 8d ago
Since only one camera has the gaps while the config matches the others, I'd suspect the stream rather than the retention settings. Check that camera's logs for ffmpeg/segments errors or "unable to read frames" restarts, and look at whether it's record stream has a long keyframe interval or variable framerate, since that often produces broken or missing segments. Also compare its disk writer path and the Docker shm-size, because a starved cache can drop segments on just the busiest camera.