blakeblackshear / frigate

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

[Config Support]: #3591

Closed mikey6283 closed 2 years ago

mikey6283 commented 2 years ago

Describe the problem you are having

Recently updated to blakeblackshear/frigate:0.11.0-37325c7 . Frigate will to start due to Config errors I amended config.yml accordingly nut i cannot see where the errors are in the config.yml.

Cameras Reolink

What am i missing please. It was running Ok previously.

Version

blakeblackshear/frigate:0.11.0-37325c7

Frigate config file

mqtt:
  # Required: host name
  host: 192.168.0.15
  # Optional: port (default: shown below)
  port: 1883
  # Optional: user
  user: mikey
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: mqtt6283
  # Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)

# Optional: Detectors configuration. Defaults to a single CPU detector
detectors:
  # Required: name of the detector
  coral1:
    # Required: type of the detector
    # Valid values are 'edgetpu' (requires device property below) and 'cpu'.
    type: edgetpu
    # Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api
    device: pci:0
#  coral2:
#    type: edgetpu
#   device: pci:1

# Optional: Database configuration
database:
  # The path to store the SQLite DB (default: shown below)
  path: /media/frigate/frigate.db

# Optional: ffmpeg configuration
ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel warning
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
  hwaccel_args:
    - -hwaccel
    - qsv
    - -qsv_device
    - /dev/dri/renderD128
  # Optional: global input args (default: shown below)
  input_args:
    - -avoid_negative_ts
    - make_zero
    - -fflags
    - nobuffer+genpts+discardcorrupt
    - -flags
    - low_delay
    - -strict
    - experimental
    - -analyzeduration
    - 1000M
    - -probesize
    - 1000M
    - -rw_timeout
    - "5000000"
  # Optional: global output args
  output_args:
    # Optional: output args for detect streams (default: shown below)
    detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for rtmp streams (default: shown below)
    rtmp: -c copy -f flv

# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
  # Optional: width of the frame for the input with the detect role (default: shown below)
  width: 896
  # Optional: height of the frame for the input with the detect role (default: shown below)
  height: 672
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 7
  # Optional: enables detection for the camera (default: True)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True

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

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Enable recording (default: shown below)
  enabled: True
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
      - cat
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 10

# Optional: RTMP configuration
# NOTE: Can be overridden at the camera level
rtmp:
  # Optional: Enable the RTMP stream (default: True)
  enabled: True

# Required
cameras:
  reolink:
  front_driveway:
    ffmpeg:
      inputs:
        - path: http:/reolink_192.168.0.48/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=XXXXXX
          roles:
            - record
            - rtmp
        - path: http://reolink_192.168.0.48/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=XXXXXXX
          roles:
            - detect
  garage_driveway:
    ffmpeg:
      inputs:
        - path: http://reolink_192.168.0.51/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=XXXXXX
          roles:
            - record
            - rtmp
        - path: http:/reolink_192.168.0.51/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=XXXXX
          roles:
            - detect 
  koi_pond:
    ffmpeg:
      inputs:
        - path: http://reolink_192.168.0.52/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=XXXXX
          roles:
            - record
            - rtmp
        - path: http://reolink_192.168.0.52/flv?port=1935app=bcs&stream=channel0_ext.bcs&user=admin&password=XXXXX
          role:
            - detect
  back_garden:
    ffmpeg:
      inputs:
        - path: httpp:/192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=XXXXXX
          roles:
            - record
            - rtmp
        - path: http://192.168.0.47/flv?port=1935&app=bc&stream=channel0_ext.bcs?&user=admin&password=XXXXXX
          roles:
            - detect
   # detect:

Relevant log output

[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-08-05 10:08:48] frigate.app INFO : Starting Frigate (0.11.0-37325c7)
*************************************************************
*************************************************************
*** Your config file is not valid! ***
*** Please check the docs at ***
*** https://docs.frigate.video/configuration/index ***
*************************************************************
*************************************************************
*** Config Validation Errors ***
*************************************************************
3 validation errors for FrigateConfig
cameras -> reolink
none is not an allowed value (type=type_error.none.not_allowed)
cameras -> koi_pond -> ffmpeg -> inputs -> 1 -> roles
field required (type=value_error.missing)
cameras -> koi_pond -> ffmpeg -> inputs -> 1 -> role
extra fields not permitted (type=value_error.extra)
Traceback (most recent call last):
File "/opt/frigate/frigate/app.py", line 332, in start
self.init_config()
File "/opt/frigate/frigate/app.py", line 82, in init_config
user_config = FrigateConfig.parse_file(config_file)
File "/opt/frigate/frigate/config.py", line 942, in parse_file
return cls.parse_obj(config)
File "pydantic/main.py", line 521, in pydantic.main.BaseModel.parse_obj
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 3 validation errors for FrigateConfig
cameras -> reolink
none is not an allowed value (type=type_error.none.not_allowed)
cameras -> koi_pond -> ffmpeg -> inputs -> 1 -> roles
field required (type=value_error.missing)
cameras -> koi_pond -> ffmpeg -> inputs -> 1 -> role
extra fields not permitted (type=value_error.extra)

*************************************************************
*** End Config Validation Errors ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Frigate stats

No response

Operating system

UNRAID

Install method

Docker CLI

Coral version

M.2

Any other information that may be helpful

No response

renarena commented 2 years ago

an s is missing, it have to be roles

role:
            - detect
mikey6283 commented 2 years ago

Hi I decided to reduce config to one camera with the config as per documentation see below but still getting error regarding FFMPEG `mqtt:

Required: host name

host: 192.168.0.15

Optional: port (default: shown below)

port: 1883

Optional: user

user: mikey

Optional: password

NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.

e.g. password: '{FRIGATE_MQTT_PASSWORD}'

password: mqtt6283

Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)

detectors: coral1: type: edgetpu device: pci:0

coral2:

type: edgetpu

device: pci:1

Optional: Database configuration

database: path: /media/frigate/frigate.db

Optional: ffmpeg configuration

ffmpeg:

Optional: global ffmpeg args (default: shown below)

global_args: -hide_banner -loglevel warning hwaccel_args:

detect:

Optional: width of the frame for the input with the detect role (default: shown below)

width: 879

width: 640

Optional: height of the frame for the input with the detect role (default: shown below)

height: 720

height: 480

Optional: desired fps for your camera for the input with the detect role (default: shown below)

NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.

fps: 7

Optional: enables detection for the camera (default: True)

This value can be set via MQTT and will be updated in startup based on retained value

enabled: True

objects:

Optional: list of objects to track from labelmap.txt (default: shown below)

track:

Optional: Record configuration

NOTE: Can be overridden at the camera level

record:

Optional: Enable recording (default: shown below)

enabled: True

Optional: Number of days to retain recordings regardless of events (default: shown below)

NOTE: This should be set to 0 and retention should be defined in events section below

if you only want to retain recordings of events.

retain_days: 0

Optional: Event recording settings

events:

Optional: Objects to save recordings for. (default: all tracked objects)

objects:
  - person
# Optional: Retention settings for recordings of events
retain:
  # Required: Default retention days (default: shown below)
  default: 10

Optional: RTMP configuration

NOTE: Can be overridden at the camera level

rtmp:

Optional: Enable the RTMP stream (default: True)

enabled: false

birdseye:

Optional: Enable birdseye view (default: shown below)

enabled: True

Optional: Width of the output resolution (default: shown below)

width: 896

Optional: Height of the output resolution (default: shown below)

height: 672

Optional: Encoding quality of the mpeg1 feed (default: shown below)

1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.

quality: 8

Optional: Mode of the view. Available options are: objects, motion, and continuous

objects - cameras are included if they have had a tracked object within the last 30 seconds

motion - cameras are included if motion was detected in the last 30 seconds

continuous - all cameras are included always

mode: objects

cameras: reolink: ffmpeg: hwaccel_args:

NickM-27 commented 2 years ago

Please use ``` to format your config otherwise we can't read it.

Anyway, to fix this simply remove the nobuffer part of the input args

mikey6283 commented 2 years ago

I have tried to correct the config.yml for the last hour however, i am still get error in the logs. I hope that you can point me in the direction at less the error are RED???

mqtt:
  # Required: host name
  host: 192.168.0.15
  # Optional: port (default: shown below)
  port: 1883
  # Optional: user
  user: mikey
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: mqtt6283
  # Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)
detectors:
  coral1:
    type: edgetpu
    device: pci:0
  # coral2:
  #  type: edgetpu
  # device: pci:1

# Optional: Database configuration
database:
  path: /media/frigate/frigate.db

# Optional: ffmpeg configuration
ffmpeg: 
# Optional: global ffmpeg args (default: shown below)
global_args: -hide_banner -loglevel warning
hwaccel_args:
    - -hwaccel
    -  vappi
    - -qsv_device
    - /dev/dri/renderD128
  # Optional: global input args (default: shown below)
input_args:
    - -avoid_negative_ts
      - make_zero
    - -fflags
  #  - nobuffer+genpts+discardcorrupt
    - -flags
    - low_delay
    - -strict
    - experimental
    - -analyzeduration
    - 1000M
    - -probesize
    - 1000M
    - -rw_timeout
    - "5000000"
  # Optional: global output args
output_args:
  Optional: output args for detect streams (default: shown below)
     detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
     record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for rtmp streams (default: shown below)
     rtmp: -c copy -f flv

detect:
  # Optional: width of the frame for the input with the detect role (default: shown below)
  width: 879
  # width: 640
  # Optional: height of the frame for the input with the detect role (default: shown below)
  height: 720
  # height: 480
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 7
  # Optional: enables detection for the camera (default: True)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Enable recording (default: shown below)
  enabled: True
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 10

# Optional: RTMP configuration
# NOTE: Can be overridden at the camera level
rtmp:
  # Optional: Enable the RTMP stream (default: True)
  enabled: True

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Width of the output resolution (default: shown below)
  width: 896
  # Optional: Height of the output resolution (default: shown below)
  height: 672
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 8
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: objects  

cameras:
  reolink:
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vaapi
      - -hwaccel_device
      - /dev/dri/renderD128
      - -hwaccel_output_format
      - yuv420p
      input_args:
      - -avoid_negative_ts
      - make_zero
      - -fflags
      - nobuffer+genpts+discardcorrupt
      - -flags
      - low_delay
      - -strict
      - experimental
      - -analyzeduration
      - 1000M
      - -probesize
      - 1000M
      - -rw_timeout
      - "5000000"
      inputs:
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=BGarden1
          roles:
            - record
            - rtmp
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=BGarden1d
          roles:
            - detect
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    detect:
      width: 640
      height: 480
      fps: 7

''[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done. [2022-08-05 20:10:40] frigate.app INFO : Starting Frigate (0.11.0-37325c7)



Your config file is not valid! Please check the docs at https://docs.frigate.video/configuration/index



Config Validation Errors


mapping values are not allowed here in "", line 52, column 52: ... args for detect streams (default: shown below) ^ Traceback (most recent call last): File "/opt/frigate/frigate/app.py", line 332, in start self.init_config() File "/opt/frigate/frigate/app.py", line 82, in init_config user_config = FrigateConfig.parse_file(config_file) File "/opt/frigate/frigate/config.py", line 938, in parse_file config = yaml.safe_load(raw_config) File "/usr/local/lib/python3.9/dist-packages/yaml/init.py", line 125, in safe_load return load(stream, SafeLoader) File "/usr/local/lib/python3.9/dist-packages/yaml/init.py", line 81, in load return loader.get_single_data() File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 49, in get_single_data node = self.get_single_node() File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 428, in parse_block_mapping_key if self.check_token(KeyToken): File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 116, in check_token self.fetch_more_tokens() File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 223, in fetch_more_tokens return self.fetch_value() File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 577, in fetch_value raise ScannerError(None, None, yaml.scanner.ScannerError: mapping values are not allowed here in "", line 52, column 52: ... args for detect streams (default: shown below) ^


End Config Validation Errors


[cmd] python3 exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.

NickM-27 commented 2 years ago

You need to use backticks ``` not single quotes '''

I won't be able to help unless you can format it correctly as this one seems to be a spacing issue

mikey6283 commented 2 years ago

  # Required: host name
  host: 192.168.0.15
  # Optional: port (default: shown below)
  port: 1883
  # Optional: user
  user: mikey
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: mqtt6283
  # Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)
detectors:
  coral1:
    type: edgetpu
    device: pci:0
  # coral2:
  #  type: edgetpu
  # device: pci:1

# Optional: Database configuration
database:
  path: /media/frigate/frigate.db

# Optional: ffmpeg configuration
ffmpeg: 
# Optional: global ffmpeg args (default: shown below)
global_args: -hide_banner -loglevel warning
hwaccel_args:
    - -hwaccel
    -  vappi
    - -qsv_device
    - /dev/dri/renderD128
  # Optional: global input args (default: shown below)
input_args:
    - -avoid_negative_ts
      - make_zero
    - -fflags
  #  - nobuffer+genpts+discardcorrupt
    - -flags
    - low_delay
    - -strict
    - experimental
    - -analyzeduration
    - 1000M
    - -probesize
    - 1000M
    - -rw_timeout
    - "5000000"
  # Optional: global output args
output_args:
  Optional: output args for detect streams (default: shown below)
     detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
     record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for rtmp streams (default: shown below)
     rtmp: -c copy -f flv

detect:
  # Optional: width of the frame for the input with the detect role (default: shown below)
  width: 879
  # width: 640
  # Optional: height of the frame for the input with the detect role (default: shown below)
  height: 720
  # height: 480
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 7
  # Optional: enables detection for the camera (default: True)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Enable recording (default: shown below)
  enabled: True
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 10

# Optional: RTMP configuration
# NOTE: Can be overridden at the camera level
rtmp:
  # Optional: Enable the RTMP stream (default: True)
  enabled: True

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Width of the output resolution (default: shown below)
  width: 896
  # Optional: Height of the output resolution (default: shown below)
  height: 672
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 8
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: objects  

cameras:
  reolink:
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vaapi
      - -hwaccel_device
      - /dev/dri/renderD128
      - -hwaccel_output_format
      - yuv420p
      input_args:
      - -avoid_negative_ts
      - make_zero
      - -fflags
      - nobuffer+genpts+discardcorrupt
      - -flags
      - low_delay
      - -strict
      - experimental
      - -analyzeduration
      - 1000M
      - -probesize
      - 1000M
      - -rw_timeout
      - "5000000"
      inputs:
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=BGarden1
          roles:
            - record
            - rtmp
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=BGarden1d
          roles:
            - detect
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    detect:
      width: 640
      height: 480
      fps: 7```
NickM-27 commented 2 years ago

You have a line Optional: output args for detect streams (default: shown below) which needs a # to comment it out but you deleted that

mikey6283 commented 2 years ago

Sorry i still get the following errors ????


global_args
extra fields not permitted (type=value_error.extra)
hwaccel_args
extra fields not permitted (type=value_error.extra)
input_args
extra fields not permitted (type=value_error.extra)
output_args
extra fields not permitted (type=value_error.extra)

*************************************************************
*** End Config Validation Errors ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.```

``mqtt:
  # Required: host name
  host: 192.168.0.15
  # Optional: port (default: shown below)
  port: 1883
  # Optional: user
  user: mikey
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: mqtt6283
  # Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)
detectors:
  coral1:
    type: edgetpu
    device: pci:0
  # coral2:
  #  type: edgetpu
  # device: pci:1

# Optional: Database configuration
database:
  path: /media/frigate/frigate.db

# Optional: ffmpeg configuration
ffmpeg: 
# Optional: global ffmpeg args (default: shown below)
global_args: -hide_banner -loglevel warning
hwaccel_args:
  - -hwaccel
  -  vappi
  - -qsv_device
  - /dev/dri/renderD128
  # Optional: global input args (default: shown below)
input_args:
  - -avoid_negative_ts
  - make_zero
  - -fflags
  #  - nobuffer+genpts+discardcorrupt
  - -flags
  - low_delay
  - -strict
  - experimental
  - -analyzeduration
  - 1000M
  - -probesize
  - 1000M
  - -rw_timeout
  - "5000000"
  # Optional: global output args
output_args:
   # Optional: output args for detect streams (default: shown below)
     detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
     record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for rtmp streams (default: shown below)
     rtmp: -c copy -f flv

detect:
  # Optional: width of the frame for the input with the detect role (default: shown below)
  width: 879
  # width: 640
  # Optional: height of the frame for the input with the detect role (default: shown below)
  height: 720
  # height: 480
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 7
  # Optional: enables detection for the camera (default: True)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Enable recording (default: shown below)
  enabled: True
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 10

# Optional: RTMP configuration
# NOTE: Can be overridden at the camera level
rtmp:
  # Optional: Enable the RTMP stream (default: True)
  enabled: True

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Width of the output resolution (default: shown below)
  width: 896
  # Optional: Height of the output resolution (default: shown below)
  height: 672
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 8
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: objects  

cameras:
  reolink:
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vaapi
      - -hwaccel_device
      - /dev/dri/renderD128
      - -hwaccel_output_format
      - yuv420p
      input_args:
      - -avoid_negative_ts
      - make_zero
      - -fflags
      - nobuffer+genpts+discardcorrupt
      - -flags
      - low_delay
      - -strict
      - experimental
      - -analyzeduration
      - 1000M
      - -probesize
      - 1000M
      - -rw_timeout
      - "5000000"
      inputs:
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=BGarden1
          roles:
            - record
            - rtmp
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=BGarden1d
          roles:
            - detect
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    detect:
      width: 640
      height: 480
      fps: 7```
NickM-27 commented 2 years ago

Please restart with a basic config per the docs: https://docs.frigate.video/guides/getting_started

Please keep in mind that yaml is space / indention dependent. In this case hwaccel_args, global_args, etc are properties of ffmpeg and yet you have them at the same level. You're also redefining them for the camera specifically so that first section is not needed at all.

mikey6283 commented 2 years ago

Sir, thank you your time i will start again as suggested.

mikey6283 commented 2 years ago

I completed a new config.yaml using the documentation & configuration however, i am still getting similar error. here is the error, hope you can help

``mapping values are not allowed here in "", line 116, column 11: ffmpeg: ^ Traceback (most recent call last): File "/opt/frigate/frigate/app.py", line 332, in start self.init_config() File "/opt/frigate/frigate/app.py", line 82, in init_config user_config = FrigateConfig.parse_file(config_file) File "/opt/frigate/frigate/config.py", line 938, in parse_file config = yaml.safe_load(raw_config) File "/usr/local/lib/python3.9/dist-packages/yaml/init.py", line 125, in safe_load return load(stream, SafeLoader) File "/usr/local/lib/python3.9/dist-packages/yaml/init.py", line 81, in load return loader.get_single_data() File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 49, in get_single_data node = self.get_single_node() File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 428, in parse_block_mapping_key if self.check_token(KeyToken): File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 116, in check_token self.fetch_more_tokens() File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 223, in fetch_more_tokens return self.fetch_value() File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 577, in fetch_value raise ScannerError(None, None, yaml.scanner.ScannerError: mapping values are not allowed here in "", line 116, column 11: ffmpeg: ^


End Config Validation Errors


[cmd] python3 exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.```


  # Required: host name
  host: 192.168.0.19
  # Optional: port (default: shown below)
  port: 1883
  # Optional: user
  user: mikey
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: mqtt6283
  # Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)

# Optional: Detectors configuration. Defaults to a single CPU detector
detectors:
  # Required: name of the detector
  coral1:
    # Required: type of the detector
    # Valid values are 'edgetpu' (requires device property below) and 'cpu'.
    type: edgetpu
    # Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api
    device: pci:0
  coral2:
    type: edgetpu
    device: pci:1

# Optional: Database configuration
database:
  # The path to store the SQLite DB (default: shown below)
  path: /media/frigate/frigate.db

# Optional: ffmpeg configuration
#ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
#  global_args: -hide_banner -loglevel warning
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
#  hwaccel_args:
#    - -hwaccel
#    - vaapi
#    - -hwacecl_device
#    - /dev/dri/renderD128
#    - - hwaccel_output_format
#    -  yuvv420p
  # Optional: global input args (default: shown below)
#  input_args:
#    - -avoid_negative_ts
#    - make_zero
  #  - -fflags
  #  - nobuffer+genpts+discardcorrupt
  # - -flags
  #  - low_delay
  #  - -strict
  #  - experimental
  #  - -analyzeduration
  #  - 1000M
  #  - -probesize
  #  - "5000000"
  #  - -rw_timeout
  #  - "5000000"
  # Optional: global output args
  # output_args:
    # Optional: output args for detect streams (default: shown below)
  #  detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
  #  record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for rtmp streams (default: shown below)
  #  rtmp: -c copy -f flv

# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
  # Optional: width of the frame for the input with the detect role (default: shown below)
  width: 896
  # Optional: height of the frame for the input with the detect role (default: shown below)
  height: 672
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 7
  # Optional: enables detection for the camera (default: True)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Enable recording (default: shown below)
  enabled: True
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 0

# Optional: RTMP configuration
# NOTE: Can be overridden at the camera level
rtmp:
  # Optional: Enable the RTMP stream (default: True)
  enabled: True
# Required
cameras:
  reolink
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vappi
      - -hwacecl_device
      - /dev/dri/renderD128
      - -hwaccel_output-format
      - yuv420p
      input_args
      - -avoid_negative_ts
      - make_zero
      - -fflags
      - nobuffer+genpts+discardcorrupt
      - -flags
      - low_delay
      - -strict
      - experimental
      - -analyzeduration
      - 1000M
      - -probesize
      - 1000M
      - -rw_timeout
      - "5000000"
      inputs:  
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=BGarden1
          roles:
            - record
            - rtmp
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=BGarden1d
          roles:
            - detect
      output_args:
        record: -f segment -segment_time mp4 -reset_timestamps 1 -strftime 1 -c copy
    detect:
      width: 640
      height: 480
      fps: 7```
NickM-27 commented 2 years ago
cameras:
  reolink
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vappi
      - -hwacecl_device
      - /dev/dri/renderD128
      - -hwaccel_output-format
      - yuv420p
      input_args
      - -avoid_negative_ts
      - make_zero
      - -fflags
      - nobuffer+genpts+discardcorrupt
      - -flags
      - low_delay
      - -strict
      - experimental
      - -analyzeduration
      - 1000M
      - -probesize
      - 1000M
      - -rw_timeout
      - "5000000"

is indented incorrectly, it needs to be

cameras:
  reolink:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - vappi
        - -hwacecl_device
        - /dev/dri/renderD128
        - -hwaccel_output-format
        - yuv420p
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer+genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
NickM-27 commented 2 years ago

You also seem to be missing : in places which is also confusing, I fixed them in the corrected code above

mikey6283 commented 2 years ago

Still no joy following your help. what does symbol ^ as per these 2 errors following the missing : ?


File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 392, in parse_block_sequence_entry
raise ParserError("while parsing a block collection", self.marks[-1],
yaml.parser.ParserError: while parsing a block collection
in "<unicode string>", line 125, column 7:
- -avoid_negative_ts
^
expected <block end>, but found '?'
in "<unicode string>", line 139, column 7:
inputs:
^

*************************************************************
*** End Config Validation Errors ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.```
NickM-27 commented 2 years ago

The ^ is it literally pointing to the part that is the issue.

That whole block starting with inputs and ending with fps: 7 are indented too far. They need to be backspaced by 2 spaces

mikey6283 commented 2 years ago

I have produced a new config.yml finally, still getting errors regarding FFMPEG. I am back to square one new config.yml


  host: 192.168.0.15
  # Optional: port (default: shown below)
  port: 1883
  # Optional: user
  user: mikey
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: mqtt6283
  # Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)
detectors:
  coral1:
    type: edgetpu
    device: pci:0
  # coral2:
  #  type: edgetpu
  # device: pci:1

# Optional: Database configuration
database:
  path: /media/frigate/frigate.db

# Optional: ffmpeg configuration
#ffmpeg: 
# Optional: global ffmpeg args (default: shown below)
#global_args: -hide_banner -loglevel warning
#hwaccel_args:
#    - -hwaccel
#    -  vappi
#    - -qsv_device
#    - /dev/dri/renderD128
  # Optional: global input args (default: shown below)
#input_args:
#    - -avoid_negative_ts
#      - make_zero
#    - -fflags
#  #  - nobuffer+genpts+discardcorrupt
#    - -flags
#    - low_delay
#    - -strict
#    - experimental
#    - -analyzeduration
#    - 1000M
#    - -probesize
#    - 1000M
#    - -rw_timeout
#    - "5000000"
  # Optional: global output args
#output_args:
  #Optional: output args for detect streams (default: shown below)
#  detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
#  record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for rtmp streams (default: shown below)
#  rtmp: -c copy -f flv

detect:
  # Optional: width of the frame for the input with the detect role (default: shown below)
  width: 879
  # width: 640
  # Optional: height of the frame for the input with the detect role (default: shown below)
  height: 720
  # height: 480
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 7
  # Optional: enables detection for the camera (default: True)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Enable recording (default: shown below)
  enabled: True
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 10

# Optional: RTMP configuration
# NOTE: Can be overridden at the camera level
rtmp:
  # Optional: Enable the RTMP stream (default: True)
  enabled: True

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Width of the output resolution (default: shown below)
  width: 896
  # Optional: Height of the output resolution (default: shown below)
  height: 672
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 8
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: objects  

cameras:
  reolink:
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vaapi
      - -hwaccel_device
      - /dev/dri/renderD128
      - -hwaccel_output_format
      - yuv420p
      input_args:
      - -avoid_negative_ts
      - make_zero
      - -fflags
      - nobuffer+genpts+discardcorrupt
      - -flags
      - low_delay
      - -strict
      - experimental
      - -analyzeduration
      - 1000M
      - -probesize
      - 1000M
      - -rw_timeout
      - "5000000"
      inputs:
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=BGarden1
          roles:
          - record
          - rtmp
        - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=BGarden1d
          roles:
          - detect
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    detect:
      width: 896
      height: 672
      fps: 5 ```

FFMPEG log errors
``ffmpeg
none is not an allowed value (type=type_error.none.not_allowed)

*************************************************************
*** End Config Validation Errors ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-08-06 08:11:09] frigate.app INFO : Starting Frigate (0.11.0-37325c7)
[2022-08-06 08:11:09] frigate.config WARNING : The 'retain_days' config option has been DEPRECATED and will be removed in a future version. Please use the 'days' setting under 'retain'

Starting migrations
[2022-08-06 08:11:09] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-08-06 08:11:09] peewee_migrate INFO : There is nothing to migrate
[2022-08-06 08:11:09] frigate.app INFO : Output process started: 215
[2022-08-06 08:11:09] frigate.app INFO : Camera processor started for reolink: 218
[2022-08-06 08:11:09] frigate.app INFO : Capture process started for reolink: 219
[2022-08-06 08:11:09] detector.coral1 INFO : Starting detection process: 214
[2022-08-06 08:11:09] frigate.edgetpu INFO : Attempting to load TPU as pci:0
[2022-08-06 08:11:09] ws4py INFO : Using epoll
[2022-08-06 08:11:09] frigate.edgetpu INFO : TPU found
[2022-08-06 08:11:09] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process.

[2022-08-06 08:11:09] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread...

[2022-08-06 08:11:09] ws4py INFO : Using epoll
[2022-08-06 08:11:29] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink.

[2022-08-06 08:11:29] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2022-08-06 08:11:29] ffmpeg.reolink.detect ERROR : [tcp @ 0x55ffca63ed80] Failed to resolve hostname reolink_192.168.0.47: Name or service not known

[2022-08-06 08:11:29] ffmpeg.reolink.detect ERROR : http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=BGarden1d: Input/output error

[2022-08-06 08:11:29] ffmpeg.reolink.record_rtmp ERROR : [tcp @ 0x556722372f00] Failed to resolve hostname reolink_192.168.0.47: Name or service not known

[2022-08-06 08:11:29] ffmpeg.reolink.record_rtmp ERROR : http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=BGarden1: Input/output error

[2022-08-06 08:11:29] watchdog.reolink INFO : Terminating the existing ffmpeg process...
[2022-08-06 08:11:29] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully...
[2022-08-06 08:11:29] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process.

[2022-08-06 08:11:29] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread...

[2022-08-06 08:11:39] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink.

[2022-08-06 08:11:39] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2022-08-06 08:11:39] ffmpeg.reolink.detect ERROR : [tcp @ 0x55c1ab0ebd80] Failed to resolve hostname reolink_192.168.0.47: Name or service not known ```
NickM-27 commented 2 years ago

Your path is wrong, it won't have reolink_ in the IP address

mikey6283 commented 2 years ago

Hi I used this path as it suggested for the Reolink Cameras in the docs. I removed the reolink from path and used the official FFMEG from the docs and still get the same error in the logs , without the reolink.

I do appreciate your time & help , but i would like to get Frigate up and running again before i updated.

``[2022-08-06 17:51:23] watchdog.back_garden INFO : Terminating the existing ffmpeg process... [2022-08-06 17:51:23] watchdog.back_garden INFO : Waiting for ffmpeg to exit gracefully... [2022-08-06 17:51:23] frigate.video ERROR : back_garden: Unable to read frames from ffmpeg process.

[2022-08-06 17:51:23] frigate.video ERROR : back_garden: ffmpeg process is not running. exiting capture thread...

[2022-08-06 17:51:33] watchdog.back_garden ERROR : Ffmpeg process crashed unexpectedly for back_garden.

[2022-08-06 17:51:33] watchdog.back_garden ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2022-08-06 17:51:33] ffmpeg.back_garden.detect ERROR : Unrecognized option 'stimeout'.

[2022-08-06 17:51:33] ffmpeg.back_garden.detect ERROR : Error splitting the argument list: Option not found

[2022-08-06 17:51:33] ffmpeg.back_garden.record_rtmp ERROR : Unrecognized option 'stimeout'.

[2022-08-06 17:51:33] ffmpeg.back_garden.record_rtmp ERROR : Error splitting the argument list: Option not found

[2022-08-06 17:51:33] watchdog.back_garden INFO : Terminating the existing ffmpeg process... [2022-08-06 17:51:33] watchdog.back_garden INFO : Waiting for ffmpeg to exit gracefully... [2022-08-06 17:51:33] frigate.video ERROR : back_garden: Unable to read frames from ffmpeg process.

[2022-08-06 17:51:33] frigate.video ERROR : back_garden: ffmpeg process is not running. exiting capture thread...

[cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.` mqtt: host: 192.168.0.15

Optional: port (default: shown below)

port: 1883

Optional: user

user: mikey

Optional: password

NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.

e.g. password: '{FRIGATE_MQTT_PASSWORD}'

password: mqtt6283

Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)

detectors: coral1: type: edgetpu device: pci:0

Optional: Database configuration

database: path: /media/frigate/frigate.db

Optional: ffmpeg configuration

ffmpeg:

Optional: global ffmpeg args (default: shown below)

global_args: -hide_banner -loglevel warning

Optional: global hwaccel args (default: shown below)

NOTE: See hardware acceleration docs for your specific device

hwaccel_args: []

Optional: global input args (default: shown below)

input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1

Optional: global output args

output_args:

Optional: output args for detect streams (default: shown below)

detect: -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
# Optional: output args for rtmp streams (default: shown below)
rtmp: -c copy -f flv

detect:

Optional: width of the frame for the input with the detect role (default: shown below)

width: 879

width: 640

Optional: height of the frame for the input with the detect role (default: shown below)

height: 720

height: 480

Optional: desired fps for your camera for the input with the detect role (default: shown below)

NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.

fps: 7

Optional: enables detection for the camera (default: True)

This value can be set via MQTT and will be updated in startup based on retained value

enabled: True

objects:

Optional: list of objects to track from labelmap.txt (default: shown below)

track:

Optional: Record configuration

NOTE: Can be overridden at the camera level

record:

Optional: Enable recording (default: shown below)

enabled: True

Optional: Number of days to retain recordings regardless of events (default: shown below)

NOTE: This should be set to 0 and retention should be defined in events section below

if you only want to retain recordings of events.

retain_days: 0

Optional: Event recording settings

events:

Optional: Objects to save recordings for. (default: all tracked objects)

objects:
  - person
# Optional: Retention settings for recordings of events
retain:
  # Required: Default retention days (default: shown below)
  default: 10

Optional: RTMP configuration

NOTE: Can be overridden at the camera level

rtmp:

Optional: Enable the RTMP stream (default: True)

enabled: false

birdseye:

Optional: Enable birdseye view (default: shown below)

enabled: True

Optional: Width of the output resolution (default: shown below)

width: 896

Optional: Height of the output resolution (default: shown below)

height: 672

Optional: Encoding quality of the mpeg1 feed (default: shown below)

1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.

quality: 8

Optional: Mode of the view. Available options are: objects, motion, and continuous

objects - cameras are included if they have had a tracked object within the last 30 seconds

motion - cameras are included if motion was detected in the last 30 seconds

continuous - all cameras are included always

mode: objects

cameras: back_garden: ffmpeg: inputs:

NickM-27 commented 2 years ago

It seems you updated to frigate 0.11 RC which the release notes state that stimeout is not a valid option, you will need to change stimeout in the input_args to timeout

mikey6283 commented 2 years ago

Hi which option should i upgrade to and i will start again as i am getting same errors after changing stimeout to -timeout. I also changed the camera path. is there away i can delete / remove


2022-08-06 18:31:20] frigate.video ERROR : koipond: Unable to read frames from ffmpeg process.

[2022-08-06 18:31:20] frigate.video ERROR : koipond: ffmpeg process is not running. exiting capture thread...

[2022-08-06 18:31:27] watchdog.koipond ERROR : Ffmpeg process crashed unexpectedly for koipond.

[2022-08-06 18:31:27] watchdog.koipond ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2022-08-06 18:31:27] ffmpeg.koipond.detect ERROR : Option rtsp_transport not found.

[2022-08-06 18:31:28] ffmpeg.koipond.record_rtmp ERROR : Option rtsp_transport not found.

[2022-08-06 18:31:28] watchdog.koipond INFO : Terminating the existing ffmpeg process...
[2022-08-06 18:31:28] watchdog.koipond INFO : Waiting for ffmpeg to exit gracefully```
NickM-27 commented 2 years ago

If you keep changing other things along with what I suggest then I will not be able to help you as you are just confusing the issue.

At this point it is probably easiest if you just paste your current config (with backticks to format it) and I will correct it for you and that should work.

mikey6283 commented 2 years ago

Thanks that would be great,

``mqtt: host: 192.168.0.15

Optional: port (default: shown below)

port: 1883

Optional: user

user: mikey

Optional: password

NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.

e.g. password: '{FRIGATE_MQTT_PASSWORD}'

password: mqtt6283

Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)

detectors: coral1: type: edgetpu device: pci:0

coral2:

type: edgetpu

device: pci:1

Optional: Database configuration

database: path: /media/frigate/frigate.db

Optional: ffmpeg configuration

ffmpeg:

Optional: global ffmpeg args (default: shown below)

global_args: -hide_banner -loglevel warning

hwaccel_args:

- -hwaccel

- vappi

- -qsv_device

- /dev/dri/renderD128

Optional: global input args (default: shown below)

input_args:

- -avoid_negative_ts

- make_zero

- -fflags

- nobuffer+genpts+discardcorrupt

- -flags

- low_delay

- -strict

- experimental

- -analyzeduration

- 1000M

- -probesize

- 1000M

- -rw_timeout

- "5000000"

Optional: global output args

output_args:

Optional: output args for detect streams (default: shown below)

detect: -f rawvideo -pix_fmt yuv420p

# Optional: output args for record streams (default: shown below)

record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an

# Optional: output args for rtmp streams (default: shown below)

rtmp: -c copy -f flv

detect:

Optional: width of the frame for the input with the detect role (default: shown below)

width: 879

width: 640

Optional: height of the frame for the input with the detect role (default: shown below)

height: 720

height: 480

Optional: desired fps for your camera for the input with the detect role (default: shown below)

NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.

fps: 7

Optional: enables detection for the camera (default: True)

This value can be set via MQTT and will be updated in startup based on retained value

enabled: True

objects:

Optional: list of objects to track from labelmap.txt (default: shown below)

track:

Optional: Record configuration

NOTE: Can be overridden at the camera level

record:

Optional: Enable recording (default: shown below)

enabled: True

Optional: Number of days to retain recordings regardless of events (default: shown below)

NOTE: This should be set to 0 and retention should be defined in events section below

if you only want to retain recordings of events.

retain_days: 0

Optional: Event recording settings

events:

Optional: Objects to save recordings for. (default: all tracked objects)

objects:
  - person
# Optional: Retention settings for recordings of events
retain:
  # Required: Default retention days (default: shown below)
  default:  10

Optional: RTMP configuration

NOTE: Can be overridden at the camera level

rtmp:

Optional: Enable the RTMP stream (default: True)

enabled: True

birdseye:

Optional: Enable birdseye view (default: shown below)

enabled: True

Optional: Width of the output resolution (default: shown below)

width: 896

Optional: Height of the output resolution (default: shown below)

height: 672

Optional: Encoding quality of the mpeg1 feed (default: shown below)

1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.

quality: 8

Optional: Mode of the view. Available options are: objects, motion, and continuous

objects - cameras are included if they have had a tracked object within the last 30 seconds

motion - cameras are included if motion was detected in the last 30 seconds

continuous - all cameras are included always

mode: objects

cameras: reolink: ffmpeg: hwaccel_args:

mikey6283 commented 2 years ago

Not sure if the previous info worked. removed al commented out lines.


  host: 192.168.0.15
  # Optional: port (default: shown below)
  port: 1883
  # Optional: user
  user: mikey

  password: mqtt6283

detectors:
  coral1:
    type: edgetpu
    device: pci:0

database:
  path: /media/frigate/frigate.db

ffmpeg: 

detect:
 below)
  width: 879
  height: 720

  fps: 7
  enabled: True

objects:
  track:
    - person

record:

  enabled: True
  retain_days: 0
  events:
    objects:
      - person
    retain:
      default:  10

rtmp:
  enabled: True

birdseye:

  enabled: True

  width: 896

  height: 672
  quality: 8

  mode: objects  

cameras:
  reolink:
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vaapi
      - -hwaccel_device
      - /dev/dri/renderD128
      - -hwaccel_output_format
      - yuv420p
    input_args:
      - -avoid_negative_ts
      - make_zero
      - -fflags
      - nobuffer+genpts+discardcorrupt
      - -flags
      - low_delay
      - -strict
      - experimental
      - -analyzeduration
      - 1000M
      - -probesize
      - 1000M
      - -rw_timeout
      - "5000000"
    inputs:
      - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=BGarden1
        roles:
          - record
          - rtmp
      - path: http://reolink_192.168.0.47/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=BGarden1
        roles:
          - detect
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    detect:
      width: 896
      height: 672
      fps: 5  ```
NickM-27 commented 2 years ago

Okay it is here: https://pastebin.com/rLPeK8ez

If you get any errors paste the logs here and I will make adjustments necessary and explain them

mikey6283 commented 2 years ago

s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done. [2022-08-06 21:16:08] frigate.app INFO : Starting Frigate (0.11.0-37325c7)



Your config file is not valid! Please check the docs at https://docs.frigate.video/configuration/index



Config Validation Errors


while scanning for the next token found character '\t' that cannot start any token in "", line 69, column 19: default: 10

NickM-27 commented 2 years ago

For some reason there was a hidden tab character there, https://pastebin.com/AmxFZN1T has fixed it

mikey6283 commented 2 years ago

Still a same problem ref :FFMPEG

2022-08-06 21:51:59] detector.coral1 INFO : Starting detection process: 215 [2022-08-06 21:51:59] frigate.edgetpu INFO : Attempting to load TPU as pci:0 [2022-08-06 21:51:59] frigate.edgetpu INFO : TPU found [2022-08-06 21:51:59] ws4py INFO : Using epoll [2022-08-06 21:52:03] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process.

[2022-08-06 21:52:03] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread...

[2022-08-06 21:52:19] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink.

[2022-08-06 21:52:19] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2022-08-06 21:52:19] ffmpeg.reolink.detect ERROR : [AVHWDeviceContext @ 0x558466fccc40] No VA display found for device /dev/dri/renderD128.

[2022-08-06 21:52:19] ffmpeg.reolink.detect ERROR : Device creation failed: -22.

[2022-08-06 21:52:19] ffmpeg.reolink.detect ERROR : [h264 @ 0x558466efd780] No device available for decoder: device type vaapi needed for codec h264.

[2022-08-06 21:52:19] ffmpeg.reolink.detect ERROR : Device setup failed for decoder on input stream #0:0 : Invalid argument

[2022-08-06 21:52:23] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process.

[2022-08-06 21:52:23] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread...

[2022-08-06 21:52:29] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink.

[2022-08-06 21:52:29] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2022-08-06 21:52:29] ffmpeg.reolink.detect ERROR : [AVHWDeviceContext @ 0x562f47caa240] No VA display found for device /dev/dri/renderD128.

NickM-27 commented 2 years ago

Still a same problem ref :FFMPEG

This is a completely different problem than you've had before. It comes from ffmpeg but it is different error. It seems that you have not passed in or do not have hardware acceleration device. What PC / CPU are you using to run unraid? Have you enabled the drivers?

For now you can use https://pastebin.com/gDcYN5SG and it should work, can try to get hwaccel working after camera is working by itself

mikey6283 commented 2 years ago

Thanks for your help, The camera is working without hwaccel . I am running Lenovo tiny pc intel® Core™ i5-8400T CPU @ 1.70GHz with coral m.2.16g Ram Coral is live according on unRain and is live. I will look into the updates for coral M2. i am only running unraid which has Frigate and VM for Home assistant. Thanks again for getting me this far. as i said everything was working before update.

NickM-27 commented 2 years ago

Was hwaccel working before the update?

mikey6283 commented 2 years ago

yes but i was using


    - -hwaccel
    - qsv
    - -qsv_device
    - /dev/dri/renderD128 ``` in my config and the path was RTMP.
    - 
NickM-27 commented 2 years ago

Okay, like the breaking changes in the release notes said those args have changed. Check out https://deploy-preview-2829--frigate-docs.netlify.app/configuration/hardware_acceleration for updated args, should be waccel_args: -c:v h264_qsv

mikey6283 commented 2 years ago

Hi , Thanks for your help, I managed to get hwaccel installed as i can now see the 1 image on 192.168.0.15:5000 by install Jellyfin as a container (which i can use later for EMBY etc). However, I included the other 3 cameras to the config, this gives config errors and will not load if i remove them i can see the original path. how can i include these?

3 validation errors for FrigateConfig
cameras -> reolink -> ffmpeg -> inputs -> 3 -> roles
none is not an allowed value (type=type_error.none.not_allowed)
cameras -> reolink -> ffmpeg -> inputs -> 5 -> roles
none is not an allowed value (type=type_error.none.not_allowed)
cameras -> reolink -> ffmpeg -> inputs -> 7 -> roles
none is not an allowed value (type=type_error.none.not_allowed)

Copy of the config.yml

  reolink:
    ffmpeg:
      hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
      inputs:
        - path: http://192.168.0.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=BGarden1
          roles:
            - record
            - rtmp
        - path: http://192.168.0.47/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=BGarden1
          roles:
            - detect
        - path: http://192.168.0.48/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=Front1
          roles:
            - record
            - rtmp
        - path: http://192.168.0.48/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=Front1
          roles:
            - detect
        - path: http://192.168.0.51/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=Garage1
          roles:
            - record
            - rtmp
        - path: http://192.168.0.51/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=Garage1
          roles:
            - detect
        - path: http://192.168.0.52/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=koipond1
          roles:
            - record
            - rtmp
        - path: http://192.168.0.52/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=koipond1
          roles:
            - detect

    detect:
      width: 896
      height: 672
      fps: 5

    objects:
      track:
        - person

    record:
      enabled: True
      retain:
        days: 0
      events:
        retain:
          default:  10
NickM-27 commented 2 years ago

You're defining all of the cameras as the same. You can't do that, each camera (with a different IP) needs to be defined as its own in the config with its own input args, path(s), etc.

mikey6283 commented 2 years ago

hi could you please check my config as i keep on getting different errors, when i think i fixed one i receive different one. As i am only receiving 1 images in IP:5000.

Do i need to input the mqtt , dectectors etc or just the camera details ?

I would very much appreciate it.

return self.fetch_value()
File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 577, in fetch_value
raise ScannerError(None, None,
yaml.scanner.ScannerError: mapping values are not allowed here
in "<unicode string>", line 113, column 18:
output_args:
^

*************************************************************
*** End Config Validation Errors ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.```

config 

mqtt: host: 192.168.0.15 user: mikey password: mqtt6283

detectors: coral1: type: edgetpu device: pci:0

database: path: /media/frigate/frigate.db

birdseye: enabled: True mode: objects

cameras: Back garden: ffmpeg: hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p input_args:

detectors: coral1: type: edgetpu device: pci:0

database: path: /media/frigate/frigate.db

birdseye: enabled: True mode: objects

cameras: front: ffmpeg: hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p input_args

mqtt: host: 192.168.0.15 user: mikey password: mqtt6283

detectors: coral1: type: edgetpu device: pci:0

database: path: /media/frigate/frigate.db

birdseye: enabled: True mode: objects

cameras: garage: ffmpeg: hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p input_args:

mqtt: host: 192.168.0.15 user: mikey password: mqtt6283

detectors: coral1: type: edgetpu device: pci:0

database: path: /media/frigate/frigate.db

birdseye: enabled: True mode: objects

cameras: koipond: ffmpeg: hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p input_args:

Thanks in advance

NickM-27 commented 2 years ago

This should be enough for you to build out in the future as a template. You had everything duplicated when the cameras just needed to be all under the same cameras group, please use this as an example in the future, I won't be able to continue to update the config for each change.

https://pastebin.com/kPzzpHx1

mikey6283 commented 2 years ago

Thank you and appreciate for your help and guidance it all seems to be working as before. Furthermore i have learnt a lot.

issue is now closed.