Closed heapxor closed 2 years ago
Have any events been created?
I recall giving a recommended config setup a couple days ago:
record:
retain:
days: 0 # how long to keep all recordings
events:
retain:
default: 365 # how long to keep recordings that have events
snapshots:
retain:
default: 365 # how long to keep snapshots
If you want to have 24/7 recordings saved then you will need to change the 0 to how many days of complete recordings that you would like to have kept. With your existing config recordings will only be saved when an event is saved.
i dont want to have 24/7 recordings saved, i want to save only recordings with movement.... that was asked.
at the moment no recordings are saved at all. Even there are events = Snapshots (jpg) only. Clips (=recordings/ mp4 files) are not there for these events (Snapshots)
@heapxor Thanks that is helpful, can you also show a screenshot of the events page?
it is working properly i think only clips are missing
so it apparently stopped to work on 3rd of March no idea why.
@heapxor Can you do a couple things I think should hopefully sort things out or at least give a better idea:
entrance_cam:
record:
enabled: true # <- ensure this is set to true
Note that at any point that recordings are enabled / working it will not add clips to existing events and a new one will need to be created to ensure it is working as expected 👍
@NickM-27 i dont get it ....
1) are u talking about frigate.yml? that was never there ... as far as i know, its ON via UI and its set to ON as i also posted mqtt log ...
2) i did restart .
Yes thats logical that it wont add clips to old Events.... so i am still testing and trying to create new events...
I did all above and the recordings dir is empty its basically not RECORDING At all.
@heapxor I have seen weird behavior before if it is off in the config and then set it to on in the UI / MQTT will not get it to start. I would say try setting it to true in the config.
I did all above and the recordings dir is empty its basically not RECORDING At all.
All recordings will be saved in memory and only added to the recordings
directory if it matches the event retention settings and is part of an event (with your config).
i never touch the config and also i cant have it inside config as i am setting it ON/OFF based on some schedule....
i never touch the config and also i cant have it inside config as i am setting it ON/OFF based on some schedule....
That's fine, I do the same having a schedule. If you set it to true on the config it can still be disabled via MQTT. I think there may be a bug if it is disabled in the config. Please try enabling in the config and then restarting, I believe that will fix this and may show a bug.
I did all above and the recordings dir is empty its basically not RECORDING At all.
All recordings will be saved in memory and only added to the
recordings
directory if it matches the event retention settings and is part of an event (with your config).
sorry i dont get it ... u are complicating things. The frigate was working year, didnt touch any config anything. IT stopped to work .
i added this and restarted frigate
created events ... which are inside Events but recordings are not there...
i am more then surprised there is no other debug/logging mechanism ... to find issue ...
@heapxor Okay I am confused. That screenshot with the retain 180
, is that supposed to be in your frigate.yml?
The config you posted at the top doesn't show that at all:
"record": {
"enabled": true,
"events": {
"max_seconds": 300,
"objects": null,
"post_capture": 5,
"pre_capture": 5,
"required_zones": [],
"retain": {
"default": 10,
"mode": "motion",
"objects": {}
}
},
"expire_interval": 60,
"retain": {
"days": 0,
"mode": "all"
},
"retain_days": null
},
[core-ssh config]$ cat /config/frigate.yml
mqtt:
host: 10.0.1.1xx
user: mqtt
password: mqtt
cameras:
entrance_cam:
record:
enabled: true
ffmpeg:
inputs:
- path: rtsp://xx:xx@10.0.1.xx:554
roles:
- detect
- rtmp
detectors:
cpu1:
type: cpu
cpu2:
type: cpu
cpu3:
type: cpu
# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
retain:
days: 0
events:
retain:
default: 180
snapshots:
retain:
default: 180
.....
in that case its other bug; as far as i can remember when i changed time ago ip add of cam it was also not propagated to frigate->debug UI ... but then something happened and it got (or maybe i set old ip to cam i cant remember)
Can you please paste here your
frigate.yml
config?
yes was pasted above
[core-ssh config]$ ls -al /config/frigate.yml -rw-r--r-- 1 root root 525 Mar 24 00:50 /config/frigate.yml
okay seems that i pasted old Debug / and after restart correct values got propagated... i am going to update "Debug" section
@NickM-27 now i updated Debug section at the begging of the thread, and also formatted frigate.yaml conf post.
@heapxor Thanks, everything in there looks correct like it should be working. You can add
logger:
default: debug
to the frigate.yml and it will create more logs giving context as to what is happening. I would recommend updating that, restarting, then creating a new event and it will hopefully give some clues as to what is going on.
Edit: I now see that recordings are enabled at the camera level and that should be sufficient.
You do not have recordings enabled in your config file. Try updating your config with
If you do not enable the record feature in the config file, turning it on via mqtt or the UI has not effect.
Enabling recordings is clearly outlined in the documentation here.
Also, I don't recommend adding a default logging config of debug. It generates so many messages, it makes it harder to find actual error messages.
Also, I don't recommend adding a default logging config of debug. It generates so many messages, it makes it harder to find actual error messages.
thanks, makes sense that debug with only specific parts would be better 👍
In your original post, the json config you posted indicates that you did not have record enabled in your config file at that time. I can see that easily by looking at cameras -> entrance_cam -> ffmpeg_cmds -> cmd
. It is missing the portion of the ffmpeg command that writes video to the cache.
Can you post your json config from the debug page with the latest /config/frigate.yml
you posted?
@blakeblackshear dont get it ... whats the issue with ffmpeg?
the latest frigate.yml was posthed here https://github.com/blakeblackshear/frigate/issues/3008#issuecomment-1076935923
and from the debug page its here
{
"birdseye": {
"enabled": true,
"height": 720,
"mode": "objects",
"quality": 8,
"width": 1280
},
"cameras": {
"entrance_cam": {
"best_image_timeout": 60,
"detect": {
"enabled": false,
"fps": 5,
"height": 720,
"max_disappeared": 25,
"stationary": {
"interval": 0,
"max_frames": {
"default": null,
"objects": {}
},
"threshold": 50
},
"width": 1280
},
"ffmpeg": {
"global_args": [
"-hide_banner",
"-loglevel",
"warning"
],
"hwaccel_args": [],
"input_args": [
"-avoid_negative_ts",
"make_zero",
"-fflags",
"+genpts+discardcorrupt",
"-rtsp_transport",
"tcp",
"-stimeout",
"5000000",
"-use_wallclock_as_timestamps",
"1"
],
"inputs": [
{
"global_args": [],
"hwaccel_args": [],
"input_args": [],
"path": "rtsp://xxx:xxxx@10.0.1.xxx:554",
"roles": [
"record",
"rtmp",
"detect"
]
}
],
"output_args": {
"detect": [
"-f",
"rawvideo",
"-pix_fmt",
"yuv420p"
],
"record": [
"-f",
"segment",
"-segment_time",
"10",
"-segment_format",
"mp4",
"-reset_timestamps",
"1",
"-strftime",
"1",
"-c",
"copy",
"-an"
],
"rtmp": [
"-c",
"copy",
"-f",
"flv"
]
}
},
"ffmpeg_cmds": [
{
"cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://xxxx:xxxx@10.0.1.xxx:554 -c copy -f flv rtmp://127.0.0.1/live/entrance_cam -r 5 -s 1280x720 -f rawvideo -pix_fmt yuv420p pipe:",
"roles": [
"record",
"rtmp",
"detect"
]
}
],
"live": {
"height": 720,
"quality": 8
},
"motion": {
"contour_area": 30,
"delta_alpha": 0.2,
"frame_alpha": 0.2,
"frame_height": 50,
"improve_contrast": false,
"mask": "",
"threshold": 25
},
"mqtt": {
"bounding_box": true,
"crop": true,
"enabled": true,
"height": 270,
"quality": 70,
"required_zones": [],
"timestamp": true
},
"name": "entrance_cam",
"objects": {
"filters": {
"person": {
"mask": null,
"max_area": 24000000,
"min_area": 0,
"min_score": 0.5,
"threshold": 0.7
}
},
"mask": "",
"track": [
"person"
]
},
"record": {
"enabled": true,
"events": {
"max_seconds": 300,
"objects": null,
"post_capture": 5,
"pre_capture": 5,
"required_zones": [],
"retain": {
"default": 180,
"mode": "motion",
"objects": {}
}
},
"expire_interval": 60,
"retain": {
"days": 0,
"mode": "all"
},
"retain_days": null
},
"rtmp": {
"enabled": true
},
"snapshots": {
"bounding_box": true,
"clean_copy": true,
"crop": false,
"enabled": true,
"height": null,
"quality": 70,
"required_zones": [],
"retain": {
"default": 180,
"mode": "motion",
"objects": {}
},
"timestamp": false
},
"timestamp_style": {
"color": {
"blue": 255,
"green": 255,
"red": 255
},
"effect": null,
"format": "%m/%d/%Y %H:%M:%S",
"position": "tl",
"thickness": 2
},
"zones": {}
}
},
"database": {
"path": "/media/frigate/frigate.db"
},
"detect": {
"enabled": true,
"fps": 5,
"height": 720,
"max_disappeared": null,
"stationary": {
"interval": 0,
"max_frames": {
"default": null,
"objects": {}
},
"threshold": null
},
"width": 1280
},
"detectors": {
"cpu1": {
"device": "usb",
"num_threads": 3,
"type": "cpu"
},
"cpu2": {
"device": "usb",
"num_threads": 3,
"type": "cpu"
},
"cpu3": {
"device": "usb",
"num_threads": 3,
"type": "cpu"
}
},
"environment_vars": {},
"ffmpeg": {
"global_args": [
"-hide_banner",
"-loglevel",
"warning"
],
"hwaccel_args": [],
"input_args": [
"-avoid_negative_ts",
"make_zero",
"-fflags",
"+genpts+discardcorrupt",
"-rtsp_transport",
"tcp",
"-stimeout",
"5000000",
"-use_wallclock_as_timestamps",
"1"
],
"output_args": {
"detect": [
"-f",
"rawvideo",
"-pix_fmt",
"yuv420p"
],
"record": [
"-f",
"segment",
"-segment_time",
"10",
"-segment_format",
"mp4",
"-reset_timestamps",
"1",
"-strftime",
"1",
"-c",
"copy",
"-an"
],
"rtmp": [
"-c",
"copy",
"-f",
"flv"
]
}
},
"live": {
"height": 720,
"quality": 8
},
"logger": {
"default": "info",
"logs": {}
},
"model": {
"height": 320,
"labelmap": {},
"labelmap_path": null,
"path": null,
"width": 320
},
"motion": null,
"mqtt": {
"client_id": "frigate",
"host": "10.0.1.xxxx",
"password": "mqtt",
"port": 1883,
"stats_interval": 60,
"tls_ca_certs": null,
"tls_client_cert": null,
"tls_client_key": null,
"tls_insecure": null,
"topic_prefix": "frigate",
"user": "mqtt"
},
"objects": {
"filters": null,
"mask": "",
"track": [
"person"
]
},
"record": {
"enabled": false,
"events": {
"max_seconds": 300,
"objects": null,
"post_capture": 5,
"pre_capture": 5,
"required_zones": [],
"retain": {
"default": 180,
"mode": "motion",
"objects": {}
}
},
"expire_interval": 60,
"retain": {
"days": 0,
"mode": "all"
},
"retain_days": null
},
"rtmp": {
"enabled": true
},
"snapshots": {
"bounding_box": true,
"clean_copy": true,
"crop": false,
"enabled": false,
"height": null,
"quality": 70,
"required_zones": [],
"retain": {
"default": 180,
"mode": "motion",
"objects": {}
},
"timestamp": false
},
"timestamp_style": {
"color": {
"blue": 255,
"green": 255,
"red": 255
},
"effect": null,
"format": "%m/%d/%Y %H:%M:%S",
"position": "tl",
"thickness": 2
}
}
The json config doesn't match your yml config. The json config indicates that record
is not enabled in your frigate.yml
file. This means you are either posting a different file or haven't restarted frigate since you updated frigate.yml
.
Can you restart the addon, wait one minute, and then post the log output of the addon?
@blakeblackshear i did that here is it
{
"birdseye": {
"enabled": true,
"height": 720,
"mode": "objects",
"quality": 8,
"width": 1280
},
"cameras": {
"entrance_cam": {
"best_image_timeout": 60,
"detect": {
"enabled": false,
"fps": 5,
"height": 720,
"max_disappeared": 25,
"stationary": {
"interval": 0,
"max_frames": {
"default": null,
"objects": {}
},
"threshold": 50
},
"width": 1280
},
"ffmpeg": {
"global_args": [
"-hide_banner",
"-loglevel",
"warning"
],
"hwaccel_args": [],
"input_args": [
"-avoid_negative_ts",
"make_zero",
"-fflags",
"+genpts+discardcorrupt",
"-rtsp_transport",
"tcp",
"-stimeout",
"5000000",
"-use_wallclock_as_timestamps",
"1"
],
"inputs": [
{
"global_args": [],
"hwaccel_args": [],
"input_args": [],
"path": "rtsp://xxx:x@10.0.1.1x:554",
"roles": [
"record",
"rtmp",
"detect"
]
}
],
"output_args": {
"detect": [
"-f",
"rawvideo",
"-pix_fmt",
"yuv420p"
],
"record": [
"-f",
"segment",
"-segment_time",
"10",
"-segment_format",
"mp4",
"-reset_timestamps",
"1",
"-strftime",
"1",
"-c",
"copy",
"-an"
],
"rtmp": [
"-c",
"copy",
"-f",
"flv"
]
}
},
"ffmpeg_cmds": [
{
"cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://x:x@10.0.1.1x:554 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/entrance_cam-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/entrance_cam -r 5 -s 1280x720 -f rawvideo -pix_fmt yuv420p pipe:",
"roles": [
"record",
"rtmp",
"detect"
]
}
],
"live": {
"height": 720,
"quality": 8
},
"motion": {
"contour_area": 30,
"delta_alpha": 0.2,
"frame_alpha": 0.2,
"frame_height": 50,
"improve_contrast": false,
"mask": "",
"threshold": 25
},
"mqtt": {
"bounding_box": true,
"crop": true,
"enabled": true,
"height": 270,
"quality": 70,
"required_zones": [],
"timestamp": true
},
"name": "entrance_cam",
"objects": {
"filters": {
"person": {
"mask": null,
"max_area": 24000000,
"min_area": 0,
"min_score": 0.5,
"threshold": 0.7
}
},
"mask": "",
"track": [
"person"
]
},
"record": {
"enabled": true,
"events": {
"max_seconds": 300,
"objects": null,
"post_capture": 5,
"pre_capture": 5,
"required_zones": [],
"retain": {
"default": 180,
"mode": "motion",
"objects": {}
}
},
"expire_interval": 60,
"retain": {
"days": 0,
"mode": "all"
},
"retain_days": null
},
"rtmp": {
"enabled": true
},
"snapshots": {
"bounding_box": true,
"clean_copy": true,
"crop": false,
"enabled": true,
"height": null,
"quality": 70,
"required_zones": [],
"retain": {
"default": 180,
"mode": "motion",
"objects": {}
},
"timestamp": false
},
"timestamp_style": {
"color": {
"blue": 255,
"green": 255,
"red": 255
},
"effect": null,
"format": "%m/%d/%Y %H:%M:%S",
"position": "tl",
"thickness": 2
},
"zones": {}
}
},
"database": {
"path": "/media/frigate/frigate.db"
},
"detect": {
"enabled": true,
"fps": 5,
"height": 720,
"max_disappeared": null,
"stationary": {
"interval": 0,
"max_frames": {
"default": null,
"objects": {}
},
"threshold": null
},
"width": 1280
},
"detectors": {
"cpu1": {
"device": "usb",
"num_threads": 3,
"type": "cpu"
},
"cpu2": {
"device": "usb",
"num_threads": 3,
"type": "cpu"
},
"cpu3": {
"device": "usb",
"num_threads": 3,
"type": "cpu"
}
},
"environment_vars": {},
"ffmpeg": {
"global_args": [
"-hide_banner",
"-loglevel",
"warning"
],
"hwaccel_args": [],
"input_args": [
"-avoid_negative_ts",
"make_zero",
"-fflags",
"+genpts+discardcorrupt",
"-rtsp_transport",
"tcp",
"-stimeout",
"5000000",
"-use_wallclock_as_timestamps",
"1"
],
"output_args": {
"detect": [
"-f",
"rawvideo",
"-pix_fmt",
"yuv420p"
],
"record": [
"-f",
"segment",
"-segment_time",
"10",
"-segment_format",
"mp4",
"-reset_timestamps",
"1",
"-strftime",
"1",
"-c",
"copy",
"-an"
],
"rtmp": [
"-c",
"copy",
"-f",
"flv"
]
}
},
"live": {
"height": 720,
"quality": 8
},
"logger": {
"default": "info",
"logs": {}
},
"model": {
"height": 320,
"labelmap": {},
"labelmap_path": null,
"path": null,
"width": 320
},
"motion": null,
"mqtt": {
"client_id": "frigate",
"host": "10.0.1.xx",
"password": "mqtt",
"port": 1883,
"stats_interval": 60,
"tls_ca_certs": null,
"tls_client_cert": null,
"tls_client_key": null,
"tls_insecure": null,
"topic_prefix": "frigate",
"user": "mqtt"
},
"objects": {
"filters": null,
"mask": "",
"track": [
"person"
]
},
"record": {
"enabled": false,
"events": {
"max_seconds": 300,
"objects": null,
"post_capture": 5,
"pre_capture": 5,
"required_zones": [],
"retain": {
"default": 180,
"mode": "motion",
"objects": {}
}
},
"expire_interval": 60,
"retain": {
"days": 0,
"mode": "all"
},
"retain_days": null
},
"rtmp": {
"enabled": true
},
"snapshots": {
"bounding_box": true,
"clean_copy": true,
"crop": false,
"enabled": false,
"height": null,
"quality": 70,
"required_zones": [],
"retain": {
"default": 180,
"mode": "motion",
"objects": {}
},
"timestamp": false
},
"timestamp_style": {
"color": {
"blue": 255,
"green": 255,
"red": 255
},
"effect": null,
"format": "%m/%d/%Y %H:%M:%S",
"position": "tl",
"thickness": 2
}
}
`
@blakeblackshear seems it works now
[core-ssh ~]$ ls /media/frigate/recordings/ 2022-03
@heapxor are things working as expected now and clips being generated with events?
@NickM-27 seems so, thank you for your assistance and help.
For anyone else with this issue and is running Frigate as a Home Assistant add-on like I am, the problem was that using the 3-dot menu -> Restart Frigate was not actually loading the changes I made to frigate.yml. You need to go into HA Add-ons and restart Frigate from there instead.
Describe the problem you are having
even the Recording is on only snapshots are generated, no recordings are created.
Version
0.10.1-83481af
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
No response
Operating system
HassOS
Install method
HassOS Addon
Coral version
CPU (no coral)
Network connection
Wired
Camera make and model
hikvision
Any other information that may be helpful
No response