frigate: [Config Support]: error occured attempting to maintain recording cache
Describe the problem you are having
After upgrading to the latest version 0.12 I’m having a whole lot of issues regarding the cache and timestamps etc… I’ve tried with go2rtc and also just sending the rtsp feed straight to the recorder since it’s the only thing accessing it I don’t really need to restream.
I’m just really confused and have no idea what has gone wrong, was working great on the version before.
Version
0.12
Frigate config file
mqtt:
host: 192.168.0.65
user: mqtt
password: xxxxxxxxxxx
detectors:
coral:
type: edgetpu
device: usb
ffmpeg:
global_args:
-hide_banner
-loglevel warning
input_args: preset-rtsp-generic
output_args:
# Optional: output args for detect streams (default: shown below)
detect: -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record: preset-record-generic
hwaccel_args: preset-vaapi
record:
enabled: true
events:
retain:
default: 10
snapshots:
retain:
default: 10
objects:
person: 15
detect:
width: 640
height: 480
fps: 7
motion:
improve_contrast: True
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
- car
- dog
- cat
#go2rtc:
# streams:
# driveway:
# - rtsp://xxxxxxxxxxxxx@192.168.0.187:554/h264Preview_01_main
# driveway_sub:
# - rtsp://xxxxxxxxxxxxxx@192.168.0.76:554/h264Preview_01_sub
# frontyard:
# - rtsp://xxxxxxxxxx@192.168.0.76:554/h264Preview_01_main
# frontyard_sub:
# - rtsp://xxxxxxxxxxxx@192.168.0.76:554/h264Preview_01_sub
# backyard:
# - rtsp://xxxxxxxxxxxxxx@192.168.0.11:554/stream1
# backyard_sub:
# - rtsp://xxxxxxxxxxxxx@192.168.0.11:554/stream2
# backdoor:
# - rtsp://xxxxxxxxxxx@192.168.0.12:554/stream1
# backdoor_sub:
# - rtsp://xxxxxxxxxxx@192.168.0.12:554/stream2
cameras:
driveway:
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxxx@192.168.0.187:554/h264Preview_01_main
# - path: rtsp://127.0.0.1:8554/driveway
# input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://xxxxxxxxxxxxx@192.168.0.187:554/h264Preview_01_sub
# - path: rtsp://127.0.0.1:8554/driveway_sub
# input_args: preset-rtsp-restream
roles:
- detect
frontyard:
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxxxxxx@192.168.0.76:554/h264Preview_01_main
# - path: rtsp://127.0.0.1:8554/frontyard
# input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://xxxxxxxxxx@192.168.0.76:554/h264Preview_01_sub
# - path: rtsp://127.0.0.1:8554/frontyard_sub
# input_args: preset-rtsp-restream
roles:
- detect
backyard:
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxxxx@192.168.0.11:554/stream1
# - path: rtsp://127.0.0.1:8554/backyard
# input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://xxxxxxxxxxx@192.168.0.11:554/stream2
# - path: rtsp://127.0.0.1:8554/backyard_sub
# input_args: preset-rtsp-restream
roles:
- detect
backdoor:
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxxxx@192.168.0.12:554/stream1
# - path: rtsp://127.0.0.1:8554/backdoor
# input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://xxxxxxxx@192.168.0.12:554/stream2
# - path: rtsp://127.0.0.1:8554/backdoor_sub
# input_args: preset-rtsp-restream
roles:
- detect
Relevant log output
2023-04-23 16:51:50.830236614 [INFO] Starting Frigate...
2023-04-23 16:51:52.217538412 [2023-04-23 16:51:52] frigate.app INFO : Starting Frigate (0.12.0-da3e197)
2023-04-23 16:51:52.251650173 [2023-04-23 16:51:52] frigate.app INFO : Creating directory: /media/frigate/recordings
2023-04-23 16:51:52.251903393 [2023-04-23 16:51:52] frigate.app INFO : Creating directory: /media/frigate/clips
2023-04-23 16:51:52.252136547 [2023-04-23 16:51:52] frigate.app INFO : Creating directory: /tmp/cache
2023-04-23 16:51:52.254545552 [2023-04-23 16:51:52] peewee_migrate INFO : Starting migrations
2023-04-23 16:51:52.270233985 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "001_create_events_table"
2023-04-23 16:51:52.270344441 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE TABLE IF NOT EXISTS "event" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "label" VARCHAR(20) NOT NULL, "camera" VARCHAR(20) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "top_score" REAL NOT NULL, "false_positive" INTEGER NOT NULL, "zones" JSON NOT NULL, "thumbnail" TEXT NOT NULL)',)
2023-04-23 16:51:52.270702363 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE INDEX IF NOT EXISTS "event_label" ON "event" ("label")',)
2023-04-23 16:51:52.270882680 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE INDEX IF NOT EXISTS "event_camera" ON "event" ("camera")',)
2023-04-23 16:51:52.271462862 [2023-04-23 16:51:52] peewee_migrate INFO : Done 001_create_events_table
2023-04-23 16:51:52.283540775 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "002_add_clip_snapshot"
2023-04-23 16:51:52.283679645 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'has_clip', <BooleanField: Event.has_clip>)
2023-04-23 16:51:52.286374880 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'has_snapshot', <BooleanField: Event.has_snapshot>)
2023-04-23 16:51:52.288578690 [2023-04-23 16:51:52] peewee_migrate INFO : Done 002_add_clip_snapshot
2023-04-23 16:51:52.300461279 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "003_create_recordings_table"
2023-04-23 16:51:52.300636178 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE TABLE IF NOT EXISTS "recordings" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "camera" VARCHAR(20) NOT NULL, "path" VARCHAR(255) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "duration" REAL NOT NULL)',)
2023-04-23 16:51:52.300875462 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE INDEX IF NOT EXISTS "recordings_camera" ON "recordings" ("camera")',)
2023-04-23 16:51:52.301238618 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE UNIQUE INDEX IF NOT EXISTS "recordings_path" ON "recordings" ("path")',)
2023-04-23 16:51:52.301567099 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE INDEX IF NOT EXISTS "recordings_start_time_end_time" ON "recordings" (start_time, end_time)',)
2023-04-23 16:51:52.302153635 [2023-04-23 16:51:52] peewee_migrate INFO : Done 003_create_recordings_table
2023-04-23 16:51:52.314554569 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "004_add_bbox_region_area"
2023-04-23 16:51:52.314633233 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'region', <JSONField: Event.region>)
2023-04-23 16:51:52.316820608 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'box', <JSONField: Event.box>)
2023-04-23 16:51:52.318759561 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'area', <IntegerField: Event.area>)
2023-04-23 16:51:52.320753911 [2023-04-23 16:51:52] peewee_migrate INFO : Done 004_add_bbox_region_area
2023-04-23 16:51:52.332700399 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "005_make_end_time_nullable"
2023-04-23 16:51:52.332799210 [2023-04-23 16:51:52] peewee_migrate INFO : drop_not_null ('event', 'end_time')
2023-04-23 16:51:52.334936111 [2023-04-23 16:51:52] peewee_migrate INFO : Done 005_make_end_time_nullable
2023-04-23 16:51:52.346208079 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "006_add_motion_active_objects"
2023-04-23 16:51:52.346393233 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('recordings', 'objects', <IntegerField: Recordings.objects>)
2023-04-23 16:51:52.346886055 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('recordings', 'motion', <IntegerField: Recordings.motion>)
2023-04-23 16:51:52.347504625 [2023-04-23 16:51:52] peewee_migrate INFO : Done 006_add_motion_active_objects
2023-04-23 16:51:52.358439367 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "007_add_retain_indefinitely"
2023-04-23 16:51:52.358532656 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'retain_indefinitely', <BooleanField: Event.retain_indefinitely>)
2023-04-23 16:51:52.360878177 [2023-04-23 16:51:52] peewee_migrate INFO : Done 007_add_retain_indefinitely
2023-04-23 16:51:52.371671908 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "008_add_sub_label"
2023-04-23 16:51:52.371762034 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'sub_label', <CharField: Event.sub_label>)
2023-04-23 16:51:52.372430869 [2023-04-23 16:51:52] peewee_migrate INFO : Done 008_add_sub_label
2023-04-23 16:51:52.383249333 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "009_add_object_filter_ratio"
2023-04-23 16:51:52.383340304 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'ratio', <FloatField: Event.ratio>)
2023-04-23 16:51:52.385654963 [2023-04-23 16:51:52] peewee_migrate INFO : Done 009_add_object_filter_ratio
2023-04-23 16:51:52.396755817 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "010_add_plus_image_id"
2023-04-23 16:51:52.396861357 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('event', 'plus_id', <CharField: Event.plus_id>)
2023-04-23 16:51:52.397515026 [2023-04-23 16:51:52] peewee_migrate INFO : Done 010_add_plus_image_id
2023-04-23 16:51:52.407954843 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "011_update_indexes"
2023-04-23 16:51:52.408191377 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE INDEX "event_start_time_end_time" ON "event" ("start_time" DESC, "end_time" DESC)',)
2023-04-23 16:51:52.408492743 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('DROP INDEX recordings_start_time_end_time',)
2023-04-23 16:51:52.408942458 [2023-04-23 16:51:52] peewee_migrate INFO : sql ('CREATE INDEX "recordings_end_time_start_time" ON "recordings" ("end_time" DESC, "start_time" DESC)',)
2023-04-23 16:51:52.409568363 [2023-04-23 16:51:52] peewee_migrate INFO : Done 011_update_indexes
2023-04-23 16:51:52.421062248 [2023-04-23 16:51:52] peewee_migrate INFO : Migrate "012_add_segment_size"
2023-04-23 16:51:52.421178571 [2023-04-23 16:51:52] peewee_migrate INFO : add_column ('recordings', 'segment_size', <FloatField: Recordings.segment_size>)
2023-04-23 16:51:52.423913417 [2023-04-23 16:51:52] peewee_migrate INFO : Done 012_add_segment_size
2023-04-23 16:51:52.457337880 [2023-04-23 16:51:52] frigate.app INFO : Output process started: 291
2023-04-23 16:51:52.470938021 [2023-04-23 16:51:52] detector.coral INFO : Starting detection process: 290
2023-04-23 16:51:55.140210248 [2023-04-23 16:51:52] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2023-04-23 16:51:55.140213772 [2023-04-23 16:51:52] frigate.app INFO : Camera processor started for driveway: 294
2023-04-23 16:51:55.140215752 [2023-04-23 16:51:52] frigate.app INFO : Camera processor started for frontyard: 296
2023-04-23 16:51:55.140217563 [2023-04-23 16:51:52] frigate.app INFO : Camera processor started for backyard: 298
2023-04-23 16:51:55.140221681 [2023-04-23 16:51:52] frigate.app INFO : Camera processor started for backdoor: 299
2023-04-23 16:51:55.140234964 [2023-04-23 16:51:52] frigate.app INFO : Capture process started for driveway: 302
2023-04-23 16:51:55.140236985 [2023-04-23 16:51:52] frigate.app INFO : Capture process started for frontyard: 303
2023-04-23 16:51:55.140418376 [2023-04-23 16:51:52] frigate.app INFO : Capture process started for backyard: 304
2023-04-23 16:51:55.140420889 [2023-04-23 16:51:52] frigate.app INFO : Capture process started for backdoor: 309
2023-04-23 16:51:55.146193456 [2023-04-23 16:51:55] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2023-04-23 16:53:02.575402819 [2023-04-23 16:53:02] ffmpeg.driveway.record ERROR : [segment @ 0x5630de64be40] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
2023-04-23 16:53:02.575406389 [2023-04-23 16:53:02] ffmpeg.driveway.record ERROR : [rtsp @ 0x5630de62c040] CSeq 7 expected, 0 received.
2023-04-23 16:53:02.575890001 [2023-04-23 16:53:02] ffmpeg.driveway.record ERROR : Last message repeated 9 times
2023-04-23 16:53:02.575893303 [2023-04-23 16:53:02] ffmpeg.driveway.record ERROR : [NULL @ 0x5630de631500] missing picture in access unit with size 17304
2023-04-23 16:53:02.577202957 [2023-04-23 16:53:02] ffmpeg.driveway.record ERROR : rtsp://*:*@192.168.0.187:554/h264Preview_01_main: Connection timed out
2023-04-23 16:53:02.580265587 [2023-04-23 16:53:02] watchdog.driveway INFO : Terminating the existing ffmpeg process...
2023-04-23 16:53:02.580483174 [2023-04-23 16:53:02] watchdog.driveway INFO : Waiting for ffmpeg to exit gracefully...
2023-04-23 16:53:12.583613514 [2023-04-23 16:53:12] ffmpeg.frontyard.record ERROR : [segment @ 0x556400c6a500] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
2023-04-23 16:53:12.587632190 [2023-04-23 16:53:12] watchdog.driveway INFO : No frames received from driveway in 20 seconds. Exiting ffmpeg...
2023-04-23 16:53:12.587636067 [2023-04-23 16:53:12] watchdog.driveway INFO : Waiting for ffmpeg to exit gracefully...
2023-04-23 16:53:12.587832587 [2023-04-23 16:53:12] ffmpeg.frontyard.record ERROR : rtsp://*:*@192.168.0.76:554/h264Preview_01_main: Connection timed out
2023-04-23 16:53:12.588022356 [2023-04-23 16:53:12] watchdog.frontyard INFO : Terminating the existing ffmpeg process...
2023-04-23 16:53:12.588242413 [2023-04-23 16:53:12] watchdog.frontyard INFO : Waiting for ffmpeg to exit gracefully...
2023-04-23 16:53:12.644559987 [2023-04-23 16:53:12] frigate.video ERROR : driveway: Unable to read frames from ffmpeg process.
2023-04-23 16:53:12.645305804 [2023-04-23 16:53:12] frigate.video ERROR : driveway: ffmpeg process is not running. exiting capture thread...
2023-04-23 16:53:17.769631673 [2023-04-23 16:53:17] frigate.record ERROR : Error occurred when attempting to maintain recording cache
2023-04-23 16:53:17.769731835 [2023-04-23 16:53:17] frigate.record ERROR : list index out of range
2023-04-23 16:53:22.646506569 [2023-04-23 16:53:22] watchdog.driveway ERROR : Ffmpeg process crashed unexpectedly for driveway.
2023-04-23 16:53:22.646681456 [2023-04-23 16:53:22] watchdog.driveway ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-04-23 16:53:22.646684087 [2023-04-23 16:53:22] ffmpeg.driveway.detect ERROR : rtsp://*:*@192.168.0.187:554/h264Preview_01_sub: Connection timed out
2023-04-23 16:53:22.683869835 [2023-04-23 16:53:22] frigate.record ERROR : Error occurred when attempting to maintain recording cache
2023-04-23 16:53:22.683971280 [2023-04-23 16:53:22] frigate.record ERROR : list index out of range
2023-04-23 16:53:27.907878403 [2023-04-23 16:53:27] frigate.record ERROR : Error occurred when attempting to maintain recording cache
2023-04-23 16:53:27.907930486 [2023-04-23 16:53:27] frigate.record ERROR : list index out of range
2023-04-23 16:53:32.592595259 [2023-04-23 16:53:32] watchdog.frontyard INFO : No frames received from frontyard in 20 seconds. Exiting ffmpeg...
2023-04-23 16:53:32.592762311 [2023-04-23 16:53:32] watchdog.frontyard INFO : Waiting for ffmpeg to exit gracefully...
2023-04-23 16:53:32.624325059 [2023-04-23 16:53:32] frigate.video ERROR : frontyard: Unable to read frames from ffmpeg process.
2023-04-23 16:53:32.624567559 [2023-04-23 16:53:32] frigate.video ERROR : frontyard: ffmpeg process is not running. exiting capture thread...
2023-04-23 16:53:32.687271475 [2023-04-23 16:53:32] frigate.record ERROR : Error occurred when attempting to maintain recording cache
2023-04-23 16:53:32.687394773 [2023-04-23 16:53:32] frigate.record ERROR : list index out of range
2023-04-23 16:53:37.771237275 [2023-04-23 16:53:37] frigate.record ERROR : Error occurred when attempting to maintain recording cache
2023-04-23 16:53:37.771411068 [2023-04-23 16:53:37] frigate.record ERROR : list index out of range
2023-04-23 16:53:42.626743874 [2023-04-23 16:53:42] watchdog.frontyard ERROR : Ffmpeg process crashed unexpectedly for frontyard.
2023-04-23 16:53:42.626748043 [2023-04-23 16:53:42] watchdog.frontyard ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-04-23 16:53:42.626750174 [2023-04-23 16:53:42] ffmpeg.frontyard.detect ERROR : rtsp://*:*@192.168.0.76:554/h264Preview_01_sub: Connection timed out
2023-04-23 16:53:42.687555519 [2023-04-23 16:53:42] frigate.record ERROR : Error occurred when attempting to maintain recording cache
2023-04-23 16:53:42.687657189 [2023-04-23 16:53:42] frigate.record ERROR : list index out of range
2023-04-23 16:57:12.578367913 [2023-04-23 16:57:12] ffmpeg.backdoor.record ERROR : [segment @ 0x560850c056c0] Non-monotonous DTS in output stream 0:0; previous: 862092, current: 862092; changing to 862093. This may result in incorrect timestamps in the output file.
2023-04-23 16:57:12.578450419 [2023-04-23 16:57:12] ffmpeg.backdoor.record ERROR : [segment @ 0x560850c056c0] Non-monotonous DTS in output stream 0:0; previous: 862093, current: 862093; changing to 862094. This may result in incorrect timestamps in the output file.
2023-04-23 16:57:12.578719289 [2023-04-23 16:57:12] ffmpeg.backdoor.record ERROR : [segment @ 0x560850c056c0] Non-monotonous DTS in output stream 0:0; previous: 862094, current: 862093; changing to 862095. This may result in incorrect timestamps in the output file.
Frigate stats
No response
Operating system
Proxmox
Install method
Docker Compose
Coral version
USB
Any other information that may be helpful
There is some code in my config I hashed out as I initially thought go2rtc was causing the problem.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 24
There was an issue somewhere on the go2rtc GitHub from memory it was a tp link tapo camera but an identical issue. I’m not sure if this was happening on the old version of frigate and I just didn’t know because the log wasn’t as easy to access so I didn’t check it.