Playing events from recordings fails, but works from events? [0.9.0 beta 2]
See original GitHub issueTwo of my six RLC-520A cameras throw errors every 10-20 seconds soon after startup, in both v8 and 9. Whilst I didn’t notice any issues within Frigate in 8, in 9 these two cameras won’t play anything from the Recordings interface - but will play the same Events from the Events interface. The other 4x cameras play Recordings and Events as expected.
Anyone seen this or have any ideas please?
All cameras have the same camera firmware and stream settings. I reset one of these cameras again this morning but no difference. Only Frigate config diff is that these two cameras also track ‘vehicle’ from my custom labelmap - but (not surprisingly) removing this didn’t stop the error.
v9 screenshot:
Frigate is amazing, thanks for all your work on it!
Versions of frigate 0.8.4-5043040 0.9.0-3340952
Config file Driveway throws error, Entrance does not. Other four cameras repeat this config, except for some object tracking differences
database:
path: /media/frigate/database/frigate.db
detectors:
coral:
type: edgetpu
device: usb
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
mqtt:
host: 192.168.1.5
port: 1883
user: user
password:
cameras:
Driveway:
ffmpeg:
inputs:
- path: rtmp://192.168.1.71/bcs/channel0_sub.bcs?channel=0&stream=0&user=admin&password={FRIGATE_RTSP_PASSWORD}
roles:
- detect
- path: rtmp://192.168.1.71/bcs/channel0_main.bcs?channel=1&stream=0&user=admin&password={FRIGATE_RTSP_PASSWORD}
roles:
- record
- rtmp
input_args:
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -rw_timeout
- '5000000'
- -f
- live_flv
detect:
width: 640
height: 480
fps: 7
motion:
mask:
- 222,469,222,447,417,447,417,469
objects:
track:
- person
- vehicle
- dog
record:
enabled: true
retain_days: 8
events:
enabled: true
pre_capture: 3
retain:
default: 8
snapshots:
retain:
default: 8
Entrance:
ffmpeg:
inputs:
- path: rtmp://192.168.1.72/bcs/channel0_sub.bcs?channel=0&stream=0&user=admin&password={FRIGATE_RTSP_PASSWORD}
roles:
- detect
- path: rtmp://192.168.1.72/bcs/channel0_main.bcs?channel=1&stream=0&user=admin&password={FRIGATE_RTSP_PASSWORD}
roles:
- record
- rtmp
input_args:
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -rw_timeout
- '5000000'
- -f
- live_flv
detect:
width: 640
height: 480
fps: 7
motion:
mask:
- 222,469,222,447,417,447,417,469
objects:
track:
- person
- dog
record:
enabled: true
retain_days: 8
events:
enabled: true
pre_capture: 3
retain:
default: 8
snapshots:
retain:
default: 8
labelmap.txt
0 person
1 bicycle
2 vehicle
3 vehicle
4 airplane
5 bus
6 train
7 vehicle
8 boat
9 ...etc.
Frigate container logs These errors are repeated every 10-20 seconds
[2021-08-20 08:37:53] ffmpeg.Balcony.record_rtmp ERROR : av_interleaved_write_frame(): Connection reset by peer,
[2021-08-20 08:37:53] ffmpeg.Balcony.record_rtmp ERROR : [flv @ 0x564814fe1cc0] Failed to update header with correct duration.,
[2021-08-20 08:37:53] ffmpeg.Balcony.record_rtmp ERROR : [flv @ 0x564814fe1cc0] Failed to update header with correct filesize.,
[2021-08-20 08:37:53] ffmpeg.Balcony.record_rtmp ERROR : Error writing trailer of rtmp://127.0.0.1/live/Balcony: Connection reset by peer,
[2021-08-20 08:37:53] watchdog.Balcony INFO : Terminating the existing ffmpeg process...,
[2021-08-20 08:37:53] watchdog.Balcony INFO : Waiting for ffmpeg to exit gracefully...,
[2021-08-20 08:37:54] ffmpeg.Driveway.record_rtmp ERROR : av_interleaved_write_frame(): Connection reset by peer,
[2021-08-20 08:37:54] ffmpeg.Driveway.record_rtmp ERROR : [flv @ 0x55ca8cc6e640] Failed to update header with correct duration.,
[2021-08-20 08:37:54] ffmpeg.Driveway.record_rtmp ERROR : [flv @ 0x55ca8cc6e640] Failed to update header with correct filesize.,
[2021-08-20 08:37:54] ffmpeg.Driveway.record_rtmp ERROR : Error writing trailer of rtmp://127.0.0.1/live/Driveway: Connection reset by peer,
[2021-08-20 08:37:54] watchdog.Driveway INFO : Terminating the existing ffmpeg process...,
[2021-08-20 08:37:54] watchdog.Driveway INFO : Waiting for ffmpeg to exit gracefully...,
after a reboot of Frigate
[2021-08-20 10:07:40] ffmpeg.Driveway.record_rtmp ERROR : av_interleaved_write_frame(): Connection reset by peer,
[2021-08-20 10:07:40] ffmpeg.Driveway.record_rtmp ERROR : [flv @ 0x55de542619c0] Failed to update header with correct duration.,
[2021-08-20 10:07:40] ffmpeg.Driveway.record_rtmp ERROR : [flv @ 0x55de542619c0] Failed to update header with correct filesize.,
[2021-08-20 10:07:40] ffmpeg.Driveway.record_rtmp ERROR : Error writing trailer of rtmp://127.0.0.1/live/Driveway: Connection reset by peer,
[2021-08-20 10:07:40] watchdog.Driveway INFO : Terminating the existing ffmpeg process...,
[2021-08-20 10:07:40] watchdog.Driveway INFO : Waiting for ffmpeg to exit gracefully...,
[2021-08-20 10:07:40] ffmpeg.Balcony.record_rtmp ERROR : av_interleaved_write_frame(): Connection reset by peer,
[2021-08-20 10:07:40] ffmpeg.Balcony.record_rtmp ERROR : [flv @ 0x55f920537980] Failed to update header with correct duration.,
[2021-08-20 10:07:40] ffmpeg.Balcony.record_rtmp ERROR : [flv @ 0x55f920537980] Failed to update header with correct filesize.,
[2021-08-20 10:07:40] ffmpeg.Balcony.record_rtmp ERROR : Error writing trailer of rtmp://127.0.0.1/live/Balcony: Connection reset by peer,
[2021-08-20 10:07:40] watchdog.Balcony INFO : Terminating the existing ffmpeg process...,
[2021-08-20 10:07:40] watchdog.Balcony INFO : Waiting for ffmpeg to exit gracefully...,
[2021-08-20 10:08:30] ffmpeg.Balcony.record_rtmp ERROR : av_interleaved_write_frame(): Connection reset by peer,
Frigate stats
{"Balcony":{"camera_fps":7.0,"capture_pid":256,"detection_fps":0.0,"pid":233,"process_fps":7.0,"skipped_fps":0.0},"Deck":{"camera_fps":7.1,"capture_pid":244,"detection_fps":0.0,"pid":229,"process_fps":7.1,"skipped_fps":0.0},"Driveway":{"camera_fps":7.0,"capture_pid":234,"detection_fps":0.0,"pid":223,"process_fps":7.0,"skipped_fps":0.0},"Entrance":{"camera_fps":7.0,"capture_pid":238,"detection_fps":7.5,"pid":224,"process_fps":7.1,"skipped_fps":0.0},"Laundry":{"camera_fps":7.1,"capture_pid":252,"detection_fps":0.0,"pid":232,"process_fps":7.1,"skipped_fps":0.0},"Rumpus":{"camera_fps":7.1,"capture_pid":240,"detection_fps":0.0,"pid":227,"process_fps":7.1,"skipped_fps":0.0},"detection_fps":7.5,"detectors":{"coral":{"detection_start":0.0,"inference_speed":15.18,"pid":218}},"service":{"storage":{"/dev/shm":{"free":61.6,"mount_type":"tmpfs","total":67.1,"used":5.5},"/media/frigate/clips":{"free":966375.4,"mount_type":"nfs4","total":1298700.9,"used":331788.6},"/media/frigate/recordings":{"free":966375.4,"mount_type":"nfs4","total":1298700.9,"used":331788.6},"/tmp/cache":{"free":1951.7,"mount_type":"tmpfs","total":2000.0,"used":48.3}},"uptime":17054,"version":"0.9.0-3340952"}}
Computer Hardware
- OS: Debian 10
- Install method: Docker Compose
- Coral Version: USB
- Network Setup: Wired, POE cameras
- NAS for all media storage
docker-compose.yml
version: '3'
services:
frigate:
container_name: frigate-9.0
image: blakeblackshear/frigate:0.9.0-beta2-amd64
hostname: frigate-9.0
# privileged: true
restart: always
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/docker/frigate-9.0/config.yml:/config/config.yml:ro
- /usr/docker/frigate-9.0/labelmap.txt:/labelmap.txt:ro
- /usr/docker/frigate-9.0/database:/media/frigate/database
- /mnt/nas_storage/frigate:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 2000000000
network_mode: bridge
ports:
- 5000:5000
- 1935:1935 # RTMP feeds
environment:
FRIGATE_RTSP_PASSWORD: ""
LIBVA_DRIVER_NAME: "radeonsi"
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
An update: switching to the MQ (Balanced) stream for
detect
has made a big improvement for me. This is most evident at night, if (re)starting Frigate when the cameras are in B&W mode: using the LQ (fluent) stream for detect, Frigate would show green screens for up to a minute on several (random) cameras and log lots of broken frame errors - whereas the MQ streams show immediately!I’m also using http streams as MarkGodwin suggested (here) and, whilst it’s only been 4 days, overall these two changes have made a big improvement. Far fewer broken frames messages and the camera recordings work.
However, I am now seeing the detection process get stuck a few times a day - anyone else seen this ? EDIT: Switched to 0.8 (running the same docker and Frigate config) and within an hour got the same error.
Here’s my 0.9 rc2 config if anyone else with Reolink cameras wants to try this-
config.yml
docker-compose.yml
Running with http has made frigate a lot more stable for me.