Closed fbcd4f50ea5350f051450323b5abfd0b closed 2 years ago
I've seen this on my setup when I have an object set up to detect, but no trigger/rule to record it.
Could that be the case with your setup?
Can you post a list of the files in the recordings directory from the time period of the event? Also, can you take a look at your log file from the time of the event?
Of course!
Screenshot of the event
Recordings directory
[...]/frigate/recordings/2021-09/29/18/carport# ls -1 2*
20.09.mp4
20.19.mp4
20.28.mp4
20.35.mp4
20.45.mp4
20.53.mp4
25.15.mp4
25.23.mp4
25.33.mp4
26.17.mp4
26.27.mp4
26.35.mp4
26.45.mp4
# date
Thu Sep 30 14:41:40 CEST 2021
# docker exec frigate date
Thu Sep 30 14:41:49 CEST 2021
There are no logs at that time. Should I increase the log level?
I've seen this on my setup when I have an object set up to detect, but no trigger/rule to record it.
Could that be the case with your setup?
Thanks for your idea. Unfortunately I can't find any error in my configuration. Often the video is also correct.
I was expecting to see some messages in the logs about ffmpeg restarting and/or invalid data being found in the segments. I may need to add more logging here to figure out what is happening.
I've just noticed a similar issue on my 2 cameras but on the recordings (events are good). The event timestamp matches the camera's timestamp but on the selection toolbar (sorry I don't know how it is named in english) I had to select 2 minutes before the event timestamp to actually see it. E.g. event was recorded at 17:53:33 (which matches the camera's timestamp) but I have to select 17:51:33 to see the event (or a detected person).
@Homas can you post your config please? Also, can you check the files in the recordings folder directly and see if the timestamps in the video are also about 2 minutes off from the filenames?
In the other issue you actually gave me an idea how to validate that.
root@beeb7444779d:/media/frigate/recordings/2021-09/30/17/backyardright520# for x in *; do echo -n "$x " ;ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $x; done
00.09.mp4 9.601000
00.19.mp4 9.617000
00.29.mp4 9.568000
00.39.mp4 9.572000
00.49.mp4 9.586000
00.59.mp4 9.606000
01.09.mp4 9.501000
01.19.mp4 9.602000
01.29.mp4 9.563000
01.39.mp4 9.586000
---cut---
09.18.mp4 11.630000
09.30.mp4 7.648000
09.38.mp4 9.659000
09.48.mp4 9.605000
09.58.mp4 9.626000
10.08.mp4 11.570000
--- cut ---
you see that every segment is less than 10 seconds. some recordings were more that 10 seconds.
root@beeb7444779d:/media/frigate/recordings/2021-09/30/17/backyardright520# for x in *; do echo -n "$x " ;ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $x; done | awk '{sum+=$2} END {print sum}'
**3468.55**
and in total the whole hour (3600 seconds) recordings didn't get 130 seconds. Because my example was towards to the end of the hour, so there were about 120 seconds delay. During last 10 minutes I've lost about 10 seconds.
root@beeb7444779d:/media/frigate/recordings/2021-09/30/17/backyardright520# for x in 5*; do echo -n "$x " ;ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $x; done | awk '{sum+=$2} END {print sum}'
578.276
here is the camera's config (reolink 520)
backyardright520:
ffmpeg:
inputs:
# - path: rtsp://frigateuser:frigatepwd@192.168.10.101:554/h264Preview_01_main
- path: rtmp://192.168.10.101/bcs/channel0_main.bcs?channel=0&stream=0&user=frigateuser&password=frigatepwd
roles:
# - rtmp
- record
# medium quality
- path: rtmp://192.168.10.101/bcs/channel0_ext.bcs?channel=0&stream=0&user=frigateuser&password=frigatepwd
# low quality
# - path: rtmp://192.168.10.101/bcs/channel0_sub.bcs?channel=0&stream=0&user=frigateuser&password=frigatepwd
roles:
- detect
- rtmp
input_args: -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rw_timeout 5000000 -use_wallclock_as_timestamps 1 -f live_flv
record:
enabled: True
retain_days: 2
events:
retain:
default: 30
snapshots:
enabled: True
motion:
mask:
- 1280,275,1280,0,1183,0,828,0
- 754,25,819,25,818,47,443,44,443,21
objects:
track:
- person
- dog
- cat
- bird
the issue I see on amcrest ip-5mp camera but I'l loosing a bit less.
root@beeb7444779d:/media/frigate/recordings/2021-09/30/14/frontgarageamcip5m# for x in *; do echo -n "$x " ;ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $x; done
00.01.mp4 9.913000
00.11.mp4 9.914000
00.21.mp4 9.904000
00.31.mp4 9.908000
00.41.mp4 9.905000
---cut---
root@beeb7444779d:/media/frigate/recordings/2021-09/30/14/frontgarageamcip5m# for x in *; do echo -n "$x " ;ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $x; done | awk '{sum+=$2} END {print sum}'
3556
So on Amcrest camera I've lost 44 seconds vs 130 on Reolink.
frontgarageamcip5m: #
ffmpeg:
inputs:
# Required: the path to the stream
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}
#high quality
- path: rtsp://frigateuser:frigatepwd@192.168.10.127:554
roles:
- rtmp
- record
#low quality
# - path: rtsp://frigateuser:frigatepwd@192.168.10.127:554/cam/realmonitor?channel=1&subtype=1
# roles:
- detect
record:
enabled: True
retain_days: 2
events:
retain:
default: 30
required_zones:
- road
- driveway
- wholeview
detect:
fps: 15
max_disappeared: 75
# best_image_timeout: 15
zones:
road:
# coordinates: 174,159,1026,182,1031,141,1059,100,1110,99,1197,126,1280,150,1175,86,1028,61,858,25,674,0,301,0,178,25,0,47,0,108,165,97
# coordinates: 343,0,150,27,0,57,0,122,149,93,169,167,1091,201,864,21
# coordinates: 174,159,1053,203,1031,141,858,25,674,0,301,0,151,26,149,79
coordinates: 174,159,630,147,914,173,1009,181,1063,98,1204,110,1182,83,1081,70,1024,63,858,25,674,0,301,0,8,58,5,113,152,92
objects:
- car
- motorcycle
driveway:
coordinates: 609,720,1280,720,1280,457,1036,207,563,175
objects:
- car
- motorcycle
parked_front:
coordinates: 1280,243,1280,151,1073,95,1023,153,1091,214
objects: []
parked_right:
coordinates: 0,113,159,95,178,169,0,390
objects: []
parked_otherside:
coordinates: 1034,0,1033,66,860,26,859,0
objects: []
wholeview:
coordinates: 0,720,1280,720,1280,0,0,0
objects:
- person
- bicycle
- dog
- cat
- bird
snapshots:
enabled: True
bounding_box: true
required_zones:
- road
- driveway
- wholeview
mqtt:
required_zones:
- road
- driveway
- wholeview
motion:
mask:
- 1280,0,1280,110,945,55,943,0
- 119,429,73,593,171,686,270,684,523,666,621,619,565,157,278,155
objects:
track:
- person
- car
- bicycle
- motorcycle
- dog
- cat
- bird
I can confirm the @Homas statement. For 40min:
[h264 @ 0x557697f2a0] left block unavailable for requested intra mode
[h264 @ 0x557697f2a0] error while decoding MB 0 95, bytestream 2724
2154.85
For 1h
root@NVR:~/frigate/media/recordings/2021-10/03/17/contre-allee# for x in *; do echo -n "$x " ;ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $x; done | awk '{sum+=$2} END {print sum}'
[h264 @ 0x55a892f2a0] SEI type 240 size 360 truncated at 352
3558.21
you see that every segment is less than 10 seconds. some recordings were more that 10 seconds
this is expected. video files can only be split along key frames.
The docs for Reolink cameras were recently updated based on another user's success. Do these work better for you?
this is expected. video files can only be split along key frames.
That is fine but looks like I'm loosing some frames with that and the player actually doesn't expect that (also sometimes I'm getting notifications with detections where a recorded video doesn't contain a detected object). With 10s files it became more noticeable.
The docs for Reolink cameras were recently updated based on another user's success. Do these work better for you?
Let me check for couple of days. I'll report back. Thanks!
The docs for Reolink cameras were recently updated based on another user's success. Do these work better for you?
Seems like the new settings work much better. The recordings are almost there, the difference is about 5-25 seconds till the end of an hour. I've a few differences with the proposed config:
I've got my cameras cheap so I've rlc-420-5mp, rlc-422, rlc-520, rlc-522, rlc-511 - all 5MP. I've also connected D800 via neolink
I also tested the new settings including switching to HTTP. Unfortunately, I can not see any difference. I still have events without event.
The event was today from 18:33:55 until 18:34:51:
[...]/frigate/recordings/2021-10/05/18/carport# ls -1
[...]
30.01.mp4
30.11.mp4
31.41.mp4
31.51.mp4
32.00.mp4
32.40.mp4
32.53.mp4
33.03.mp4
33.12.mp4
33.22.mp4
34.42.mp4
[...]
Unfortunately there's not even movement anywhere in the video.
Same here... RC5...and a lot of clips not available.
Deleted RC5 and installed 0.9.1 today... Let's see if it gets any better.
I've still have the same issues... Even with the release: "0.9.2-EF82C5C" ... How did it work out for you?
@Minglarn I suspect you are losing video segments because of corrupt segments or because of an incorrect configuration. It doesn't seem like you have the same issue posted here. Have you already opened your own issue?
Either way, yes, I still have the problem :)
If you are still having a problem, please provide logs from around the time of the event with missing segments.
There was nothing in the logs. I have enabled debug logging and will be watching the events over the next few days.
@Minglarn I suspect you are losing video segments because of corrupt segments or because of an incorrect configuration. It doesn't seem like you have the same issue posted here. Have you already opened your own issue?
It must bee so. I've enabled the ffmpeg debug.. Cleaned up my config a bit, erased my recordings.. So far no unplayable clips ...
I've got an event without the person that should be visible corresponding to the snapshot on 18.10.2021 09:45:45 - 09:46:31
Logs (with grep -Ev "peewee|mqtt"
)
[2021-10-18 09:45:12] frigate.events DEBUG : Event received: end carport 1634543070.85855-ayo97j
[2021-10-18 09:45:20] frigate.events DEBUG : Event received: start carport 1634543119.827299-so5jnh
[2021-10-18 09:45:24] frigate.output DEBUG : Changing layout size from 2 to 1
[2021-10-18 09:45:24] frigate.output DEBUG : Clearing the birdseye frame
[2021-10-18 09:45:38] frigate.events DEBUG : Event received: start entrance 1634543138.5116-id6h86
[2021-10-18 09:45:39] frigate.output DEBUG : Changing layout size from 1 to 2
[2021-10-18 09:45:39] frigate.output DEBUG : Clearing the birdseye frame
[2021-10-18 09:45:50] frigate.events DEBUG : Event received: start frontdoor 1634543149.668947-93cjys
[2021-10-18 09:45:50] frigate.events DEBUG : Event received: start frontdoor 1634543150.139779-cepybs
[2021-10-18 09:45:50] frigate.events DEBUG : Event received: start frontdoor 1634543150.139779-hz03en
[2021-10-18 09:45:50] frigate.events DEBUG : Event received: start frontdoor 1634543150.686759-9eh7ov
[2021-10-18 09:45:50] frigate.events DEBUG : Event received: start frontdoor 1634543150.686759-5hvvfq
[2021-10-18 09:45:50] frigate.events DEBUG : Event received: start frontdoor 1634543150.686759-chc0eh
[2021-10-18 09:45:52] frigate.events DEBUG : Event received: end carport 1634543119.827299-so5jnh
[2021-10-18 09:45:57] frigate.events DEBUG : Event received: start frontdoor 1634543156.865766-e22l5x
[2021-10-18 09:45:58] frigate.events DEBUG : Event received: start frontdoor 1634543158.019418-ks33m7
[2021-10-18 09:46:07] frigate.record DEBUG : Start expire recordings (new).
[2021-10-18 09:46:07] frigate.record DEBUG : Start deleted cameras.
[2021-10-18 09:46:07] frigate.record DEBUG : Expiring 0 recordings
[2021-10-18 09:46:07] frigate.record DEBUG : End deleted cameras.
[2021-10-18 09:46:07] frigate.record DEBUG : Start all cameras.
[2021-10-18 09:46:07] frigate.record DEBUG : Start camera: carport.
[2021-10-18 09:46:08] frigate.record DEBUG : Expiring 6 recordings
[2021-10-18 09:46:08] frigate.record DEBUG : End camera: carport.
[2021-10-18 09:46:08] frigate.record DEBUG : Start camera: entrance.
[2021-10-18 09:46:08] frigate.record DEBUG : Expiring 6 recordings
[2021-10-18 09:46:08] frigate.record DEBUG : End camera: entrance.
[2021-10-18 09:46:08] frigate.record DEBUG : Start camera: frontdoor.
[2021-10-18 09:46:08] frigate.record DEBUG : Expiring 6 recordings
[2021-10-18 09:46:09] frigate.record DEBUG : End camera: frontdoor.
[2021-10-18 09:46:09] frigate.record DEBUG : End all cameras.
[2021-10-18 09:46:09] frigate.record DEBUG : End expire recordings (new).
[2021-10-18 09:46:09] frigate.events DEBUG : Event received: end entrance 1634543138.5116-id6h86
[2021-10-18 09:46:15] frigate.events DEBUG : Event received: end frontdoor 1634543150.139779-hz03en
[2021-10-18 09:46:16] frigate.events DEBUG : Event received: end frontdoor 1634543150.686759-9eh7ov
[2021-10-18 09:46:16] frigate.events DEBUG : Event received: end frontdoor 1634543150.139779-cepybs
[2021-10-18 09:46:17] frigate.events DEBUG : Event received: end frontdoor 1634543156.865766-e22l5x
[2021-10-18 09:46:18] frigate.events DEBUG : Event received: end frontdoor 1634543158.019418-ks33m7
[2021-10-18 09:46:22] frigate.events DEBUG : Event received: end frontdoor 1634543150.686759-5hvvfq
[2021-10-18 09:46:26] frigate.events DEBUG : Event received: end frontdoor 1634543149.668947-93cjys
[2021-10-18 09:46:27] frigate.events DEBUG : Event received: end frontdoor 1634543150.686759-chc0eh
[2021-10-18 09:46:38] frigate.output DEBUG : Changing layout size from 2 to 1
[2021-10-18 09:46:38] frigate.output DEBUG : Clearing the birdseye frame
[2021-10-18 09:46:57] frigate.output DEBUG : Clearing the birdseye frame
[2021-10-18 09:47:09] frigate.record DEBUG : Start expire recordings (new).
@fbcd4f50ea5350f051450323b5abfd0b can you post the segments you do have and their durations for that event?
root@3ceaca9021e2:/media/frigate/recordings/2021-10/18/09/frontdoor# for F in * ; do echo -n "${F}: " ; ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 ${F} ; done
46.14.mp4: 9.817000
46.24.mp4: 9.817000
What is the event id for the event? You can see it in the url for the download snapshot button.
I may need to make a special build with some additional debug logging for this.
It's 1634543150.686759-chc0eh
Just let me know if I shuld apply a patch or something if it's less work for you than to create a new build. I'd be happy to help where I can.
Give this image a try blakeblackshear/frigate:record_debug-04a5614-amd64
. This is going to log information for each recording segment evaluated during the expiration job. It will generate a lot of logs every minute. Set your logging config to the following:
logger:
default: info
logs:
frigate.record: debug
Once it happens again, gzip the log file and post here.
Intermediate status So far there is no video without object. However, some events can now no longer be played [0]. The bad events are:
1634566661.765772-8fwjp7
1634569571.883288-459bzp
1634576770.468861-p71sid
[0] The media playback was aborted due to a corruption problem or because the media used features your browser did not support.
It's strange, but with the debug version I didn't find a single wrong event. I'll test the current 9.4 now and get back to you if the problem occurs again.
Thank you!
I'm on 0.9.5 and in some cases I see the no object on the video (looks like it was cut), in some other cases I see an object but the event video stops before the best shoot (the recording is Ok)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug Sometimes I have the problem that an event has a very good snapshot/preview, but the video does not contain the event. The recognized object is then simply not visible. It looks as if a different point in time was recorded.
Version of frigate 0.9.0-aa807d2
Config file
Frigate container logs Nothing relevant found
Frigate stats
FFprobe from your camera
Run the following command and paste output below
Screenshots I could prepare a video where you can see no object if that helps ;)
Computer Hardware
Camera Info: