blakeblackshear / frigate

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

[Support]: How to notify close camera that a cat is coming #8797

Closed dopeytree closed 11 months ago

dopeytree commented 11 months ago

Describe the problem you are having

I have 2 cameras on each side of a gate. The low down one 100% detects cats every time as they crawl under the gate. However the camera on the drive doesn't really detect cats that well.

Can I send a mqqt message or something from one camera to the other to say hey look for a cat for the next 60seconds and then go back to normal?

In specific we are talking about the barn camera always detecting cats and the porch camera which is a little bit higher not doing so much.

Version

0.12.1-367D724

Frigate config file

# Configuration File
# Used https://docs.frigate.video/configuration/#vscode-configuration-schema

mqtt:
  enabled: true
  host: 192.168.22.2
  port: 1883
   # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  user:
  # Optional: password
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password:
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60

detectors:
  coral:
    type: edgetpu
    device: usb   

# 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: 1280
  # Optional: height of the frame for the input with the detect role (default: shown below)
  #height: 720
  # 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: 5
  # Optional: enables detection for the camera (default: True)
  enabled: true
  # Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
  max_disappeared: 75
  # Optional: Configuration for stationary object tracking
  stationary:
    # Optional: Frequency for confirming stationary objects (default: shown below)
    # When set to 0, object detection will not confirm stationary objects until movement is detected.
    # If set to 10, object detection will run to confirm the object still exists on every 10th frame.
    interval: 10
    # Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
    threshold: 20

# Optional: Motion configuration
# NOTE: Can be overridden at the camera level
motion:
  # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
  # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
  # The value should be between 1 and 255.
  threshold: 25
  # Optional: Minimum size in pixels in the resized motion image that counts as motion (default: 30)
  # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
  # make motion detection more sensitive to smaller moving objects.
  # As a rule of thumb:
  #  - 15 - high sensitivity
  #  - 30 - medium sensitivity
  #  - 50 - low sensitivity
  contour_area: 30
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
  # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
  # Too low and a fast moving person wont be detected as motion.
  delta_alpha: 0.2
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
  # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
  # Low values will cause things like moving shadows to be detected as motion for longer.
  # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
  frame_alpha: 0.3
  # Optional: Height of the resized motion frame  (default: 50)
  # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense
  # of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion.
  frame_height: 30
  # Optional: improve contrast (default: shown below)
  # Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive
  # for daytime.
  improve_contrast: true

# Optional: ffmpeg configuration
# More information about presets at https://docs.frigate.video/configuration/ffmpeg_presets
ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel warning -threads 2
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
  hwaccel_args: preset-vaapi
  # Optional: global input args (default: shown below)
  input_args: preset-record-generic-audio-copy
  # Optional: global output args
  output_args:
    # Optional: output args for detect streams (default: shown below)
    detect: -threads 2 -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    record: preset-record-generic-audio-copy
    # Optional: output args for rtmp streams (default: shown below)
    rtmp: preset-rtmp-generic

# Optional: Restream configuration
# Uses https://github.com/AlexxIT/go2rtc (v1.7.1)
go2rtc:
   streams:
    barn_catflap : ffmpeg:rtsp://MPG7QbYQ:ICRGvtBU2xo3DxMy@192.168.22.202:554/live/ch0
      #
    #road_1080p HQ: ffmpeg:rtsp://EWLHSHKY:XGEJzBByF2IE3c@192.168.44.5:554/live/ch0
      #
    road_cam HQ: ffmpeg:rtsp://admin:annke2023@10.0.0.2:554/H265/ch1/main/av_stream
      #
    porch_cam HQ: ffmpeg:rtsp://admin:annke2023@10.0.0.3:554/H265/ch1/main/av_stream
      #
    bird_cam HQ:  ffmpeg:rtsp://admin:annke2023@10.0.0.7:554/H265/ch1/main/av_stream
      #
    barn HQ: ffmpeg:rtsp://admin:annke2023@10.0.0.4:554/H265/ch1/main/av_stream
      #
    kitchen_cam HQ: ffmpeg:rtsp://admin:annke2023@10.0.0.5:554/H265/ch1/main/av_stream
      #
    house_cam HQ: ffmpeg:rtsp://admin:annke2023@10.0.0.6:554/H265/ch1/main/av_stream
      #

cameras:
  #
  barn_catflap: #Cam name: Barn Catflap     #Brand: wansview   #Quality:1080p    #Link:WIFI
    snapshots:
      enabled: true
      bounding_box: true
      quality: 99
    #  
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://MPG7QbYQ:ICRGvtBU2xo3DxMy@192.168.22.202:554/live/ch1 # SD Link
          input_args: preset-rtsp-generic
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/barn_catflap?mp4  # HD Link
          input_args: preset-rtsp-restream
          roles:
            - record
    detect:
      width: 768  
      height: 432
      fps: 4
      stationary:
        interval: 0
        threshold: 70
    motion:
      mask:
        - 522,26,768,31,768,0,524,0
    objects:
      track:
        - dog
        - cat
      #filters:
        #
    record:
      enabled: true
      retain:
        days: 7
        mode: motion
      events:
        pre_capture: 5
        post_capture: 5
        objects:
        - dog
        - cat
        retain:
          default: 28
          mode: active_objects         

  #
  bird_cam: #Cam Name: Bird Cam     #Brand: Annke c500   #Quality:3k    #Link:POE
    snapshots:
      enabled: true
      bounding_box: false
      quality: 100
      #required_zones:
          #- bird-zone
    #  
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://admin:annke2023@10.0.0.7:554/Streaming/Channels/102 # SQ Link
          input_args: preset-rtsp-generic
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/bird_cam%20HQ?mp4  # HQ Link
          input_args: preset-rtsp-restream
          roles:
            - record
    detect:
      width: 640  
      height: 360
      fps: 4
      stationary:
        interval: 0
        threshold: 70
    objects:
      track:
        - bird
      filters:
        bird:
          min_area: 1000
          max_area: 100000
          # Optional: minimum width/height of the bounding box for the detected object (default: 0)
          min_ratio: 0.5
          # Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
          max_ratio: 2.0
          # Optional: minimum score for the object to initiate tracking (default: shown below)
          min_score: 0.5
          # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
          threshold: 0.7
    record:
      enabled: true
      retain:
        days: 7
        mode: motion
      events:
        pre_capture: 5
        post_capture: 5
        objects:
        - bird
        retain:
          default: 28
          mode: active_objects 
     # Optional: Configuration for the jpg snapshots published via MQTT        
    mqtt:
      enabled: true
      bounding_box: false #this will get rid of the box around the bird. We already know it is a bird. Sheesh.
      timestamp: false #this will get rid of the time stamp in the image. 
      quality: 100 #default quality is 70, which will get you lots of compression artifacts

  porch_cam: #Cam Name: Porch     #Brand: Annke c500   #Quality:3k    #Link:POE
    snapshots:
      enabled: true
      bounding_box: true
      quality: 99
    #  
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://admin:annke2023@10.0.0.3:554/Streaming/Channels/102 # SQ Link
          input_args: preset-rtsp-generic
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/porch_cam%20HQ?mp4  # HQ Link
          input_args: preset-rtsp-restream
          roles:
            - record
    detect:
      width: 640  
      height: 360
      fps: 4
      stationary:
        interval: 0
        threshold: 70
    motion:
      mask:
        - 189,0,183,32,0,33,0,0,0,0,0,0
        #- 640,360,619,228,583,178,473,223,423,360
        - 297,47,480,45,504,0,302,0
        - 124,246,194,242,174,207,147,193,110,228
    zones:
      zone_0:
        coordinates: 185,30,197,0,640,0,640,360,0,360,0,32
        objects: # (everywhere you want a person, cat, dog)
        - person
        - cat
        - dog  
      zone_1:
        coordinates: 268,154,256,0,575,0,544,150
        objects: # (everywhere you want a car)
        - car
        - person
        - cat
        - dog
    objects:
      track:
        - person
        - car
        - dog
        - cat
      filters:
        #
        car:
          mask:
            - 0,360,640,360,640,153,264,163,244,0,0,0,0,198
        # min_area: 5000
        #  max_area: 100000
        #  # Optional: minimum width/height of the bounding box for the detected object (default: 0)
        #  min_ratio: 0.6
        #  # Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
        #  max_ratio: 2.0
        #  # Optional: minimum score for the object to initiate tracking (default: shown below)
        #  min_score: 0.5
        #  # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
        #  threshold: 0.7
        #
        #person:
        #
        #dog:
        #  min_area: 1000
        #  max_area: 100000
        #  # Optional: minimum width/height of the bounding box for the detected object (default: 0)
        #  min_ratio: 0.5
        #  # Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
        #  max_ratio: 2.0
        #  # Optional: minimum score for the object to initiate tracking (default: shown below)
        #  min_score: 0.5
        #  # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
        #  threshold: 0.7
        #
        #cat:
        #  min_area: 1000
        #  max_area: 100000
        #  # Optional: minimum width/height of the bounding box for the detected object (default: 0)
        #  min_ratio: 0.5
        #  # Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
        #  max_ratio: 2.0
        #  # Optional: minimum score for the object to initiate tracking (default: shown below)
        #  min_score: 0.5
        #  # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
        #  threshold: 0.7
    record:
      enabled: true
      retain:
        days: 7
        mode: motion
      events:
        pre_capture: 5
        post_capture: 5
        objects:
        - person
        - car
        - dog
        - cat
        retain:
          default: 28
          mode: active_objects 

  road_cam: #Cam name: Road     #Brand: Annke c500   #Quality:3k    #Link:POE
    snapshots:
      enabled: true
      bounding_box: true
      quality: 99
    #  
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy 
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://admin:annke2023@10.0.0.2:554/Streaming/Channels/102 # SQ Link
          input_args: preset-rtsp-generic
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/road_cam%20HQ?mp4  # HQ Link
          input_args: preset-rtsp-restream
          roles:
            - record
    detect:
      width: 640  
      height: 360
      fps: 4
      stationary:
        interval: 0
        threshold: 70
    #motion:
      # mask:
       # - 189,0,189,23,0,23,0,0,0,0,0,0
    #zones:
      #zone_0:
        # coordinates: 192,21,197,0,640,0,640,236,514,210,410,480,0,480,0,21 
        # objects: # (everywhere you want a person, cat, dog)
        #- person
        #- cat
        #- dog  
      #zone_1:
        #coordinates: 325,176,578,183,584,0,323,0   
        #objects: # (everywhere you want a car)
        #- car
    objects:
      track:
        - person
        #- car
        - dog
        - cat
      filters:
        #
        #car:
        #person:
        #
    record:
      enabled: true
      retain:
        days: 7
        mode: motion
      events:
        pre_capture: 5
        post_capture: 5
        objects:
        - person
        - dog
        - cat
        retain:
          default: 28
          mode: active_objects        

  barn: #Cam name: Barn     #Brand: Annke c500   #Quality:3k    #Link:POE
    snapshots:
      enabled: true
      bounding_box: true
      quality: 99
    #  
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://admin:annke2023@10.0.0.4:554/Streaming/Channels/102 # SD Link
          input_args: preset-rtsp-generic
          roles:
            - detect
        - path: rtsp://192.168.22.2:8554/barn%20HQ?mp4  # HD Link
          input_args: preset-rtsp-restream
          roles:
            - record
    detect:
      width: 640  
      height: 360
      fps: 4
      stationary:
        interval: 0
        threshold: 70
    objects:
      track:
        - person
        - dog
        - cat
      filters:
        #
        person:
          min_area: 2000
          max_area: 100000
          # Optional: minimum width/height of the bounding box for the detected object (default: 0)
          min_ratio: 0.6
          # Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
          max_ratio: 2.0
          # Optional: minimum score for the object to initiate tracking (default: shown below)
          min_score: 0.6
          # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
          threshold: 0.7    
    record:
      enabled: true
      retain:
        days: 7
        mode: motion
      events:
        pre_capture: 5
        post_capture: 5
        objects:
        - person
        - dog
        - cat
        retain:
          default: 28
          mode: active_objects         

# Optional
ui:
  # Optional: Set the default live mode for cameras in the UI (default: shown below)
  live_mode: mse
  # Optional: Set a timezone to use in the UI (default: use browser local time)
  # timezone: America/Denver
  # Optional: Use an experimental recordings / camera view UI (default: shown below)
  use_experimental: True  

    # Optional: Telemetry configuration
telemetry:
  # Optional: Enable the latest version outbound check (default: shown below)
  # NOTE: If you use the HomeAssistant integration, disabling this will prevent it from reporting new versions
  version_check: True

Relevant log output

2023-11-30 03:46:08.760457741  [INFO] Starting Frigate...
2023-11-30 03:46:09.743081317  [2023-11-30 03:46:09] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2023-11-30 03:46:09.790434946  [2023-11-30 03:46:09] peewee_migrate                 INFO    : Starting migrations
2023-11-30 03:46:09.796298789  [2023-11-30 03:46:09] peewee_migrate                 INFO    : There is nothing to migrate
2023-11-30 03:46:09.815730579  [2023-11-30 03:46:09] detector.coral                 INFO    : Starting detection process: 721
2023-11-30 03:46:12.855631834  [2023-11-30 03:46:09] frigate.app                    INFO    : Output process started: 723
2023-11-30 03:46:12.855770006  [2023-11-30 03:46:09] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2023-11-30 03:46:12.855859380  [2023-11-30 03:46:09] frigate.app                    INFO    : Camera processor started for barn_catflap: 726
2023-11-30 03:46:12.855931777  [2023-11-30 03:46:09] frigate.app                    INFO    : Camera processor started for bird_cam: 728
2023-11-30 03:46:12.856007080  [2023-11-30 03:46:09] frigate.app                    INFO    : Camera processor started for porch_cam: 730
2023-11-30 03:46:12.856076780  [2023-11-30 03:46:09] frigate.app                    INFO    : Camera processor started for road_cam: 734
2023-11-30 03:46:12.856179039  [2023-11-30 03:46:09] frigate.app                    INFO    : Camera processor started for barn: 736
2023-11-30 03:46:12.856307938  [2023-11-30 03:46:09] frigate.app                    INFO    : Capture process started for barn_catflap: 738
2023-11-30 03:46:12.856395309  [2023-11-30 03:46:09] frigate.app                    INFO    : Capture process started for bird_cam: 741
2023-11-30 03:46:12.856456570  [2023-11-30 03:46:09] frigate.app                    INFO    : Capture process started for porch_cam: 746
2023-11-30 03:46:12.856515558  [2023-11-30 03:46:09] frigate.app                    INFO    : Capture process started for road_cam: 753
2023-11-30 03:46:12.856592111  [2023-11-30 03:46:09] frigate.app                    INFO    : Capture process started for barn: 767
2023-11-30 03:46:12.859433608  [2023-11-30 03:46:12] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
2023-11-30 03:46:14.872342321  [2023-11-30 03:46:14] frigate.video                  ERROR   : bird_cam: Unable to read frames from ffmpeg process.
2023-11-30 03:46:14.872459741  [2023-11-30 03:46:14] frigate.video                  ERROR   : bird_cam: ffmpeg process is not running. exiting capture thread...
2023-11-30 03:46:29.880022703  [2023-11-30 03:46:29] watchdog.bird_cam              ERROR   : Ffmpeg process crashed unexpectedly for bird_cam.
2023-11-30 03:46:29.880140581  [2023-11-30 03:46:29] watchdog.bird_cam              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 03:46:29.880210277  [2023-11-30 03:46:29] ffmpeg.bird_cam.detect         ERROR   : [tcp @ 0x55669db432c0] Connection to tcp://10.0.0.7:554?timeout=5000000 failed: Connection timed out
2023-11-30 03:46:29.880287314  [2023-11-30 03:46:29] ffmpeg.bird_cam.detect         ERROR   : rtsp://*:*@10.0.0.7:554/Streaming/Channels/102: Connection timed out
2023-11-30 03:46:29.890183050  [2023-11-30 03:46:29] ffmpeg.bird_cam.record         ERROR   : rtsp://192.168.22.2:8554/bird_cam%20HQ?mp4: Invalid data found when processing input
2023-11-30 03:46:29.894028957  [2023-11-30 03:46:29] watchdog.bird_cam              INFO    : Terminating the existing ffmpeg process...
2023-11-30 03:46:29.894117987  [2023-11-30 03:46:29] watchdog.bird_cam              INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 03:46:34.902794172  [2023-11-30 03:46:34] frigate.video                  ERROR   : bird_cam: Unable to read frames from ffmpeg process.
2023-11-30 03:46:34.903372660  [2023-11-30 03:46:34] frigate.video                  ERROR   : bird_cam: ffmpeg process is not running. exiting capture thread...
2023-11-30 03:46:39.898738935  [2023-11-30 03:46:39] watchdog.bird_cam              ERROR   : Ffmpeg process crashed unexpectedly for bird_cam.
2023-11-30 03:46:39.908034142  [2023-11-30 03:46:39] watchdog.bird_cam              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 03:46:39.908258198  [2023-11-30 03:46:39] ffmpeg.bird_cam.detect         ERROR   : [tcp @ 0x55942cf8f2c0] Connection to tcp://10.0.0.7:554?timeout=5000000 failed: Connection timed out
2023-11-30 03:46:39.908419979  [2023-11-30 03:46:39] ffmpeg.bird_cam.detect         ERROR   : rtsp://*:*@10.0.0.7:554/Streaming/Channels/102: Connection timed out
2023-11-30 03:46:39.918438671  [2023-11-30 03:46:39] ffmpeg.bird_cam.record         ERROR   : rtsp://192.168.22.2:8554/bird_cam%20HQ?mp4: Invalid data found when processing input
2023-11-30 03:46:39.922723030  [2023-11-30 03:46:39] watchdog.bird_cam              INFO    : Terminating the existing ffmpeg process...
2023-11-30 03:46:39.922791444  [2023-11-30 03:46:39] watchdog.bird_cam              INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 03:46:44.928995894  [2023-11-30 03:46:44] frigate.video                  ERROR   : bird_cam: Unable to read frames from ffmpeg process.
2023-11-30 03:46:44.929118176  [2023-11-30 03:46:44] frigate.video                  ERROR   : bird_cam: ffmpeg process is not running. exiting capture thread...
2023-11-30 03:46:49.926884470  [2023-11-30 03:46:49] watchdog.bird_cam              ERROR   : Ffmpeg process crashed unexpectedly for bird_cam.
2023-11-30 03:46:49.926979516  [2023-11-30 03:46:49] watchdog.bird_cam              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 03:46:49.927019033  [2023-11-30 03:46:49] ffmpeg.bird_cam.detect         ERROR   : [tcp @ 0x5558ab5062c0] Connection to tcp://10.0.0.7:554?timeout=5000000 failed: Connection timed out
2023-11-30 03:46:49.927064093  [2023-11-30 03:46:49] ffmpeg.bird_cam.detect         ERROR   : rtsp://*:*@10.0.0.7:554/Streaming/Channels/102: Connection timed out
2023-11-30 03:46:49.936669098  [2023-11-30 03:46:49] ffmpeg.bird_cam.record         ERROR   : rtsp://192.168.22.2:8554/bird_cam%20HQ?mp4: Invalid data found when processing input
2023-11-30 03:46:49.936749753  [2023-11-30 03:46:49] watchdog.bird_cam              INFO    : Terminating the existing ffmpeg process...
2023-11-30 03:46:49.936797344  [2023-11-30 03:46:49] watchdog.bird_cam              INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 03:46:54.951149087  [2023-11-30 03:46:54] frigate.video                  ERROR   : bird_cam: Unable to read frames from ffmpeg process.
2023-11-30 03:46:54.951386323  [2023-11-30 03:46:54] frigate.video                  ERROR   : bird_cam: ffmpeg process is not running. exiting capture thread...
2023-11-30 03:46:59.944265464  [2023-11-30 03:46:59] watchdog.bird_cam              ERROR   : Ffmpeg process crashed unexpectedly for bird_cam.
2023-11-30 03:46:59.944361772  [2023-11-30 03:46:59] watchdog.bird_cam              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 03:46:59.944425317  [2023-11-30 03:46:59] ffmpeg.bird_cam.detect         ERROR   : [tcp @ 0x556c7b2fa2c0] Connection to tcp://10.0.0.7:554?timeout=5000000 failed: Connection timed out
2023-11-30 03:46:59.944491381  [2023-11-30 03:46:59] ffmpeg.bird_cam.detect         ERROR   : rtsp://*:*@10.0.0.7:554/Streaming/Channels/102: Connection timed out
2023-11-30 03:46:59.953777607  [2023-11-30 03:46:59] ffmpeg.bird_cam.record         ERROR   : rtsp://192.168.22.2:8554/bird_cam%20HQ?mp4: Invalid data found when processing input
2023-11-30 03:46:59.953902335  [2023-11-30 03:46:59] watchdog.bird_cam              INFO    : Terminating the existing ffmpeg process...
2023-11-30 03:46:59.953977453  [2023-11-30 03:46:59] watchdog.bird_cam              INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 03:47:04.964702714  [2023-11-30 03:47:04] frigate.video                  ERROR   : bird_cam: Unable to read frames from ffmpeg process.
2023-11-30 03:47:04.964817931  [2023-11-30 03:47:04] frigate.video                  ERROR   : bird_cam: ffmpeg process is not running. exiting capture thread...
2023-11-30 03:47:09.960948253  [2023-11-30 03:47:09] watchdog.bird_cam              ERROR   : Ffmpeg process crashed unexpectedly for bird_cam.
2023-11-30 03:47:09.961043438  [2023-11-30 03:47:09] watchdog.bird_cam              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 03:47:09.961114448  [2023-11-30 03:47:09] ffmpeg.bird_cam.detect         ERROR   : [tcp @ 0x55c7242822c0] Connection to tcp://10.0.0.7:554?timeout=5000000 failed: Connection timed out
2023-11-30 03:47:09.961185813  [2023-11-30 03:47:09] ffmpeg.bird_cam.detect         ERROR   : rtsp://*:*@10.0.0.7:554/Streaming/Channels/102: Connection timed out
2023-11-30 03:47:09.971037291  [2023-11-30 03:47:09] ffmpeg.bird_cam.record         ERROR   : rtsp://192.168.22.2:8554/bird_cam%20HQ?mp4: Invalid data found when processing input
2023-11-30 03:47:09.971178495  [2023-11-30 03:47:09] watchdog.bird_cam              INFO    : Terminating the existing ffmpeg process...
2023-11-30 03:47:09.971276695  [2023-11-30 03:47:09] watchdog.bird_cam              INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 03:47:14.984228173  [2023-11-30 03:47:14] frigate.video                  ERROR   : bird_cam: Unable to read frames from ffmpeg process.
2023-11-30 03:47:14.984492176  [2023-11-30 03:47:14] frigate.video                  ERROR   : bird_cam: ffmpeg process is not running. exiting capture thread...
2023-11-30 03:47:19.980238318  [2023-11-30 03:47:19] watchdog.bird_cam              ERROR   : Ffmpeg process crashed unexpectedly for bird_cam.
2023-11-30 03:47:19.980367736  [2023-11-30 03:47:19] watchdog.bird_cam              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 03:47:19.980442470  [2023-11-30 03:47:19] ffmpeg.bird_cam.detect         ERROR   : [tcp @ 0x5641868892c0] Connection to tcp://10.0.0.7:554?timeout=5000000 failed: Connection

FFprobe output from your camera

FFPROBE OUTPUT
Stream 0:
Return Code: 0

Video:

Codec: H.265 / HEVC (High Efficiency Video Coding)
Resolution: 640x360
FPS: 4/1

Audio:

Codec: AAC (Advanced Audio Coding)

Stream 1:

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

annke c500

Any other information that may be helpful

The bird camera in logs in currently disconnected so irrelevant.

Screenshot 2023-11-30 at 03 57 45 Screenshot 2023-11-30 at 03 58 27
NickM-27 commented 11 months ago

Frigate is always looking for motion / objects, so if the cat isn't detected either motion is not detected or the object is not detected.

dopeytree commented 11 months ago

Ok thanks.

Next question in Homeassistant with the lovelace card... is it possible to have a snapshot gallery that shows all snapshots with a given tag such as 'cat, dog'

Trying to have one set up for snapshots and another that cycles the latest video clips tagged with 'cat, dog'.

At present they seem to show them per camera and need manual interaction to choose next camera?

type: vertical-stack
cards:
  - type: tile
    entity: sensor.sun_next_rising
    icon: mdi:video
    hide_state: true
    name: Catflix
    color: teal
    vertical: false
  - type: custom:frigate-card
    cameras:
      - camera_entity: camera.barn_catflap_cat
        labels: cat
        live_provider: image
      - camera_entity: camera.porch_cam_cat
        labels: cat
        live_provider: image
      - camera_entity: camera.barn_cat
        live_provider: image
      - camera_entity: camera.road_cam_cat
        live_provider: image
    view:
      camera_select: snapshot
      update_cycle_camera: false
    menu:
      style: hover
    live:
      draggable: false
      zoomable: false
      lazy_load: true
      show_image_during_load: false
    media_viewer:
      auto_pause: hidden
      draggable: false
      zoomable: false
      auto_play: all
      lazy_load: false
      snapshot_click_plays_clip: true
    image:
      mode: camera
      zoomable: false
dopeytree commented 11 months ago

This one is showing people when the label is set to 'cat'

Screenshot 2023-11-30 at 16 31 55
type: custom:frigate-card
cameras:
  - camera_entity: camera.barn
    labels: cat
  - camera_entity: camera.barn_catflap
    labels: cat
  - camera_entity: camera.porch_cam
    labels: cat
view:
  camera_select: snapshot
  default: snapshot
menu:
  style: hover
  position: top
live:
  draggable: false
  zoomable: false
  show_image_during_load: false
image:
  mode: camera
  zoomable: false
  layout:
    fit: contain
dimensions:
  aspect_ratio_mode: static
NickM-27 commented 11 months ago

that's a question for the frigate card repo, not here

dopeytree commented 11 months ago

Putting back to frigate.

Is it easy to create something to show the sensors to be a total per day?

and frigate's integration delivers the media per day to home-assistant but is there any way to easily filter this as per the 'tracked' items such as 'cat'.

dopeytree commented 11 months ago

am working through the documentation and maybe mqqt is would allow for the totals to be send and used as sensor in home-assistant. Am looking for some examples.

Played with using the build in motion sensors from frigate but they send an event on any motion rather than just the item like 'cat' and then send again when the sensor updates its state to be cleared etc.

NickM-27 commented 11 months ago

there's not direct way to do that, the frigate api could be used directly or you could use some HA automation method

in any case the original issue is answered so closing this, feel free to create discussions for any questions like the above