blakeblackshear / frigate

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

[Config Support]: birdseye view override at camera level breaks the configuration #4600

Closed gaborkissjr closed 1 year ago

gaborkissjr commented 1 year ago

Describe the problem you are having

hi everyone,

would like to disable few of my cameras from the birdseye view following this article: https://docs.frigate.video/configuration/birdseye/#birdseye-view-override-at-camera-level

but when I start frigate it throws an error:

_frigate | pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig frigate | cameras -> A21_door_camera -> birdseye frigate | extra fields not permitted (type=valueerror.extra)

can someone help me to set the configuration file properly to achieve this scenario?

thank you, Gabor

Version

0.10.1-83481af

Frigate config file

mqtt:
  host: 192.168.0.2

detectors:
  coral:
    type: edgetpu
    device: usb

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
    - car
    #- bicycle
    - motorcycle
    - bird
    - cat
    - dog

# Include all cameras by default in Birdseye view
birdseye:
  enabled: True
  mode: continuous

record:
  enabled: True
  events:
    retain:
      default: 10

cameras:
  A21_door_camera:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.88.100:554/user=admin_password=xxxxxxx_channel=1_stream=0.sdp?real_stream
          roles:
            - record
            - rtmp
        - path: rtsp://192.168.88.100:554/user=admin_password=xxxxxxx_channel=1_stream=1.sdp?real_stream
          roles:
            - detect
    rtmp:
      enabled: True # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 800
      height: 448
    birdseye:
      enabled: False
  A21_pool_camera:
    ffmpeg:
      inputs:
        - path: rtsp://bela:xxxxxxx@192.168.88.239:554/ch0_0.264
          roles:
            - record
            - rtmp
        - path: rtsp://bela:xxxxxxx@192.168.88.239:554/ch0_1.264
          roles:
            - detect
    rtmp:
      enabled: True # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 800
      height: 448
  A21_gate_camera:
    ffmpeg:
      inputs:
        - path: rtsp://admin:xxxxxxx@192.168.88.237:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
          roles:
            - record
            - rtmp
        - path: rtsp://admin:xxxxxxx@192.168.88.237:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif
          roles:
            - detect
    rtmp:
      enabled: True # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 800
      height: 448

Relevant log output

bela@ubuntuservermachine:~/docker-compose/frigate$ sudo docker-compose up
[+] Running 1/0
 ⠿ Container frigate  Created                                                                                                                                                                                                           0.0s
Attaching to frigate
frigate  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
frigate  | [s6-init] ensuring user provided files have correct perms...exited 0.
frigate  | [fix-attrs.d] applying ownership & permissions fixes...
frigate  | [fix-attrs.d] done.
frigate  | [cont-init.d] executing container initialization scripts...
frigate  | [cont-init.d] done.
frigate  | [services.d] starting services
frigate  | [services.d] done.
frigate  | [2022-12-05 07:37:12] frigate.app                    INFO    : Starting Frigate (0.10.1-83481af)
frigate  | *************************************************************
frigate  | *************************************************************
frigate  | ***    Your config file is not valid!                     ***
frigate  | ***    Please check the docs at                           ***
frigate  | ***    https://docs.frigate.video/configuration/index     ***
frigate  | *************************************************************
frigate  | *************************************************************
frigate  | ***    Config Validation Errors                           ***
frigate  | *************************************************************
frigate  | 1 validation error for FrigateConfig
frigate  | cameras -> A21_door_camera -> birdseye
frigate  |   extra fields not permitted (type=value_error.extra)
frigate  | Traceback (most recent call last):
frigate  |   File "/opt/frigate/frigate/app.py", line 312, in start
frigate  |     self.init_config()
frigate  |   File "/opt/frigate/frigate/app.py", line 77, in init_config
frigate  |     user_config = FrigateConfig.parse_file(config_file)
frigate  |   File "/opt/frigate/frigate/config.py", line 904, in parse_file
frigate  |     return cls.parse_obj(config)
frigate  |   File "pydantic/main.py", line 511, in pydantic.main.BaseModel.parse_obj
frigate  |   File "pydantic/main.py", line 331, in pydantic.main.BaseModel.__init__
frigate  | pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
frigate  | cameras -> A21_door_camera -> birdseye
frigate  |   extra fields not permitted (type=value_error.extra)
frigate  |
frigate  | *************************************************************
frigate  | ***    End Config Validation Errors                       ***
frigate  | *************************************************************
frigate  | [cmd] python3 exited 1
frigate  | [cont-finish.d] executing container finish scripts...
frigate  | [cont-finish.d] done.
frigate  | [s6-finish] waiting for services.
frigate  | [s6-finish] sending all processes the TERM signal.
^CGracefully stopping... (press Ctrl+C again to force)

Frigate stats

No response

Operating system

Other Linux

Install method

Docker Compose

Coral version

USB

Any other information that may be helpful

it's running on ubuntu server

NickM-27 commented 1 year ago

You are on an outdated version of frigate before this was added. Paste your docker compose file.

gaborkissjr commented 1 year ago

hi NickM-27,

thank you for your response,

let me paste here the compose file: (below).

Thank you! Gabor

version: '3.9'
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: blakeblackshear/frigate:stable-amd64
    devices:
      - /dev/bus/usb:/dev/bus/usb
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./config/frigate.yml:/config/config.yml:ro
      - /mnt/2tbhdd/frigate/footage:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"
      - "1935:1935"   # RTMP feeds
    environment:
      FRIGATE_RTSP_PASSWORD: "xxxxxxxxx"
NickM-27 commented 1 year ago

Frigate uses multiarch so there's no longer a need to specify arch. Change your image to blakeblackshear/frigate:stable and read the 0.11.0 / 0.11.1 release notes to be aware of the latest changes

gaborkissjr commented 1 year ago

Thank you very much NickM-27, it worked!