blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.94k stars 1.73k forks source link

[Support]: Record only when detect object #1942

Closed sudheeshb closed 2 years ago

sudheeshb commented 3 years ago

Describe the problem you are having

I upgraded to the latest version of Frigate 0.9.1. I also upgraded the add-on in my HA. Everything works fine, but looks recording is always on. I used the config below from the docs as I do not want 24x7 recording.

record: enabled: True retain_days: 0 events: retain: default: 10

I noticed recording always happens, only difference is 5 min of recording is retained. This is a deal breaker for me as it reduces the life span of my hard disk and I do not want any recording with out motion/object detection.

Is there any way to avoid this unwanted writing to hard disk?. I believe the previous version ( where clips are enabled ) writes to hard disk only when object is detected. Can any one please confirm?

Version

0.9.1-800F33E

Frigate config file


### Relevant log output

```shell
None

FFprobe output from your camera

None

Frigate stats

No response

Operating system

Debian

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

AMCREST

Any other information that may be helpful

No response

blakeblackshear commented 3 years ago

There is no way to avoid this for now. It's planned for a future version.

sudheeshb commented 3 years ago

Thanks for the quick response. Will switch back to the older version for the time being.

blakeblackshear commented 3 years ago

I'm not sure if reverting will be a smooth process after the database migrations. Just be prepared for some challenges.

sudheeshb commented 3 years ago

Just reverted. Couldn't do that from the backup as I ran into some weird issues. I uninstalled and again installed the older version. Everything seems to be working fine so far. Thanks for the support!.

Any idea when do you plan to implement this feature? (ie enable record only on object detection )

blakeblackshear commented 3 years ago

Probably in one of the first few 0.9.x releases unless I run into something unexpected.

sudheeshb commented 3 years ago

Thanks for your all hard work and a great free nvr product!

djaydev commented 3 years ago

Same for me pretty much. I only need video written to the storage device when an object detected event occurs. I tried to move /media/frigate/recordings to a tmpfs directory which moved the unused recordings to RAM but then it wouldn't save the clips to clips directory, only snapshots were being saved after an event happened. Also, the database started writing to storage like every minute, I assume for each recording segment video file of those unused recordings. With a raspberrypi its just too many writes to storage device, I only get 0-5 events a day so most of the time the old version didn't write anything to storage.

Forced to go back as well. I didn't even try to savage it just delete the old DB and run the older docker image of your choosing.

T-21 commented 3 years ago

I was breaking my head over this thinking I overlooked something. Thanks for implementing this in a near future release!

sudheeshb commented 3 years ago

Is this issue resolved in 0.9.2 version?

Joeviocoe commented 3 years ago

I have to say, this is a MAJOR issue that is really understated in the change log. For a traditional NVR setup with proper hardware (disks designed for 24/7 recording), this may be okay.

Frigate is appealing precisely because it can run on a variety of hardware that's not necessarily designed as an NVR.

@blakeblackshear please, please prioritize this fix.

Iceman248 commented 2 years ago

I just noticed this issue as well trying to get clips going. I'll be turning off recording until it can be object only. Thanks.

blakeblackshear commented 2 years ago

If you haven't already seen it, the 0.10.0 betas address this: https://github.com/blakeblackshear/frigate/releases/tag/v0.10.0-beta4

Iceman248 commented 2 years ago

If you haven't already seen it, the 0.10.0 betas address this: https://github.com/blakeblackshear/frigate/releases/tag/v0.10.0-beta4

Thanks, but after trying it, it ignores my masks and I get way too many notifications of objects in masked zones as a result. Whether related, my GPU usage skyrockets, as well as CPU the whole time, so back to stable for me.

blakeblackshear commented 2 years ago

@Iceman248 Ignores motion masks or object masks? There is no such thing as "masked zones" in frigate, so I am not sure what you mean. If had previously set values for frame_height and/or contour_area in your motion config, the release notes for the beta specifically say to remove those.

Iceman248 commented 2 years ago

Sorry, I just worded it in a way that felt natural to me. I just meant ignores motion masks. It did also ignore an object mask as well. I'm not even sure what those other two values do, so definitely didn't have them set.

blakeblackshear commented 2 years ago

I don't see any way the changes for 0.10.0 could cause masks to be ignored. No one else has reported that issue yet, so I would appreciate if you could open an issue with more information so I can help track it down.

stale[bot] commented 2 years ago

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.