Frigate - cpu detector running on on Proxmox can't get it stable - please help

Oh I see, the clips is intended and need to be set per camera?

no, that doe not work for me…


 * Starting nginx nginx


   ...done.


Error parsing config: extra keys not allowed @ data['cameras']['terras']['clips']['max_seconds']


 * Starting nginx nginx


   ...done.


Error parsing config: extra keys not allowed @ data['cameras']['terras']['clips']['max_seconds']

I am really not sure how to get that in my config file…

Bingo!!

Frigate is amazing but the config file is like Homeassistant
I really want to know if this can be split like homeassistants. I only be using frigate about 8 hrs and have shutdown but motioneye and doods in favor of this

the error says you have set something wrong in the config for the “terras” camera for “clips” “max_seconds” value. Check this part of config and make sure no extra spaces or incorrect spacing

extra keys not allowed @ data['cameras']['terras']['clips']['max_seconds']

post current config if you cant find error

EDIT
max_seconds was not in my config example and I not find it in documentation
maybe it not belong in config

Think I got ‘that’ part now running… all cams are now saving clips.

although yesterday it was running more smooth up until this morning and then it froze again… I could not see ‘any’ sensible thing in log so I restarted the container.

will update on this. thanks so far! very much appreciated.

EDIT: Update

It is hopeless… the reason for having a more stable situation yesterday seems to be the fact there was less motion due to wind. This morning ther eis more motion and it keeps crashing…

part of the log I was able to capture:

  File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap


  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch


  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__


  File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen


  File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen


  File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start


  File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes


  File "/opt/frigate/frigate/app.py", line 228 in start


  File "/opt/frigate/frigate/__main__.py", line 15 in <module>


  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code


  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main


Fatal Python error: Bus error

More info:


root                           INFO    : Detection process didnt exit. Force killing...


detector.coral                 INFO    : Starting detection process: 3528


frigate.edgetpu                INFO    : Attempting to load TPU as usb


frigate.edgetpu                INFO    : TPU found


frigate.http                   DEBUG   : Received mqtt message on frigate200/stats.

Bus error is likely caused by memory issue according to docs

Try “df” at command line of vm again and see if results change from yesterday

Also based on, it’s ok with little motion but crash when a lot of motion, it sound like resource/memory issue.

You don’t use addon correct?
Remove this from config

tmpfs_cache_size: 512m

Also, you have FPS set between 4-6 depending on camera. Is this set the same in camera? Just curious, not sure if this matter.

This is my final config with still the “when a lot of motion it crashes”

#logger:
  # Optional: default log level (default: shown below)
  #default: debug
ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel warning
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
  hwaccel_args: []
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
  # Optional: global output args
  output_args:
    # Optional: output args for detect streams (default: shown below)
    detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for clips streams (default: shown below)
    clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an

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

# Cameras Config ######################################################################################################
cameras:
# FRONT Camera ########################################################################################################
  voordeur:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
          roles:
            - detect
            - clips
    width: 704
    height: 576
    fps: 6
    snapshots:
      enabled: true
      crop: false
    objects:
      track:
        - person
        - dog
        - cat
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        - dog
        - cat
      # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 200
          dog: 20
          cat: 200

# SCHUUR Camera ########################################################################################################
  schuurachter:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
          roles:
            - detect
            - clips
    width: 704
    height: 576
    fps: 6
    snapshots:
      enabled: true
      crop: false
    objects:
      track:
        - person
        - car
        - dog
        - bicycle
        - cat
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        - car
        - dog
        - bicycle
        - cat
      # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 200
          car: 200
          dog: 20
          cat: 200
          bicycle: 200

# PARKING Camera ########################################################################################################
  parkeerplaats:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
          roles:
            - detect
            - clips
    width: 640
    height: 480
    fps: 6
    snapshots:
      enabled: true
      crop: false
    objects:
      track:
        - person
        - car
        - dog
        - bicycle
    motion:
      mask: 402,30,461,47,455,170,640,230,640,0,474,0,56,0,58,45,207,57,206,34,233,32,229,88,326,77,354,54,379,38
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        - car
        - dog
        - bicycle
        - cat
      # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 200
          car: 200
          dog: 20
          cat: 200
          bicycle: 200

# TERRAS Camera ########################################################################################################
  terras:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/101/
          roles:
            - detect
            - clips
    width: 3840
    height: 2160
    fps: 4
    snapshots:
      enabled: true
      crop: false
    objects:
      track:
        - bird
        - dog
        - cat
    motion:
      mask: 3840,0,3840,1290,3193,1383,3069,769,3001,378,2723,0
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - bird
        - dog
        - cat
      # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          bird: 200
          dog: 3
          cat: 200
detectors:
  coral:
    type: edgetpu
    device: usb
ubuntu@frigate:~$ df
Filesystem                        1K-blocks     Used Available Use% Mounted on
tmpfs                               1197448     1216   1196232   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  20511312 13540276   5906076  70% /
tmpfs                               5987228        0   5987228   0% /dev/shm
tmpfs                                  5120        0      5120   0% /run/lock
tmpfs                                  4096        0      4096   0% /sys/fs/cgro                                                                                               up
/dev/sda2                            999320   218392    712116  24% /boot
overlay                            20511312 13540276   5906076  70% /var/lib/doc                                                                                               ker/overlay2/6966c1a657864b0f349ddd4508ac8cd414877f35a21c88baa5a87e31fcd6bd9d/me                                                                                               rged
tmpfs                               1197444        4   1197440   1% /run/user/10                                                                                               00
overlay                            20511312 13540276   5906076  70% /var/lib/doc                                                                                               ker/overlay2/c27c113c473c78c3d8cdd0fd669787ff79935dd2586b481713db659e427f7c65/me                                                                                               rged

Yes, it matches the camera

Help it keeps crashing…

  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007fdea3fff700 (most recent call first):,
  File "/opt/frigate/frigate/log.py", line 71 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007fdecc247740 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock,
  File "/usr/lib/python3.8/threading.py", line 1011 in join,
  File "/opt/frigate/frigate/video.py", line 245 in capture_camera,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start,
  File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes,
  File "/opt/frigate/frigate/app.py", line 228 in start,
  File "/opt/frigate/frigate/__main__.py", line 15 in <module>,
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code,
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main,
Fatal Python error: Bus error,
,
Thread 0x00007fdeb2be0700 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 302 in wait,
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed,
  File "/usr/lib/python3.8/threading.py", line 870 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Current thread 0x00007fdeb23d6700 (most recent call first):,
  File "/opt/frigate/frigate/video.py", line 117 in capture_frames,
  File "/opt/frigate/frigate/video.py", line 231 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007fdeb1b8d700 (most recent call first):,
  File "/opt/frigate/frigate/video.py", line 205 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007fdea3fff700 (most recent call first):,
  File "/opt/frigate/frigate/log.py", line 71 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007fdecc247740 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock,
  File "/usr/lib/python3.8/threading.py", line 1011 in join,
  File "/opt/frigate/frigate/video.py", line 245 in capture_camera,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start,
  File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes,
  File "/opt/frigate/frigate/app.py", line 228 in start,
  File "/opt/frigate/frigate/__main__.py", line 15 in <module>,
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code,
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main,
Fatal Python error: Bus error,
,
Thread 0x00007fdeb1b8d700 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 302 in wait,
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed,
  File "/usr/lib/python3.8/threading.py", line 870 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007fdea3fff700 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 302 in wait,
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed,
  File "/usr/lib/python3.8/threading.py", line 870 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Current thread 0x00007fdecc247740 (most recent call first):,
  File "/opt/frigate/frigate/edgetpu.py", line 214 in detect,
  File "/opt/frigate/frigate/video.py", line 295 in detect,
  File "/opt/frigate/frigate/video.py", line 380 in process_frames,
  File "/opt/frigate/frigate/video.py", line 273 in track_camera,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start,
  File "/opt/frigate/frigate/app.py", line 173 in start_camera_processors,
  File "/opt/frigate/frigate/app.py", line 227 in start,
  File "/opt/frigate/frigate/__main__.py", line 15 in <module>,
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code,
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main,
detector.coral                 INFO    : Starting detection process: 361,
frigate.edgetpu                INFO    : Attempting to load TPU as usb,
frigate.edgetpu                INFO    : TPU found,

I think problem lies in VM setup but I not use VM so cannot provide suggestion there. I do have ideas below however

I think your error cause changed but you need to confirm. Before you getting memory warning then crash but now Tstate_lock then restart just before crash. I think original memory issue may be resolved but now you have new issue where frigate not finish some process but try start new process then crash as result. You could try reduce all frame rate to 1 to see if this help just as confirmation step.

Also, do you need VM?
VM setup always seem difficult to me where docker is simpler solution. Unless windows/Linux mixed needs.

Good tip, where to do?

I have 1 NUC with proxmox and run some workloads on it. I want to use the rest of capacity for frigate. So yes I need to use VM. Although I can also try the LXC route but I have had totally no succes with that yet… (tried a lot).

for exampe, change fps from 6 to 1.
do this for all camera
this is not solution, only step to help identify cause.

cameras:
  voordeur:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
          roles:
            - detect
            - clips
    width: 704
    height: 576
    fps: 6 

EDIT
Proxmox has some VM dashboard that provide summary of individual VM?
What does that show. Low storage, high memory use, cpu high use, anything stand out?

I can not find any anomalies on any layer (hypervisor, docker, storage, etc.) except that when there is “a lot of motion” like windy weather the CPU of the VM goes up and finally frigate stops working.

Some displays after I restarted the container and it is now not windy and everything runs smoothly:

the yaml:

#logger:
  # Optional: default log level (default: shown below)
  #default: debug
ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel warning
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
  hwaccel_args: []
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
  # Optional: global output args
  output_args:
    # Optional: output args for detect streams (default: shown below)
    detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for clips streams (default: shown below)
    clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an

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

# Cameras Config ######################################################################################################
cameras:
# FRONT Camera ########################################################################################################
  voordeur:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
          roles:
            - detect
            - clips
    width: 704
    height: 576
    fps: 6
    snapshots:
      enabled: true
      crop: false
    objects:
      track:
        - person
        - dog
        - cat
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        - dog
        - cat
      # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 200
          dog: 20
          cat: 200

# SCHUUR Camera ########################################################################################################
  schuurachter:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
          roles:
            - detect
            - clips
    width: 704
    height: 576
    fps: 6
    snapshots:
      enabled: true
      crop: false
    objects:
      track:
        - person
        - car
        - dog
        - bicycle
        - cat
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        - car
        - dog
        - bicycle
        - cat
      # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 200
          car: 200
          dog: 20
          cat: 200
          bicycle: 200

# PARKING Camera ########################################################################################################
  parkeerplaats:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
          roles:
            - detect
            - clips
    width: 640
    height: 480
    fps: 6
    snapshots:
      enabled: true
      crop: false
    objects:
      track:
        - person
        - car
        - dog
        - bicycle
    motion:
      mask: 402,30,461,47,455,170,640,230,640,0,474,0,56,0,58,45,207,57,206,34,233,32,229,88,326,77,354,54,379,38
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - person
        - car
        - dog
        - bicycle
        - cat
      # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          person: 200
          car: 200
          dog: 20
          cat: 200
          bicycle: 200

# TERRAS Camera ########################################################################################################
  terras:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/101/
          roles:
            - detect
            - clips
    width: 3840
    height: 2160
    fps: 4
    snapshots:
      enabled: true
      crop: false
    objects:
      track:
        - bird
        - dog
        - cat
    motion:
      mask:    
        - '3840,0,3840,1295,3138,1412,3034,769,2958,382,2622,0'
        - '0,652,178,384,444,137,598,303,416,496,104,819,25,777'
        - '0,161,64,242,180,248,248,264,354,178,455,92,532,0,0,0'
      threshold: 25
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 5
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 5
      # Optional: Objects to save clips for. (default: all tracked objects)
      objects:
        - bird
        - dog
        - cat
      # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        objects:
          bird: 200
          dog: 3
          cat: 200
detectors:
  coral:
    type: edgetpu
    device: usb

Some additional information:


Try Hardware → machine: q35

first found this, now trying:

Will monitor

then try your suggestion:

BTW what is the advantage there?

I do not have PCI in the host…
You can choose between the default Intel 440FX or the Q35 chipset, which also provides a virtual PCIe bus, and thus may be desired if one wants to pass through PCIe hardware.

1 Like

All my linux machines have this settings, as i told you it looks like linux specific problem with virtualization. There are like tons of tests that need to be run to figure the problem out. If you try all of the options, then the logical way is to rise issue on github

Update:
I also dont pass all the time PCI, but neverthe less, try it.

  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main,
Fatal Python error: **Bus error**,

I think I am getting a little closer… it was stable up untill “now”…

  File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start,
  File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes,
  File "/opt/frigate/frigate/app.py", line 228 in start,
  File "/opt/frigate/frigate/__main__.py", line 15 in <module>,
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code,
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main,
Fatal Python error: Bus error,
,
Thread 0x00007f355e245700 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 302 in wait,
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed,
  File "/usr/lib/python3.8/threading.py", line 870 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Current thread 0x00007f355ea46700 (most recent call first):,
  File "/opt/frigate/frigate/video.py", line 117 in capture_frames,
  File "/opt/frigate/frigate/video.py", line 231 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007f355f247700 (most recent call first):,
  File "/opt/frigate/frigate/video.py", line 205 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007f354cd77700 (most recent call first):,
  File "/opt/frigate/frigate/log.py", line 71 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007f356b43a740 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock,
  File "/usr/lib/python3.8/threading.py", line 1011 in join,
  File "/opt/frigate/frigate/video.py", line 245 in capture_camera,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start,
  File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes,
  File "/opt/frigate/frigate/app.py", line 228 in start,
  File "/opt/frigate/frigate/__main__.py", line 15 in <module>,
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code,
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main,
Fatal Python error: Bus error,
,
Thread 0x00007f355e245700 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 302 in wait,
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed,
  File "/usr/lib/python3.8/threading.py", line 870 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Current thread 0x00007f355ea46700 (most recent call first):,
  File "/opt/frigate/frigate/video.py", line 117 in capture_frames,
  File "/opt/frigate/frigate/video.py", line 231 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007f355f247700 (most recent call first):,
  File "/opt/frigate/frigate/video.py", line 205 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007f354cd77700 (most recent call first):,
  File "/opt/frigate/frigate/log.py", line 71 in run,
  File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner,
  File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap,
,
Thread 0x00007f356b43a740 (most recent call first):,
  File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock,
  File "/usr/lib/python3.8/threading.py", line 1011 in join,
  File "/opt/frigate/frigate/video.py", line 245 in capture_camera,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch,
  File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen,
  File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start,
  File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes,
  File "/opt/frigate/frigate/app.py", line 228 in start,
  File "/opt/frigate/frigate/__main__.py", line 15 in <module>,
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code,
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main,
frigate.watchdog               INFO    : Detection appears to be stuck. Restarting detection process...,
root                           INFO    : Waiting for detection process to exit gracefully...,
root                           INFO    : Detection process didnt exit. Force killing...,
detector.coral                 INFO    : Starting detection process: 3004,
frigate.edgetpu                INFO    : Attempting to load TPU as usb,
frigate.edgetpu                INFO    : TPU found,

Will now try q35…

I think I am running out of options here…

Argh… keeps crashing in the same way… I am not sure if any of above actually helped or it is just “not windy”.

Althoug on the console of the VM (ubuntu) running the docker I see:

So wait. Remind me why you using frigate in ubuntu?