Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Config Support]: Disable everything but simply continuously recording to files #4023

Closed
RobHofmann opened this issue Oct 5, 2022 · 9 comments

Comments

@RobHofmann
Copy link

Describe the problem you are having

I'm trying to disable all detect/motion/snapshot recording features and just enable continuously record. I still see 2 cores being fully used (200% CPU on Linux) while recording. Is this normal?

Version

blakeblackshear/frigate:stable-amd64

Frigate config file

mqtt:
  host: hidden
  port: 1883
  topic_prefix: frigate
  client_id: hidden
  user: hidden
  password: hidden
  stats_interval: 60
cameras:
  voortuin:
    ffmpeg:
      inputs:
        - path: rtsp://hidden:[email protected]:554/cam/realmonitor?channel=1&subtype=0
  achtertuin:
    ffmpeg:
      inputs:
        - path: rtsp://hidden:[email protected]:554/cam/realmonitor?channel=1&subtype=0
  woonkamer:
    ffmpeg:
      inputs:
        - path: rtsp://hidden:[email protected]:554/videoMain
  master_bedroom:
    ffmpeg:
      inputs:
        - path: rtsp://hidden:[email protected]:554/videoMain
  slaapkamer_puck:
    ffmpeg:
      inputs:
        - path: rtsp://hidden:[email protected]:88/videoMain
record:
  enabled: false
  retain:
    days: 7
detect:
  enabled: false
rtmp:
  enabled: false
logger:
  default: info

Relevant log output

[2022-10-05 16:42:05] frigate.app                    INFO    : Starting Frigate (0.10.1-83481af)
Starting migrations
[2022-10-05 16:42:05] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-10-05 16:42:05] peewee_migrate                 INFO    : There is nothing to migrate
[2022-10-05 16:42:05] detector.cpu                   INFO    : Starting detection process: 257
[2022-10-05 16:42:05] frigate.app                    INFO    : Output process started: 259
[2022-10-05 16:42:05] ws4py                          INFO    : Using epoll
[2022-10-05 16:42:05] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-10-05 16:42:05] frigate.app                    INFO    : Camera processor started for voortuin: 264
[2022-10-05 16:42:05] frigate.app                    INFO    : Camera processor started for achtertuin: 265
[2022-10-05 16:42:05] frigate.app                    INFO    : Camera processor started for parkeerplek: 267
[2022-10-05 16:42:05] frigate.app                    INFO    : Camera processor started for woonkamer: 269
[2022-10-05 16:42:05] frigate.app                    INFO    : Camera processor started for master_bedroom: 271
[2022-10-05 16:42:05] frigate.app                    INFO    : Camera processor started for slaapkamer_puck: 273
[2022-10-05 16:42:05] frigate.app                    INFO    : Capture process started for voortuin: 275
[2022-10-05 16:42:05] frigate.app                    INFO    : Capture process started for achtertuin: 279
[2022-10-05 16:42:05] frigate.app                    INFO    : Capture process started for parkeerplek: 280
[2022-10-05 16:42:05] frigate.app                    INFO    : Capture process started for woonkamer: 295
[2022-10-05 16:42:05] frigate.app                    INFO    : Capture process started for master_bedroom: 302
[2022-10-05 16:42:05] frigate.app                    INFO    : Capture process started for slaapkamer_puck: 306
[2022-10-05 16:42:05] ws4py                          INFO    : Using epoll
[2022-10-05 16:43:05] frigate.record                 WARNING : Unable to find file from recordings database: /media/frigate/recordings/2022-10/05/10/achtertuin/10.46.mp4

Frigate stats

No response

Operating system

Debian

Install method

Docker CLI

Coral version

CPU (no coral)

Any other information that may be helpful

Running on a Ryzen 3900X with TrueNAS inside a Ubuntu host with Docker.

@NickM-27
Copy link
Collaborator

NickM-27 commented Oct 5, 2022

There's no way to disable the decoding of the stream for the live view / motion detection (which can be used to only keep recording when the camera sees motion).

If you enable hwaccel then that will reduce the CPU usage

@NickM-27
Copy link
Collaborator

NickM-27 commented Oct 5, 2022

Also recommend updating to 0.11 using image blakeblackshear/frigate:stable

@RobHofmann
Copy link
Author

There's no way to disable the decoding of the stream for the live view / motion detection (which can be used to only keep recording when the camera sees motion).

If you enable hwaccel then that will reduce the CPU usage

Is there any HWaccel available for a Ryzen 3900X? (again i'm using TrueNAS with a Ubuntu VM which runs Docker; and thats where Frigate runs).

I switched to blakeblackshear/frigate:stable. However I now no longer have a live view (more like a 5 fps feed in Home Assistant). This isn't fixed whenever I switch back to blakeblackshear/frigate:stable-amd64. Also not when doing a clean install.

@NickM-27
Copy link
Collaborator

NickM-27 commented Oct 5, 2022

No that CPU has no integrated GPU so it can't do hardware acceleration.

And also you disabled RTMP so of course the home assistant live view isn't full res / speed, that is what RTMP is used for.

@RobHofmann
Copy link
Author

Doh! you are completely right! Sorry about that!

So about 3 cores in use for 6 camera's seems fair? It can't go any lower?

Is using an Intel CPU (for example the 12500T) more efficient in terms of power for these tasks?

@NickM-27
Copy link
Collaborator

NickM-27 commented Oct 5, 2022

It doesn't have much to do with intel or AMD. For example I have an AMD 5700G which does hardware acceleration (since it has integration RDNA graphics) and that means with 4 cameras frigate only uses 5% CPU (with a coral and detection enabled).

@NickM-27
Copy link
Collaborator

NickM-27 commented Oct 5, 2022

Another thing that would help you is setting the width and height if the cameras under detect, otherwise frigate resizes it to 720p which also uses considerable CPU

@NickM-27
Copy link
Collaborator

NickM-27 commented Oct 5, 2022

I'd recommend just checking out #3860 actually as it covers your case as well

@RobHofmann
Copy link
Author

Perfect! Modifying the detection resolution & fps got my CPU usage down to ~200%. Thats fair i think.

Thank you for all the information!

I'll see to upgrade my CPU to something with an iGPU & try to hunt a Coral unit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants