Frigate hwaccel for Home Assistant Blue

I installed Frigate on Home Assistant Blue and have two cameras working. I have a Coral TPU plugged into a USB3 port and is seems to be working.

~ $ lsusb
Bus 002 Device 004: ID 18d1:9302
Bus 002 Device 002: ID 05e3:0620
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 05e3:0610
Bus 002 Device 001: ID 1d6b:0003
~ $ 

I am unable to find the proper value for hwaccel_args. If I leave out the ffmpeg key altogether, everything works but I get a warning about not having a GPU.

WARNING : Did not detect hwaccel, using a GPU for accelerated video decoding is highly recommended.

This clip from the log shows the warning and the message that the TPU was found.

2024-11-03 22:25:41.905386941  [2024-11-03 14:25:41] frigate.util.services          WARNING : Did not detect hwaccel, using a GPU for accelerated video decoding is highly recommended
2024-11-03 22:25:42.318449113  [h264 @ 0x274a42c0] Overread VUI by 8 bits
2024-11-03 22:25:45.113397904  [h264 @ 0x272acf40] Overread VUI by 8 bits
2024-11-03 22:25:46.707508655  [INFO] Starting go2rtc healthcheck service...
2024-11-03 22:25:46.948848773  [2024-11-03 14:25:46] peewee_migrate.logs            INFO    : Starting migrations
2024-11-03 22:25:46.951650040  [2024-11-03 14:25:46] peewee_migrate.logs            INFO    : There is nothing to migrate
2024-11-03 22:25:46.964795165  [2024-11-03 14:25:46] frigate.app                    INFO    : Recording process started: 409
2024-11-03 22:25:46.982707532  [2024-11-03 14:25:46] frigate.app                    INFO    : Recording process started: 410
2024-11-03 22:25:46.989690303  [2024-11-03 14:25:46] frigate.app                    INFO    : go2rtc process pid: 98
2024-11-03 22:25:47.050402591  [2024-11-03 14:25:47] detector.coral                 INFO    : Starting detection process: 438
2024-11-03 22:25:47.056317183  [2024-11-03 14:25:47] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2024-11-03 22:25:49.825962080  [2024-11-03 14:25:47] frigate.app                    INFO    : Output process started: 440
2024-11-03 22:25:49.827359318  [2024-11-03 14:25:47] frigate.app                    INFO    : Camera processor started for pool: 457
2024-11-03 22:25:49.828110481  [2024-11-03 14:25:47] frigate.app                    INFO    : Camera processor started for driveway: 458
2024-11-03 22:25:49.829134074  [2024-11-03 14:25:47] frigate.app                    INFO    : Capture process started for pool: 459
2024-11-03 22:25:49.829995285  [2024-11-03 14:25:47] frigate.app                    INFO    : Capture process started for driveway: 469
2024-11-03 22:25:49.830857537  [2024-11-03 14:25:49] frigate.comms.mqtt             ERROR   : Unable to publish to driveway/all: client is not connected
2024-11-03 22:25:49.831604033  [2024-11-03 14:25:49] frigate.comms.mqtt             ERROR   : Unable to publish to driveway/motion: client is not connected
2024-11-03 22:25:49.832228981  [2024-11-03 14:25:49] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found

My configuration file is:

detectors:
  coral:
    type: edgetpu
    device: usb

mqtt:
  enabled: true
  host: worldofmaze.duckdns.org
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: homeassistant
  password: redacted
  stats_interval: 60
  
cameras:
  pool:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]/h264Preview_01_sub
          roles:
            - record
            - detect
            - rtmp
  driveway:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]/h264Preview_01_sub
          roles:
            - record
            - detect
            - rtmp

record:
  enabled: true
  retain:
    days: 7
    mode: motion
  events:
    retain:
      default: 14
      mode: active_objects

objects:
  track:
    - person
    - dog
    - cat
  filters:
    person:
      # Optional: minimum width*height of the bounding box for the detected object (default: 0)
      min_area: 0
      # 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
version: 0.14

Any help getting the TPU working would be appreciated.

Thanks in advance.

Hwaccel is different to the detection/tpu.

Hwaccel is for decoding video streams. Detection (which is assisted by the TPU) is detecting an object in a frame once there is motion detected in the video stream.

1 Like

Thanks for the response, @nickrout.

Is this warning

WARNING : Did not detect hwaccel, using a GPU for accelerated video decoding is highly recommended.

to be expected since I am running on HA Blue or is there a config change I need to make.

I don’t know if any of the hwaccel options that work on the Blue, so yes I would expect that. Although you could explore the rockchip option. (I can’t recall what chipset the blue has)

yes, there is no hwaccel available on the blue

Thank you @crzynik

It probably is acheivable given that the Blue is based on one of the computers that performs extremely well at video decoding on Kodi.

Yeah, it requires a specific version of ffmpeg with decoders built for the hardware, which frigate does not include

1 Like