frigate icon indicating copy to clipboard operation
frigate copied to clipboard

[Support]: FFMPEG crashes immediately with newest beta

Open starman2k01 opened this issue 2 years ago • 9 comments

Describe the problem you are having

Supervised Home Assistant. hwaccel_args: preset-rpi-64-h264, coral edge tpu. Frigate crashes out right away:

s6-rc: info: service s6rc-fdholder: starting s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service s6rc-fdholder successfully started s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service log-prepare: starting s6-rc: info: service log-prepare successfully started s6-rc: info: service nginx-log: starting s6-rc: info: service go2rtc-log: starting s6-rc: info: service frigate-log: starting s6-rc: info: service nginx-log successfully started s6-rc: info: service go2rtc-log successfully started s6-rc: info: service go2rtc: starting s6-rc: info: service frigate-log successfully started s6-rc: info: service go2rtc successfully started s6-rc: info: service frigate: starting s6-rc: info: service frigate successfully started s6-rc: info: service nginx: starting [INFO] Preparing go2rtc config... s6-rc: info: service nginx successfully started s6-rc: info: service legacy-services: starting [INFO] Starting Frigate... [INFO] Starting NGINX... s6-rc: info: service legacy-services successfully started [WARN] Failed to get IP address from supervisor [INFO] Starting go2rtc... 2023-01-29 14:49:33.947696581 14:49:33.947 INF go2rtc version 0.1-rc.9 linux/arm64 2023-01-29 14:49:33.950003912 14:49:33.949 INF [api] listen addr=:1984 2023-01-29 14:49:33.950970681 14:49:33.950 INF [rtsp] listen addr=:8554 2023-01-29 14:49:33.952839276 14:49:33.952 INF [webrtc] listen addr=:8555 2023-01-29 14:49:33.953887766 14:49:33.953 INF [srtp] listen addr=:8443 2023-01-29 14:49:38.471196031 [2023-01-29 09:49:38] frigate.app INFO : Starting Frigate (0.12.0-12d51d3) 2023-01-29 14:49:38.588975330 [2023-01-29 09:49:38] frigate.app INFO : Creating directory: /tmp/cache 2023-01-29 14:49:38.597879898 [2023-01-29 09:49:38] peewee_migrate INFO : Starting migrations 2023-01-29 14:49:38.613557943 [2023-01-29 09:49:38] peewee_migrate INFO : There is nothing to migrate 2023-01-29 14:49:38.640568627 [2023-01-29 09:49:38] ws4py INFO : Using epoll 2023-01-29 14:49:38.696495942 [2023-01-29 09:49:38] frigate.app INFO : Output process started: 285 2023-01-29 14:49:38.708060672 [2023-01-29 09:49:38] detector.coral INFO : Starting detection process: 284 2023-01-29 14:49:38.709133477 [2023-01-29 09:49:38] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-01-29 14:49:38.716589077 [2023-01-29 09:49:38] frigate.app INFO : Camera processor started for Den: 288 2023-01-29 14:49:38.732904505 [2023-01-29 09:49:38] ws4py INFO : Using epoll 2023-01-29 14:49:38.738464363 [2023-01-29 09:49:38] frigate.app INFO : Camera processor started for Gate: 292 2023-01-29 14:49:38.783011872 [2023-01-29 09:49:38] frigate.app INFO : Capture process started for Den: 293 2023-01-29 14:49:38.829019868 [2023-01-29 09:49:38] frigate.app INFO : Capture process started for Gate: 297 2023-01-29 14:49:41.198952497 [2023-01-29 09:49:41] frigate.video ERROR : Gate: Unable to read frames from ffmpeg process. 2023-01-29 14:49:41.200232893 [2023-01-29 09:49:41] frigate.video ERROR : Gate: ffmpeg process is not running. exiting capture thread... 2023-01-29 14:49:41.666422554 [2023-01-29 09:49:41] frigate.video ERROR : Den: Unable to read frames from ffmpeg process. 2023-01-29 14:49:41.667327343 [2023-01-29 09:49:41] frigate.video ERROR : Den: ffmpeg process is not running. exiting capture thread...

Version

beta 0.12.0 jsmpeg

Frigate config file

mqtt:
  host: 192.168.1.244
  user: homeassistant
  password: password

detectors:
  coral:
    type: edgetpu
    device: usb
ffmpeg:
  hwaccel_args: preset-rpi-64-h264
record:
  enabled: True
minimize i/o
  expire_interval: 60

  retain:
    days: 0
    mode: active_objects
  events:
    pre_capture: 5
    post_capture: 5                            
    objects:
      - person
      - car
      - cat
      - dog
    retain:
      default: 10
      mode: active_objects
      objects:
        person: 15
snapshots:
  enabled: True
cameras:
  Den: # <---- Dome Camera 1080p
    ffmpeg:
      inputs:
        - path: rtsp://starmanj:[email protected]/ch0_0.h264
          roles:
            - detect
#            - restream
            - record
    detect:
      width: 1920 # <---- update for your camera's resolution
      height: 1080 # <---- update for your camera's resolution
      fps: 5
    objects:
      track:
        - person
  Gate: # <-- outdoor camera 1080p
    ffmpeg:
      inputs:
        - path: rtsp://starmanj:[email protected]/ch0_0.h264

          roles:
            - detect
#            - restream
            - record
    motion:
      mask:
        - 0,1080,616,1080,672,0,0,0
    detect:
      width: 1920 # <---- update for your camera's resolution
      height: 1080 # <---- update for your camera's resolution
      fps: 5
    objects:
      track:
        - person
        - car
        - cat
        - dog

Relevant log output

2023-01-29 15:03:20.371279366  [2023-01-29 10:03:20] frigate.video                  ERROR   : Den: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:03:21.593628690  [2023-01-29 10:03:21] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 15:03:21.594334868  [2023-01-29 10:03:21] frigate.video                  ERROR   : Gate: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:03:24.129732447  [2023-01-29 10:02:58] detector.coral                 INFO    : Starting detection process: 284
2023-01-29 15:03:24.130557013  Process detector:coral:
2023-01-29 15:03:24.130660512  [2023-01-29 10:02:58] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2023-01-29 15:03:24.131229562  [2023-01-29 10:03:24] 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-01-29 15:03:24.135425651  Traceback (most recent call last):
2023-01-29 15:03:24.135505576    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
2023-01-29 15:03:24.135508965      delegate = Delegate(library, options)
2023-01-29 15:03:24.135512206    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
2023-01-29 15:03:24.135514447      raise ValueError(capture.message)
2023-01-29 15:03:24.135669445  ValueError
2023-01-29 15:03:24.135717889  
2023-01-29 15:03:24.135721685  During handling of the above exception, another exception occurred:
2023-01-29 15:03:24.135723167  
2023-01-29 15:03:24.135801407  Traceback (most recent call last):
2023-01-29 15:03:24.135957183    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2023-01-29 15:03:24.135960405      self.run()
2023-01-29 15:03:24.135963072    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2023-01-29 15:03:24.135965127      self._target(*self._args, **self._kwargs)
2023-01-29 15:03:24.135999571    File "/opt/frigate/frigate/object_detection.py", line 97, in run_detector
2023-01-29 15:03:24.136002979      object_detector = LocalObjectDetector(detector_config=detector_config)
2023-01-29 15:03:24.136005442    File "/opt/frigate/frigate/object_detection.py", line 52, in __init__
2023-01-29 15:03:24.136014405      self.detect_api = create_detector(detector_config)
2023-01-29 15:03:24.136017331    File "/opt/frigate/frigate/detectors/__init__.py", line 24, in create_detector
2023-01-29 15:03:24.136019127      return api(detector_config)
2023-01-29 15:03:24.136115941    File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 34, in __init__
2023-01-29 15:03:24.136121089      edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
2023-01-29 15:03:24.136124015    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
2023-01-29 15:03:24.136126404      raise ValueError('Failed to load delegate from {}\n{}'.format(
2023-01-29 15:03:24.136170811  ValueError: Failed to load delegate from libedgetpu.so.1.0
2023-01-29 15:03:24.136173514  
2023-01-29 15:03:28.613503795  [2023-01-29 10:03:28] watchdog.Gate                  ERROR   : Ffmpeg process crashed unexpectedly for Gate.
2023-01-29 15:03:28.614909985  [2023-01-29 10:03:28] watchdog.Gate                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:03:28.616154843  [2023-01-29 10:03:28] ffmpeg.Gate.detect             ERROR   : [h264_v4l2m2m @ 0x5593d5a070] Could not find a valid device
2023-01-29 15:03:28.617637551  [2023-01-29 10:03:28] ffmpeg.Gate.detect             ERROR   : [h264_v4l2m2m @ 0x5593d5a070] can't configure decoder
2023-01-29 15:03:28.618937964  [2023-01-29 10:03:28] ffmpeg.Gate.detect             ERROR   : Error while opening decoder for input stream #0:0 : Operation not permitted
2023-01-29 15:03:28.703938414  [2023-01-29 10:03:28] watchdog.Den                   ERROR   : Ffmpeg process crashed unexpectedly for Den.
2023-01-29 15:03:28.704491835  [2023-01-29 10:03:28] watchdog.Den                   ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:03:28.705403382  [2023-01-29 10:03:28] ffmpeg.Den.detect              ERROR   : [h264_v4l2m2m @ 0x559dd508a0] Could not find a valid device
2023-01-29 15:03:28.706297558  [2023-01-29 10:03:28] ffmpeg.Den.detect              ERROR   : [h264_v4l2m2m @ 0x559dd508a0] can't configure decoder
2023-01-29 15:03:28.707109069  [2023-01-29 10:03:28] ffmpeg.Den.detect              ERROR   : Error while opening decoder for input stream #0:0 : Operation not permitted
2023-01-29 15:03:29.253580285  [2023-01-29 10:03:29] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting Frigate...
2023-01-29 15:03:29.255845615  [2023-01-29 10:03:29] frigate.app                    INFO    : Stopping...
2023-01-29 15:03:29.257287508  [2023-01-29 10:03:29] ws4py                          INFO    : Closing all websockets with [1001] 'Server is shutting down'
2023-01-29 15:03:29.258141092  [2023-01-29 10:03:29] frigate.stats                  INFO    : Exiting watchdog...
2023-01-29 15:03:29.259433858  [2023-01-29 10:03:29] frigate.record                 INFO    : Exiting recording cleanup...
2023-01-29 15:03:29.260431959  [2023-01-29 10:03:29] frigate.events                 INFO    : Exiting event cleanup...
2023-01-29 15:03:29.262005777  [2023-01-29 10:03:29] frigate.storage                INFO    : Exiting storage maintainer...
2023-01-29 15:03:29.262792973  [2023-01-29 10:03:29] frigate.record                 INFO    : Exiting recording maintenance...
2023-01-29 15:03:29.264585400  [2023-01-29 10:03:29] frigate.watchdog               INFO    : Exiting watchdog...
2023-01-29 15:03:30.196134219  [2023-01-29 10:03:30] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 15:03:30.197023728  [2023-01-29 10:03:30] frigate.video                  ERROR   : Gate: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:03:30.600406615  [2023-01-29 10:03:30] frigate.video                  ERROR   : Den: Unable to read frames from ffmpeg process.
2023-01-29 15:03:30.601541678  [2023-01-29 10:03:30] frigate.video                  ERROR   : Den: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:03:38.449924264  [2023-01-29 10:03:38] frigate.object_processing      INFO    : Exiting object processor...
2023-01-29 15:03:38.647333471  [2023-01-29 10:03:38] watchdog.Gate                  ERROR   : Ffmpeg process crashed unexpectedly for Gate.
2023-01-29 15:03:38.648659235  [2023-01-29 10:03:38] watchdog.Gate                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:03:38.649312748  [2023-01-29 10:03:38] ffmpeg.Gate.detect             ERROR   : [h264_v4l2m2m @ 0x55902d9940] Could not find a valid device
2023-01-29 15:03:38.650159406  [2023-01-29 10:03:38] ffmpeg.Gate.detect             ERROR   : [h264_v4l2m2m @ 0x55902d9940] can't configure decoder
2023-01-29 15:03:38.650984916  [2023-01-29 10:03:38] ffmpeg.Gate.detect             ERROR   : Error while opening decoder for input stream #0:0 : Operation not permitted
2023-01-29 15:03:38.751957692  [2023-01-29 10:03:38] watchdog.Den                   ERROR   : Ffmpeg process crashed unexpectedly for Den.
2023-01-29 15:03:38.752915590  [2023-01-29 10:03:38] watchdog.Den                   ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:03:38.754020209  [2023-01-29 10:03:38] ffmpeg.Den.detect              ERROR   : [h264_v4l2m2m @ 0x5591516a60] Could not find a valid device
2023-01-29 15:03:38.755087365  [2023-01-29 10:03:38] ffmpeg.Den.detect              ERROR   : [h264_v4l2m2m @ 0x5591516a60] can't configure decoder
2023-01-29 15:03:38.756171836  [2023-01-29 10:03:38] ffmpeg.Den.detect              ERROR   : Error while opening decoder for input stream #0:0 : Operation not permitted
2023-01-29 15:03:39.230436383  [2023-01-29 10:03:39] frigate.events                 INFO    : Exiting event processor...
2023-01-29 15:03:39.233255782  [2023-01-29 10:03:39] peewee.sqliteq                 INFO    : writer received shutdown request, exiting.
2023-01-29 15:03:39.236016551  [2023-01-29 10:03:39] root                           INFO    : Waiting for detection process to exit gracefully...
2023-01-29 15:03:49.824102509  /usr/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown
2023-01-29 15:03:49.824113971    warnings.warn('resource_tracker: There appear to be %d '
Service Frigate exited with code 0 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
s6-rc: info: service nginx-log successfully stopped
2023-01-29 15:03:49.984322688  exit OK
s6-rc: info: service frigate-log successfully stopped
Service go2rtc exited with code 0 (by signal 0)
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

FFprobe output from your camera

ffprobe rtsp://starmanj:[email protected]/ch0_0.h264

rtsp://starmanj:[email protected]/ch0_0.h264: Protocol not found

Not sure how to make this work?

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

Yi Home Camera 1080

Any other information that may be helpful

Latest HA updates installed. 2023.1.7, OS 9.5

starman2k01 avatar Jan 29 '23 15:01 starman2k01

[h264_v4l2m2m @ 0x5591516a60] Could not find a valid device

You need to use the full access version of the addon with Protected Mode disabled

NickM-27 avatar Jan 29 '23 15:01 NickM-27

That corrected the TPU issue (I think) but FFMPEG still crashing out:

s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service log-prepare: starting
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service frigate: starting
[INFO] Preparing go2rtc config...
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
[INFO] Starting Frigate...
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[INFO] Starting NGINX...
s6-rc: info: service legacy-services successfully started
[WARN] Failed to get IP address from supervisor
[INFO] Starting go2rtc...
2023-01-29 15:46:10.807805762  15:46:10.807 INF go2rtc version 0.1-rc.9 linux/arm64
2023-01-29 15:46:10.810165755  15:46:10.809 INF [api] listen addr=:1984
2023-01-29 15:46:10.810178218  15:46:10.809 INF [rtsp] listen addr=:8554
2023-01-29 15:46:10.811816034  15:46:10.811 INF [webrtc] listen addr=:8555
2023-01-29 15:46:10.812893596  15:46:10.812 INF [srtp] listen addr=:8443
2023-01-29 15:46:14.915730096  [2023-01-29 10:46:14] frigate.app                    INFO    : Starting Frigate (0.12.0-12d51d3)
2023-01-29 15:46:15.024551987  [2023-01-29 10:46:15] frigate.app                    INFO    : Creating directory: /tmp/cache
2023-01-29 15:46:15.032902822  [2023-01-29 10:46:15] peewee_migrate                 INFO    : Starting migrations
2023-01-29 15:46:15.059928177  [2023-01-29 10:46:15] peewee_migrate                 INFO    : There is nothing to migrate
2023-01-29 15:46:15.078104016  [2023-01-29 10:46:15] ws4py                          INFO    : Using epoll
2023-01-29 15:46:15.133729338  [2023-01-29 10:46:15] frigate.app                    INFO    : Output process started: 286
2023-01-29 15:46:15.147590558  [2023-01-29 10:46:15] frigate.app                    INFO    : Camera processor started for Den: 289
2023-01-29 15:46:15.171142191  [2023-01-29 10:46:15] frigate.app                    INFO    : Camera processor started for Gate: 291
2023-01-29 15:46:15.185585793  [2023-01-29 10:46:15] ws4py                          INFO    : Using epoll
2023-01-29 15:46:15.203770262  [2023-01-29 10:46:15] frigate.app                    INFO    : Capture process started for Den: 293
2023-01-29 15:46:15.222182580  [2023-01-29 10:46:15] frigate.app                    INFO    : Capture process started for Gate: 297
2023-01-29 15:46:22.267921455  [2023-01-29 10:46:15] detector.coral                 INFO    : Starting detection process: 285
2023-01-29 15:46:22.379661465  [2023-01-29 10:46:15] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2023-01-29 15:46:22.590185143  [2023-01-29 10:46:22] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
2023-01-29 15:46:38.489365685  172.30.32.2 - - [29/Jan/2023:10:46:38 -0500] "GET // HTTP/1.1" 200 6701 "https://yucaisla.duckdns.org:8123/hassio" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:46:38.570287050  172.30.32.2 - - [29/Jan/2023:10:46:38 -0500] "GET /api/config HTTP/1.1" 200 7323 "https://yucaisla.duckdns.org:8123/api/hassio_ingress/xWpooJE7OERrP1bKE4DLO955EFwjXVhyJvPf8L_hJD4//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:46:38.633764086  [2023-01-29 10:46:38] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:45886]
2023-01-29 15:46:38.895944565  172.30.32.2 - - [29/Jan/2023:10:46:38 -0500] "GET //api/Den/latest.jpg?h=371 HTTP/1.1" 200 10116 "https://yucaisla.duckdns.org:8123/api/hassio_ingress/xWpooJE7OERrP1bKE4DLO955EFwjXVhyJvPf8L_hJD4//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:46:38.933728064  172.30.32.2 - - [29/Jan/2023:10:46:38 -0500] "GET //api/Gate/latest.jpg?h=371 HTTP/1.1" 200 10116 "https://yucaisla.duckdns.org:8123/api/hassio_ingress/xWpooJE7OERrP1bKE4DLO955EFwjXVhyJvPf8L_hJD4//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:46:43.487895855  172.30.32.2 - - [29/Jan/2023:10:46:43 -0500] "GET /api/config HTTP/1.1" 200 7323 "https://yucaisla.duckdns.org:8123/api/hassio_ingress/xWpooJE7OERrP1bKE4DLO955EFwjXVhyJvPf8L_hJD4//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:46:45.330087177  [2023-01-29 10:46:45] watchdog.Gate                  INFO    : No frames received from Gate in 20 seconds. Exiting ffmpeg...
2023-01-29 15:46:45.331059778  [2023-01-29 10:46:45] watchdog.Gate                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-01-29 15:46:50.530637520  172.30.32.2 - - [29/Jan/2023:10:46:50 -0500] "GET /api/config HTTP/1.1" 200 7323 "https://yucaisla.duckdns.org:8123/cameras/Den" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:46:50.561074469  172.30.32.2 - - [29/Jan/2023:10:46:50 -0500] "GET //api/Den/person/thumbnail.jpg HTTP/1.1" 200 8575 "https://yucaisla.duckdns.org:8123/cameras/Den" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:46:50.566896573  [2023-01-29 10:46:50] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:34824]
2023-01-29 15:46:57.237825703  [2023-01-29 10:46:57] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 15:46:57.240062660  [2023-01-29 10:46:57] frigate.video                  ERROR   : Gate: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:47:07.248286596  [2023-01-29 10:47:07] watchdog.Gate                  ERROR   : Ffmpeg process crashed unexpectedly for Gate.
2023-01-29 15:47:07.248305133  [2023-01-29 10:47:07] watchdog.Gate                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:47:11.008358120  172.30.32.2 - - [29/Jan/2023:10:47:11 -0500] "GET /live/jsmpeg/Den HTTP/1.1" 101 18808 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:47:11.019996773  [2023-01-29 10:47:11] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:34824]
2023-01-29 15:47:11.090400757  172.30.32.2 - - [29/Jan/2023:10:47:11 -0500] "GET /api/config HTTP/1.1" 200 7323 "https://yucaisla.duckdns.org:8123/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:47:11.253403987  172.30.32.2 - - [29/Jan/2023:10:47:11 -0500] "GET //api/Den/latest.jpg?h=371 HTTP/1.1" 200 9502 "https://yucaisla.duckdns.org:8123/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:47:11.284206119  172.30.32.2 - - [29/Jan/2023:10:47:11 -0500] "GET //api/Gate/latest.jpg?h=371 HTTP/1.1" 200 67827 "https://yucaisla.duckdns.org:8123/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:47:13.815526499  [2023-01-29 10:47:13] frigate.video                  ERROR   : Den: Unable to read frames from ffmpeg process.
2023-01-29 15:47:13.817060279  [2023-01-29 10:47:13] frigate.video                  ERROR   : Den: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:47:15.318214566  [2023-01-29 10:47:15] watchdog.Den                   ERROR   : Ffmpeg process crashed unexpectedly for Den.
2023-01-29 15:47:15.319940992  [2023-01-29 10:47:15] watchdog.Den                   ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:47:15.321504197  [2023-01-29 10:47:15] ffmpeg.Den.detect              ERROR   : [NULL @ 0x555bbec2d0] missing picture in access unit with size 52
2023-01-29 15:47:23.163939925  172.30.32.2 - - [29/Jan/2023:10:47:23 -0500] "GET /api/config HTTP/1.1" 200 7323 "https://yucaisla.duckdns.org:8123/cameras/Den" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:47:23.247449215  [2023-01-29 10:47:23] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:34994]
2023-01-29 15:47:24.592073246  172.30.32.2 - - [29/Jan/2023:10:47:24 -0500] "GET /live/jsmpeg/Den HTTP/1.1" 101 9992 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:47:24.595932667  172.30.32.2 - - [29/Jan/2023:10:47:24 -0500] "GET /ws HTTP/1.1" 101 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "192.168.1.1, 172.30.32.1"
2023-01-29 15:47:24.602611651  [2023-01-29 10:47:24] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:34994]
2023-01-29 15:47:24.607177825  [2023-01-29 10:47:24] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:45886]
2023-01-29 15:47:37.284363181  [2023-01-29 10:47:37] watchdog.Gate                  INFO    : No frames received from Gate in 20 seconds. Exiting ffmpeg...
2023-01-29 15:47:37.284399737  [2023-01-29 10:47:37] watchdog.Gate                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-01-29 15:47:45.983006906  [2023-01-29 10:47:45] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 15:47:45.985099458  [2023-01-29 10:47:45] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 15:47:46.021861436  [2023-01-29 10:47:46] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 15:47:46.021874547  [2023-01-29 10:47:46] frigate.video                  ERROR   : Gate: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:47:55.990410087  [2023-01-29 10:47:55] watchdog.Gate                  ERROR   : Ffmpeg process crashed unexpectedly for Gate.
2023-01-29 15:47:55.990553456  [2023-01-29 10:47:55] watchdog.Gate                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:48:19.159500340  [2023-01-29 10:48:19] frigate.video                  ERROR   : Den: Unable to read frames from ffmpeg process.
2023-01-29 15:48:19.161805112  [2023-01-29 10:48:19] frigate.video                  ERROR   : Den: Unable to read frames from ffmpeg process.
2023-01-29 15:48:19.162558252  [2023-01-29 10:48:19] frigate.video                  ERROR   : Den: Unable to read frames from ffmpeg process.
2023-01-29 15:48:19.179993215  [2023-01-29 10:48:19] frigate.video                  ERROR   : Den: Unable to read frames from ffmpeg process.
2023-01-29 15:48:19.182301487  [2023-01-29 10:48:19] frigate.video                  ERROR   : Den: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:48:25.355211742  [2023-01-29 10:48:25] watchdog.Den                   ERROR   : Ffmpeg process crashed unexpectedly for Den.
2023-01-29 15:48:25.355226094  [2023-01-29 10:48:25] watchdog.Den                   ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:48:25.355230742  [2023-01-29 10:48:25] ffmpeg.Den.detect              ERROR   : [NULL @ 0x5570ef72d0] missing picture in access unit with size 62
2023-01-29 15:49:26.022501033  [2023-01-29 10:49:26] watchdog.Gate                  INFO    : No frames received from Gate in 20 seconds. Exiting ffmpeg...
2023-01-29 15:49:26.023079323  [2023-01-29 10:49:26] watchdog.Gate                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-01-29 15:49:37.177897248  [2023-01-29 10:49:37] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 15:49:37.179813006  [2023-01-29 10:49:37] frigate.video                  ERROR   : Gate: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:49:41.377106648  [2023-01-29 10:49:41] frigate.video                  ERROR   : Den: Unable to read frames from ffmpeg process.
2023-01-29 15:49:41.379631269  [2023-01-29 10:49:41] frigate.video                  ERROR   : Den: ffmpeg process is not running. exiting capture thread...
2023-01-29 15:49:45.394208407  [2023-01-29 10:49:45] watchdog.Den                   ERROR   : Ffmpeg process crashed unexpectedly for Den.
2023-01-29 15:49:45.394223814  [2023-01-29 10:49:45] watchdog.Den                   ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 15:49:47.181692545  [2023-01-29 10:49:47] watchdog.Gate                  ERROR   : Ffmpeg process crashed unexpectedly for Gate.
2023-01-29 15:49:47.182539239  [2023-01-29 10:49:47] watchdog.Gate                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.

starman2k01 avatar Jan 29 '23 15:01 starman2k01

I get some video before crashing out though.

starman2k01 avatar Jan 29 '23 15:01 starman2k01

Also under FFPROBE: "[\n {\n "return_code": 1,\n "stderr": {},\n "stdout": {}\n }\n]" for both cameras.

Video is coming in and out due to FFMPEG crash cycle

starman2k01 avatar Jan 29 '23 16:01 starman2k01

Does it work if you comment out hwaccel?

NickM-27 avatar Jan 29 '23 16:01 NickM-27

If I comment out HW Accel:

hwaccel_args: preset-rpi-64-h264

I get this:

2023-01-29 22:06:43.350728408 1 validation error for FrigateConfig 2023-01-29 22:06:43.350734815 ffmpeg 2023-01-29 22:06:43.350737574 none is not an allowed value (type=type_error.none.not_allowed) 2023-01-29 22:06:43.356404761 Traceback (most recent call last): 2023-01-29 22:06:43.356416928 File "/opt/frigate/frigate/app.py", line 335, in start 2023-01-29 22:06:43.356418909 self.init_config() 2023-01-29 22:06:43.356421261 File "/opt/frigate/frigate/app.py", line 80, in init_config 2023-01-29 22:06:43.356423483 user_config = FrigateConfig.parse_file(config_file) 2023-01-29 22:06:43.356425965 File "/opt/frigate/frigate/config.py", line 1031, in parse_file 2023-01-29 22:06:43.356427743 return cls.parse_obj(config) 2023-01-29 22:06:43.356432039 File "/usr/local/lib/python3.9/dist-packages/pydantic/main.py", line 527, in parse_obj 2023-01-29 22:06:43.356441891 return cls(**obj) 2023-01-29 22:06:43.356444780 File "/usr/local/lib/python3.9/dist-packages/pydantic/main.py", line 342, in init 2023-01-29 22:06:43.356446742 raise validation_error 2023-01-29 22:06:43.356449317 pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig 2023-01-29 22:06:43.356541186 ffmpeg 2023-01-29 22:06:43.356544797 none is not an allowed value (type=type_error.none.not_allowed) 2023-01-29 22:06:43.356548112
2023-01-29 22:06:43.356550482 ************************************************************* 2023-01-29 22:06:43.356552816 *** End Config Validation Errors *** 2023-01-29 22:06:43.356660815 *************************************************************

starman2k01 avatar Jan 29 '23 22:01 starman2k01

you need to comment out ffmpeg: too if you comment out hwaccel_args

NickM-27 avatar Jan 29 '23 22:01 NickM-27

Right. I did that and my HA rebooted spontaneously. After reboot, Frigate crashes out only. No log explanation, after TPU found it just died.

s6-rc: info: service s6rc-fdholder: starting s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service s6rc-fdholder successfully started s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service log-prepare: starting s6-rc: info: service log-prepare successfully started s6-rc: info: service nginx-log: starting s6-rc: info: service go2rtc-log: starting s6-rc: info: service frigate-log: starting s6-rc: info: service nginx-log successfully started s6-rc: info: service frigate-log successfully started s6-rc: info: service go2rtc-log successfully started s6-rc: info: service go2rtc: starting s6-rc: info: service go2rtc successfully started s6-rc: info: service frigate: starting [INFO] Preparing go2rtc config... s6-rc: info: service frigate successfully started s6-rc: info: service nginx: starting [INFO] Starting Frigate... [INFO] Starting NGINX... s6-rc: info: service nginx successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [WARN] Failed to get IP address from supervisor [INFO] Starting go2rtc... 2023-01-29 22:15:29.306152907 22:15:29.305 INF go2rtc version 0.1-rc.9 linux/arm64 2023-01-29 22:15:29.314405405 22:15:29.307 INF [api] listen addr=:1984 2023-01-29 22:15:29.314409683 22:15:29.308 INF [rtsp] listen addr=:8554 2023-01-29 22:15:29.314419127 22:15:29.309 INF [webrtc] listen addr=:8555 2023-01-29 22:15:29.314423071 22:15:29.309 INF [srtp] listen addr=:8443 2023-01-29 22:15:38.280589863 [2023-01-29 17:15:38] frigate.app INFO : Starting Frigate (0.12.0-12d51d3) 2023-01-29 22:15:38.434136469 [2023-01-29 17:15:38] frigate.app INFO : Creating directory: /tmp/cache 2023-01-29 22:15:38.443222005 [2023-01-29 17:15:38] peewee_migrate INFO : Starting migrations 2023-01-29 22:15:38.496008901 [2023-01-29 17:15:38] peewee_migrate INFO : There is nothing to migrate 2023-01-29 22:15:38.508885040 [2023-01-29 17:15:38] ws4py INFO : Using epoll 2023-01-29 22:15:38.588484061 [2023-01-29 17:15:38] frigate.app INFO : Output process started: 285 2023-01-29 22:15:38.617722661 [2023-01-29 17:15:38] frigate.app INFO : Camera processor started for Den: 288 2023-01-29 22:15:38.639778296 [2023-01-29 17:15:38] ws4py INFO : Using epoll 2023-01-29 22:15:38.666916797 [2023-01-29 17:15:38] frigate.app INFO : Camera processor started for Gate: 291 2023-01-29 22:15:38.673761054 [2023-01-29 17:15:38] detector.coral INFO : Starting detection process: 284 2023-01-29 22:15:45.861356611 [2023-01-29 17:15:38] frigate.app INFO : Capture process started for Den: 294 2023-01-29 22:15:45.862956161 [2023-01-29 17:15:38] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-01-29 22:15:45.874223863 [2023-01-29 17:15:38] frigate.app INFO : Capture process started for Gate: 298 2023-01-29 22:15:45.875669419 [2023-01-29 17:15:45] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found

starman2k01 avatar Jan 29 '23 22:01 starman2k01

FFMPEG CPU at 95%, maybe that's forcing the shutdown? Now it cycles the cameras on/off but is stable. TPU is working because add-on CPU total usage is now low. I just get these errors as it's running:

2023-01-29 22:21:39.015488374  [2023-01-29 17:21:39] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59854]
2023-01-29 22:21:43.615924409  [2023-01-29 17:21:43] frigate.video                  ERROR   : Den: Unable to read frames from ffmpeg process.
2023-01-29 22:21:43.616946158  [2023-01-29 17:21:43] frigate.video                  ERROR   : Den: ffmpeg process is not running. exiting capture thread...
2023-01-29 22:21:53.186162186  [2023-01-29 17:21:53] watchdog.Gate                  INFO    : No frames received from Gate in 20 seconds. Exiting ffmpeg...
2023-01-29 22:21:53.187253693  [2023-01-29 17:21:53] watchdog.Gate                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-01-29 22:21:53.621393034  [2023-01-29 17:21:53] watchdog.Den                   ERROR   : Ffmpeg process crashed unexpectedly for Den.
2023-01-29 22:21:53.621532125  [2023-01-29 17:21:53] watchdog.Den                   ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 22:21:53.622300229  [2023-01-29 17:21:53] ffmpeg.Den.detect              ERROR   : [swscaler @ 0x559603bf50] deprecated pixel format used, make sure you did set range correctly
2023-01-29 22:21:53.622926463  [2023-01-29 17:21:53] ffmpeg.Den.detect              ERROR   : [NULL @ 0x5595f942d0] missing picture in access unit with size 52
2023-01-29 22:21:53.624135061  [2023-01-29 17:21:53] ffmpeg.Den.detect              ERROR   : [h264 @ 0x55960cbc00] no frame!
2023-01-29 22:21:53.625298753  [2023-01-29 17:21:53] ffmpeg.Den.detect              ERROR   : Error while decoding stream #0:0: Invalid data found when processing input
2023-01-29 22:21:59.125187814  [2023-01-29 17:21:59] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:36466]
2023-01-29 22:22:02.546140253  [2023-01-29 17:22:02] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:39450]
2023-01-29 22:22:04.722122994  [2023-01-29 17:22:04] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 22:22:04.724575227  [2023-01-29 17:22:04] frigate.video                  ERROR   : Gate: Unable to read frames from ffmpeg process.
2023-01-29 22:22:04.726579966  [2023-01-29 17:22:04] frigate.video                  ERROR   : Gate: ffmpeg process is not running. exiting capture thread...
2023-01-29 22:22:10.265198371  [2023-01-29 17:22:10] frigate.record                 WARNING : Discarding a corrupt recording segment: {'cache_path': '/tmp/cache/Gate-20230129172034.mp4', 'start_time': datetime.datetime(2023, 1, 29, 17, 20, 34)}
2023-01-29 22:22:14.874504251  [2023-01-29 17:22:14] watchdog.Gate                  ERROR   : Ffmpeg process crashed unexpectedly for Gate.
2023-01-29 22:22:14.874518806  [2023-01-29 17:22:14] watchdog.Gate                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-29 22:22:14.878587726  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [segment @ 0x557ded2df0] Non-monotonous DTS in output stream 0:0; previous: 9071, current: 9071; changing to 9072. This may result in incorrect timestamps in the output file.
2023-01-29 22:22:14.878617374  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [segment @ 0x557ded2df0] Non-monotonous DTS in output stream 0:0; previous: 9072, current: 9071; changing to 9073. This may result in incorrect timestamps in the output file.
2023-01-29 22:22:14.878623689  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [segment @ 0x557ded2df0] Non-monotonous DTS in output stream 0:0; previous: 9073, current: 9071; changing to 9074. This may result in incorrect timestamps in the output file.
2023-01-29 22:22:14.880617112  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [segment @ 0x557ded2df0] Non-monotonous DTS in output stream 0:0; previous: 9074, current: 9071; changing to 9075. This may result in incorrect timestamps in the output file.
2023-01-29 22:22:14.880630593  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [swscaler @ 0x557dfaa3f0] deprecated pixel format used, make sure you did set range correctly
2023-01-29 22:22:14.882014727  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [segment @ 0x557ded2df0] Non-monotonous DTS in output stream 0:0; previous: 9075, current: -830103483316929823; changing to 9076. This may result in incorrect timestamps in the output file.
2023-01-29 22:22:14.882029208  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [segment @ 0x557ded2df0] Non-monotonous DTS in output stream 0:0; previous: 9076, current: -830103483316929823; changing to 9077. This may result in incorrect timestamps in the output file.
2023-01-29 22:22:14.882035134  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [segment @ 0x557ded2df0] Non-monotonous DTS in output stream 0:0; previous: 9077, current: -830103483316929823; changing to 9078. This may result in incorrect timestamps in the output file.
2023-01-29 22:22:14.882207928  [2023-01-29 17:22:14] ffmpeg.Gate.detect             ERROR   : [h264 @ 0x557decde40] error while decoding MB 55 22, bytestream -8
2023-01-29 22:22:59.838486952  [2023-01-29 17:22:59] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:39450]

starman2k01 avatar Jan 29 '23 22:01 starman2k01

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 02 '23 00:03 github-actions[bot]