[SUPPORT] blakeblackshear - Frigate


Recommended Posts

20 hours ago, SohailS said:

so after getting everything up and running I have added another GPU into my server to use with a VM.  so i have changed the config of my docker I have added the below

 

image.thumb.png.90be3ecfb56a6944d61818de6339ad7e.png

 

and then the following two parameters

 

image.thumb.png.81058dcaf3e701e79e40e1de16d9011f.png

 

image.thumb.png.b2330a91ed2a14409f3622809baf37d2.png

 

I have added the correct ID for the GPU but for some reason its using the other GPU what have i done wrong?

 

image.thumb.png.496f024914abba881e416cd214892e7b.png

Please open a issue in github to the main developers as in the docs they only "support" the --gpus=all extra paramateres.

 

https://github.com/blakeblackshear/frigate/issues

Link to comment

I've a cctv share listed as Yes:Cache.

Frigate config path is /mnt/cache/appdata/frigate and media path is /mnt/cache/cctv/frigate.

 

I've setup my dockers to use the cache otherwise the array disks never spin down but unfortunately mover seems to keep moving clips and recordings folder with associated files to the array causing Frigate to crash.  I've downloaded mover tuner with age plugin to solve the issue of all my recent clips (14 days) not being accessible from the interface but this doesn't stop the folders from being migrated.  How can I stop these folders from being moved and instead files in the folder older than 14 days?

Link to comment
14 minutes ago, bugsysiegals said:

I've a cctv share listed as Yes:Cache.

Frigate config path is /mnt/cache/appdata/frigate and media path is /mnt/cache/cctv/frigate.

 

I've setup my dockers to use the cache otherwise the array disks never spin down but unfortunately mover seems to keep moving clips and recordings folder with associated files to the array causing Frigate to crash.  I've downloaded mover tuner with age plugin to solve the issue of all my recent clips (14 days) not being accessible from the interface but this doesn't stop the folders from being migrated.  How can I stop these folders from being moved and instead files in the folder older than 14 days?

Use "user cache" path (for example /mnt/user/cctv) instead of disk/pool path, and same for config path. Your mover is moving files from the cache into the array as you have setup that share as "cache:yes" instead of "cache:prefer". I'm not sure that you can achieve that on pools shares so I suggest you to follow the best practices recommended on the unraid manual:

https://wiki.unraid.net/Manual/Shares

Link to comment
2 hours ago, yayitazale said:

Use "user cache" path (for example /mnt/user/cctv) instead of disk/pool path, and same for config path. Your mover is moving files from the cache into the array as you have setup that share as "cache:yes" instead of "cache:prefer". I'm not sure that you can achieve that on pools shares so I suggest you to follow the best practices recommended on the unraid manual:

https://wiki.unraid.net/Manual/Shares

I switched from /user path to /cache path because some transfers were slow and I read this is because of FUSE but more importantly my drives can never spin down if I'm using /user and read/write files on the array all day long.  It seems the best method is to use the /cache and only move files which to the array which are older than "X" days old using the mover tuning plugin but I'm just not sure how to prevent it from moving the folders and only moving the files.

 

Have I misunderstood unRAID about the points below?  I do not want slow transfers and want my array to spin down rather than running all day.

Link to comment
30 minutes ago, bugsysiegals said:

I switched from /user path to /cache path because some transfers were slow and I read this is because of FUSE but more importantly my drives can never spin down if I'm using /user and read/write files on the array all day long.  It seems the best method is to use the /cache and only move files which to the array which are older than "X" days old using the mover tuning plugin but I'm just not sure how to prevent it from moving the folders and only moving the files.

 

Have I misunderstood unRAID about the points below?  I do not want slow transfers and want my array to spin down rather than running all day.

So you just can config the "/mnt/user/cctv" to cache=yes and "/mnt/user/appdata" to cache=prefer and your array will only spin up when mover is invoked or if your cache disk fills up.

 

Another thing you have to do according to the frigate's docs is to define the database's path to the config folder doing this in the config.yml:


 

database:

  path:  /config/frigate.db

 

With that configuration the files under cctv will live only in cache until mover is invoked and it will move them into the array. The files under /appdata will live in the cache foreverif there is enough space.

 

Thats the point of using a cache disk/pool, you will speed up r/w of the disks and don't need to use de HDD array until mover is invoked. This is the standard method proposed in the link I sent you of the documentation on how to use shares in unraid to get the maximum performance out of your system, extend the lifespan of your hard disks and reduce power consumption.

 

I don't know anything about "transfers were slow", I just use this standard configuration since 5 years ago without any issues at all, so I can't help you much more with that.

Edited by yayitazale
Link to comment
22 hours ago, yayitazale said:

So you just can config the "/mnt/user/cctv" to cache=yes and "/mnt/user/appdata" to cache=prefer and your array will only spin up when mover is invoked or if your cache disk fills up.

 

Another thing you have to do according to the frigate's docs is to define the database's path to the config folder doing this in the config.yml:


 

database:

  path:  /config/frigate.db

 

With that configuration the files under cctv will live only in cache until mover is invoked and it will move them into the array. The files under /appdata will live in the cache foreverif there is enough space.

 

Thats the point of using a cache disk/pool, you will speed up r/w of the disks and don't need to use de HDD array until mover is invoked. This is the standard method proposed in the link I sent you of the documentation on how to use shares in unraid to get the maximum performance out of your system, extend the lifespan of your hard disks and reduce power consumption.

 

I don't know anything about "transfers were slow", I just use this standard configuration since 5 years ago without any issues at all, so I can't help you much more with that.

 

I already had unRAID cctv share to cache=yes and appdata to cache=prefer; however, my config.yaml is pointed to /media/frigate/frigate.db and Frigate Docker is set with Config: /mnt/cache/appdata/frigate and Media: /mnt/cache/cctv/frigate.

 

I used to have the Docker pointed to /mnt/user and switched it to /mnt/cache but seems you'd suggest changing back to /mnt/user and using the share settings to leave Frigate appdata on the cache drive if space exists and write new clips/recordings to the cache drive which are then offloaded only when mover is run?

 

If changing Frigate back to /mnt/user ... do I still change the config.yaml to /config which is appdata leaving all clips/snapshots on the cache drive or leave it as-is /media so that they're written to cache and offloaded when the mover runs?

Link to comment
On 3/17/2023 at 5:45 PM, bugsysiegals said:

 

I already had unRAID cctv share to cache=yes and appdata to cache=prefer; however, my config.yaml is pointed to /media/frigate/frigate.db and Frigate Docker is set with Config: /mnt/cache/appdata/frigate and Media: /mnt/cache/cctv/frigate.

 

I used to have the Docker pointed to /mnt/user and switched it to /mnt/cache but seems you'd suggest changing back to /mnt/user and using the share settings to leave Frigate appdata on the cache drive if space exists and write new clips/recordings to the cache drive which are then offloaded only when mover is run?

 

If changing Frigate back to /mnt/user ... do I still change the config.yaml to /config which is appdata leaving all clips/snapshots on the cache drive or leave it as-is /media so that they're written to cache and offloaded when the mover runs?

As I said, if you use /mnt/user paths and change the config file to /config you shouldn't see HDD drives to spin up until mover is invoked.

Link to comment

Does frigate have a memory leak of some kind? noticed my unraid server was at 93% memory usage this morning which is unusual
Frigate happened to be the first docker i restarted and it dropped memory usage back to 33%. (machine with 16GB Ram)

 

Wonder if that was what was causing my frigate crashes...

Link to comment
7 hours ago, macmanluke said:

Does frigate have a memory leak of some kind? noticed my unraid server was at 93% memory usage this morning which is unusual
Frigate happened to be the first docker i restarted and it dropped memory usage back to 33%. (machine with 16GB Ram)

 

Wonder if that was what was causing my frigate crashes...

I don't have this issues. 32Gb of ram and only 4% of difference between frigate running or not running.

Link to comment
18 hours ago, yayitazale said:

As I said, if you use /mnt/user paths and change the config file to /config you shouldn't see HDD drives to spin up until mover is invoked.

Per your suggestion, it seems all clips/recordings would be written to the cache and never moved to the array since /config path points to appdata which is set to cache:prefer.  Is this correct?

Link to comment

I am getting this error "Unable to poll intel GPU stats: Failed to initialize PMU!" in Frigate that is running on my Unraid machine. I had just updated to the Frigate 12-Beta10 app. I'm trying to use my Intel IGPU I7-12700K. Here is screenshot of my Unraid paths:

 

frigate.thumb.jpg.8ba1b9b053a5479d1e0a8918c850cb81.jpg

 

Anyone have any idea why I'm getting the error or why the GPU isn't showing up in Frigate? I have already checked intel_gpu_top and it is working properly and showing up, but it is not showing up in Frigate.

Link to comment
20 hours ago, bugsysiegals said:

Per your suggestion, it seems all clips/recordings would be written to the cache and never moved to the array since /config path points to appdata which is set to cache:prefer.  Is this correct?

No. If you define media math to /mnt/user/media/cctv/frigate and you have the /mnt/user/media share set cache:yes the clips and recordings will be saved on cache and then mover will move them to array. Thats the point of having two diferent paths, one for the media and another one for config. The only thing to keep in mind in that setup is that by default, frigate's database will be living on media folder so if you don't change the path in the config file to /config as I said, once the database is moved to array by the mover, the array will never spin down.

Link to comment
11 hours ago, Vesuvious911 said:

I am getting this error "Unable to poll intel GPU stats: Failed to initialize PMU!" in Frigate that is running on my Unraid machine. I had just updated to the Frigate 12-Beta10 app. I'm trying to use my Intel IGPU I7-12700K. Here is screenshot of my Unraid paths:

 

frigate.thumb.jpg.8ba1b9b053a5479d1e0a8918c850cb81.jpg

 

Anyone have any idea why I'm getting the error or why the GPU isn't showing up in Frigate? I have already checked intel_gpu_top and it is working properly and showing up, but it is not showing up in Frigate.

Try to launch the container in privileged mode.

  • Upvote 1
Link to comment

Ever since I installed the Coral Accelerator Module Drivers plugin and the m.2 Google Coral, my entire server has been crashing constantly.  I went ahead and removed the Google Coral and uninstalled the plugin, but it keeps happening still.  Is there any reason why this would be happening?  Is there anything lingering from the plugin install that I can remove?

Link to comment
On 3/24/2023 at 7:04 AM, clowncracker said:

Ever since I installed the Coral Accelerator Module Drivers plugin and the m.2 Google Coral, my entire server has been crashing constantly.  I went ahead and removed the Google Coral and uninstalled the plugin, but it keeps happening still.  Is there any reason why this would be happening?  Is there anything lingering from the plugin install that I can remove?

Can you attatch a diagnostic file?

Link to comment
9 hours ago, flyize said:

I just setup Frigate12rc2. Are there any config changes for 12? I can't seem to find any 12 specific documentation.

Yes, a lot. You can see them in the Github releases https://github.com/blakeblackshear/frigate/releases and documentation link for frigate 12 is already in the overview of the unraid app:

 

https://deploy-preview-4055--frigate-docs.netlify.app/

  • Like 1
Link to comment

Template updated to v12

 

This is a breaking change so you MUST uninstall the APP and reinstall it from the store adapting you config file and template inputs.

 

You can read the full changelog here:

https://github.com/blakeblackshear/frigate/releases/tag/v0.12.0

 

And the docs are also updated:

https://docs.frigate.video

 

Plase read them entirely before posting for any help here.

  • Like 1
Link to comment

Afternoon all

(cross posted late from a Reddit post but with further details)

Hello my fellow Unraiders. Recently moved over from Blue Iris in a windows 10 VM in (Unraid 6.10.3 should that matter) to Frigate....OMFG it's just incredible, with deepstack(not convinced yet) double take and compreface(wow again) but my CPU is taking a bit of a hit as Im also using it for various other things Plex, RR's, Windows gaming VM etc etc so...

I've reinstalled my old Quadro p600 but cannot for the life of me see where I'm supposed to add it to the config file as well as the unraid docker template (assuming this needs to be done)....I'm Using Frigate 11 currently(yes I have seen the move but Id like to gedt this working 100% before I then delve into that if at all poss...I'll add my botch job config file here if I may, removing the sensitive stuff of course....Id just like to confirm do I edit the config adding a GPU device line and/OR I read something about GPU=all and that's confused me somewhat.  Secondly what and where would I put the Quadro GPU info into the config?  Ive downloaded the Nvidia GPU plugin to get the ID of that GPU, but Im unsure from there where to go.....and again to the maker/contributor of Frigate....words cannot express enough this is amazing software, and I plan on contributing for sure...after all I paid a fair chunk of change for Blue Iris and it is not anywhere near the standard of Frigate!

Anyway my config(using my 11900 Igpu at moment only):

mqtt:

  host: 192.168.1.XX

  user: homeassistant

  password: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

 

cameras:

  front:

    ffmpeg:

      hwaccel_args: -c:v h264_qsv

      inputs:

        - path: rtsp://XXXXX:[email protected]/live

          roles:

          - detect

          - rtmp

          - clips

          - record

    detect:

      width: 1280

      height: 720

      fps: 10

    objects:

      track:

        - person

        - dog

        - cat

        - car

        - bike

        - motorcyle

        - bus

      filters:

        person:

          threshold: 0.8

          min_area: 5000

          max_area: 100000

    record:

      enabled: True

      retain:

        days: 5

        mode: all

      events:

        retain:

          default: 10

  entrance:

    ffmpeg:

      hwaccel_args: -c:v h264_qsv

      inputs:

        - path: rtsp://admin:[email protected]:554/onvif1

          roles:

          - detect

          - rtmp

          - clips

          - record

    detect:

      width: 1280

      height: 720

      fps: 10

    objects:

      track:

        - person

        - dog

        - cat

        - car

        - bike

        - motorcyle

        - bus

      filters:

        person:

          threshold: 0.8

          min_area: 5000

          max_area: 100000

    record:

      enabled: True

      retain:

        days: 5

        mode: all

      events:

        retain:

          default: 10          

  back:

    ffmpeg:

      hwaccel_args: -c:v h264_qsv

      inputs:

        - path: rtsp://XXXXX:[email protected]/live

          roles:

          - detect

          - rtmp

          - clips

          - record

    detect:

      width: 1280

      height: 720

      fps: 10

    objects:

      track:

        - person

        - dog

        - cat

        - car

        - bike

        - motorcyle

        - bus

      filters:

        person:

          threshold: 0.8

          min_area: 5000

          max_area: 100000

    record:

      enabled: True

      retain:

        days: 5

        mode: all

      events:

        retain:

          default: 10      

  patio:

    ffmpeg:

      hwaccel_args: -c:v h264_qsv

      inputs:

        - path: rtsp://admin:[email protected]/

          roles:

          - detect

          - rtmp

          - clips

          - record

    detect:

      width: 1280

      height: 720

      fps: 10

    objects:

      track:

        - person

        - dog

        - cat

        - car

        - bike

        - motorcyle

        - bus

      filters:

        person:

          threshold: 0.8

          min_area: 5000

          max_area: 100000

    record:

      enabled: True

      retain:

        days: 5

        mode: all

      events:

        retain:

          default: 10          

  carport:

    ffmpeg:

      hwaccel_args: -c:v h264_qsv

      inputs:

        - path: rtsp://admin:[email protected]:554/h.265

          roles:

          - detect

          - rtmp

          - clips

          - record

    detect:

      width: 1280

      height: 720

      fps: 10

    objects:

      track:

        - person

        - dog

        - cat

        - car

        - bike

        - motorcyle

        - bus

      filters:

        person:

          threshold: 0.8

          min_area: 5000

          max_area: 100000

    record:

      enabled: True

      retain:

        days: 5

        mode: all

      events:

        retain:

          default: 10      

  backyard:

    ffmpeg:

      hwaccel_args: -c:v h264_qsv

      inputs:

        - path: rtsp://admin:[email protected]:554/h.265

          roles:

          - detect

          - rtmp

          - clips

          - record

    detect:

      width: 1280

      height: 720

      fps: 10

    objects:

      track:

        - person

        - dog

        - cat

        - car

        - bike

        - motorcyle

        - bus

      filters:

        person:

          threshold: 0.8

          min_area: 5000

          max_area: 100000

    record:

      enabled: True

      retain:

        days: 5

        mode: all

      events:

        retain:

          default: 10      

Link to comment
4 minutes ago, Lunch said:

 

I've reinstalled my old Quadro p600 but cannot for the life of me see where I'm supposed to add it to the config file as well as the unraid docker template (assuming this needs to be done)....I'm Using Frigate 11

For GPU detection you need to use Frigate 12

Link to comment

ok, so I have now got Frigate 12 setup and running. working fine so far, have added the Nvidia P600 in the template with its ID, yet to put in config.  Whereabouts and what do I write for it?  Ive run ffmpeg -decoders | grep cuvi

And my results as below, but I am still confised where I add the P600 to the config and what exactly it should read

 

Am I right in thinking I should have this, at the start of my config under my MTQQT broker login details?:

ffmpeg:
  hwaccel_args: preset-nvidia-h264 assuming thats the decoding I would like done on my cameras?

 

Below is my results of the console command ffmpeg -decoders | grep cuvi:

ffmpeg version n5.1-2-g915ef932a3-20220731 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20220731
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
 V..... av1_cuvid            Nvidia CUVID AV1 decoder (codec av1)
 V..... h264_cuvid           Nvidia CUVID H264 decoder (codec h264)
 V..... hevc_cuvid           Nvidia CUVID HEVC decoder (codec hevc)
 V..... mjpeg_cuvid          Nvidia CUVID MJPEG decoder (codec mjpeg)
 V..... mpeg1_cuvid          Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)
 V..... mpeg2_cuvid          Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)
 V..... mpeg4_cuvid          Nvidia CUVID MPEG4 decoder (codec mpeg4)
 V..... vc1_cuvid            Nvidia CUVID VC1 decoder (codec vc1)
 V..... vp8_cuvid            Nvidia CUVID VP8 decoder (codec vp8)
 V..... vp9_cuvid            Nvidia CUVID VP9 decoder (codec vp9)

 

 

 

Id be so very grateful for someone with more of an idea to help point me in the right direction, I honestly dont want spoonfeeding I feel Im very close to finishing this off to how Id like it, so please spare a few mins to give me a hand if at all possible

 

Thanks all

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.