Frigate Integration - Loads and Crashes

I have just installed Frigate on my Pi4 with HASSOS. Am running 2021.

Hass Core: core-2021.4.4
Frigate version: 1.14

Sometimes i can get it to start, but i get a corrupted video feed, and before long the add-on crashes.

Log File:

 * Starting nginx nginx
   ...done.
frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
peewee_migrate                 INFO    : There is nothing to migrate
detector.coral                 INFO    : Starting detection process: 36
frigate.edgetpu                INFO    : Attempting to load TPU as usb
frigate.app                    INFO    : Camera processor started for back: 39
frigate.app                    INFO    : Capture process started for back: 41
frigate.edgetpu                INFO    : No EdgeTPU detected.
Process detector:coral:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
    delegate = Delegate(library, options)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, in __init__
    raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/frigate/frigate/edgetpu.py", line 124, in run_detector
    object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
  File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
    edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.mqtt                   INFO    : MQTT connected

frigate.yml:

mqtt:
  host: 192.168.***.***
  user: *******
  password: *******
cameras:
  back:
    ffmpeg:
      inputs:
        - path: rtsp://*username**:**pass**@192.168.***.***:554/ch01/1
          roles:
            - detect
            - rtmp
    width: 1920
    height: 1088
    fps: 5

Any ideas?

Please add also these to your frigate.yml and try if the adon startup. If it starts and gets a corrupted video this means that your width or height or fps of the camera is wrong.

detectors:
  coral:
    type: cpu
ffmpeg:
  input_args: >-
    -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport
    tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
  hwaccel_args:
    - '-c:v'
    - h264
  output_args:
    detect: '-f rawvideo -pix_fmt yuv420p'
    rtmp: '-c copy -f flv'
1 Like