blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.13k stars 1.65k forks source link

No frames been received, check error logs - no feeds on main page, no detection #7192

Closed cpuks closed 1 year ago

cpuks commented 1 year ago

Describe the problem you are having

Cannot get camera feeds to display on main page, detection does not work too. Frigate stable runs inside docker container on top of LXC (Proxmox) Cameras are Dahua HDCVI and one Dahua IP camera - I'm using Frigate for over a year now. I've got coral USB and Intel QSV set up, when I enter camera I've got feed via webrtc/jsmpeg/msi. I've also used custom go2rtc -> 1.5 This what I'm getting on Edge browser: image

Version

0.12.1-367d724

Frigate config file

mqtt:
  host: 192.168.88.26
  port: 1883
  user: mqtt
  password: ###

detectors:
  coral:
    type: edgetpu
    device: usb

#detect:
#  width: 704
#  height: 480
#  fps: 5
#  enabled: True
#  max_disappeared: 25

objects:
  track:
    - person
    - cat
    - car
    - truck
    - bicycle
    - motorcycle

motion:
  threshold: 40

record:
  enabled: True
  retain:
    days: 5
  events:
    pre_capture: 10
    post_capture: 10
    retain:
      default: 5
      mode: motion
      objects:
        person: 10
        cat: 5

snapshots:
  enabled: True
  timestamp: True
  bounding_box: True
  retain:
    default: 14
    objects:
      person: 21

go2rtc:
  streams:
    brama:
      - rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=1&subtype=0
    wejscie:
      - rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=2&subtype=0
    taras:
      - rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=3&subtype=0
    ognisko:
      - rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=4&subtype=0
    furtka_tyl:
      - rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=5&subtype=0
    domofon:
      - rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=6&subtype=0
  webrtc:
    candidates:
      - 192.168.88.22:8555
      - stun:8555

#restream:
#  enabled: True
#  birdseye: True
#  jsmpeg:
#    height: 720
#    quality: 12

timestamp_style:
  position: "tl"
  format: "%d.%m.%Y %H:%M:%S"

ffmpeg:
  hwaccel_args: preset-intel-qsv-h264
  input_args: preset-rtsp-restream

cameras:
  brama:
    ffmpeg:
      inputs:
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=1&subtype=0
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=1&subtype=1
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 704
      height: 480
    birdseye:
      mode: motion
    motion:
      mask:
        - 704,36,532,34,528,0,704,0
  wejscie:
    ffmpeg:
      inputs:
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=2&subtype=0
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=2&subtype=1
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 704
      height: 480
    birdseye:
      mode: motion
    motion:
      mask:
        - 704,38,529,36,529,0,704,0
  taras:
    ffmpeg:
      inputs:
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=3&subtype=0
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=3&subtype=1
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 704
      height: 480
    birdseye:
      mode: motion
    motion:
      mask:
        - 704,35,531,36,530,0,704,0
  ognisko:
    ffmpeg:
      inputs:
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=4&subtype=0
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=4&subtype=1
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 704
      height: 480
    birdseye:
      enabled: False
    motion:
      mask:
        - 704,35,532,37,530,0,704,0
  furtka_tyl:
    ffmpeg:
      inputs:
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=5&subtype=0
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=5&subtype=1
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 704
      height: 480
    birdseye:
      enabled: False
    motion:
      mask:
        - 522,35,523,0,704,0,704,35
  domofon:
    ffmpeg:
      inputs:
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=6&subtype=0
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://user:pswd@192.168.88.135:554/cam/realmonitor?channel=6&subtype=1
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 640
      height: 480
    birdseye:
      mode: motion
    motion:
      mask:
        - 0,480,0,440,296,442,296,480
        - 0,0,0,266,45,289,186,337,282,346,430,345,534,328,704,267,704,0

Relevant log output

2023-07-17 18:03:15.952526261  [2023-07-17 18:03:15] frigate.app                    INFO    : Camera processor started for domofon: 692
2023-07-17 18:03:15.956829017  [2023-07-17 18:03:15] frigate.app                    INFO    : Capture process started for brama: 693
2023-07-17 18:03:15.961041603  [2023-07-17 18:03:15] frigate.app                    INFO    : Capture process started for wejscie: 694
2023-07-17 18:03:15.968324798  [2023-07-17 18:03:15] frigate.app                    INFO    : Capture process started for taras: 695
2023-07-17 18:03:15.984484302  [2023-07-17 18:03:15] frigate.app                    INFO    : Capture process started for ognisko: 698
2023-07-17 18:03:15.996721689  [2023-07-17 18:03:15] frigate.app                    INFO    : Capture process started for furtka_tyl: 704
2023-07-17 18:03:16.014774175  [2023-07-17 18:03:16] frigate.app                    INFO    : Capture process started for domofon: 714
2023-07-17 18:03:16.197660493  [2023-07-17 18:03:16] frigate.video                  ERROR   : domofon: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.198225036  [2023-07-17 18:03:16] frigate.video                  ERROR   : domofon: ffmpeg process is not running. exiting capture thread...
2023-07-17 18:03:16.201312745  [2023-07-17 18:03:16] frigate.video                  ERROR   : taras: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.201521115  [2023-07-17 18:03:16] frigate.video                  ERROR   : taras: ffmpeg process is not running. exiting capture thread...
2023-07-17 18:03:16.251254132  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.251805244  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.252172946  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.252516563  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.252878778  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.253219119  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.253549830  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.253892810  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.254217833  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.254582261  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.254931032  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.255265335  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.255574531  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.255948992  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.287534229  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.287537531  [2023-07-17 18:03:16] frigate.video                  ERROR   : furtka_tyl: ffmpeg process is not running. exiting capture thread...
2023-07-17 18:03:16.311205734  [2023-07-17 18:03:16] frigate.video                  ERROR   : wejscie: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.314998287  [2023-07-17 18:03:16] frigate.video                  ERROR   : wejscie: ffmpeg process is not running. exiting capture thread...
2023-07-17 18:03:16.324052319  [2023-07-17 18:03:16] frigate.video                  ERROR   : ognisko: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.324699591  [2023-07-17 18:03:16] frigate.video                  ERROR   : ognisko: ffmpeg process is not running. exiting capture thread...
2023-07-17 18:03:16.339292538  [2023-07-17 18:03:16] frigate.video                  ERROR   : brama: Unable to read frames from ffmpeg process.
2023-07-17 18:03:16.340216774  [2023-07-17 18:03:16] frigate.video                  ERROR   : brama: ffmpeg process is not running. exiting capture

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

You need to let the logs run longer before pasting them so we can see the actual errors

NickM-27 commented 1 year ago

I would also suggest using preset-vaapi not qsv

cpuks commented 1 year ago

Ok did swap to preset-vaapi, let me catch some logs now. Should I change log level to debug or something? Hmm nothing fancy in logs, Chrome gives same behaviour, Android browsers too, no events, no feeds: 2023-07-17 18:32:57.508662970 [INFO] Starting Frigate... 2023-07-17 18:32:58.589560805 [2023-07-17 18:32:58] frigate.app INFO : Starting Frigate (0.12.1-367d724) 2023-07-17 18:32:58.614404362 [2023-07-17 18:32:58] peewee_migrate INFO : Starting migrations 2023-07-17 18:32:58.619814577 [2023-07-17 18:32:58] peewee_migrate INFO : There is nothing to migrate 2023-07-17 18:32:58.647146710 [2023-07-17 18:32:58] frigate.app INFO : Output process started: 679 2023-07-17 18:32:58.647150954 [2023-07-17 18:32:58] frigate.app INFO : Camera processor started for brama: 682 2023-07-17 18:32:58.652558721 [2023-07-17 18:32:58] frigate.app INFO : Camera processor started for wejscie: 683 2023-07-17 18:32:58.657523712 [2023-07-17 18:32:58] frigate.app INFO : Camera processor started for taras: 684 2023-07-17 18:32:58.662616536 [2023-07-17 18:32:58] detector.coral INFO : Starting detection process: 678 2023-07-17 18:32:58.662620587 [2023-07-17 18:32:58] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-07-17 18:32:58.662621832 [2023-07-17 18:32:58] frigate.app INFO : Camera processor started for ognisko: 685 2023-07-17 18:32:58.669477787 [2023-07-17 18:32:58] frigate.app INFO : Camera processor started for furtka_tyl: 687 2023-07-17 18:32:58.676140347 [2023-07-17 18:32:58] frigate.app INFO : Camera processor started for domofon: 688 2023-07-17 18:32:58.691245486 [2023-07-17 18:32:58] frigate.app INFO : Capture process started for brama: 691 2023-07-17 18:32:58.696238528 [2023-07-17 18:32:58] frigate.app INFO : Capture process started for wejscie: 696 2023-07-17 18:32:58.701157953 [2023-07-17 18:32:58] frigate.app INFO : Capture process started for taras: 697 2023-07-17 18:32:58.713848919 [2023-07-17 18:32:58] frigate.app INFO : Capture process started for ognisko: 699 2023-07-17 18:32:58.722564556 [2023-07-17 18:32:58] frigate.app INFO : Capture process started for furtka_tyl: 703 2023-07-17 18:32:58.740446665 [2023-07-17 18:32:58] frigate.app INFO : Capture process started for domofon: 705

cpuks commented 1 year ago

Ok I've got something: 2023-07-17 18:34:49.927180776 [INFO] Starting Frigate... 2023-07-17 18:34:50.952790509 [2023-07-17 18:34:50] frigate.app INFO : Starting Frigate (0.12.1-367d724) 2023-07-17 18:34:50.977653069 [2023-07-17 18:34:50] peewee_migrate INFO : Starting migrations 2023-07-17 18:34:50.982439144 [2023-07-17 18:34:50] peewee_migrate INFO : There is nothing to migrate 2023-07-17 18:34:51.004800666 [2023-07-17 18:34:51] frigate.app INFO : Output process started: 680 2023-07-17 18:34:51.024331519 [2023-07-17 18:34:51] frigate.app INFO : Camera processor started for brama: 685 2023-07-17 18:34:51.026723086 [2023-07-17 18:34:51] frigate.app INFO : Camera processor started for wejscie: 686 2023-07-17 18:34:51.032534460 [2023-07-17 18:34:51] frigate.app INFO : Camera processor started for taras: 688 2023-07-17 18:34:51.037740248 [2023-07-17 18:34:51] frigate.app INFO : Camera processor started for ognisko: 689 2023-07-17 18:34:51.051871630 [2023-07-17 18:34:51] frigate.app INFO : Camera processor started for furtka_tyl: 691 2023-07-17 18:34:51.062123999 [2023-07-17 18:34:51] frigate.app INFO : Camera processor started for domofon: 694 2023-07-17 18:34:51.068910032 [2023-07-17 18:34:51] frigate.app INFO : Capture process started for brama: 695 2023-07-17 18:34:51.073735930 [2023-07-17 18:34:51] frigate.app INFO : Capture process started for wejscie: 699 2023-07-17 18:34:51.081863863 [2023-07-17 18:34:51] frigate.app INFO : Capture process started for taras: 701 2023-07-17 18:34:51.086949867 [2023-07-17 18:34:51] frigate.app INFO : Capture process started for ognisko: 702 2023-07-17 18:34:51.091830608 [2023-07-17 18:34:51] frigate.app INFO : Capture process started for furtka_tyl: 705 2023-07-17 18:34:51.100526468 [2023-07-17 18:34:51] frigate.app INFO : Capture process started for domofon: 707 2023-07-17 18:35:11.139936493 [2023-07-17 18:35:11] ffmpeg.brama.record ERROR : rtsp://:@192.168.88.135:554/cam/realmonitor?channel=1&subtype=0: Invalid data found when processing input 2023-07-17 18:35:11.141067566 [2023-07-17 18:35:11] watchdog.brama INFO : Terminating the existing ffmpeg process... 2023-07-17 18:35:11.141071223 [2023-07-17 18:35:11] watchdog.brama INFO : Waiting for ffmpeg to exit gracefully... 2023-07-17 18:35:11.211619713 [2023-07-17 18:35:11] watchdog.domofon INFO : domofon exceeded fps limit. Exiting ffmpeg... 2023-07-17 18:35:11.212360657 [2023-07-17 18:35:11] watchdog.domofon INFO : Waiting for ffmpeg to exit gracefully... 2023-07-17 18:35:16.325391177 [2023-07-17 18:34:51] detector.coral INFO : Starting detection process: 679 2023-07-17 18:35:16.325394998 [2023-07-17 18:34:51] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-07-17 18:35:16.326135331 [2023-07-17 18:35:16] frigate.detectors.plugins.edgetpu_tfl ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors. 2023-07-17 18:35:16.326247272 Process detector:coral: 2023-07-17 18:35:16.335672995 Traceback (most recent call last): 2023-07-17 18:35:16.335676349 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate 2023-07-17 18:35:16.335677368 delegate = Delegate(library, options) 2023-07-17 18:35:16.335678457 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in init 2023-07-17 18:35:16.335682105 raise ValueError(capture.message) 2023-07-17 18:35:16.335700192 ValueError 2023-07-17 18:35:16.335701098
2023-07-17 18:35:16.335702376 During handling of the above exception, another exception occurred: 2023-07-17 18:35:16.335703560
2023-07-17 18:35:16.335704297 Traceback (most recent call last): 2023-07-17 18:35:16.335705316 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap 2023-07-17 18:35:16.335706104 self.run() 2023-07-17 18:35:16.335707019 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run 2023-07-17 18:35:16.335726403 self._target(*self._args, **self._kwargs) 2023-07-17 18:35:16.335727575 File "/opt/frigate/frigate/object_detection.py", line 98, in run_detector 2023-07-17 18:35:16.335729056 object_detector = LocalObjectDetector(detector_config=detector_config) 2023-07-17 18:35:16.335729959 File "/opt/frigate/frigate/object_detection.py", line 52, in init 2023-07-17 18:35:16.335743738 self.detect_api = create_detector(detector_config) 2023-07-17 18:35:16.335744895 File "/opt/frigate/frigate/detectors/init.py", line 24, in create_detector 2023-07-17 18:35:16.335745819 return api(detector_config) 2023-07-17 18:35:16.335746776 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 37, in init 2023-07-17 18:35:16.335747678 edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config) 2023-07-17 18:35:16.335760011 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate 2023-07-17 18:35:16.335761117 raise ValueError('Failed to load delegate from {}\n{}'.format( 2023-07-17 18:35:16.335761938 ValueError: Failed to load delegate from libedgetpu.so.1.0 2023-07-17 18:35:16.335762645

NickM-27 commented 1 year ago

That means the coral was not found

cpuks commented 1 year ago

But it shouldn't be related to no feed on main page and no detection - it's LXC container, privileged and docker is privileged too. image

And VAINFO: {"return_code":0,"stderr":"","stdout":"vainfo:VA-APIversion:1.17(libva2.10.0)nvainfo:Driverversion:InteliHDdriverforIntel(R)GenGraphics-23.1.1()nvainfo:SupportedprofileandentrypointsnVAProfileNone:tVAEntrypointVideoProcnVAProfileNone:tVAEntrypointStatsnVAProfileMPEG2Simple:tVAEntrypointVLDnVAProfileMPEG2Simple:tVAEntrypointEncSlicenVAProfileMPEG2Main:tVAEntrypointVLDnVAProfileMPEG2Main:tVAEntrypointEncSlicenVAProfileH264Main:tVAEntrypointVLDnVAProfileH264Main:tVAEntrypointEncSlicenVAProfileH264Main:tVAEntrypointFEInVAProfileH264Main:tVAEntrypointEncSliceLPnVAProfileH264High:tVAEntrypointVLDnVAProfileH264High:tVAEntrypointEncSlicenVAProfileH264High:tVAEntrypointFEInVAProfileH264High:tVAEntrypointEncSliceLPnVAProfileVC1Simple:tVAEntrypointVLDnVAProfileVC1Main:tVAEntrypointVLDnVAProfileVC1Advanced:tVAEntrypointVLDnVAProfileJPEGBaseline:tVAEntrypointVLDnVAProfileJPEGBaseline:tVAEntrypointEncPicturenVAProfileH264ConstrainedBaseline:tVAEntrypointVLDnVAProfileH264ConstrainedBaseline:tVAEntrypointEncSlicenVAProfileH264ConstrainedBaseline:tVAEntrypointFEInVAProfileH264ConstrainedBaseline:tVAEntrypointEncSliceLPnVAProfileVP8Version0_3:tVAEntrypointVLDnVAProfileHEVCMain:tVAEntrypointVLDnVAProfileHEVCMain:tVAEntrypointEncSlicenVAProfileHEVCMain:tVAEntrypointFEInVAProfileHEVCMain:tVAEntrypointEncSliceLPnVAProfileHEVCMain10:tVAEntrypointVLDnVAProfileHEVCMain10:tVAEntrypointEncSlicenVAProfileHEVCMain10:tVAEntrypointEncSliceLPnVAProfileVP9Profile0:tVAEntrypointVLDnVAProfileVP9Profile0:tVAEntrypointEncSliceLPnVAProfileVP9Profile1:tVAEntrypointVLDnVAProfileVP9Profile1:tVAEntrypointEncSliceLPnVAProfileVP9Profile2:tVAEntrypointVLDnVAProfileVP9Profile2:tVAEntrypointEncSliceLPnVAProfileVP9Profile3:tVAEntrypointVLDnVAProfileVP9Profile3:tVAEntrypointEncSliceLPnVAProfileHEVCMain12:tVAEntrypointVLDnVAProfileHEVCMain12:tVAEntrypointEncSlicenVAProfileHEVCMain422_10:tVAEntrypointVLDnVAProfileHEVCMain422_10:tVAEntrypointEncSlicenVAProfileHEVCMain422_12:tVAEntrypointVLDnVAProfileHEVCMain422_12:tVAEntrypointEncSlicenVAProfileHEVCMain444:tVAEntrypointVLDnVAProfileHEVCMain444:tVAEntrypointEncSliceLPnVAProfileHEVCMain444_10:tVAEntrypointVLDnVAProfileHEVCMain444_10:tVAEntrypointEncSliceLPnVAProfileHEVCMain444_12:tVAEntrypointVLDnVAProfileHEVCSccMain:tVAEntrypointVLDnVAProfileHEVCSccMain:tVAEntrypointEncSliceLPnVAProfileHEVCSccMain10:tVAEntrypointVLDnVAProfileHEVCSccMain10:tVAEntrypointEncSliceLPnVAProfileHEVCSccMain444:tVAEntrypointVLDnVAProfileHEVCSccMain444:tVAEntrypointEncSliceLPnVAProfileAV1Profile0:tVAEntrypointVLDnVAProfileHEVCSccMain444_10:tVAEntrypointVLDnVAProfileHEVCSccMain444_10:tVAEntrypointEncSliceLP"}

NickM-27 commented 1 year ago

But it shouldn't be related to no feed on main page and no detection - it's LXC container, privileged and docker is privileged too.

If the coral is not detected then there is no way to do detection... so of course it's related. frigate also immediately shuts down if no coral is detected.

cpuks commented 1 year ago

That's my docker compose:

services:
  frigate:
    container_name: frigate
    image: ghcr.io/blakeblackshear/frigate:0.12.0 (swapped just now to 0.12.0 to see what's going on - was using stable)
    privileged: true
    ports:
      - 5000:5000
      - 8554:8554 # RTSP feeds
      - 8555:8555/tcp # WebRTC over tcp
      - 8555:8555/udp # WebRTC over udp
      - 1984:1984/tcp # HA WebRTC integration
    network_mode: host
    environment:
      - FRIGATE_RTSP_PASSWORD=XXX
      - PLUS_API_KEY=XXX
      - LIBVA_DRIVER_NAME=iHD
    shm_size: 256mb
    devices:
      - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    restart: unless-stopped
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /mnt/appdata/frigate:/config
      - /mnt/frigate:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000

And that's LXC part:

lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/serial/by-id  dev/serial/by-id  none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0       dev/ttyUSB0       none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1       dev/ttyUSB1       none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM0       dev/ttyACM0       none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM1       dev/ttyACM1       none bind,optional,create=file
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.mount.entry: /dev/bus/usb/002 dev/bus/usb/002 none bind,optional,create=dir 0, 0

Didn't made any changes and on 5th July it stopped working.

NickM-27 commented 1 year ago

Didn't made any changes and on 5th July it stopped working.

Right, the last logs are clear from there that the coral is not being found.

cpuks commented 1 year ago

So it might be broken too and resets any time frigate tries to use it?

This is lsusb -v inside LXC:

Bus 004 Device 003: ID 1a6e:089a Global Unichip Corp. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x1a6e Global Unichip Corp.
  idProduct          0x089a 
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x001b
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              896mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2 
      iInterface              0 
      Device Firmware Upgrade Interface Descriptor:
        bLength                             9
        bDescriptorType                    33
        bmAttributes                        7
          Will Not Detach
          Manifestation Tolerant
          Upload Supported
          Download Supported
        wDetachTimeout                   1000 milliseconds
        wTransferSize                     256 bytes
        bcdDFUVersion                   1.01

And that's inside host system:

Bus 004 Device 003: ID 1a6e:089a Global Unichip Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x1a6e Global Unichip Corp.
  idProduct          0x089a 
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x001b
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              896mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2 
      iInterface              0 
      Device Firmware Upgrade Interface Descriptor:
        bLength                             9
        bDescriptorType                    33
        bmAttributes                        7
          Will Not Detach
          Manifestation Tolerant
          Upload Supported
          Download Supported
        wDetachTimeout                   1000 milliseconds
        wTransferSize                     256 bytes
        bcdDFUVersion                   1.01
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x0016
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000006
      BESL Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000c
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   2
      Lowest fully-functional device speed is High Speed (480Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat        2047 micro seconds
Device Status:     0x000c
  (Bus Powered)
  U1 Enabled
  U2 Enabled
cpuks commented 1 year ago

Thanks for assist USB permissions or should I say USB cgroup changed when kernel updated. Sorry for hassle and thanks for help!