blakeblackshear / frigate

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

Support needed: clips role is not valid #1819

Closed gmrandom closed 3 years ago

gmrandom commented 3 years ago

Describe the bug Whenever adding the "clips" role to any of my cameras, the frigate container fails to start because of a config parsing error (error message below). I tried adding a clips top-level block, as well as adding it as a role to my cameras, and the config file parsing fails in both instances.

Is the install config documentation up to date? I appreciate any help with this.

Version of frigate 0.9.0-1049673

Config file Include your full config file wrapped in triple back ticks.


mqtt:
  host: <host>
  port: 1883

cameras:
  camera1:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>
          roles:
            - detect
  camera2:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>
          roles:
            - detect
            - clips

Frigate container logs

Error parsing config: 1 validation error for FrigateConfig,
cameras -> camera2 -> ffmpeg -> inputs -> 0 -> roles -> 1,
  value is not a valid enumeration member; permitted: 'record', 'rtmp', 'detect' (type=type_error.enum; enum_values=[<CameraRoleEnum.record: 'record'>, <CameraRoleEnum.rtmp: 'rtmp'>, <CameraRoleEnum.detect: 'detect'>]),

Frigate stats

{"camera1":{"camera_fps":5.0,"capture_pid":239,"detection_fps":0.0,"pid":231,"process_fps":5.0,"skipped_fps":0.0},"camera2":{"camera_fps":5.1,"capture_pid":241,"detection_fps":0.0,"pid":232,"process_fps":5.1,"skipped_fps":0.0},"detection_fps":0.0,"detectors":{"cpu":{"detection_start":0.0,"inference_speed":43.75,"pid":225}},"service":{"storage":{"/dev/shm":{"free":58.5,"mount_type":"tmpfs","total":67.1,"used":8.6},"/media/frigate/clips":{"free":187776.4,"mount_type":"ext4","total":210304.5,"used":11773.9},"/media/frigate/recordings":{"free":187776.4,"mount_type":"ext4","total":210304.5,"used":11773.9},"/tmp/cache":{"free":1073.7,"mount_type":"tmpfs","total":1073.7,"used":0.0}},"uptime":1000,"version":"0.9.0-1049673"}}

FFprobe from your camera

Run the following command and paste output below

ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from '<redacted>':
  Metadata:
    title           : Media Server
  Duration: N/A, start: 0.118000, bitrate: N/A
    Stream #0:0: Video: h264, yuv420p(progressive), 3840x2160, 100 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: aac, 8000 Hz, mono, fltp

Screenshots If applicable, add screenshots to help explain your problem.

Computer Hardware

Camera Info:

ozett commented 3 years ago
mqtt:
  host: <host>
  port: 1883

cameras:
  camera1:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>
          roles:
            - detect
  camera2:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>
          roles:
            - detect
            #- clips
          ^^^ # clips-role is commented out
gmrandom commented 3 years ago

Hi @ozett are you suggesting to comment out the clips role? That would parse, but I am trying to make clips work. The documentation here https://blakeblackshear.github.io/frigate/configuration/cameras/ suggests that "clips" is a valid role.

fbcd4f50ea5350f051450323b5abfd0b commented 3 years ago

Hey,

please read the release notes of the 0.9 beta version carefully: https://github.com/blakeblackshear/frigate/releases

BREAKING: Clips have been merged into Recordings

Your container logs say: value is not a valid enumeration member; permitted: 'record', 'rtmp', 'detect' [...] So it clearly states that 'clips' is not a valid config option anymore.

The documentation you mentioned is written for the current stable version, which you're not using.

gmrandom commented 3 years ago

Thanks for the link, @fbcd4f50ea5350f051450323b5abfd0b

I was sure there had to be a deprecation notice somewhere but could not find it. It would be nice to tag the official documentation as obsolete, for other folks that will run into the same.

Resolving.