[SUPPORT] blakeblackshear - Frigate


Recommended Posts

On 7/29/2021 at 9:45 PM, Hendrik6073 said:

thanks for checking, going to send it back, hope next oe works!

 

 

yes it was broken and replaced, now i got a active led and stick is found;

 

frigate.mqtt INFO : MQTT connected detector.

coral INFO : Starting detection process: 38

frigate.app INFO : Camera processor started for voordeur: 41

frigate.edgetpu INFO : Attempting to load TPU as usb

frigate.app INFO : Camera processor started for inrit: 43

frigate.app INFO : Camera processor started for achtertuin: 45

frigate.app INFO : Capture process started for voordeur: 46

frigate.app INFO : Capture process started for inrit: 51

frigate.app INFO : Capture process started for achtertuin: 52

frigate.edgetpu INFO : TPU found

 

my config per camera looks like this;

 

  # Name of your camera
  voordeur:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.2.242:554/user=admin_password=kznXUeBx_channel=1
          roles:
            - detect
            - rtmp
            - clips
            - record
    objects:
      track:
        - person
        - cat
    # Optional: save clips configuration
    width: 2592
    height: 1944
    fps: 5

 

TPU part:

detectors:
  coral:
    type: edgetpu
    device: usb

 

I run Home Asistant on a Nuc with Intel I3, i was aspecting average load dropping with installing the Coral stick, it stays above quit high above 3.

Stopping Frigate drops load down to 0.3.... is there a way to check if offloading works as it should? or is my config not correct?

 

thanks agian!

 

coral_led.jpg

Link to comment
3 hours ago, Hendrik6073 said:

 

yes it was broken and replaced, now i got a active led and stick is found;

 

frigate.mqtt INFO : MQTT connected detector.

coral INFO : Starting detection process: 38

frigate.app INFO : Camera processor started for voordeur: 41

frigate.edgetpu INFO : Attempting to load TPU as usb

frigate.app INFO : Camera processor started for inrit: 43

frigate.app INFO : Camera processor started for achtertuin: 45

frigate.app INFO : Capture process started for voordeur: 46

frigate.app INFO : Capture process started for inrit: 51

frigate.app INFO : Capture process started for achtertuin: 52

frigate.edgetpu INFO : TPU found

 

my config per camera looks like this;

 

  # Name of your camera
  voordeur:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.2.242:554/user=admin_password=kznXUeBx_channel=1
          roles:
            - detect
            - rtmp
            - clips
            - record
    objects:
      track:
        - person
        - cat
    # Optional: save clips configuration
    width: 2592
    height: 1944
    fps: 5

 

TPU part:

detectors:
  coral:
    type: edgetpu
    device: usb

 

I run Home Asistant on a Nuc with Intel I3, i was aspecting average load dropping with installing the Coral stick, it stays above quit high above 3.

Stopping Frigate drops load down to 0.3.... is there a way to check if offloading works as it should? or is my config not correct?

 

thanks agian!

 

coral_led.jpg

Can you attach your docker settings? Can you see the tpu on unraid under tools>system devices>USB devices? You can find it as a Google Inc. device.

Link to comment
Quote

Can you attach your docker settings? Can you see the tpu on unraid under tools>system devices>USB devices? You can find it as a Google Inc. device.

i feel stupid now.......... where can i see the docke settings and... where is this tools option ? on my debian machine ? sorry........😞

 

edit: this is my LSUSB, it shows Google, and Frigate says also it sees it. Maybe it is normal to get much higer processor times just because the camera's are also be seen /active in my Home Assistant (dashboard) and only the AI component of de images (looking for objects) is offloaded ? Would it be better to run the camera's on a dedicated NUC to not interere with Home Assistant?

tpu.JPG

Edited by Hendrik6073
Link to comment

Using  PCI m2 Coral , I dont see the apex drivers in unraid 

root@Tower:~# ls -l /dev/apex_*
/bin/ls: cannot access '/dev/apex_*': No such file or directory

I do see the PCI device however
03:00.0 System peripheral: Global Unichip Corp. Coral Edge TPU
04:00.0 System peripheral: Global Unichip Corp. Coral Edge TPU

Im trying to pass the PCI coral over to a docker instance.

im using the coral drivers plugin. Unraid 6.10 rc

Interesting part is that im using a new dual edge adapter card that exposes both tpu cores to the system. In a VM I can get everything to work and can use Frigate with dual TPUs even with docker in the VM... But on the Frigate docker instance in Unraid, it cant see the dual tpu pci card?

some content -> https://github.com/blakeblackshear/frigate/issues/1428

Edited by aceofskies05
Link to comment
On 8/9/2021 at 7:44 PM, Hendrik6073 said:

i feel stupid now.......... where can i see the docke settings and... where is this tools option ? on my debian machine ? sorry........😞

 

edit: this is my LSUSB, it shows Google, and Frigate says also it sees it. Maybe it is normal to get much higer processor times just because the camera's are also be seen /active in my Home Assistant (dashboard) and only the AI component of de images (looking for objects) is offloaded ? Would it be better to run the camera's on a dedicated NUC to not interere with Home Assistant?

tpu.JPG

Ok. This forum is for unraid users, please use the official project forum on github. By the way, yes, using frigate with a TPU still uses some CPU for ffmpeg decoding and movement detection.

  • Thanks 1
Link to comment
On 8/10/2021 at 11:25 PM, aceofskies05 said:

Using  PCI m2 Coral , I dont see the apex drivers in unraid 

root@Tower:~# ls -l /dev/apex_*
/bin/ls: cannot access '/dev/apex_*': No such file or directory

I do see the PCI device however
03:00.0 System peripheral: Global Unichip Corp. Coral Edge TPU
04:00.0 System peripheral: Global Unichip Corp. Coral Edge TPU

Im trying to pass the PCI coral over to a docker instance.

im using the coral drivers plugin. Unraid 6.10 rc

Interesting part is that im using a new dual edge adapter card that exposes both tpu cores to the system. In a VM I can get everything to work and can use Frigate with dual TPUs even with docker in the VM... But on the Frigate docker instance in Unraid, it cant see the dual tpu pci card?

some content -> https://github.com/blakeblackshear/frigate/issues/1428

As I see this has been resolved here:

 

 

  • Like 1
Link to comment

Slightly off topic... but I just tried this out with CPU inference and am impressed, so I want to get the Coral TPU

 

Im not familiar with M.2 and after an hour of Amazon searches.. and can't figure out what adapter I need for this.  Any recommendations?

 

I have an older Dell T20 with one "one full-height, half-length x16 PCIe Gen3 card slot connected to processor" and "One full-height, half-length x16 (x4) PCIe Gen2 card slot connected to PCH"

 

It looks like the M.2 A+E  Coral is easier to find.. but cant find the right adapter.  If I get the M.2 B+M, most adapters I saw say they are for M.2 M keyed SSDs.. I assume that's not the right one for this?

 

BTW with one camera and a low framerate.. it seems to work fine with CPU inference.  I'll wait for the TPU to add my other cameras.

Edited by doctor17
Link to comment
13 hours ago, doctor17 said:

Slightly off topic... but I just tried this out with CPU inference and am impressed, so I want to get the Coral TPU

 

Im not familiar with M.2 and after an hour of Amazon searches.. and can't figure out what adapter I need for this.  Any recommendations?

 

I have an older Dell T20 with one "one full-height, half-length x16 PCIe Gen3 card slot connected to processor" and "One full-height, half-length x16 (x4) PCIe Gen2 card slot connected to PCH"

 

It looks like the M.2 A+E  Coral is easier to find.. but cant find the right adapter.  If I get the M.2 B+M, most adapters I saw say they are for M.2 M keyed SSDs.. I assume that's not the right one for this?

 

BTW with one camera and a low framerate.. it seems to work fine with CPU inference.  I'll wait for the TPU to add my other cameras.

If I'm correct, your motherboard is a VD5HY-0VD5HY so you can use a Mini PCI version connecting it to the Mini PCI Gen2 slot:

 

imagen.png.6fdfafc2fea45a5223106ba63a7f7cd1.png

Link to comment

Hi,

 

I don't know why after a period of perfect work now my docker is not starting anymore.

 

The only message I receive is

Execution error

Server error

 

In appdata folder there's no log and no log is available when selection log from container gui in unraid.

 

Any hint?

 

PS: I noticed a new variable for FRIGATE_RTSP_PASSWORD but there's no descrition at all? I tried to update my config for all rtsp streams but how can I write it down when I need to login to a stream with user and pass?

 

This is my config at the moment:

 

        - path: rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=0

 

Thank you in advance

Link to comment
4 hours ago, Jokerigno said:

Hi,

 

I don't know why after a period of perfect work now my docker is not starting anymore.

 

The only message I receive is

Execution error

Server error

 

In appdata folder there's no log and no log is available when selection log from container gui in unraid.

 

Any hint?

 

PS: I noticed a new variable for FRIGATE_RTSP_PASSWORD but there's no descrition at all? I tried to update my config for all rtsp streams but how can I write it down when I need to login to a stream with user and pass?

 

This is my config at the moment:

 

        - path: rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=0

 

Thank you in advance

Can you post your config file and your container configuration please?

Link to comment
On 8/24/2021 at 6:49 PM, yayitazale said:

Can you post your config file and your container configuration please?

Sorry I completely lost this message.

 

Here's the config.yml

 

#frigate sample config.yml
mqtt:
  # Required: host name
  host: 192.168.2.100
  # Optional: port (default: shown below)
  port: 1883
  # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  user: xxxxxxxxxxxx
  # Optional: 
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password: xxxxxxxxxxx
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60
 
cameras:
  soggiorno:
    # ffmpeg:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - qsv
        - -qsv_device
        - /dev/dri/renderD128
      inputs:
        - path: rtsp://192.168.2.115:8554/unicast
          roles:
            - detect
            - clips
        # - path: rtsp://192.168.2.118/ch0_1.h264
          # roles:
# #            - detect
            # - clips
#    width: 3840
#    height: 2160
    width: 1920
    height: 1080
    fps: 5
    rtmp:
      # Required: Enable the live stream (default: True)
      enabled: false
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        # - car
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    # Optional: Configuration for the jpg snapshots written to the clips directory for each event
    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: False
#      # Optional: height to resize the snapshot to (default: original size)
#      height: 175
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    objects:
      track:
        - person
        # - cat
        # - dog
#        - car 
  veranda:
    # ffmpeg:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - qsv
        - -qsv_device
        - /dev/dri/renderD128
      inputs:
        - path: rtsp://xxxxxxxxx:[email protected]:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - detect
            - clips
        # - path: rtsp://192.168.2.118/ch0_1.h264
          # roles:
# #            - detect
            # - clips
#    width: 3840
#    height: 2160
    width: 1920
    height: 1080
    fps: 5
    rtmp:
      # Required: Enable the live stream (default: True)
      enabled: false
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        # - car
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    # Optional: Configuration for the jpg snapshots written to the clips directory for each event
    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: False
#      # Optional: height to resize the snapshot to (default: original size)
#      height: 175
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    objects:
      track:
        - person
        # - cat
        # - dog
#        - car
    motion:
      mask:
        - 1920,1080,1920,315,1839,202,1575,459,1695,656,1271,904,968,1080
        - 0,0,0,392,155,656,635,465,1006,354,1176,0
        - 1861,59,1861,113,1441,108,1442,52
  balcone:
    # ffmpeg:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - qsv
        - -qsv_device
        - /dev/dri/renderD128
      inputs:
        - path: rtsp://192.168.2.118/ch0_0.h264
          roles:
            - detect
            - clips
        # - path: rtsp://192.168.2.118/ch0_1.h264
          # roles:
# #            - detect
            # - clips
#    width: 3840
#    height: 2160
    width: 1920
    height: 1080
    fps: 5
    rtmp:
      # Required: Enable the live stream (default: True)
      enabled: false
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        # - car
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    # Optional: Configuration for the jpg snapshots written to the clips directory for each event
    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: False
#      # Optional: height to resize the snapshot to (default: original size)
#      height: 175
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    objects:
      track:
        - person
        # - cat
        # - dog
#        - car
    motion:
      mask:
        - 1920,0,743,0,728,278,869,440,1079,707,1409,1080,1920,1080
# detectors:
  # cpu1:
    # type: cpu
  # cpu2:
    # type: cpu
detectors:
  coral:
    type: edgetpu
    device: usb
# detectors:
  # coral_pci:
    # type: edgetpu
    # device: pci

 

 

and attached screenshot of the config ( I don't know other ways to share it)

 

Thank you

 

immagine.thumb.png.76e56c08e902d43a57aa9b7222bc5192.png

Link to comment
15 hours ago, Jokerigno said:

Sorry I completely lost this message.

 

Here's the config.yml

 

#frigate sample config.yml
mqtt:
  # Required: host name
  host: 192.168.2.100
  # Optional: port (default: shown below)
  port: 1883
  # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  user: xxxxxxxxxxxx
  # Optional: 
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password: xxxxxxxxxxx
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60
 
cameras:
  soggiorno:
    # ffmpeg:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - qsv
        - -qsv_device
        - /dev/dri/renderD128
      inputs:
        - path: rtsp://192.168.2.115:8554/unicast
          roles:
            - detect
            - clips
        # - path: rtsp://192.168.2.118/ch0_1.h264
          # roles:
# #            - detect
            # - clips
#    width: 3840
#    height: 2160
    width: 1920
    height: 1080
    fps: 5
    rtmp:
      # Required: Enable the live stream (default: True)
      enabled: false
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        # - car
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    # Optional: Configuration for the jpg snapshots written to the clips directory for each event
    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: False
#      # Optional: height to resize the snapshot to (default: original size)
#      height: 175
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    objects:
      track:
        - person
        # - cat
        # - dog
#        - car 
  veranda:
    # ffmpeg:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - qsv
        - -qsv_device
        - /dev/dri/renderD128
      inputs:
        - path: rtsp://xxxxxxxxx:[email protected]:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - detect
            - clips
        # - path: rtsp://192.168.2.118/ch0_1.h264
          # roles:
# #            - detect
            # - clips
#    width: 3840
#    height: 2160
    width: 1920
    height: 1080
    fps: 5
    rtmp:
      # Required: Enable the live stream (default: True)
      enabled: false
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        # - car
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    # Optional: Configuration for the jpg snapshots written to the clips directory for each event
    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: False
#      # Optional: height to resize the snapshot to (default: original size)
#      height: 175
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    objects:
      track:
        - person
        # - cat
        # - dog
#        - car
    motion:
      mask:
        - 1920,1080,1920,315,1839,202,1575,459,1695,656,1271,904,968,1080
        - 0,0,0,392,155,656,635,465,1006,354,1176,0
        - 1861,59,1861,113,1441,108,1442,52
  balcone:
    # ffmpeg:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - qsv
        - -qsv_device
        - /dev/dri/renderD128
      inputs:
        - path: rtsp://192.168.2.118/ch0_0.h264
          roles:
            - detect
            - clips
        # - path: rtsp://192.168.2.118/ch0_1.h264
          # roles:
# #            - detect
            # - clips
#    width: 3840
#    height: 2160
    width: 1920
    height: 1080
    fps: 5
    rtmp:
      # Required: Enable the live stream (default: True)
      enabled: false
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        # - car
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    # Optional: Configuration for the jpg snapshots written to the clips directory for each event
    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: False
#      # Optional: height to resize the snapshot to (default: original size)
#      height: 175
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 15
    objects:
      track:
        - person
        # - cat
        # - dog
#        - car
    motion:
      mask:
        - 1920,0,743,0,728,278,869,440,1079,707,1409,1080,1920,1080
# detectors:
  # cpu1:
    # type: cpu
  # cpu2:
    # type: cpu
detectors:
  coral:
    type: edgetpu
    device: usb
# detectors:
  # coral_pci:
    # type: edgetpu
    # device: pci

 

 

and attached screenshot of the config ( I don't know other ways to share it)

 

Thank you

 

immagine.thumb.png.76e56c08e902d43a57aa9b7222bc5192.png

You hace mixed configs for older versions. Delete the entrys of clips and recording paths, change the path of media to /mnt/user/cctv and delete the "Inter GPU mapping" entry and try again.

Link to comment
35 minutes ago, yayitazale said:

You hace mixed configs for older versions. Delete the entrys of clips and recording paths, change the path of media to /mnt/user/cctv and delete the "Inter GPU mapping" entry and try again.

It still does not start

 

immagine.thumb.png.7e7b36ce79a5dbccd85e319bf302c11b.png

 

I also tried to delete container and redownload it from CA (hoping in a correct template):

 

the first time I see this error when building the container:

 

docker: Error response from daemon: error gathering device information while adding custom device "/dev/dri/renderD128": no such file or directory.

 

But then after few tentatives it worked (but container does not start still)

Edited by Jokerigno
Link to comment

I tried modifing config with just mqtt 1 camera e detectors but still I see error in building the container:

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='frigate' --net='bridge' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'FRIGATE_RTSP_PASSWORD'='enterpassword' -p '5000:5000/tcp' -p '1935:1935/tcp' -v '/mnt/user/appdata/frigate':'/config':'rw' -v '/mnt/user/Media/frigate':'/media/frigate':'rw' -v '/tmp/frigate':'/tmp/cache':'rw' -v '/etc/localtime':'/etc/localtime':'rw' --device='/dev/bus/usb' --device='/dev/dri/renderD128' --shm-size=5G 'blakeblackshear/frigate:stable-amd64'

cc6093a248943b695bffe696d9da014ae29f9b52fdb2c388f9926ae90d3c9cce
docker: Error response from daemon: error gathering device information while adding custom device "/dev/dri/renderD128": no such file or directory.

 

(this time I made no changed to the template)

 

Any hint on why the dev/dri is not found?

Link to comment

Thanks for the coral AI driver. It works right out of the box for my new Coral AI M.2 A+E key. The inference speed is 5-10ms. Amazing speed!

 

But, my CPU usage hovers at around 15-20% when frigate is operating. I also managed to passthrough intel hd520 via the Intel GPU TOP plugin by ich77, added "/dev/dri/renderD128" to the docker variable, config frigate to use the ffmpeg. The GPU usage is only around 7% but CPU is 15-20%.

 

Nothing abnormal on the frigate's log.

 

My cctvs are literally standstill pictures. minimal to no motion. The sky, trees & timestamps have all been masked. I would have thought once I pass iGPU, the CPU usage would drop. :| Any idea what may have cause this?

 

My rig: Gigabyte Brix with Intel i5-6200U CPU; 16GB DDR3

 

Here's my frigate config:

image.thumb.png.315fd6a579d170543a014fcc191e4f0b.png

ffmpeg:
  global_args: -hide_banner -loglevel warning
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
  # Optional: output args for detect streams (default: shown below)
  output_args:
    detect: -f rawvideo -pix_fmt yuv420p
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

cameras:
  front_porch:
    ffmpeg:
       inputs:
        - path: rtsp://XXX:[email protected]:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - detect
            - clips
    motion:
      mask:
        - 550,0,544,95,0,173,0,0
        - 1280,235,1280,193,862,66,860,109
        - 940,54,949,0,953,0,1253,0,1259,57     
    width: 1280
    height: 720
    fps: 5
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
  side_porch:
    ffmpeg:
      inputs:
        - path: rtsp://XXX:[email protected]:554/cam/realmonitor?channel=2&subtype=0
          roles:
            - detect
            - clips
    motion:
      mask:
#       - 0,100,199,0,209,45,0,204
        - 1259,50,1258,21,951,21,942,49
        - 0,502,935,35,745,0,933,0,728,0,923,0,1065,0,1053,53,711,0,0,0      
    width: 1280
    height: 720
    fps: 5  
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
  back_porch:
    ffmpeg:
      inputs:
        - path: rtsp://XXX:[email protected]:554/cam/realmonitor?channel=3&subtype=0
          roles:
            - detect
            - clips
    motion:
      mask:
        - 0,528,604,31,1280,187,1280,0,966,0,786,0,737,0,635,0,498,97,274,55,0,250       
    width: 1280
    height: 720
    fps: 5  
    objects:
      track:
        - person 
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
  wet_kitchen:
    ffmpeg:
      inputs:
        - path: rtsp://XXX:[email protected]:554/cam/realmonitor?channel=4&subtype=0
          roles:
            - detect
            - clips
    motion:
        mask:
          - 1280,0,1280,72,1280,60,0,52,0,0
          - 746,143,938,195,927,41,738,27
          - 1280,115,1280,302,1088,231,1082,74
          - 577,111,668,124,660,21,573,25
    width: 1280
    height: 720
    fps: 5  
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
  indoor:
    ffmpeg:
      inputs:
        - path: rtsp://XXX:[email protected]:554//h264Preview_01_sub
          roles:
            - detect
            - clips
    motion:
        mask:
          - 224,29,414,29,413,10,226,10
    width: 640
    height: 352
    fps: 3
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
detectors:
  coral:
    type: edgetpu
    device: pci

 

 

Edited by fishermanG
Link to comment
51 minutes ago, fishermanG said:

Thanks for the coral AI driver. It works right out of the box for my new Coral AI M.2 A+E key. The inference speed is 5-10ms. Amazing speed!

 

But, my CPU usage hovers at around 15-20% when frigate is operating. I also managed to passthrough intel hd520 via the Intel GPU TOP plugin by ich77, added "/dev/dri/renderD128" to the docker variable, config frigate to use the ffmpeg. The GPU usage is only around 7% but CPU is 15-20%.

 

Nothing abnormal on the frigate's log.

 

My cctvs are literally standstill pictures. minimal to no motion. The sky, trees & timestamps have all been masked. I would have thought once I pass iGPU, the CPU usage would drop. :| Any idea what may have cause this?

 

My rig: Gigabyte Brix with Intel i5-6200U CPU; 16GB DDR3

 

Here's my frigate config:

image.thumb.png.315fd6a579d170543a014fcc191e4f0b.png

ffmpeg:
  global_args: -hide_banner -loglevel warning
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
  # Optional: output args for detect streams (default: shown below)
  output_args:
    detect: -f rawvideo -pix_fmt yuv420p
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

cameras:
  front_porch:
    ffmpeg:
       inputs:
        - path: rtsp://XXX:[email protected]:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - detect
            - clips
    motion:
      mask:
        - 550,0,544,95,0,173,0,0
        - 1280,235,1280,193,862,66,860,109
        - 940,54,949,0,953,0,1253,0,1259,57     
    width: 1280
    height: 720
    fps: 5
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
  side_porch:
    ffmpeg:
      inputs:
        - path: rtsp://XXX:[email protected]:554/cam/realmonitor?channel=2&subtype=0
          roles:
            - detect
            - clips
    motion:
      mask:
#       - 0,100,199,0,209,45,0,204
        - 1259,50,1258,21,951,21,942,49
        - 0,502,935,35,745,0,933,0,728,0,923,0,1065,0,1053,53,711,0,0,0      
    width: 1280
    height: 720
    fps: 5  
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
  back_porch:
    ffmpeg:
      inputs:
        - path: rtsp://XXX:[email protected]:554/cam/realmonitor?channel=3&subtype=0
          roles:
            - detect
            - clips
    motion:
      mask:
        - 0,528,604,31,1280,187,1280,0,966,0,786,0,737,0,635,0,498,97,274,55,0,250       
    width: 1280
    height: 720
    fps: 5  
    objects:
      track:
        - person 
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
  wet_kitchen:
    ffmpeg:
      inputs:
        - path: rtsp://XXX:[email protected]:554/cam/realmonitor?channel=4&subtype=0
          roles:
            - detect
            - clips
    motion:
        mask:
          - 1280,0,1280,72,1280,60,0,52,0,0
          - 746,143,938,195,927,41,738,27
          - 1280,115,1280,302,1088,231,1082,74
          - 577,111,668,124,660,21,573,25
    width: 1280
    height: 720
    fps: 5  
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
  indoor:
    ffmpeg:
      inputs:
        - path: rtsp://XXX:[email protected]:554//h264Preview_01_sub
          roles:
            - detect
            - clips
    motion:
        mask:
          - 224,29,414,29,413,10,226,10
    width: 640
    height: 352
    fps: 3
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 5
detectors:
  coral:
    type: edgetpu
    device: pci

 

 

Not sure if you can achieve a better performance, I have a similar config and same performance witch I think is normal because of the decoding/encoding activity. Maybe we need to tinker with ffmpeg args ¿Can you open a issue on github?

Link to comment
10 hours ago, bigbangus said:

Any way to avoid having the refresh the usb coral path in the docker template when I reboot my server? It sometimes changes if I have various devices plugged/unplugged in the usb ports.

 

I read this https://forums.unraid.net/topic/71372-usb-passthrough-device-location-changing/ but not sure if there was a clear solution.

You only need to map '/dev/bus/usb' as a device and frigate will detect your TPU and only use that device. There is no need to change anything on that line on the template.

Edited by yayitazale
  • Thanks 1
Link to comment

Having some issues getting frigate up and running i'm hoping someone could assist with .  I am running HA as a VM and can setup frigate just fine and it works great.  However if i attempt to passthrough my USB Coral to the VM and start it it says the USB device cannot be found and essentially will not allow the VM to startup period even if i untick the coral usb device.   I have to rebuild the VM to get HA up and running again. 

 

So my next logical option is the Frigate Docker container but i'm not finding much for tutorials on how to get frigate setup properly here and integrate it with HA.   When i setup the Docker and attempt to run it  i get:  Error parsing config: [Errno 2] No such file or directory: '/config/config.yml'

 

I guess what i am unsure on here is where do i put this config.yml file?   i have a frigate.yml file in HA but apparently i'm not grasping how to make the two talk to each other.  I do have MQTT setup and if it matters the HA instance and Frigate have separate local IP's.

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.