[SUPPORT] blakeblackshear - Frigate


Recommended Posts

On 1/5/2022 at 10:21 PM, ajguerre said:

Hi @yayitazale,

 

I have 2 Coral TPU USB installed in UNRAID. Do I need to install the Coral Drivers in UNRAID or that is just for PCI/M.2 TPUs?

 

Also, how do I passthrough the USB TPUs to the Frigate Docker in UNRAID?

 

Thanks for your help!

For USB TPUS there is no need to install the drivers. The USB TPU is passed already on the template:

 

imagen.thumb.png.89cb4b84d48ddb3adc2eff8cd3b6daae.png

Link to comment
On 1/6/2022 at 5:18 AM, m0ngr31 said:

I'm having a weird issue with this docker where if the docker is started, I can't start up my Windows VM. I'm not sure what the issue is.

 

I'm using the nvidia docker passing in my Quadro and my Coral USB device. My Windows VM is using a GTX 1070 with its own PCIe USB card passed in. Home Assistant is being ran on an actual RPi 4. What could be causing this issue?

Can you show how are you doing the passthrough of the graphic cards to the container and to the VM?

Link to comment

There are these 2 lines in the template

 

<Config Mask="false" Required="true" Display="always" Type="Path" Description="Container Path: /media/frigate" Mode="rw" Default="/mnt/user/Media/frigate" Target="/media/frigate/" Name="Clips path">/mnt/user/Frigate/</Config>

...

<Config Mask="false" Required="true" Display="always" Type="Path" Description="Container Path: /media/frigate" Mode="rw" Default="/mnt/user/Media/frigate" Target="/media/frigate" Name="Media path">/mnt/user/Media/frigate</Config>

 

Both are required (forced) and both map to the same container path so it makes absolutely no sense to have it twice. Every time I update the container this screws up my container settings. Every time I have to delete the second one that gets re-added and I also have to delete the media user share that gets created by the mapping because the container re-started after the update.

 

The name and default system paths also don't match in the first one where I underlined them.  I don't use a media share so that isn't right for my system. Lots of people don't. I would suggest using the typical /mnt/user/Frigate type path like all the other templates I've used are doing.

 

I would remove the fist one and also remove the Media from the path in the second one. 

 

Also, the paths to the GPU and CPU mapping should not be required(forced). I was testing it without a TPU and no GPU acceleration so I deleted those device mappings but updating the container messed that up for me too by adding them back in so I had to delete them again.

 

Edited by lionelhutz
Link to comment
45 minutes ago, lionelhutz said:

There are these 2 lines in the template

 

<Config Mask="false" Required="true" Display="always" Type="Path" Description="Container Path: /media/frigate" Mode="rw" Default="/mnt/user/Media/frigate" Target="/media/frigate/" Name="Clips path">/mnt/user/Frigate/</Config>

...

<Config Mask="false" Required="true" Display="always" Type="Path" Description="Container Path: /media/frigate" Mode="rw" Default="/mnt/user/Media/frigate" Target="/media/frigate" Name="Media path">/mnt/user/Media/frigate</Config>

 

Both are required (forced) and both map to the same container path so it makes absolutely no sense to have it twice. Every time I update the container this screws up my container settings. Every time I have to delete the second one that gets re-added and I also have to delete the media user share that gets created by the mapping because the container re-started after the update.

 

The name and default system paths also don't match in the first one where I underlined them.  I don't use a media share so that isn't right for my system. Lots of people don't. I would suggest using the typical /mnt/user/Frigate type path like all the other templates I've used are doing.

 

I would remove the fist one and also remove the Media from the path in the second one. 

 

Also, the paths to the GPU and CPU mapping should not be required(forced). I was testing it without a TPU and no GPU acceleration so I deleted those device mappings but updating the container messed that up for me too by adding them back in so I had to delete them again.

 

I think you are messing up updating over a older template. Delete the container and recreate it with the new template from the app store:

 

imagen.thumb.png.600daacd3b0cce49312d6cc634b353e7.png

 

Media folder is OK where it is, you can change it if you are not using it, but I don't like the idea of forcing everybody to have a new share just for this. Media must live on media.

 

The cpu/pgpu devices are not forced.

Link to comment

Hmm, my install must have keep an earlier messed up template once I installed it.... 

 

I haven't had any other containers act like this one, I guess the original assignments in them must have been fine with how I wanted to use them.

 

When did Media become a default user share that is created by a new unRAID install? 

 

 

Edited by lionelhutz
Link to comment

I am having an issue where Frigate will not delete any recordings past the time saved in my config (I had it at 1 day and tried 0 also).

I suspect this is a permission issue, as I cannot delete the recordings from explorer either, I have to delete through Unraid console or dolphin.

 

I have tried permission fix in Unraid and completely removing and reinstalling Frigate and tried turning on Privileged Mode . However, any new recordings generating from Frigate are not deleted. I did not have this issue before the new version and clips successfully delete after the config'd 10 days.

Link to comment
8 hours ago, eep said:

I am having an issue where Frigate will not delete any recordings past the time saved in my config (I had it at 1 day and tried 0 also).

I suspect this is a permission issue, as I cannot delete the recordings from explorer either, I have to delete through Unraid console or dolphin.

 

I have tried permission fix in Unraid and completely removing and reinstalling Frigate and tried turning on Privileged Mode . However, any new recordings generating from Frigate are not deleted. I did not have this issue before the new version and clips successfully delete after the config'd 10 days.

Do you have any warning or error on the logs at bootup of frigate? What version are you running? Can you post your retain config?

Link to comment

EDIT: 0 Day retain appears to be working now (except for a few corrupt recordings from a wifi cam), going to try 1 day retain to see if it will also work.

6 hours ago, yayitazale said:

Do you have any warning or error on the logs at bootup of frigate? What version are you running? Can you post your retain config?

I am on 0.9.4. The issue started with 0.9.x.

Config:

record:
  enabled: True
  retain_days: 0
  events:
    max_seconds: 300
    pre_capture: 5
    post_capture: 5
    required_zones: []
    retain:
      default: 10

I get the following on bootup, the driveway.record ERROR repeats but there is no issues with that camera's recording files.

[2022-01-11 08:39:44] frigate.record WARNING : Discarding a corrupt recording segment: Driveway-20220111083920.mp4
[2022-01-11 08:39:44] frigate.record WARNING : Discarding a corrupt recording segment: Backyard-20220111083918.mp4
[2022-01-11 08:39:44] frigate.record WARNING : Discarding a corrupt recording segment: Garage-20220111083916.mp4
[2022-01-11 08:40:59] ffmpeg.Driveway.record ERROR : [rtsp @ 0x5590c6f30b00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
[2022-01-11 08:40:59] ffmpeg.Driveway.record ERROR : Consider increasing the value for the 'analyzeduration' and 'probesize' options
[2022-01-11 08:40:59] ffmpeg.Driveway.record ERROR : Output file #0 does not contain any stream
[2022-01-11 08:41:39] watchdog.Driveway INFO : Terminating the existing ffmpeg process...
[2022-01-11 08:41:39] watchdog.Driveway INFO : Waiting for ffmpeg to exit gracefully...
Exception in thread recording_cleanup:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/frigate/frigate/record.py", line 310, in run
self.expire_files()
File "/opt/frigate/frigate/record.py", line 280, in expire_files
oldest_timestamp = p.stat().st_mtime - 1
File "/usr/lib/python3.8/pathlib.py", line 1198, in stat
return self._accessor.stat(self)
FileNotFoundError: [Errno 2] No such file or directory: '/media/frigate/recordings/2022-01/01/09/Front_Yard/16.19.mp4'

 

Edited by eep
new update
Link to comment
5 minutes ago, eep said:

I am on 0.9.4. The issue started with 0.9.x.

Config:

record:
  enabled: True
  retain_days: 0
  events:
    max_seconds: 300
    pre_capture: 5
    post_capture: 5
    required_zones: []
    retain:
      default: 10

I get the following on bootup, the driveway.record ERROR repeats but there is no issues with that camera's recording files.

[2022-01-11 08:39:44] frigate.record WARNING : Discarding a corrupt recording segment: Driveway-20220111083920.mp4
[2022-01-11 08:39:44] frigate.record WARNING : Discarding a corrupt recording segment: Backyard-20220111083918.mp4
[2022-01-11 08:39:44] frigate.record WARNING : Discarding a corrupt recording segment: Garage-20220111083916.mp4
[2022-01-11 08:40:59] ffmpeg.Driveway.record ERROR : [rtsp @ 0x5590c6f30b00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
[2022-01-11 08:40:59] ffmpeg.Driveway.record ERROR : Consider increasing the value for the 'analyzeduration' and 'probesize' options
[2022-01-11 08:40:59] ffmpeg.Driveway.record ERROR : Output file #0 does not contain any stream
[2022-01-11 08:41:39] watchdog.Driveway INFO : Terminating the existing ffmpeg process...
[2022-01-11 08:41:39] watchdog.Driveway INFO : Waiting for ffmpeg to exit gracefully...
Exception in thread recording_cleanup:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/frigate/frigate/record.py", line 310, in run
self.expire_files()
File "/opt/frigate/frigate/record.py", line 280, in expire_files
oldest_timestamp = p.stat().st_mtime - 1
File "/usr/lib/python3.8/pathlib.py", line 1198, in stat
return self._accessor.stat(self)
FileNotFoundError: [Errno 2] No such file or directory: '/media/frigate/recordings/2022-01/01/09/Front_Yard/16.19.mp4'

 

This is not related with unraid, you have a "Exception in thread recording_cleanup" and it looks like you have a missing file that it is messing up. There is already a issue opened on github with the same error:

 

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

 

Meanwhile this is fixed, you just can delete the frigate.db and all the recorded files and then restart it.

Link to comment

For some reason my config has stopped working properly.

 

In the Web GUI provided by the docker I can no longer toggle detect, snapshot or recordings on or off - clicking the icons simply hightlights the buttons and that's it.

 

Also, in Home Assistant multiple entities now report as Unavailable or greyed out:

 

image.thumb.png.4a077ced7110d6df8e2335b672d9bcde.png

 

 

I have tried deleting all my recordings and the appdata, deleting the container and re-downloading and starting from fresh but the problem strangely remains.

 

Any ideas ?

 

The frigate logs seem OK, from a fresh start:

 

 

022-01-11 19:58:52] frigate.app INFO : Starting Frigate (0.9.4-26ae608)
[2022-01-11 19:58:52] frigate.app INFO : Creating directory: /media/frigate/recordings
[2022-01-11 19:58:52] frigate.app INFO : Creating directory: /media/frigate/clips
Starting migrations
[2022-01-11 19:58:52] peewee_migrate INFO : Starting migrations
Migrate "001_create_events_table"
[2022-01-11 19:58:52] peewee_migrate INFO : Migrate "001_create_events_table"
sql ('CREATE TABLE IF NOT EXISTS "event" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "label" VARCHAR(20) NOT NULL, "camera" VARCHAR(20) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "top_score" REAL NOT NULL, "false_positive" INTEGER NOT NULL, "zones" JSON NOT NULL, "thumbnail" TEXT NOT NULL)',)
[2022-01-11 19:58:52] peewee_migrate INFO : sql ('CREATE TABLE IF NOT EXISTS "event" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "label" VARCHAR(20) NOT NULL, "camera" VARCHAR(20) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "top_score" REAL NOT NULL, "false_positive" INTEGER NOT NULL, "zones" JSON NOT NULL, "thumbnail" TEXT NOT NULL)',)
sql ('CREATE INDEX IF NOT EXISTS "event_label" ON "event" ("label")',)
[2022-01-11 19:58:52] peewee_migrate INFO : sql ('CREATE INDEX IF NOT EXISTS "event_label" ON "event" ("label")',)
sql ('CREATE INDEX IF NOT EXISTS "event_camera" ON "event" ("camera")',)
[2022-01-11 19:58:52] peewee_migrate INFO : sql ('CREATE INDEX IF NOT EXISTS "event_camera" ON "event" ("camera")',)
Done 001_create_events_table
[2022-01-11 19:58:52] peewee_migrate INFO : Done 001_create_events_table
Migrate "002_add_clip_snapshot"
[2022-01-11 19:58:52] peewee_migrate INFO : Migrate "002_add_clip_snapshot"
add_column ('event', 'has_clip', <BooleanField: Event.has_clip>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'has_clip', <BooleanField: Event.has_clip>)
add_column ('event', 'has_snapshot', <BooleanField: Event.has_snapshot>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'has_snapshot', <BooleanField: Event.has_snapshot>)
Done 002_add_clip_snapshot
[2022-01-11 19:58:52] peewee_migrate INFO : Done 002_add_clip_snapshot
Migrate "003_create_recordings_table"
[2022-01-11 19:58:52] peewee_migrate INFO : Migrate "003_create_recordings_table"
Done 003_create_recordings_table
[2022-01-11 19:58:52] peewee_migrate INFO : Done 003_create_recordings_table
Migrate "004_add_bbox_region_area"
[2022-01-11 19:58:52] peewee_migrate INFO : Migrate "004_add_bbox_region_area"
add_column ('event', 'region', <JSONField: Event.region>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'region', <JSONField: Event.region>)
add_column ('event', 'box', <JSONField: Event.box>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'box', <JSONField: Event.box>)
add_column ('event', 'area', <IntegerField: Event.area>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'area', <IntegerField: Event.area>)
Done 004_add_bbox_region_area
[2022-01-11 19:58:52] peewee_migrate INFO : Done 004_add_bbox_region_area
[2022-01-11 19:58:52] frigate.mqtt INFO : MQTT connected
[2022-01-11 19:58:52] detector.cpu1 INFO : Starting detection process: 216
[2022-01-11 19:58:52] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-01-11 19:58:52] frigate.app INFO : Output process started: 220
[2022-01-11 19:58:52] frigate.app INFO : Camera processor started for low_drive: 223
[2022-01-11 19:58:52] frigate.app INFO : Camera processor started for high_drive: 225
[2022-01-11 19:58:52] detector.cpu2 INFO : Starting detection process: 218
[2022-01-11 19:58:52] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-01-11 19:58:52] ws4py INFO : Using epoll
[2022-01-11 19:58:52] frigate.app INFO : Camera processor started for garden: 226
[2022-01-11 19:58:52] frigate.app INFO : Camera processor started for shed: 228
[2022-01-11 19:58:52] frigate.app INFO : Capture process started for low_drive: 229
[2022-01-11 19:58:52] frigate.app INFO : Capture process started for high_drive: 231
[2022-01-11 19:58:52] frigate.app INFO : Capture process started for garden: 235
[2022-01-11 19:58:52] frigate.app INFO : Capture process started for shed: 239
[2022-01-11 19:58:52] ws4py INFO : Using epoll
[2022-01-11 19:58:57] frigate.record WARNING : Discarding a corrupt recording segment: high_drive-20220111194745.mp4
[2022-01-11 19:58:57] frigate.record WARNING : Discarding a corrupt recording segment: shed-20220111194745.mp4
[2022-01-11 19:58:57] frigate.record WARNING : Discarding a corrupt recording segment: garden-20220111194745.mp4
[2022-01-11 19:58:57] frigate.record WARNING : Discarding a corrupt recording segment: low_drive-20220111194745.mp4
[2022-01-11 19:59:51] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:50020]
[2022-01-11 20:00:51] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:50020]
[2022-01-11 20:00:57] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:40060]
[2022-01-11 20:01:03] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:40060]
[2022-01-11 20:01:42] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:51260]
[2022-01-11 20:01:43] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:41224]
[2022-01-11 20:01:46] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:41224]
[2022-01-11 20:03:48] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:51260]

 

 

Any ideas ?

Edited by fireplex
Link to comment
3 minutes ago, fireplex said:

For some reason my config has stopped working properly.

 

In the Web GUI provided by the docker I can no longer toggle detect, snapshot or recordings on or off - clicking the icons simply hightlights the buttons and that's it.

 

Also, in Home Assistant multiple entities now report as Unavailable or greyed out:

 

image.thumb.png.4a077ced7110d6df8e2335b672d9bcde.png

 

 

I have tried deleting all my recordings and the appdata, deleting the container and re-downloading and starting from fresh but the problem strangely remains.

 

Any ideas ?

 

The frigate logs seem OK, from a fresh start:

 

 

022-01-11 19:58:52] frigate.app INFO : Starting Frigate (0.9.4-26ae608)
[2022-01-11 19:58:52] frigate.app INFO : Creating directory: /media/frigate/recordings
[2022-01-11 19:58:52] frigate.app INFO : Creating directory: /media/frigate/clips
Starting migrations
[2022-01-11 19:58:52] peewee_migrate INFO : Starting migrations
Migrate "001_create_events_table"
[2022-01-11 19:58:52] peewee_migrate INFO : Migrate "001_create_events_table"
sql ('CREATE TABLE IF NOT EXISTS "event" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "label" VARCHAR(20) NOT NULL, "camera" VARCHAR(20) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "top_score" REAL NOT NULL, "false_positive" INTEGER NOT NULL, "zones" JSON NOT NULL, "thumbnail" TEXT NOT NULL)',)
[2022-01-11 19:58:52] peewee_migrate INFO : sql ('CREATE TABLE IF NOT EXISTS "event" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "label" VARCHAR(20) NOT NULL, "camera" VARCHAR(20) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "top_score" REAL NOT NULL, "false_positive" INTEGER NOT NULL, "zones" JSON NOT NULL, "thumbnail" TEXT NOT NULL)',)
sql ('CREATE INDEX IF NOT EXISTS "event_label" ON "event" ("label")',)
[2022-01-11 19:58:52] peewee_migrate INFO : sql ('CREATE INDEX IF NOT EXISTS "event_label" ON "event" ("label")',)
sql ('CREATE INDEX IF NOT EXISTS "event_camera" ON "event" ("camera")',)
[2022-01-11 19:58:52] peewee_migrate INFO : sql ('CREATE INDEX IF NOT EXISTS "event_camera" ON "event" ("camera")',)
Done 001_create_events_table
[2022-01-11 19:58:52] peewee_migrate INFO : Done 001_create_events_table
Migrate "002_add_clip_snapshot"
[2022-01-11 19:58:52] peewee_migrate INFO : Migrate "002_add_clip_snapshot"
add_column ('event', 'has_clip', <BooleanField: Event.has_clip>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'has_clip', <BooleanField: Event.has_clip>)
add_column ('event', 'has_snapshot', <BooleanField: Event.has_snapshot>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'has_snapshot', <BooleanField: Event.has_snapshot>)
Done 002_add_clip_snapshot
[2022-01-11 19:58:52] peewee_migrate INFO : Done 002_add_clip_snapshot
Migrate "003_create_recordings_table"
[2022-01-11 19:58:52] peewee_migrate INFO : Migrate "003_create_recordings_table"
Done 003_create_recordings_table
[2022-01-11 19:58:52] peewee_migrate INFO : Done 003_create_recordings_table
Migrate "004_add_bbox_region_area"
[2022-01-11 19:58:52] peewee_migrate INFO : Migrate "004_add_bbox_region_area"
add_column ('event', 'region', <JSONField: Event.region>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'region', <JSONField: Event.region>)
add_column ('event', 'box', <JSONField: Event.box>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'box', <JSONField: Event.box>)
add_column ('event', 'area', <IntegerField: Event.area>)
[2022-01-11 19:58:52] peewee_migrate INFO : add_column ('event', 'area', <IntegerField: Event.area>)
Done 004_add_bbox_region_area
[2022-01-11 19:58:52] peewee_migrate INFO : Done 004_add_bbox_region_area
[2022-01-11 19:58:52] frigate.mqtt INFO : MQTT connected
[2022-01-11 19:58:52] detector.cpu1 INFO : Starting detection process: 216
[2022-01-11 19:58:52] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-01-11 19:58:52] frigate.app INFO : Output process started: 220
[2022-01-11 19:58:52] frigate.app INFO : Camera processor started for low_drive: 223
[2022-01-11 19:58:52] frigate.app INFO : Camera processor started for high_drive: 225
[2022-01-11 19:58:52] detector.cpu2 INFO : Starting detection process: 218
[2022-01-11 19:58:52] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-01-11 19:58:52] ws4py INFO : Using epoll
[2022-01-11 19:58:52] frigate.app INFO : Camera processor started for garden: 226
[2022-01-11 19:58:52] frigate.app INFO : Camera processor started for shed: 228
[2022-01-11 19:58:52] frigate.app INFO : Capture process started for low_drive: 229
[2022-01-11 19:58:52] frigate.app INFO : Capture process started for high_drive: 231
[2022-01-11 19:58:52] frigate.app INFO : Capture process started for garden: 235
[2022-01-11 19:58:52] frigate.app INFO : Capture process started for shed: 239
[2022-01-11 19:58:52] ws4py INFO : Using epoll
[2022-01-11 19:58:57] frigate.record WARNING : Discarding a corrupt recording segment: high_drive-20220111194745.mp4
[2022-01-11 19:58:57] frigate.record WARNING : Discarding a corrupt recording segment: shed-20220111194745.mp4
[2022-01-11 19:58:57] frigate.record WARNING : Discarding a corrupt recording segment: garden-20220111194745.mp4
[2022-01-11 19:58:57] frigate.record WARNING : Discarding a corrupt recording segment: low_drive-20220111194745.mp4
[2022-01-11 19:59:51] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:50020]
[2022-01-11 20:00:51] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:50020]
[2022-01-11 20:00:57] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:40060]
[2022-01-11 20:01:03] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:40060]
[2022-01-11 20:01:42] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:51260]
[2022-01-11 20:01:43] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:41224]
[2022-01-11 20:01:46] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:41224]
[2022-01-11 20:03:48] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:51260]

 

 

Any ideas ?

This is not related to the frigate docker, is something with your hass addon. Please refer to that github issue page.

Link to comment

OK thanks, I thought because the toggles on the Web GUI no longer worked it may be an issue with the docker...

 

I have also tried deleting everything on HA, ie removing the integration from HA AND HACS, re-downloading etc and the issue remains.

 

Should I open a new Issue against the HASS integration on github https://github.com/blakeblackshear/frigate-hass-integration ?

Edited by fireplex
Link to comment
5 minutes ago, fireplex said:

OK thanks, I thought because the toggles on the Web GUI no longer worked it may be an issue with the docker...

 

I have also tried deleting everything on HA, ie removing the integration from HA AND HACS, re-downloading etc and the issue remains.

If you refer to this icons then maybe yes but the image you attached is from HA.

 

imagen.png.e0317449d942e005432ff596d2d0e971.png

 

Anyway, if this is the case, I found this: https://github.com/blakeblackshear/frigate/issues/2098

 

Comment out the port on your config file.

Edited by yayitazale
Link to comment

Yes those icons, I forgot to also post a picture of them.

 

Sorry, which port number?

 

My config file:

 

mqtt:
  host: 192.168.1.37    # homeassistant

#logger:
#  default: debug

 
detectors:
   cpu1: 
     type: cpu
   cpu2:
     type: cpu   
#   cpu3: 
#     type: cpu
#   cpu4:
#     type: cpu  
     
     
cameras:
  low_drive:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.1.43:554/12
          roles:
            - detect
            - rtmp
        - path: rtsp://192.168.1.43:554/11
          roles:
            - record
    motion:
      mask:
        - 0,0,389,0,345,153,0,179
    detect:
      width: 640
      height: 352

  high_drive:
    ffmpeg:
      inputs:
        - path: rtsp://user:[email protected]:554/stream2
          roles:
            - detect
            - rtmp
        - path: rtsp://user:[email protected]:554/stream1
          roles:
            - record
    motion:
      mask:
        - 714,720,1280,720,1280,0,1101,0,916,0,911,124,810,169,717,275
    detect:
      width: 640
      height: 480


  garden:
    ffmpeg:
      inputs:
        - path: rtsp://guest:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
            - rtmp
        - path: rtsp://guest:[email protected]:554/h264Preview_01_main
          roles:
            - record
    motion:
      mask:
        - 1280,0,275,0,542,720,1280,720
    detect:
      width: 640
      height: 480

  shed:
    ffmpeg:
      inputs:
        - path: rtsp://guest:[email protected]:80/ch0_1.264
          roles:
            - detect
            - rtmp
        - path: rtsp://guest:[email protected]:80/ch0_0.264
          roles:
            - record
    detect:
      width: 640
      height: 360

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
  # Optional: filters to reduce false positives for specific object types
  filters:
    person:
      # Optional: minimum width*height of the bounding box for the detected object (default: 0)
      # min_area: 5000
      # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
      # max_area: 100000
      # Optional: minimum score for the object to initiate tracking (default: shown below)
      min_score: 0.5
      # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
      threshold: 0.7      


record:
  # Optional: Enable recording
  enabled: True
  # Optional: Number of days to retain
  retain_days: 7  


#
# Intel Quick Sync ffmpeg GPU acceleration
#      
      
ffmpeg:
  hwaccel_args:
    - -hwaccel
#    - qsv 
#    - -qsv_device
#    - /dev/dri/renderD128
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p    

 

Link to comment
11 hours ago, fireplex said:

Yes those icons, I forgot to also post a picture of them.

 

Sorry, which port number?

 

My config file:

 

mqtt:
  host: 192.168.1.37    # homeassistant

#logger:
#  default: debug

 
detectors:
   cpu1: 
     type: cpu
   cpu2:
     type: cpu   
#   cpu3: 
#     type: cpu
#   cpu4:
#     type: cpu  
     
     
cameras:
  low_drive:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.1.43:554/12
          roles:
            - detect
            - rtmp
        - path: rtsp://192.168.1.43:554/11
          roles:
            - record
    motion:
      mask:
        - 0,0,389,0,345,153,0,179
    detect:
      width: 640
      height: 352

  high_drive:
    ffmpeg:
      inputs:
        - path: rtsp://user:[email protected]:554/stream2
          roles:
            - detect
            - rtmp
        - path: rtsp://user:[email protected]:554/stream1
          roles:
            - record
    motion:
      mask:
        - 714,720,1280,720,1280,0,1101,0,916,0,911,124,810,169,717,275
    detect:
      width: 640
      height: 480


  garden:
    ffmpeg:
      inputs:
        - path: rtsp://guest:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
            - rtmp
        - path: rtsp://guest:[email protected]:554/h264Preview_01_main
          roles:
            - record
    motion:
      mask:
        - 1280,0,275,0,542,720,1280,720
    detect:
      width: 640
      height: 480

  shed:
    ffmpeg:
      inputs:
        - path: rtsp://guest:[email protected]:80/ch0_1.264
          roles:
            - detect
            - rtmp
        - path: rtsp://guest:[email protected]:80/ch0_0.264
          roles:
            - record
    detect:
      width: 640
      height: 360

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
  # Optional: filters to reduce false positives for specific object types
  filters:
    person:
      # Optional: minimum width*height of the bounding box for the detected object (default: 0)
      # min_area: 5000
      # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
      # max_area: 100000
      # Optional: minimum score for the object to initiate tracking (default: shown below)
      min_score: 0.5
      # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
      threshold: 0.7      


record:
  # Optional: Enable recording
  enabled: True
  # Optional: Number of days to retain
  retain_days: 7  


#
# Intel Quick Sync ffmpeg GPU acceleration
#      
      
ffmpeg:
  hwaccel_args:
    - -hwaccel
#    - qsv 
#    - -qsv_device
#    - /dev/dri/renderD128
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p    

 

 

Try to define the port number on the MQTT host like so:

 

mqtt:
  host: IP address
  port: port

 

And see if it makes any difference. If the error persists please open a issue o reopen a issue on github.

 

Link to comment

I thought I was doing so well.  I am 3 weeks into my Unraid journey, and ran into the first problem I have not been able to solve on my own, so this gets to be my first post asking for help.  I know that I have been lurking here for quite some time, and hope I give all the pertinent information that is needed.

 

Environment:

  1. I have a Wyze Cam V3 wuth the RTSP firmware 4.61.0.1
  2. Running unraid 6.9.2
  3. GPU NVIDIA GeForce GTX 750 Ti
    1. Nvidia Plugin installed and confirmed working in Plex Container for hardware transcoding
    2. It is not passed through to any VM
  4. Latest version of frigate-nvidia container
    1. Extra Parameters: --runtime=nvidia --shm-size=5G
    2. NVIDIA_DRIVER_CAPABILITIES: compute,utility,video

Frigate Config.yml File:

 

mqtt:
  host: w.x.y.z
  port: 1884
  client_id: aaaaaaaaa
  user: bbbbbbbbbb
  password: cccccccccc
cameras:
  #WYZE Cam V3 with FW 4.61.0.1
  Garage:
    ffmpeg:
      inputs:
        - path: rtsp://ddddddd:eeeeeee@fffffffff/live
          roles:
            - detect
            - rtmp        
    detect:
      width: 1920
      height: 1080
      fps: 5
    motion:
      mask:
        #Tree by Camera
        - 147,149,251,85,425,60,655,42,714,0,0,0,0,88,0,259
        #Tree by door
        - 1647,0,1658,125,1513,160,1461,217,1410,182,1420,137,1272,108,1364,0
        #Across the street
        - 611,0,640,41,652,100,598,175,499,163,487,66,532,0
    zones:
      MySpot:
        coordinates: 1462,378,1514,151,1676,116,1649,0,1920,0,1920,1080,670,1080
      Common:
        coordinates: 500,108,589,293,789,266,1066,201,1264,147,1359,167,1370,230,1483,289,1414,415,1116,702,698,1080,0,1080,0,256
record:
  # Optional: Enable recording (default: shown below)
  enabled: True
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 8
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 8
    retain:
      # Required: Default retention days (default: shown below)
      default: 10
snapshots:
  # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True
  # Optional: print a timestamp on the snapshots (default: shown below)
  timestamp: True
  # Optional: draw bounding box on the snapshots (default: shown below)
  bounding_box: True
  # Optional: crop the snapshot (default: shown below)
  crop: True
  # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
  retain:
    # Required: Default retention days (default: shown below)
    default: 10
objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
    - car
    - motorcycle
    - bicycle
    - knife
detect:
  # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
  max_disappeared: 50
  ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel warning
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
  hwaccel_args: []
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
ffmpeg:
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
    - -c:v
    - h264_cuvid

 

If I take out 

ffmpeg:
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
    - -c:v
    - h264_cuvid

 

Everything works perfectly.,

 

Problem:

 

If I have those entries in the config.yml file I get this in the logs when I start the container up:

[2022-01-14 18:54:39] frigate.app INFO : Starting Frigate (0.9.4-26ae608)
*************************************************************
*************************************************************
*** Your config file is not valid! ***
*** Please check the docs at ***
*** https://docs.frigate.video/configuration/index ***
*************************************************************
*************************************************************
*** Config Validation Errors ***
*************************************************************
4 validation errors for FrigateConfig
detect -> ffmpeg
extra fields not permitted (type=value_error.extra)
detect -> global_args
extra fields not permitted (type=value_error.extra)
detect -> hwaccel_args
extra fields not permitted (type=value_error.extra)
detect -> input_args
extra fields not permitted (type=value_error.extra)
*************************************************************
*** End Config Validation Errors ***
*************************************************************

 

Target Solution:  Working Frigate with a clean start up and able to use the card, and any direction on how to post questions like this to make it easier not only to get help, but if someone has problems later it can help them too.

 

Thank you

 

Edited by Azarian
Link to comment
On 1/15/2022 at 2:16 AM, Azarian said:

I thought I was doing so well.  I am 3 weeks into my Unraid journey, and ran into the first problem I have not been able to solve on my own, so this gets to be my first post asking for help.  I know that I have been lurking here for quite some time, and hope I give all the pertinent information that is needed.

 

Environment:

  1. I have a Wyze Cam V3 wuth the RTSP firmware 4.61.0.1
  2. Running unraid 6.9.2
  3. GPU NVIDIA GeForce GTX 750 Ti
    1. Nvidia Plugin installed and confirmed working in Plex Container for hardware transcoding
    2. It is not passed through to any VM
  4. Latest version of frigate-nvidia container
    1. Extra Parameters: --runtime=nvidia --shm-size=5G
    2. NVIDIA_DRIVER_CAPABILITIES: compute,utility,video

Frigate Config.yml File:

 

mqtt:
  host: w.x.y.z
  port: 1884
  client_id: aaaaaaaaa
  user: bbbbbbbbbb
  password: cccccccccc
cameras:
  #WYZE Cam V3 with FW 4.61.0.1
  Garage:
    ffmpeg:
      inputs:
        - path: rtsp://ddddddd:eeeeeee@fffffffff/live
          roles:
            - detect
            - rtmp        
    detect:
      width: 1920
      height: 1080
      fps: 5
    motion:
      mask:
        #Tree by Camera
        - 147,149,251,85,425,60,655,42,714,0,0,0,0,88,0,259
        #Tree by door
        - 1647,0,1658,125,1513,160,1461,217,1410,182,1420,137,1272,108,1364,0
        #Across the street
        - 611,0,640,41,652,100,598,175,499,163,487,66,532,0
    zones:
      MySpot:
        coordinates: 1462,378,1514,151,1676,116,1649,0,1920,0,1920,1080,670,1080
      Common:
        coordinates: 500,108,589,293,789,266,1066,201,1264,147,1359,167,1370,230,1483,289,1414,415,1116,702,698,1080,0,1080,0,256
record:
  # Optional: Enable recording (default: shown below)
  enabled: True
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 8
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 8
    retain:
      # Required: Default retention days (default: shown below)
      default: 10
snapshots:
  # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True
  # Optional: print a timestamp on the snapshots (default: shown below)
  timestamp: True
  # Optional: draw bounding box on the snapshots (default: shown below)
  bounding_box: True
  # Optional: crop the snapshot (default: shown below)
  crop: True
  # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
  retain:
    # Required: Default retention days (default: shown below)
    default: 10
objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
    - car
    - motorcycle
    - bicycle
    - knife
detect:
  # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
  max_disappeared: 50
  ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel warning
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
  hwaccel_args: []
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
ffmpeg:
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
    - -c:v
    - h264_cuvid

 

If I take out 

ffmpeg:
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
    - -c:v
    - h264_cuvid

 

Everything works perfectly.,

 

Problem:

 

If I have those entries in the config.yml file I get this in the logs when I start the container up:

[2022-01-14 18:54:39] frigate.app INFO : Starting Frigate (0.9.4-26ae608)
*************************************************************
*************************************************************
*** Your config file is not valid! ***
*** Please check the docs at ***
*** https://docs.frigate.video/configuration/index ***
*************************************************************
*************************************************************
*** Config Validation Errors ***
*************************************************************
4 validation errors for FrigateConfig
detect -> ffmpeg
extra fields not permitted (type=value_error.extra)
detect -> global_args
extra fields not permitted (type=value_error.extra)
detect -> hwaccel_args
extra fields not permitted (type=value_error.extra)
detect -> input_args
extra fields not permitted (type=value_error.extra)
*************************************************************
*** End Config Validation Errors ***
*************************************************************

 

Target Solution:  Working Frigate with a clean start up and able to use the card, and any direction on how to post questions like this to make it easier not only to get help, but if someone has problems later it can help them too.

 

Thank you

 

Did you fill out the "NVIDIA_VISIBLE_DEVICES" argument on the docker template?

 

Then, the ffmpeg validation error is because you are mixing arguments on one line with the new ones with line breaks. You should only have one type of separation between args. so it must be something like:

 

ffmpeg:
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -c:v hevc_cuvid

 

Or:

 

ffmpeg:
  # Optional: global input args (default: shown below)
  input_args: 
	- -avoid_negative_ts 
	- make_zero 
	- -fflags +genpts+discardcorrupt 
	- -rtsp_transport tcp 
	- -stimeout 5000000 
	- -use_wallclock_as_timestamps 1
	- -c:v
	- h264_cuvid

 

Change that and I think it will work.

 

PD: if that doesn't work, you maybe need to change it for something like this as we discuss it here:

 

ffmpeg:
  # Optional: global input args (default: shown below)
  hwaccel_args: -c:v hevc_cuvid
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1

 

Edited by yayitazale
Link to comment

Tat took care of it.  I have an old card until I upgrade my gamming card, so I had to change the codec from hevc_cuvid to h264_cuvid

 

This is my configuration that is working.  I did have the GUI set as mentioned, but forgot to add that to my configuration.

ffmpeg:
  # Optional: global input args (default: shown below)
  hwaccel_args: -c:v h264_cuvid
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1

 

  • Like 1
Link to comment
On 5/1/2021 at 11:08 AM, yayitazale said:

Be aware that this is going to increase a lot the write/reads on your disk, so I recomend you to use a proper disk to do this job (a WD purple series or so https://amzn.to/3e6UIjC (refered link)). You should config all your shares except the NVR one to not to use this disk and only use it to store NVR)

 

Is there an easy way to do this? I've emptied a disk to use with this docker and tried setting global share setting to not use this disk. Unfortunately, now I cannot create a new share that uses only this disk. Do I have to adjust the setting for every share I have to not use this disk?

Link to comment
4 hours ago, wgstarks said:

Is there an easy way to do this? I've emptied a disk to use with this docker and tried setting global share setting to not use this disk. Unfortunately, now I cannot create a new share that uses only this disk. Do I have to adjust the setting for every share I have to not use this disk?

Not sure how did you define it, but I think you have to config the global option just to include certain disks except the NVR one, and then create a specific share with NVR disk included and all the other disks excluded.

 

https://wiki.unraid.net/Manual/Shares#Included_and_Excluded_disk.28s.29

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.