blakeblackshear / frigate

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

[Support]: HA crashes when starting Frigate #4512

Closed COUBOT closed 1 year ago

COUBOT commented 1 year ago

Describe the problem you are having

Hey

because cats and birds aren't detected at a resolution of 896x512 with the ext stream, I tried using the main stream with a resolution of 2560x1440. But everytime I want to start the addon, HA crashes and I have to restart it by cutting the power. I also added the line gpu_mem= 384 in the config.txt.

The logs aren't helping me.

Can somebody help me? image image image

Version

0.11.1-2EADA21

Frigate config file

detectors:
  coral:
    type: edgetpu
    device: usb

mqtt:
  host: 192.168.178.67
  user: mqtt-user
  password: 2883

ffmpeg:
  hwaccel_args: -c:v h264_v4l2m2m

cameras:
  reolink:
    rtmp:
        enabled: false
    ffmpeg:
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - +genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
      inputs:
        - path: http://192.168.178.50/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=[PW]
          roles:
            - record
            - rtmp
            - detect
    detect:
      width: 2560
      height: 1440
      fps: 5

    snapshots:
        enabled: true
        timestamp: false
        bounding_box: true
        required_zones:
            - vordergarten
        retain:
            default: 5
    record:
        enabled: true
        events:
            retain:
                default: 5
            required_zones:
                - vordergarten
    motion:
      mask:
        - 0,512,836,512,829,432,789,334,697,315,634,371,580,400,536,364,475,324,416,300,324,312,281,405,188,391,115,349,71,271,28,196,0,124
        - 0,0,896,0,896,62,781,119,699,128,560,114,484,125,336,162,163,199,0,230
    zones:
      vordergarten:
        coordinates: 92,322,149,388,216,383,265,400,304,360,360,323,410,301,472,311,512,345,561,400,607,370,669,335,739,324,845,388,896,323,896,145,825,153,759,145,670,131,580,116,489,135,367,165,281,177,126,204,124,234,51,261
    objects:
        track:
            - person
            - cat
            - bicycle
            - bird

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-11-25 17:35:14] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
[2022-11-25 17:35:14] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2022-11-25 17:35:14] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-11-25 17:35:14] peewee_migrate                 INFO    : There is nothing to migrate
[2022-11-25 17:35:14] frigate.app                    INFO    : Output process started: 217
[2022-11-25 17:35:14] ws4py                          INFO    : Using epoll
[2022-11-25 17:35:14] detector.coral                 INFO    : Starting detection process: 216
[2022-11-25 17:35:14] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-11-25 17:35:14] frigate.app                    INFO    : Camera processor started for reolink: 223
[2022-11-25 17:35:14] frigate.app                    INFO    : Capture process started for reolink: 227
[2022-11-25 17:35:15] ws4py                          INFO    : Using epoll
[2022-11-25 17:35:21] frigate.edgetpu                INFO    : TPU found
[2022-11-25 17:35:34] watchdog.reolink               INFO    : No frames received from reolink in 20 seconds. Exiting ffmpeg...
[2022-11-25 17:35:34] watchdog.reolink               INFO    : Waiting for ffmpeg to exit gracefully...
[2022-11-25 17:36:05] watchdog.reolink               INFO    : FFmpeg didnt exit. Force killing...
[2022-11-25 17:36:05] frigate.video                  ERROR   : reolink: Unable to read frames from ffmpeg process.
[2022-11-25 17:36:05] frigate.video                  ERROR   : reolink: ffmpeg process is not running. exiting capture thread...
[2022-11-25 17:36:05] frigate.record                 WARNING : Discarding a corrupt recording segment: reolink-20221125173527.mp4
[2022-11-25 17:36:15] watchdog.reolink               ERROR   : Ffmpeg process crashed unexpectedly for reolink.
[2022-11-25 17:36:15] watchdog.reolink               ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-11-25 17:36:15] ffmpeg.reolink.detect          ERROR   : Error while decoding stream #0:0: Resource temporarily unavailable
[2022-11-25 17:36:35] watchdog.reolink               INFO    : No frames received from reolink in 20 seconds. Exiting ffmpeg...
[2022-11-25 17:36:35] watchdog.reolink               INFO    : Waiting for ffmpeg to exit gracefully...
[2022-11-25 17:37:05] watchdog.reolink               INFO    : FFmpeg didnt exit. Force killing...
[2022-11-25 17:37:05] frigate.video                  ERROR   : reolink: Unable to read frames from ffmpeg process.
[2022-11-25 17:37:05] frigate.video                  ERROR   : reolink: ffmpeg process is not running. exiting capture thread...
[2022-11-25 17:37:05] frigate.record                 WARNING : Discarding a corrupt recording segment: reolink-20221125173631.mp4
[2022-11-25 17:37:15] watchdog.reolink               ERROR   : Ffmpeg process crashed unexpectedly for reolink.
[2022-11-25 17:37:15] watchdog.reolink               ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-11-25 17:37:15] ffmpeg.reolink.detect          ERROR   : Error while decoding stream #0:0: Resource temporarily unavailable

FFprobe output from your camera

-

Frigate stats

{"detection_fps":0.0,"detectors":{"coral":{"detection_start":0.0,"inference_speed":10.0,"pid":216}},"reolink":{"camera_fps":0.0,"capture_pid":227,"detection_fps":0.0,"pid":223,"process_fps":0.0,"skipped_fps":0.0},"service":{"latest_version":"0.11.1","storage":{"/dev/shm":{"free":810.0,"mount_type":"tmpfs","total":810.3,"used":0.3},"/media/frigate/clips":{"free":204634.1,"mount_type":"ext4","total":235527.2,"used":21282.0},"/media/frigate/recordings":{"free":204634.6,"mount_type":"ext4","total":235527.2,"used":21281.5},"/tmp/cache":{"free":809.4,"mount_type":"tmpfs","total":810.3,"used":0.9}},"temperatures":{},"uptime":10,"version":"0.11.1-2eada21"}}

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

Reolink RLC-811A

Running on Rasbperry Pi 4 2gb

No response

NickM-27 commented 1 year ago

You're going to need to add more GPU memory resource unavailableis referring to memory

COUBOT commented 1 year ago

When I opened the config.txt on the ssd there wasn't a gpu_mem line. So I just added it. Is this correct? And now I changed it to 1024. image

COUBOT commented 1 year ago

Now I get this log: [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-11-25 21:10:39] frigate.app INFO : Starting Frigate (0.11.1-2eada21)



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



Config Validation Errors


'inputs' Traceback (most recent call last): File "/opt/frigate/frigate/app.py", line 332, in start self.init_config() File "/opt/frigate/frigate/app.py", line 82, in init_config user_config = FrigateConfig.parse_file(config_file) File "/opt/frigate/frigate/config.py", line 942, in parse_file return cls.parse_obj(config) File "/usr/local/lib/python3.9/dist-packages/pydantic/main.py", line 521, in parse_obj return cls(obj) File "/usr/local/lib/python3.9/dist-packages/pydantic/main.py", line 339, in init values, fields_set, validation_error = validate_model(__pydantic_self.class__, data) File "/usr/local/lib/python3.9/dist-packages/pydantic/main.py", line 1056, in validatemodel v, errors = field.validate(value, values, loc=field.alias, cls=cls) File "/usr/local/lib/python3.9/dist-packages/pydantic/fields.py", line 859, in validate v, errors = self._validate_mapping_like(v, values, loc, cls) File "/usr/local/lib/python3.9/dist-packages/pydantic/fields.py", line 994, in _validate_mapping_like value_result, value_errors = self._validatesingleton(v, values, v_loc, cls) File "/usr/local/lib/python3.9/dist-packages/pydantic/fields.py", line 1067, in _validate_singleton value, error = field.validate(v, values, loc=loc, cls=cls) File "/usr/local/lib/python3.9/dist-packages/pydantic/fields.py", line 857, in validate v, errors = self._validate_singleton(v, values, loc, cls) File "/usr/local/lib/python3.9/dist-packages/pydantic/fields.py", line 1074, in _validate_singleton return self._apply_validators(v, values, loc, cls, self.validators) File "/usr/local/lib/python3.9/dist-packages/pydantic/fields.py", line 1121, in _apply_validators v = validator(cls, v, values, self, self.model_config) File "/usr/local/lib/python3.9/dist-packages/pydantic/class_validators.py", line 313, in return lambda cls, v, values, field, config: validator(v) File "/usr/local/lib/python3.9/dist-packages/pydantic/main.py", line 704, in validate return cls(value) File "/opt/frigate/frigate/config.py", line 584, in init if len(config["ffmpeg"]["inputs"]) == 1: KeyError: 'inputs'


End Config Validation Errors


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

But weird for me is, I have nothing written with "inputs"

NickM-27 commented 1 year ago

Can you repaste your config? Seems something changed

COUBOT commented 1 year ago
detectors:
  coral:
    type: edgetpu
    device: usb

mqtt:
  host: 192.168.178.67
  user: mqtt-user
  password: 2883

ffmpeg:
  hwaccel_args: -c:v h264_v4l2m2m

cameras:
  reolink:
    rtmp:
        enabled: false
    ffmpeg:
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - +genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
        - path: http://192.168.178.50/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=[PW]
          roles:

            - record
            - rtmp
             - detect
    detect:
      width: 2560
      height: 1440
      fps: 5

    snapshots:
        enabled: true
        timestamp: false
        bounding_box: true
        required_zones:
            - vordergarten
        retain:
            default: 5
    record:
        enabled: true
        events:
            retain:
                default: 5
            required_zones:
                - vordergarten
    motion:
      mask:
        - 0,512,836,512,829,432,789,334,697,315,634,371,580,400,536,364,475,324,416,300,324,312,281,405,188,391,115,349,71,271,28,196,0,124
        - 0,0,896,0,896,62,781,119,699,128,560,114,484,125,336,162,163,199,0,230
    zones:
      vordergarten:
        coordinates: 92,322,149,388,216,383,265,400,304,360,360,323,410,301,472,311,512,345,561,400,607,370,669,335,739,324,845,388,896,323,896,145,825,153,759,145,670,131,580,116,489,135,367,165,281,177,126,204,124,234,51,261
    objects:
        track:
            - person
            - cat
            - bicycle
            - bird
NickM-27 commented 1 year ago

So the problem is that you are missing the inputs key. Recommend reading the docs. Or referencing your config above which has inputs.

COUBOT commented 1 year ago

Okay I tried it again now with the Frigate config file which I have written at the beginning. When I start the addon, HA just crashes and I can't see any log. The CPU got up to 95% usage.

NickM-27 commented 1 year ago

Seems that your device isn't capable of decoding that high resolution of a stream.

COUBOT commented 1 year ago

I discovered after changing gpu_mem line to 1024 or 512 the low res stream didn't work either, which worked on gpu_mem=256. Does this info maybe help you?

NickM-27 commented 1 year ago

Between HA and GPU memory seems the RPi isn't able to allocate enough.

COUBOT commented 1 year ago

Would the 4gb version of the Pi fix that?

NickM-27 commented 1 year ago

I believe so but I of course can't say for sure.

COUBOT commented 1 year ago

I will try that and report back if it works. Maybe thats good for somebody with the same problem.

COUBOT commented 1 year ago

Update: I just got the 4gb version of the raspberry pi 4 and it doesn't crash on start anymore. But I still get no video.

This is the log:

[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-12-05 19:39:52] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
[2022-12-05 19:39:52] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2022-12-05 19:39:52] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-12-05 19:39:52] peewee_migrate                 INFO    : There is nothing to migrate
[2022-12-05 19:39:52] frigate.app                    INFO    : Output process started: 217
[2022-12-05 19:39:52] ws4py                          INFO    : Using epoll
[2022-12-05 19:39:52] detector.coral                 INFO    : Starting detection process: 216
[2022-12-05 19:39:52] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-12-05 19:39:52] frigate.app                    INFO    : Camera processor started for reolink: 222
[2022-12-05 19:39:52] frigate.app                    INFO    : Capture process started for reolink: 225
[2022-12-05 19:39:52] ws4py                          INFO    : Using epoll
[2022-12-05 19:39:55] frigate.edgetpu                INFO    : TPU found
[2022-12-05 19:40:12] watchdog.reolink               INFO    : No frames received from reolink in 20 seconds. Exiting ffmpeg...
[2022-12-05 19:40:12] watchdog.reolink               INFO    : Waiting for ffmpeg to exit gracefully...
[2022-12-05 19:40:42] watchdog.reolink               INFO    : FFmpeg didnt exit. Force killing...
[2022-12-05 19:40:42] frigate.video                  ERROR   : reolink: Unable to read frames from ffmpeg process.
[2022-12-05 19:40:42] frigate.video                  ERROR   : reolink: ffmpeg process is not running. exiting capture thread...
[2022-12-05 19:40:43] frigate.record                 WARNING : Discarding a corrupt recording segment: reolink-20221205194006.mp4
[2022-12-05 19:40:52] watchdog.reolink               ERROR   : Ffmpeg process crashed unexpectedly for reolink.
[2022-12-05 19:40:52] watchdog.reolink               ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-12-05 19:40:52] ffmpeg.reolink.detect          ERROR   : Error while decoding stream #0:0: Resource temporarily unavailable
[2022-12-05 19:41:12] watchdog.reolink               INFO    : No frames received from reolink in 20 seconds. Exiting ffmpeg...
[2022-12-05 19:41:12] watchdog.reolink               INFO    : Waiting for ffmpeg to exit gracefully...
[2022-12-05 19:41:42] watchdog.reolink               INFO    : FFmpeg didnt exit. Force killing...
[2022-12-05 19:41:42] frigate.video                  ERROR   : reolink: Unable to read frames from ffmpeg process.
[2022-12-05 19:41:42] frigate.video                  ERROR   : reolink: ffmpeg process is not running. exiting capture thread...
[2022-12-05 19:41:43] frigate.record                 WARNING : Discarding a corrupt recording segment: reolink-20221205194106.mp4
[2022-12-05 19:41:52] watchdog.reolink               ERROR   : Ffmpeg process crashed unexpectedly for reolink.
[2022-12-05 19:41:52] watchdog.reolink               ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-12-05 19:41:52] ffmpeg.reolink.detect          ERROR   : Error while decoding stream #0:0: Resource temporarily unavailable
NickM-27 commented 1 year ago

Still seeing ERROR : Error while decoding stream #0:0: Resource temporarily unavailable what is your GPU mem set to?

COUBOT commented 1 year ago

I didn't edit it. What do you recommend? image

NickM-27 commented 1 year ago

Try 1024 and see what happens

COUBOT commented 1 year ago

Now it went from 4gb to 3gb image

The log is as follows: [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-12-05 19:52:16] frigate.app INFO : Starting Frigate (0.11.1-2eada21) [2022-12-05 19:52:16] frigate.app INFO : Creating directory: /tmp/cache Starting migrations [2022-12-05 19:52:16] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-12-05 19:52:17] peewee_migrate INFO : There is nothing to migrate [2022-12-05 19:52:17] frigate.app INFO : Output process started: 217 [2022-12-05 19:52:17] frigate.app INFO : Camera processor started for reolink: 220 [2022-12-05 19:52:17] detector.coral INFO : Starting detection process: 216 [2022-12-05 19:52:17] frigate.app INFO : Capture process started for reolink: 221 [2022-12-05 19:52:17] ws4py INFO : Using epoll [2022-12-05 19:52:17] frigate.edgetpu INFO : Attempting to load TPU as usb [2022-12-05 19:52:17] ws4py INFO : Using epoll [2022-12-05 19:52:24] frigate.edgetpu INFO : TPU found [2022-12-05 19:52:37] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 19:52:37] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully... [2022-12-05 19:52:38] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:52550] [2022-12-05 19:52:38] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:33598] [2022-12-05 19:52:46] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:33598] [2022-12-05 19:52:59] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:51508] [2022-12-05 19:53:07] watchdog.reolink INFO : FFmpeg didnt exit. Force killing... [2022-12-05 19:53:07] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:53:07] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread... [2022-12-05 19:53:07] frigate.record WARNING : Discarding a corrupt recording segment: reolink-20221205195230.mp4 [2022-12-05 19:53:17] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink. [2022-12-05 19:53:17] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-12-05 19:53:17] ffmpeg.reolink.detect ERROR : Error while decoding stream #0:0: Resource temporarily unavailable [2022-12-05 19:53:37] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 19:53:37] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully... [2022-12-05 19:53:59] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:51508] [2022-12-05 19:54:05] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:58444] [2022-12-05 19:54:07] watchdog.reolink INFO : FFmpeg didnt exit. Force killing... [2022-12-05 19:54:07] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:54:07] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:54:07] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:54:07] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:54:07] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread... [2022-12-05 19:54:07] frigate.record WARNING : Discarding a corrupt recording segment: reolink-20221205195330.mp4 [2022-12-05 19:54:17] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink. [2022-12-05 19:54:17] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-12-05 19:54:17] ffmpeg.reolink.detect ERROR : Error while decoding stream #0:0: Resource temporarily unavailable [2022-12-05 19:54:27] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:52550] [2022-12-05 19:54:37] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 19:54:37] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully... [2022-12-05 19:55:05] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:58444] [2022-12-05 19:55:07] watchdog.reolink INFO : FFmpeg didnt exit. Force killing... [2022-12-05 19:55:07] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:55:07] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:55:07] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread... [2022-12-05 19:55:11] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:56806] [2022-12-05 19:55:12] frigate.record WARNING : Discarding a corrupt recording segment: reolink-20221205195430.mp4 [2022-12-05 19:55:17] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink. [2022-12-05 19:55:17] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-12-05 19:55:17] ffmpeg.reolink.detect ERROR : Error while decoding stream #0:0: Resource temporarily unavailable [2022-12-05 19:55:37] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 19:55:37] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully... [2022-12-05 19:55:37] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:55:37] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread... [2022-12-05 19:55:47] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink. [2022-12-05 19:55:47] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-12-05 19:55:47] ffmpeg.reolink.detect ERROR : Error while decoding stream #0:0: Resource temporarily unavailable [2022-12-05 19:55:47] ffmpeg.reolink.detect ERROR : Last message repeated 146 times [2022-12-05 19:55:47] ffmpeg.reolink.detect ERROR : Finishing stream 1:0 without any data written to it. [2022-12-05 19:56:07] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 19:56:07] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully... [2022-12-05 19:56:08] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:56806] [2022-12-05 19:56:08] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33740] [2022-12-05 19:56:09] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:46876] [2022-12-05 19:56:31] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33740] [2022-12-05 19:56:31] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:46876] [2022-12-05 19:56:37] watchdog.reolink INFO : FFmpeg didnt exit. Force killing... [2022-12-05 19:56:37] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 19:56:37] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread... [2022-12-05 19:56:42] frigate.record WARNING : Discarding a corrupt recording segment: {'cache_path': '/tmp/cache/reolink-20221205195321.mp4', 'start_time': datetime.datetime(2022, 12, 5, 19, 53, 21)}

COUBOT commented 1 year ago

I guess there is something going on with Reolink cameras... .

NickM-27 commented 1 year ago

let the logs run longer, there's nothing useful there

COUBOT commented 1 year ago

I updated the upper log

NickM-27 commented 1 year ago

Maybe try 2048 for gpu_mem, otherwise I don't know

COUBOT commented 1 year ago

Well unfortunately it still doesn't work. The Log is exactly the same as before. But thank you very much for your help.

NickM-27 commented 1 year ago

it works with the sub stream right?

COUBOT commented 1 year ago

correct

COUBOT commented 1 year ago

There has to be something wrong with Reolink, but I keep using the sub stream then.

NickM-27 commented 1 year ago

you could maybe try going into the reolink settings and reducing the bit rate, that might help

COUBOT commented 1 year ago

I tried changing it from 8192 to 1024, but:

[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-12-05 20:09:38] frigate.app INFO : Starting Frigate (0.11.1-2eada21) [2022-12-05 20:09:38] frigate.app INFO : Creating directory: /tmp/cache Starting migrations [2022-12-05 20:09:38] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-12-05 20:09:38] peewee_migrate INFO : There is nothing to migrate [2022-12-05 20:09:38] frigate.app INFO : Output process started: 217 [2022-12-05 20:09:38] detector.coral INFO : Starting detection process: 216 [2022-12-05 20:09:38] frigate.edgetpu INFO : Attempting to load TPU as usb [2022-12-05 20:09:38] frigate.app INFO : Camera processor started for reolink: 220 [2022-12-05 20:09:38] frigate.app INFO : Capture process started for reolink: 221 [2022-12-05 20:09:38] ws4py INFO : Using epoll [2022-12-05 20:09:38] ws4py INFO : Using epoll [2022-12-05 20:09:41] frigate.edgetpu INFO : TPU found [2022-12-05 20:09:58] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 20:09:58] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully... [2022-12-05 20:10:00] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:41304] [2022-12-05 20:10:01] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:35944] [2022-12-05 20:10:28] watchdog.reolink INFO : FFmpeg didnt exit. Force killing... [2022-12-05 20:10:28] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 20:10:28] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread... [2022-12-05 20:10:28] frigate.record WARNING : Discarding a corrupt recording segment: reolink-20221205200954.mp4 [2022-12-05 20:10:34] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:35944] [2022-12-05 20:10:34] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:41304] [2022-12-05 20:10:38] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink. [2022-12-05 20:10:38] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-12-05 20:10:38] ffmpeg.reolink.detect ERROR : Error while decoding stream #0:0: Resource temporarily unavailable [2022-12-05 20:10:58] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 20:10:58] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully... [2022-12-05 20:11:10] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49972] [2022-12-05 20:11:11] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:45676] [2022-12-05 20:11:13] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49972] [2022-12-05 20:11:13] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:45676] [2022-12-05 20:11:28] watchdog.reolink INFO : FFmpeg didnt exit. Force killing... [2022-12-05 20:11:28] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 20:11:28] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 20:11:28] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 20:11:28] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread... [2022-12-05 20:11:28] frigate.record WARNING : Discarding a corrupt recording segment: reolink-20221205201054.mp4 [2022-12-05 20:11:38] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink. [2022-12-05 20:11:38] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-12-05 20:11:38] ffmpeg.reolink.detect ERROR : Error while decoding stream #0:0: Resource temporarily unavailable [2022-12-05 20:11:58] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 20:11:58] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully... [2022-12-05 20:12:28] watchdog.reolink INFO : FFmpeg didnt exit. Force killing... [2022-12-05 20:12:28] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 20:12:28] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 20:12:28] frigate.video ERROR : reolink: Unable to read frames from ffmpeg process. [2022-12-05 20:12:28] frigate.video ERROR : reolink: ffmpeg process is not running. exiting capture thread... [2022-12-05 20:12:33] frigate.record WARNING : Discarding a corrupt recording segment: reolink-20221205201154.mp4 [2022-12-05 20:12:38] watchdog.reolink ERROR : Ffmpeg process crashed unexpectedly for reolink. [2022-12-05 20:12:38] watchdog.reolink ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-12-05 20:12:38] ffmpeg.reolink.detect ERROR : Error while decoding stream #0:0: Resource temporarily unavailable [2022-12-05 20:12:58] watchdog.reolink INFO : No frames received from reolink in 20 seconds. Exiting ffmpeg... [2022-12-05 20:12:58] watchdog.reolink INFO : Waiting for ffmpeg to exit gracefully...

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.