Frigate recording motion only?

I have frigate up and running and everything is working as it should.
It’s currently recording 24 hours a day which is filling my remaining storage very quickly…
Is there a way to configure to record motion only.

I’ve looked through loads of threads and can’t find the answer.

TIA

Here is my config file that is recording just the motion.

#Configuration for Frigate
mqtt:
  host: <redacted>
  user: <redacted>
  password: '<redacted>'
  #topic_prefix: frigate
#Camera
cameras:
  wans01:
    ffmpeg:
      inputs:
        - path: rtsp://camera:<redacted>@<redacted>/live/ch0
          roles:
            - detect
            - clips
    detect:
      width: 1280
      height: 720
      fps: 5
    objects:
      track:
        - person
        - car
        - dog
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain: 
        default: 2
    record:
      enabled: true
      retain: 
        days: 10

detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu
  cpu3:
    type: cpu
  cpu4:
    type: cpu
  cpu5:
    type: cpu
1 Like

With frigate 0.10+ you just need to set record -> retain -> mode to motion instead of all (the default)

1 Like

This will retain 10 days of all recording segments since the default retain -> mode is all for recordings.

You’d want to set it to motion as above comment

1 Like

Thanks for the reply. I’ll test tonight and let you know if it worked.

Many thanks. This has worked although it did record motion for everything even though I have (under detect) objects to track as person.
Do I need to put something under (record)to stop this happening.

detect:
width: 640
height: 360
fps: 5
objects:
track:
- person
- cat
snapshots:
enabled: true
bounding_box: true
retain:
default: 2
record:
enabled: true
retain:
days: 10
mode: motion

motion:
  mask:
    - 640,252,640,0,0,0,0,125,418,108

The formatting has come out differently on copying it in this post. It is correct in my yml file

A snippet from mine:

  record:
      enabled: true
      retain:
        days: 14
        mode: motion
      events:
        retain:
          default: 14
          mode: active_objects
        pre_capture: 5
        post_capture: 8
        objects:
          - car
          - person
          - cat
          - dog
          - bear
        required_zones:
          - car_automation
          - parking_area
          - near_driveway
          - front_yard
1 Like

Thank you very much.
I’ll wait till tomorrow morning to see if it’s picks up any flying critters like it did last night.

Ps. I’ve left out the Bear tracking as we don’t have much use for this in the UK :grin::bear:

Its not going to stop that. Motion between the car and the camera will trigger the record. Youll just get a thumbnail in the events tab, but youll get a recording in recording tab. It wiont record constantly,
I think you could eliminate the motion mode and keep the active object mode to accomplish that, but Im not sure…

That’s because you put it under the record section which is for 24/7 recording. If you only want motion recorded for events (when frigate detects an object) then you would set record -> retain -> days to 0 and you would set record -> events -> retain -> default to 10 and record -> events -> retain -> mode to motion

1 Like

Thanks
I keep get invalid config in the log.
Please could you lay it out for me how it would go in the yml file.

Thanks

Paste your current yaml file

I am following this thread because I am having the same problem understanding how to save only detected AI objects , not simply movement. ( I already have a nvr that record 24/24)
If I understand correctly if I want to record only events ( person cats dogs cars…ecc…) I have to put

record:
      enabled: true
      retain:
        days: 0
        mode: motion <--- I suppose I don't need this mode because it is referred to record.
      events:
        retain:
          default: 3  <--- number of days clips will be saved
          mode: active_objects

This config stay on top of the config file or inside of every camera configuration. If I understand correctly camera setting overrides the general setting.
Is it right?
Snapshot and clip are managed in the same way?

Thank you

2 Likes

That’s correct way to configure it. If you want that for all cameras just do it globally, override at Camera level for cameras you want to be different.

Snapshots work this way already and there’s no clips configuration anymore as that’s what record is for

1 Like

Thanks for all the tips.
Looks like I’ve got it now. :+1:t2: