blakeblackshear / frigate

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

[Support]: Cameras not working after upgrade from <8.0 to 9.1 (FFMPEG issues) #1964

Closed JesusRo closed 3 years ago

JesusRo commented 3 years ago

Describe the problem you are having

I was using version <8.x during some time and now upgraded to latest stable I run over documentation to update my config file but and also was complaining about the db. I just delete db and all recordings (all clean folders) and finally the UI appeared However, cameras now show usual green image and logs show errors with them.

For the cameras before, I didn´t have any input_args (only output_args to have audio) and now I have the feeling I need to tweak it somehow, but no idea what to use.

I tried with the examples of other cameras from docs but no luck

Could you please guide me where I can look at to figuere out what params to us? Thanks!

Version

0.9.1-800f33e

Frigate config file

{
  "birdseye": {
    "enabled": true,
    "height": 720,
    "mode": "continuous",
    "quality": 8,
    "width": 1280
  },
  "cameras": {
    "dalek": {
      "best_image_timeout": 60,
      "detect": {
        "enabled": false,
        "fps": 5,
        "height": 1080,
        "max_disappeared": 25,
        "width": 1920
      },
      "ffmpeg": {
        "global_args": "-hide_banner",
        "hwaccel_args": [
          "-hwaccel",
          "qsv",
          "-qsv_device",
          "/dev/dri/renderD128"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-stimeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.169.26:8554/unicast",
            "roles": [
              "detect",
              "record",
              "rtmp"
            ]
          }
        ],
        "output_args": {
          "detect": "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy",
          "record": "-f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy",
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -hwaccel qsv -qsv_device /dev/dri/renderD128 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.169.26:8554/unicast -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy /tmp/cache/dalek-%Y%m%d%H%M%S.mp4 -r 5 -s 1920x1080 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy pipe:",
          "roles": [
            "detect",
            "record",
            "rtmp"
          ]
        }
      ],
      "live": {
        "height": 1080,
        "quality": 8
      },
      "motion": {
        "contour_area": 99,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 180,
        "mask": "",
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "dalek",
      "objects": {
        "filters": {
          "cat": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.6,
            "threshold": 0.8
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.6,
            "threshold": 0.8
          }
        },
        "mask": "",
        "track": [
          "person",
          "cat",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "max_seconds": 300,
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 30,
            "objects": {}
          }
        },
        "retain_days": 30
      },
      "rtmp": {
        "enabled": false
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 30,
          "objects": {}
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "zones": {}
    },
    "sauron": {
      "best_image_timeout": 60,
      "detect": {
        "enabled": false,
        "fps": 5,
        "height": 1080,
        "max_disappeared": 25,
        "width": 1920
      },
      "ffmpeg": {
        "global_args": "-hide_banner",
        "hwaccel_args": [
          "-hwaccel",
          "qsv",
          "-qsv_device",
          "/dev/dri/renderD128"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-stimeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.169.11:8554/unicast",
            "roles": [
              "detect",
              "record",
              "rtmp"
            ]
          }
        ],
        "output_args": {
          "detect": "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy",
          "record": "-f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy",
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -hwaccel qsv -qsv_device /dev/dri/renderD128 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.169.11:8554/unicast -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy /tmp/cache/sauron-%Y%m%d%H%M%S.mp4 -r 5 -s 1920x1080 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy pipe:",
          "roles": [
            "detect",
            "record",
            "rtmp"
          ]
        }
      ],
      "live": {
        "height": 1080,
        "quality": 8
      },
      "motion": {
        "contour_area": 99,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 180,
        "mask": "",
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "sauron",
      "objects": {
        "filters": {
          "cat": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.6,
            "threshold": 0.8
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.6,
            "threshold": 0.8
          }
        },
        "mask": "",
        "track": [
          "person",
          "cat",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "max_seconds": 300,
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 30,
            "objects": {}
          }
        },
        "retain_days": 30
      },
      "rtmp": {
        "enabled": false
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 30,
          "objects": {}
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "zones": {}
    }
  },
  "database": {
    "path": "/media/frigate/frigate.db"
  },
  "detect": {
    "enabled": true,
    "fps": 5,
    "height": 720,
    "max_disappeared": 25,
    "width": 1280
  },
  "detectors": {
    "cpu1": {
      "device": "usb",
      "num_threads": 3,
      "type": "cpu"
    },
    "cpu2": {
      "device": "usb",
      "num_threads": 3,
      "type": "cpu"
    }
  },
  "environment_vars": {},
  "ffmpeg": {
    "global_args": "-hide_banner",
    "hwaccel_args": [
      "-hwaccel",
      "qsv",
      "-qsv_device",
      "/dev/dri/renderD128"
    ],
    "input_args": [
      "-avoid_negative_ts",
      "make_zero",
      "-fflags",
      "+genpts+discardcorrupt",
      "-rtsp_transport",
      "tcp",
      "-stimeout",
      "5000000",
      "-use_wallclock_as_timestamps",
      "1"
    ],
    "output_args": {
      "detect": "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy",
      "record": "-f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy",
      "rtmp": [
        "-c",
        "copy",
        "-f",
        "flv"
      ]
    }
  },
  "live": {
    "height": 1080,
    "quality": 8
  },
  "logger": {
    "default": "info",
    "logs": {}
  },
  "model": {
    "height": 320,
    "labelmap": {},
    "labelmap_path": null,
    "path": null,
    "width": 320
  },
  "motion": null,
  "mqtt": {
    "client_id": "frigate",
    "host": "192.168.X.X",
    "password": "XXXXXXXX",
    "port": 1883,
    "stats_interval": 60,
    "tls_ca_certs": null,
    "tls_client_cert": null,
    "tls_client_key": null,
    "tls_insecure": null,
    "topic_prefix": "frigate",
    "user": "frigata"
  },
  "objects": {
    "filters": {
      "cat": {
        "mask": null,
        "max_area": 24000000,
        "min_area": 0,
        "min_score": 0.6,
        "threshold": 0.8
      },
      "person": {
        "mask": null,
        "max_area": 24000000,
        "min_area": 0,
        "min_score": 0.6,
        "threshold": 0.8
      }
    },
    "mask": "",
    "track": [
      "person",
      "cat",
      "dog"
    ]
  },
  "record": {
    "enabled": true,
    "events": {
      "max_seconds": 300,
      "objects": null,
      "post_capture": 5,
      "pre_capture": 5,
      "required_zones": [],
      "retain": {
        "default": 30,
        "objects": {}
      }
    },
    "retain_days": 30
  },
  "rtmp": {
    "enabled": false
  },
  "snapshots": {
    "bounding_box": true,
    "clean_copy": true,
    "crop": false,
    "enabled": true,
    "height": null,
    "quality": 70,
    "required_zones": [],
    "retain": {
      "default": 30,
      "objects": {}
    },
    "timestamp": true
  },
  "timestamp_style": {
    "color": {
      "blue": 255,
      "green": 255,
      "red": 255
    },
    "effect": null,
    "format": "%m/%d/%Y %H:%M:%S",
    "position": "tl",
    "thickness": 2
  }
}

Relevant log output

[2021-10-08 22:13:39] frigate.app                    INFO    : Starting Frigate (0.9.1-800f33e)

[2021-10-08 22:13:39] frigate.app                    WARNING : Camera dalek has rtmp assigned to an input, but rtmp is not enabled.

[2021-10-08 22:13:39] frigate.app                    WARNING : Camera sauron has rtmp assigned to an input, but rtmp is not enabled.

Starting migrations

[2021-10-08 22:13:39] peewee_migrate                 INFO    : Starting migrations

There is nothing to migrate

[2021-10-08 22:13:39] peewee_migrate                 INFO    : There is nothing to migrate

[2021-10-08 22:13:39] frigate.mqtt                   INFO    : MQTT connected

[2021-10-08 22:13:39] detector.cpu1                  INFO    : Starting detection process: 234

[2021-10-08 22:13:39] detector.cpu2                  INFO    : Starting detection process: 236

[2021-10-08 22:13:39] frigate.app                    INFO    : Output process started: 237

[2021-10-08 22:13:39] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.

[2021-10-08 22:13:39] ws4py                          INFO    : Using epoll

[2021-10-08 22:13:39] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.

[2021-10-08 22:13:39] frigate.app                    INFO    : Camera processor started for dalek: 242

[2021-10-08 22:13:39] frigate.app                    INFO    : Camera processor started for sauron: 244

[2021-10-08 22:13:39] frigate.app                    INFO    : Capture process started for dalek: 245

[2021-10-08 22:13:39] frigate.app                    INFO    : Capture process started for sauron: 247

[2021-10-08 22:13:39] frigate.mqtt                   INFO    : Turning off detection for dalek via mqtt

[2021-10-08 22:13:39] ws4py                          INFO    : Using epoll

[2021-10-08 22:13:39] frigate.mqtt                   INFO    : Turning off detection for sauron via mqtt

[2021-10-08 22:13:43] frigate.video                  INFO    : sauron: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures

[2021-10-08 22:13:43] frigate.video                  INFO    : dalek: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures

[2021-10-08 22:13:43] frigate.video                  INFO    : sauron: ffmpeg process is not running. exiting capture thread...

[2021-10-08 22:13:43] frigate.video                  INFO    : dalek: ffmpeg process is not running. exiting capture thread...

[2021-10-08 22:13:59] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:50052]

[2021-10-08 22:13:59] watchdog.dalek                 ERROR   : FFMPEG process crashed unexpectedly for dalek.

[2021-10-08 22:13:59] watchdog.dalek                 ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.

[2021-10-08 22:13:59] watchdog.dalek                 ERROR   : You may have invalid args defined for this camera.

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   : [mp3float @ 0x55edcdf78240] Header missing

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   : Input #0, rtsp, from 'rtsp://192.168.169.26:8554/unicast':

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   :   Metadata:

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   :     title           : LIVE555 Streaming Media v2020.05.15

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   :     comment         : LIVE555 Streaming Media v2020.05.15

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   :   Duration: N/A, start: 1633724019.771756, bitrate: N/A

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   :     Stream #0:0: Video: h264, yuv420p(progressive), 1920x1080, 25 fps, 5.08 tbr, 90k tbn, 50 tbc

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   :     Stream #0:1: Audio: mp3, 48000 Hz, mono, fltp, 64 kb/s

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   : Output #1, segment, to 'pipe:':

[2021-10-08 22:13:59] ffmpeg.dalek.detect            ERROR   : Output file #1 does not contain any stream

[2021-10-08 22:13:59] watchdog.sauron                ERROR   : FFMPEG process crashed unexpectedly for sauron.

[2021-10-08 22:13:59] watchdog.sauron                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.

[2021-10-08 22:13:59] watchdog.sauron                ERROR   : You may have invalid args defined for this camera.

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   : [mp3float @ 0x55d2b8e9f240] Header missing

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   : Input #0, rtsp, from 'rtsp://192.168.169.11:8554/unicast':

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   :   Metadata:

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   :     title           : LIVE555 Streaming Media v2020.05.15

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   :     comment         : LIVE555 Streaming Media v2020.05.15

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   :   Duration: N/A, start: 1633724019.776889, bitrate: N/A

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   :     Stream #0:0: Video: h264, yuv420p(progressive), 1920x1080, 25 fps, 10 tbr, 90k tbn, 50 tbc

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   :     Stream #0:1: Audio: mp3, 48000 Hz, mono, fltp, 64 kb/s

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   : Output #1, segment, to 'pipe:':

[2021-10-08 22:13:59] ffmpeg.sauron.detect           ERROR   : Output file #1 does not contain any stream

[2021-10-08 22:14:03] frigate.video                  INFO    : sauron: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures

[2021-10-08 22:14:03] frigate.video                  INFO    : dalek: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures

[2021-10-08 22:14:03] frigate.video                  INFO    : dalek: ffmpeg process is not running. exiting capture thread...

[2021-10-08 22:14:03] frigate.video                  INFO    : sauron: ffmpeg process is not running. exiting capture thread...

FFprobe output from your camera

From container
root@c4591ed182e4:/opt/frigate# ffprobe rtsp://192.168.169.26:8554/unicast
ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[mp3float @ 0x55a942c53ec0] Header missing
[rtsp @ 0x55a942c4eb80] max delay reached. need to consume packet
[rtsp @ 0x55a942c4eb80] RTP: missed 13 packets
[h264 @ 0x55a942c52880] error while decoding MB 45 55, bytestream -17
[h264 @ 0x55a942c52880] concealing 1564 DC, 1564 AC, 1564 MV errors in I frame
Input #0, rtsp, from 'rtsp://192.168.169.26:8554/unicast':
  Metadata:
    title           : LIVE555 Streaming Media v2020.05.15
    comment         : LIVE555 Streaming Media v2020.05.15
  Duration: N/A, start: -0.166667, bitrate: N/A
    Stream #0:0: Video: h264, yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: mp3, 48000 Hz, mono, fltp, 64 kb/s
root@c4591ed182e4:/opt/frigate#

From host
root@machine:/data/containers/frigata# ffprobe rtsp://192.168.169.26:8554/unicast
ffprobe version 4.1.6 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --disable-decoder=amrnb --disable-decoder=libopenjpeg --disable-libopencv --disable-outdev=sdl2 --disable-podpages --disable-sndio --disable-stripping --enable-libaom --enable-avfilter --enable-avresample --enable-gcrypt --disable-gnutls --enable-openssl --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libzimg --enable-libxvid --enable-libzvbi --enable-nonfree --enable-opencl --enable-opengl --enable-postproc --enable-pthreads --enable-shared --enable-version3 --enable-libwebp --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --toolchain=hardened --enable-frei0r --enable-chromaprint --enable-libx264 --enable-libiec61883 --enable-libdc1394 --enable-vaapi --enable-libmfx --enable-libvmaf --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[mp3float @ 0x556fd87d9800] Header missing
Input #0, rtsp, from 'rtsp://192.168.169.26:8554/unicast':
  Metadata:
    title           : LIVE555 Streaming Media v2020.05.15
    comment         : LIVE555 Streaming Media v2020.05.15
  Duration: N/A, start: -0.167411, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 25 fps, 5 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: mp3, 48000 Hz, mono, fltp, 64 kb/s
root@machine:/data/containers/frigata#

Frigate stats

{"dalek":{"camera_fps":0.0,"capture_pid":245,"detection_fps":0.0,"pid":242,"process_fps":0.0,"skipped_fps":0.0},"detection_fps":0.0,"detectors":{"cpu1":{"detection_start":0.0,"inference_speed":10.0,"pid":234},"cpu2":{"detection_start":0.0,"inference_speed":10.0,"pid":236}},"sauron":{"camera_fps":0.0,"capture_pid":247,"detection_fps":0.0,"pid":244,"process_fps":0.0,"skipped_fps":0.0},"service":{"storage":{"/dev/shm":{"free":133.8,"mount_type":"tmpfs","total":134.2,"used":0.4},"/media/frigate/clips":{"free":3217364.0,"mount_type":"xfs","total":15000657.1,"used":11783293.1},"/media/frigate/recordings":{"free":3217364.0,"mount_type":"xfs","total":15000657.1,"used":11783293.1},"/tmp/cache":{"free":1000.0,"mount_type":"tmpfs","total":1000.0,"used":0.0}},"uptime":519,"version":"0.9.1-800f33e"}}

Operating system

Debian

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wireless

Camera make and model

Xiaomi Dafang with custom firmware

Any other information that may be helpful

Custom firmware used on the cameras https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks Docker

root@machine:/data/containers/frigata# docker --version
Docker version 20.10.9, build c2ea9bc

Host OS

root@machine:/data/containers/frigata# cat /etc/*release*
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@machine:/data/containers/frigata# uname -r
4.19.0-17-amd64
mdelecate commented 3 years ago

What hardware are you running Frigate on? Also, for your config, please paste the contents of the frigate.yml, it's formatting is easier to review.

JesusRo commented 3 years ago

Hi, @mdelecate The host is a rescued ML330 G6 (already with me for 4 years) with 18G of RAM and a Xeon X5650. May I messed up with the hardware acceleration? I left what I had before but I will test removing anything related.

Below the config files config.yaml

root@machine:/data/containers/frigata# cat config.yml
mqtt:
  host: 192.168.169.252
  user: frigata
  password: #######

detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu

birdseye:
  enabled: True
  mode: continuous

ffmpeg:
  global_args: -hide_banner
  output_args:
      record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
      detect: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
  hwaccel_args:
    - -hwaccel
    - qsv
    - -qsv_device
    - /dev/dri/renderD128

detect:
  enabled: True
  max_disappeared: 25

objects:
  track:
    - person
    - cat
    - dog
  filters:
    person:
      min_score: 0.6
      threshold: 0.8
    cat:
      min_score: 0.6
      threshold: 0.8

record:
  enabled: True
  retain_days: 30
  events:
    max_seconds: 300
    pre_capture: 5
    post_capture: 5
    retain:
      default: 30

snapshots:
  enabled: True
  timestamp: True
  bounding_box: True
  crop: False
  retain:
    default: 30

rtmp:
  enabled: False

live:
  height: 1080
  quality: 8

cameras:
  dalek:
    ffmpeg:
      input_args:
        - -pix_fmt
        - yuv420p
      inputs:
        - path: rtsp://192.168.169.26:8554/unicast
          roles:
            - detect
            - record
            - rtmp
    detect:
      width: 1920
      height: 1080
      fps: 5
  sauron:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.169.11:8554/unicast
          roles:
            - detect
            - record
            - rtmp
    detect:
      width: 1920
      height: 1080
      fps: 5

and compose one

version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true
    restart: unless-stopped
    image: blakeblackshear/frigate:0.9.1-amd64
    devices:
      - /dev/dri/renderD128
      - /dev/bus/usb:/dev/bus/usb
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /data/containers/frigata/config.yml:/config/config.yml:ro
      - /data/motioneye:/media/frigate
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"
      - "1935:1935"
    environment:
      FRIGATE_RTSP_PASSWORD: "#########"
blakeblackshear commented 3 years ago

You are overriding the output_args for detect in a way that will definitely break everything. Also, the segment time in the output_args for record should be 10 instead of 60.

JesusRo commented 3 years ago

HI @blakeblackshear ,

Removed output_args and working fine again. :facepalm:

I must messed up while updating the configuration and didn't save backup of the initial config.

So, solved now. Thanks a lot guys