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]: Mqtt available topic is flipping online/offline every second #3575

Closed droosma closed 2 years ago

droosma commented 2 years ago

Describe the problem you are having

Looking into MQTT Explorer I see Frigate "toggling" the availability topic from online to offline every second or so.

image

Having checked the docker container it's reporting running for 12 hours, so it's not restarting

Version

0.11.0-37325C7

Frigate config file

{
  "birdseye": {
    "enabled": false,
    "height": 720,
    "mode": "objects",
    "quality": 8,
    "width": 1280
  },
  "cameras": {
    "Doorbell": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": false,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 640
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-c:v",
          "h264_v4l2m2m"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.0.0.166:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
            "roles": [
              "detect"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.0.0.166:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
            "roles": [
              "record",
              "rtmp"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.0.0.166:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif -r 5 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.0.0.166:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/Doorbell-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/Doorbell",
          "roles": [
            "record",
            "rtmp"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "640,269,308,274,287,275,182,272,114,295,0,299,0,0,640,0"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Doorbell",
      "objects": {
        "filters": {
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 7,
            "mode": "motion",
            "objects": {
              "person": 14
            }
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 7,
          "mode": "active_objects"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": true,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 7,
          "mode": "motion",
          "objects": {
            "person": 14
          }
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {}
    },
    "Front-door": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": false,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 640
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-c:v",
          "h264_v4l2m2m"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.113:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
            "roles": [
              "detect"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.113:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
            "roles": [
              "record",
              "rtmp"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.113:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif -r 5 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.113:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/Front-door-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/Front-door",
          "roles": [
            "record",
            "rtmp"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "311,111,0,101,0,0,640,0,640,196"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Front-door",
      "objects": {
        "filters": {
          "car": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "motorcycle": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "motorcycle",
          "car",
          "person",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 7,
            "mode": "motion",
            "objects": {
              "person": 14
            }
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 7,
          "mode": "active_objects"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": true,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 7,
          "mode": "motion",
          "objects": {
            "person": 14
          }
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {}
    },
    "Front-side": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": false,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 640
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-c:v",
          "h264_v4l2m2m"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.185:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
            "roles": [
              "detect"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.185:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
            "roles": [
              "record",
              "rtmp"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.185:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif -r 5 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.185:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/Front-side-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/Front-side",
          "roles": [
            "record",
            "rtmp"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "343,0,333,26,135,92,0,164,0,0"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Front-side",
      "objects": {
        "filters": {
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 7,
            "mode": "motion",
            "objects": {
              "person": 14
            }
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 7,
          "mode": "active_objects"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": true,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 7,
          "mode": "motion",
          "objects": {
            "person": 14
          }
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {}
    },
    "Garden-Front": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": false,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 640
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-c:v",
          "h264_v4l2m2m"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.236:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
            "roles": [
              "detect"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.236:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
            "roles": [
              "record",
              "rtmp"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.236:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif -r 5 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.236:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/Garden-Front-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/Garden-Front",
          "roles": [
            "record",
            "rtmp"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": "",
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Garden-Front",
      "objects": {
        "filters": {
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 7,
            "mode": "motion",
            "objects": {
              "person": 14
            }
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 7,
          "mode": "active_objects"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": true,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 7,
          "mode": "motion",
          "objects": {
            "person": 14
          }
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {}
    },
    "Orchard": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": false,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 640
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-c:v",
          "h264_v4l2m2m"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.150:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
            "roles": [
              "detect"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.150:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
            "roles": [
              "record",
              "rtmp"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.150:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif -r 5 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.150:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/Orchard-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/Orchard",
          "roles": [
            "record",
            "rtmp"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "192,0,190,27,0,28,0,0",
          "512,0,640,0,640,311"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Orchard",
      "objects": {
        "filters": {
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 7,
            "mode": "motion",
            "objects": {
              "person": 14
            }
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 7,
          "mode": "active_objects"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": true,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 7,
          "mode": "motion",
          "objects": {
            "person": 14
          }
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {}
    },
    "Workshop": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": false,
        "mode": "objects"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 640
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-c:v",
          "h264_v4l2m2m"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.177:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
            "roles": [
              "detect"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://[creds]@10.47.29.177:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
            "roles": [
              "record",
              "rtmp"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.177:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif -r 5 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://[creds]@10.47.29.177:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/Workshop-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/Workshop",
          "roles": [
            "record",
            "rtmp"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "369,107,364,0,640,0,640,210",
          "165,0,128,85,0,96,0,0"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Workshop",
      "objects": {
        "filters": {
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 7,
            "mode": "motion",
            "objects": {
              "person": 14
            }
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 7,
          "mode": "active_objects"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": true,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 7,
          "mode": "motion",
          "objects": {
            "person": 14
          }
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {}
    }
  },
  "database": {
    "path": "/media/frigate/frigate.db"
  },
  "detect": {
    "enabled": true,
    "fps": 5,
    "height": 480,
    "max_disappeared": null,
    "stationary": {
      "interval": 0,
      "max_frames": {
        "default": null,
        "objects": {}
      },
      "threshold": null
    },
    "width": 640
  },
  "detectors": {
    "coral": {
      "device": "usb",
      "num_threads": 3,
      "type": "edgetpu"
    }
  },
  "environment_vars": {},
  "ffmpeg": {
    "global_args": [
      "-hide_banner",
      "-loglevel",
      "warning"
    ],
    "hwaccel_args": [
      "-c:v",
      "h264_v4l2m2m"
    ],
    "input_args": [
      "-avoid_negative_ts",
      "make_zero",
      "-fflags",
      "+genpts+discardcorrupt",
      "-rtsp_transport",
      "tcp",
      "-timeout",
      "5000000",
      "-use_wallclock_as_timestamps",
      "1"
    ],
    "output_args": {
      "detect": [
        "-f",
        "rawvideo",
        "-pix_fmt",
        "yuv420p"
      ],
      "record": [
        "-f",
        "segment",
        "-segment_time",
        "10",
        "-segment_format",
        "mp4",
        "-reset_timestamps",
        "1",
        "-strftime",
        "1",
        "-c",
        "copy",
        "-an"
      ],
      "rtmp": [
        "-c",
        "copy",
        "-f",
        "flv"
      ]
    }
  },
  "live": {
    "height": 720,
    "quality": 8
  },
  "logger": {
    "default": "info",
    "logs": {}
  },
  "model": {
    "height": 320,
    "labelmap": {},
    "labelmap_path": null,
    "path": null,
    "width": 320
  },
  "motion": null,
  "mqtt": {
    "client_id": "frigate",
    "host": "10.0.0.228",
    "password": "d1sssssssss,
    "port": 1883,
    "stats_interval": 60,
    "tls_ca_certs": null,
    "tls_client_cert": null,
    "tls_client_key": null,
    "tls_insecure": null,
    "topic_prefix": "frigate",
    "user": "frigate"
  },
  "objects": {
    "filters": null,
    "mask": "",
    "track": [
      "person",
      "dog"
    ]
  },
  "plus": {
    "enabled": false
  },
  "record": {
    "enabled": true,
    "events": {
      "objects": [
        "person"
      ],
      "post_capture": 5,
      "pre_capture": 5,
      "required_zones": [],
      "retain": {
        "default": 7,
        "mode": "motion",
        "objects": {
          "person": 14
        }
      }
    },
    "expire_interval": 60,
    "retain": {
      "days": 7,
      "mode": "active_objects"
    },
    "retain_days": null
  },
  "rtmp": {
    "enabled": true
  },
  "snapshots": {
    "bounding_box": true,
    "clean_copy": true,
    "crop": true,
    "enabled": true,
    "height": null,
    "quality": 70,
    "required_zones": [],
    "retain": {
      "default": 7,
      "mode": "motion",
      "objects": {
        "person": 14
      }
    },
    "timestamp": true
  },
  "timestamp_style": {
    "color": {
      "blue": 255,
      "green": 255,
      "red": 255
    },
    "effect": null,
    "format": "%m/%d/%Y %H:%M:%S",
    "position": "tl",
    "thickness": 2
  },
  "ui": {
    "use_experimental": false
  }
}

Relevant log output

[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-02 09:41:10] frigate.app                    INFO    : Starting Frigate (0.11.0-37325c7)
[2022-08-02 09:41:10] frigate.config                 WARNING : Front-door: Recording retention is configured for active_objects and event retention is configured for motion. The more restrictive retention policy will be applied.
[2022-08-02 09:41:10] frigate.config                 WARNING : Front-side: Recording retention is configured for active_objects and event retention is configured for motion. The more restrictive retention policy will be applied.
[2022-08-02 09:41:10] frigate.config                 WARNING : Orchard: Recording retention is configured for active_objects and event retention is configured for motion. The more restrictive retention policy will be applied.
[2022-08-02 09:41:10] frigate.config                 WARNING : Garden-Front: Recording retention is configured for active_objects and event retention is configured for motion. The more restrictive retention policy will be applied.
[2022-08-02 09:41:10] frigate.config                 WARNING : Workshop: Recording retention is configured for active_objects and event retention is configured for motion. The more restrictive retention policy will be applied.
[2022-08-02 09:41:10] frigate.config                 WARNING : Doorbell: Recording retention is configured for active_objects and event retention is configured for motion. The more restrictive retention policy will be applied.
Starting migrations
[2022-08-02 09:41:10] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-08-02 09:41:10] peewee_migrate                 INFO    : There is nothing to migrate
[2022-08-02 09:41:11] detector.coral                 INFO    : Starting detection process: 210
[2022-08-02 09:41:11] frigate.app                    INFO    : Output process started: 212
[2022-08-02 09:41:11] ws4py                          INFO    : Using epoll
[2022-08-02 09:41:11] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-08-02 09:41:11] frigate.app                    INFO    : Camera processor started for Front-door: 216
[2022-08-02 09:41:11] frigate.app                    INFO    : Camera processor started for Front-side: 220
[2022-08-02 09:41:11] frigate.app                    INFO    : Camera processor started for Orchard: 222
[2022-08-02 09:41:11] frigate.app                    INFO    : Camera processor started for Garden-Front: 224
[2022-08-02 09:41:11] frigate.app                    INFO    : Camera processor started for Workshop: 226
[2022-08-02 09:41:11] frigate.app                    INFO    : Camera processor started for Doorbell: 227
[2022-08-02 09:41:11] frigate.app                    INFO    : Capture process started for Front-door: 228
[2022-08-02 09:41:11] frigate.app                    INFO    : Capture process started for Front-side: 230
[2022-08-02 09:41:11] frigate.app                    INFO    : Capture process started for Orchard: 234
[2022-08-02 09:41:11] frigate.app                    INFO    : Capture process started for Garden-Front: 238
[2022-08-02 09:41:11] frigate.app                    INFO    : Capture process started for Workshop: 241
[2022-08-02 09:41:11] frigate.app                    INFO    : Capture process started for Doorbell: 256
[2022-08-02 09:41:11] ws4py                          INFO    : Using epoll
[2022-08-02 09:41:13] frigate.edgetpu                INFO    : TPU found

FFprobe output from your camera

not related to camera

Frigate stats

{"Doorbell":{"camera_fps":5.3,"capture_pid":256,"detection_fps":6.2,"pid":227,"process_fps":5.1,"skipped_fps":0.0},"Front-door":{"camera_fps":5.1,"capture_pid":228,"detection_fps":0.0,"pid":216,"process_fps":5.1,"skipped_fps":0.0},"Front-side":{"camera_fps":5.0,"capture_pid":230,"detection_fps":0.0,"pid":220,"process_fps":5.0,"skipped_fps":0.0},"Garden-Front":{"camera_fps":5.1,"capture_pid":238,"detection_fps":8.0,"pid":224,"process_fps":5.0,"skipped_fps":0.0},"Orchard":{"camera_fps":5.1,"capture_pid":234,"detection_fps":0.0,"pid":222,"process_fps":5.1,"skipped_fps":0.0},"Workshop":{"camera_fps":5.1,"capture_pid":241,"detection_fps":0.0,"pid":226,"process_fps":5.1,"skipped_fps":0.0},"detection_fps":14.2,"detectors":{"coral":{"detection_start":1659429824.555117,"inference_speed":23.47,"pid":210}},"service":{"latest_version":"0.10.1","storage":{"/dev/shm":{"free":61.1,"mount_type":"tmpfs","total":67.1,"used":6.1},"/media/frigate/clips":{"free":1416667.2,"mount_type":"nfs","total":1909027.1,"used":492359.9},"/media/frigate/recordings":{"free":1416667.2,"mount_type":"nfs","total":1909027.1,"used":492359.9},"/tmp/cache":{"free":23642.1,"mount_type":"overlay","total":31113.7,"used":6173.5}},"temperatures":{},"uptime":153,"version":"0.11.0-37325c7"}}

Operating system

Other Linux

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

Dahua

Any other information that may be helpful

No response

droosma commented 2 years ago

I'm such a fool. I'm very sorry to have bothered you. As it was quite a challenge to get my Coral working with Proxmox / ESXi I had an old VM running the same config closing.