blakeblackshear / frigate

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

Frigate wont start after 0.12.0 update [Support]: #6063

Closed MrPresident2 closed 1 year ago

MrPresident2 commented 1 year ago

Describe the problem you are having

The App won't start after 0.12.0 update, everything worked just fine before. There shouldn't be a problem with my yml file because everything worked fine before the update. Do you have any idea what's wrong?

Version

0.12.0

Frigate config file

mqtt:
  host: *****
  user: *****
  password: ******

birdseye:
  enabled: True
  mode: continuous

cameras:
  Parking:
    ffmpeg:
      inputs:
        - path: rtsp://********/cam/realmonitor?channel=1&subtype=1
          roles:
            - detect
            - rtmp
        - path: rtsp://**********/cam/realmonitor?channel=1&subtype=1
          roles:
            - record
    record:
      enabled: True
      events:
        retain:
          default: 10
    detect:
      width: 1920
      height: 1080
    objects:
      track:
        - person
        - car
        - bicycle
        - motorcycle
        - airplane
        - bus
        - dog
        - cat
    motion:
      mask:
        - 1798,705,1713,737,1579,772,1464,794,1233,844,1225,578,1223,345,1695,402,1920,438,1920,671
        - 302,613,203,707,0,802,0,563,0,298,631,292,633,600
    rtmp:
      enabled: True # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 1920 # <---- update for your camera's resolution
      height: 1080 # <---- update for your camera's resolution

  Kitchen1:
    ffmpeg:
      input_args: -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an
        rtmp: -c:v libx264 -an -f flv
      inputs:
        - path: *************
          roles:
            - detect
            - record
            - rtmp
    record:
      enabled: True
      events:
        retain:
          default: 10
    detect:
      width: 640
      height: 480
    objects:
      track:
        - person
    rtmp:
      enabled: False # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution

Relevant log output

s6-rc: info: service go2rtc: starting
s6-rc: info: service frigate-log successfully started
2023-04-14 00:09:43.981399373  [INFO] Preparing go2rtc config...
s6-rc: info: service go2rtc successfully started
s6-rc: info: service go2rtc-healthcheck: starting
s6-rc: info: service frigate: starting
s6-rc: info: service go2rtc-healthcheck successfully started
2023-04-14 00:09:43.990445663  [INFO] Starting Frigate...
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
2023-04-14 00:09:43.998106754  [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
2023-04-14 00:09:44.033198420  [INFO] Got IP address from supervisor: 192.168.1.32
2023-04-14 00:09:44.078440777  [INFO] Got WebRTC port from supervisor: 8555
2023-04-14 00:09:44.332224394  [INFO] Starting go2rtc...
2023-04-14 00:09:44.412933375  17:09:44.412 INF go2rtc version 1.2.0 linux/amd64
2023-04-14 00:09:44.413172352  17:09:44.413 INF [api] listen addr=:1984
2023-04-14 00:09:44.413395939  17:09:44.413 INF [rtsp] listen addr=:8554
2023-04-14 00:09:44.413606762  17:09:44.413 INF [srtp] listen addr=:8443
2023-04-14 00:09:44.413795574  17:09:44.413 INF [webrtc] listen addr=:8555
2023-04-14 00:09:45.147726762  [2023-04-13 17:09:45] frigate.app                    INFO    : Starting Frigate (0.12.0-da3e197)
2023-04-14 00:09:45.154383011  *************************************************************
2023-04-14 00:09:45.154387506  *************************************************************
2023-04-14 00:09:45.154407358  ***    Your config file is not valid!                     ***
2023-04-14 00:09:45.154409477  ***    Please check the docs at                           ***
2023-04-14 00:09:45.154411398  ***    https://docs.frigate.video/configuration/index     ***
2023-04-14 00:09:45.154414306  *************************************************************
2023-04-14 00:09:45.154416492  *************************************************************
2023-04-14 00:09:45.154432826  ***    Config Validation Errors                           ***
2023-04-14 00:09:45.154434579  *************************************************************
2023-04-14 00:09:45.154447802  Config input detect is defined multiple times for the same field, this is not allowed.
2023-04-14 00:09:45.155724096  Traceback (most recent call last):
2023-04-14 00:09:45.155728057    File "/opt/frigate/frigate/app.py", line 351, in start
2023-04-14 00:09:45.155729821      self.init_config()
2023-04-14 00:09:45.155731919    File "/opt/frigate/frigate/app.py", line 80, in init_config
2023-04-14 00:09:45.155733665      user_config = FrigateConfig.parse_file(config_file)
2023-04-14 00:09:45.155735380    File "/opt/frigate/frigate/config.py", line 1068, in parse_file
2023-04-14 00:09:45.155737115      config = load_config_with_no_duplicates(raw_config)
2023-04-14 00:09:45.155738918    File "/opt/frigate/frigate/util.py", line 78, in load_config_with_no_duplicates
2023-04-14 00:09:45.155740600      return yaml.load(raw_config, PreserveDuplicatesLoader)
2023-04-14 00:09:45.155743291    File "/usr/local/lib/python3.9/dist-packages/yaml/__init__.py", line 81, in load
2023-04-14 00:09:45.155763998      return loader.get_single_data()
2023-04-14 00:09:45.155766422    File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 51, in get_single_data
2023-04-14 00:09:45.155768023      return self.construct_document(node)
2023-04-14 00:09:45.155770270    File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 55, in construct_document
2023-04-14 00:09:45.155782395      data = self.construct_object(node)
2023-04-14 00:09:45.155784768    File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 100, in construct_object
2023-04-14 00:09:45.155786513      data = constructor(self, node)
2023-04-14 00:09:45.155788207    File "/opt/frigate/frigate/util.py", line 63, in map_constructor
2023-04-14 00:09:45.155790413      vals = [loader.construct_object(node, deep=deep) for _, node in node.value]
2023-04-14 00:09:45.155792907    File "/opt/frigate/frigate/util.py", line 63, in <listcomp>
2023-04-14 00:09:45.155794672      vals = [loader.construct_object(node, deep=deep) for _, node in node.value]
2023-04-14 00:09:45.155796282    File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 100, in construct_object
2023-04-14 00:09:45.155808164      data = constructor(self, node)
2023-04-14 00:09:45.155809751    File "/opt/frigate/frigate/util.py", line 63, in map_constructor
2023-04-14 00:09:45.155811452      vals = [loader.construct_object(node, deep=deep) for _, node in node.value]
2023-04-14 00:09:45.155814242    File "/opt/frigate/frigate/util.py", line 63, in <listcomp>
2023-04-14 00:09:45.155816363      vals = [loader.construct_object(node, deep=deep) for _, node in node.value]
2023-04-14 00:09:45.155818633    File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 100, in construct_object
2023-04-14 00:09:45.155833863      data = constructor(self, node)
2023-04-14 00:09:45.155835810    File "/opt/frigate/frigate/util.py", line 68, in map_constructor
2023-04-14 00:09:45.155837325      raise ValueError(
2023-04-14 00:09:45.155839631  ValueError: Config input detect is defined multiple times for the same field, this is not allowed.
2023-04-14 00:09:45.155840952  
2023-04-14 00:09:45.155842479  *************************************************************
2023-04-14 00:09:45.155864797  ***    End Config Validation Errors                       ***
2023-04-14 00:09:45.155866803  *************************************************************
2023-04-14 00:09:46.331410086  [INFO] Service Frigate exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
s6-rc: info: service go2rtc-healthcheck: stopping
2023-04-14 00:09:46.340577628  [INFO] The go2rtc-healthcheck service exited with code 256 (by signal 15)
s6-rc: info: service go2rtc-healthcheck successfully stopped
2023-04-14 00:09:46.374766165  [INFO] 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-04-14 00:09:46.383791115  exit OK
s6-rc: info: service frigate-log successfully stopped
2023-04-14 00:09:46.396899694  [INFO] The go2rtc service 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

Idk know what's that and its not a camera issue

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

amcrest, ESP32

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

There were issues with users having duplicates configs which was an invalid config that silently failed. In 0.12 we added checks to fail on that. In this case you have detect defined twice for both cameras which is not allowed.

MrPresident2 commented 1 year ago

There were issues with users having duplicates configs which was an invalid config that silently failed. In 0.12 we added checks to fail on that. In this case you have detect defined twice for both cameras which is not allowed.

Detect is not a config option for each camera? what should I do just remove it?

NickM-27 commented 1 year ago

You have config defined two times for each camera. You just simply need to remove the duplicate

MrPresident2 commented 1 year ago

You have config defined two times for each camera. You just simply need to remove the duplicate

Where can I find the config option? I don't see any config option in my config file

NickM-27 commented 1 year ago

I've done my best to highlight the problem with your config file

Screen Shot 2023-04-13 at 18 41 29 PM

MrPresident2 commented 1 year ago

I've done my best to highlight the problem with your config file

Screen Shot 2023-04-13 at 18 41 29 PM

Oh nice thank you! I just got another pm here also telling me I got the detect twice per camera (I don't know how I missed that :D ) and not a config twice in the config file under the config option below the cameras next to the config! thanks !