frigate: [Camera Support]: Reoling Wifi Doorbell crashing

Describe the problem you are having

My Reolink Wifi doorbell keeps crashing and my log is flooded with errors.

Version

Frigate (0.12.1-367d724)

Frigate config file

ui:
  live_mode: mse

mqtt:
  host: 192.168.##.##
  port: 1883
  user: #####
  password: ######

birdseye:
  enabled: False

go2rtc:
  streams:
    girls_cam:
      - rtsp://######:######@192.168.##.##:554/h264Preview_01_main
      # - http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=####&password=####
      # - "ffmpeg:http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=#####&password=####video=copy#audio=copy"
    doorbell:
      # - rtsp://######:######@192.168.##.##:554/h264Preview_01_main
      - http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=######&password=######
      # - "ffmpeg:http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=######&password=#######video=copy#audio=copy"
  webrtc:
    candidates:
      - 192.168.##.##:8555
      - stun:8555

detectors:
  coral:
    type: edgetpu
    device: usb

record:
  enabled: True
  retain:
    mode: all
  events:
    pre_capture: 10
    post_capture: 10
    retain:
      default: 30
      mode: motion

snapshots:
  enabled: True
  clean_copy: True
  timestamp: True
  bounding_box: True
  retain:
    default: 14

cameras:
  girls_cam:
    detect:
      width: 640
      height: 360
      fps: 7  
    ffmpeg:
      output_args:
          record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://######:######@192.168.##.##:554/h264Preview_01_main
          roles:
            - record
        - path: rtsp://######:######@192.168.##.##:554/h264Preview_01_sub
          roles:
            - detect

  doorbell:
    detect:
      width: 640
      height: 480
      fps: 7
    ffmpeg:
      output_args:
          record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://######:######@192.168.##.##:554/h264Preview_01_main
        # - path: rtsp://127.0.0.1:8554/doorbell?video=copy&audio=copy
          roles:
            - record
        - path: rtsp://######:######@192.168.##.##:554/h264Preview_01_sub
        # - path: rtsp://127.0.0.1:8554/doorbell_sub?video=copy
          roles:
            - detect

Relevant log output

2023-06-29 21:13:39.440950851  [2023-06-29 17:13:36] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2023-06-29 21:13:39.449787066  [2023-06-29 17:13:39] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
2023-06-29 21:14:56.924818549  [2023-06-29 17:14:56] ffmpeg.doorbell.record         ERROR   : [segment @ 0x56179d9a77c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
2023-06-29 21:14:56.926652235  [2023-06-29 17:14:56] ffmpeg.doorbell.record         ERROR   : [segment @ 0x56179d9a77c0] Non-monotonous DTS in output stream 0:0; previous: 6562, current: 6562; changing to 6563. This may result in incorrect timestamps in the output file.
____________
ffmpeg.doorbell.record         ERROR   : [rtsp @ 0x56179d985f00] CSeq 6 expected, 0 received.
2023-06-29 21:14:57.022004400  [2023-06-29 17:14:56] ffmpeg.doorbell.record         ERROR   :     Last message repeated 3 times
______________
ffmpeg.doorbell.record         ERROR   : rtsp://*:*@192.168.1.30:554/h264Preview_01_main: Connection timed out
2023-06-29 21:14:57.028256540  [2023-06-29 17:14:56] watchdog.doorbell              INFO    : Terminating the existing ffmpeg process...
2023-06-29 21:14:57.028260350  [2023-06-29 17:14:56] watchdog.doorbell              INFO    : Waiting for ffmpeg to exit gracefully...
2023-06-29 21:14:59.916620489  [2023-06-29 17:14:59] frigate.video                  ERROR   : doorbell: Unable to read frames from ffmpeg process.
2023-06-29 21:14:59.916792527  [2023-06-29 17:14:59] frigate.video                  ERROR   : doorbell: ffmpeg process is not running. exiting capture thread...
2023-06-29 21:15:07.024621539  [2023-06-29 17:15:07] watchdog.doorbell              ERROR   : Ffmpeg process crashed unexpectedly for doorbell.
2023-06-29 21:15:07.024757557  [2023-06-29 17:15:07] watchdog.doorbell              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-06-29 21:15:07.024952668  [2023-06-29 17:15:07] ffmpeg.doorbell.detect         ERROR   : [NULL @ 0x556c6064c240] missing picture in access unit with size 33
2023-06-29 21:15:07.025094159  [2023-06-29 17:15:07] ffmpeg.doorbell.detect         ERROR   : [h264 @ 0x556c607bfec0] no frame!
2023-06-29 21:15:07.025214690  [2023-06-29 17:15:07] ffmpeg.doorbell.detect         ERROR   : Error while decoding stream #0:0: Invalid data found when processing input
2023-06-29 21:15:07.036657272  [2023-06-29 17:15:07] ffmpeg.doorbell.record         ERROR   : rtsp://*:*@192.168.1.30:554/h264Preview_01_main: Invalid data found when processing input
2023-06-29 21:15:07.036779599  [2023-06-29 17:15:07] watchdog.doorbell              INFO    : Terminating the existing ffmpeg process...
2023-06-29 21:15:07.036916340  [2023-06-29 17:15:07] watchdog.doorbell              INFO    : Waiting for ffmpeg to exit gracefully...
2023-06-29 21:15:07.907018332  [2023-06-29 17:15:07] frigate.video                  ERROR   : doorbell: Unable to read frames from ffmpeg process.
2023-06-29 21:15:07.907107098  [2023-06-29 17:15:07] frigate.video                  ERROR   : doorbell: ffmpeg process is not running. exiting capture thread...
2023-06-29 21:15:17.044631627  [2023-06-29 17:15:17] watchdog.doorbell              ERROR   : Ffmpeg process crashed unexpectedly for doorbell.
2023-06-29 21:15:17.044752928  [2023-06-29 17:15:17] watchdog.doorbell              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-06-29 21:15:17.044910896  [2023-06-29 17:15:17] ffmpeg.doorbell.detect         ERROR   : [tcp @ 0x561b1c86b140] Connection to tcp://192.168.1.30:554?timeout=5000000 failed: Connection refused
2023-06-29 21:15:17.045040860  [2023-06-29 17:15:17] ffmpeg.doorbell.detect         ERROR   : rtsp://*:*@192.168.1.30:554/h264Preview_01_sub: Connection refused
2023-06-29 21:15:17.055924641  [2023-06-29 17:15:17] ffmpeg.doorbell.record         ERROR   : [tcp @ 0x558ced06b240] Connection to tcp://192.168.1.30:554?timeout=5000000 failed: Connection refused
2023-06-29 21:15:17.056042018  [2023-06-29 17:15:17] ffmpeg.doorbell.record         ERROR   : rtsp://*:*@192.168.1.30:554/h264Preview_01_main: Connection refused
2023-06-29 21:15:17.056178153  [2023-06-29 17:15:17] watchdog.doorbell              INFO    : Terminating the existing ffmpeg process...
2023-06-29 21:15:17.056304707  [2023-06-29 17:15:17] watchdog.doorbell              INFO    : Waiting for ffmpeg to exit gracefully...
2023-06-29 21:15:17.431587042  [2023-06-29 17:15:17] frigate.video                  ERROR   : doorbell: Unable to read frames from ffmpeg process.
2023-06-29 21:15:17.431731380  [2023-06-29 17:15:17] frigate.video                  ERROR   : doorbell: ffmpeg process is not running. exiting capture thread...
2023-06-29 21:15:27.063788322  [2023-06-29 17:15:27] watchdog.doorbell              ERROR   : Ffmpeg process crashed unexpectedly for doorbell.

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"20/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":1920,"width":2560},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}},{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"7/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":480,"width":640},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}}]

Frigate stats

{"cpu_usages":{"1":{"cpu":"0.0","mem":"0.0"},"1000":{"cpu":"0.0","mem":"0.5"},"102":{"cpu":"0.0","mem":"0.6"},"1046":{"cpu":"0.0","mem":"0.5"},"1092":{"cpu":"0.0","mem":"0.5"},"1133":{"cpu":"0.0","mem":"0.5"},"1172":{"cpu":"0.0","mem":"0.5"},"1199":{"cpu":"0.0","mem":"0.5"},"1230":{"cpu":"0.0","mem":"0.5"},"1263":{"cpu":"0.0","mem":"0.5"},"1296":{"cpu":"0.0","mem":"0.5"},"1326":{"cpu":"0.0","mem":"0.5"},"134":{"cpu":"0.0","mem":"0.5"},"135":{"cpu":"0.0","mem":"0.5"},"1352":{"cpu":"0.0","mem":"0.5"},"136":{"cpu":"0.0","mem":"0.5"},"137":{"cpu":"0.0","mem":"0.6"},"139":{"cpu":"0.0","mem":"0.5"},"1391":{"cpu":"0.0","mem":"0.5"},"141":{"cpu":"0.0","mem":"0.6"},"143":{"cpu":"0.0","mem":"0.5"},"1441":{"cpu":"0.0","mem":"0.5"},"1486":{"cpu":"0.0","mem":"0.5"},"15":{"cpu":"0.0","mem":"0.0"},"150":{"cpu":"0.0","mem":"0.5"},"1521":{"cpu":"0.0","mem":"0.5"},"1553":{"cpu":"0.0","mem":"0.5"},"1586":{"cpu":"0.0","mem":"0.5"},"16":{"cpu":"0.0","mem":"0.0"},"1621":{"cpu":"0.0","mem":"0.5"},"1659":{"cpu":"0.0","mem":"0.5"},"166":{"cpu":"0.0","mem":"0.5"},"1696":{"cpu":"0.0","mem":"0.5"},"1727":{"cpu":"0.0","mem":"0.5"},"1757":{"cpu":"0.0","mem":"0.5"},"1784":{"cpu":"0.0","mem":"0.5"},"1811":{"cpu":"0.0","mem":"0.5"},"184":{"cpu":"0.0","mem":"0.5"},"1842":{"cpu":"0.0","mem":"0.5"},"1874":{"cpu":"0.0","mem":"0.5"},"1892":{"cpu":"0.0","mem":"0.5"},"1893":{"cpu":"0.0","mem":"0.5"},"1923":{"cpu":"0.0","mem":"0.5"},"1948":{"cpu":"0.0","mem":"0.5"},"1994":{"cpu":"0.0","mem":"0.5"},"2041":{"cpu":"0.0","mem":"0.5"},"2075":{"cpu":"0.0","mem":"0.5"},"213":{"cpu":"0.0","mem":"0.5"},"2131":{"cpu":"0.0","mem":"0.5"},"2185":{"cpu":"0.0","mem":"0.5"},"2237":{"cpu":"0.0","mem":"0.5"},"2271":{"cpu":"0.0","mem":"0.5"},"2307":{"cpu":"0.0","mem":"0.5"},"2341":{"cpu":"0.0","mem":"0.5"},"2375":{"cpu":"0.0","mem":"0.5"},"24":{"cpu":"0.0","mem":"0.0"},"246":{"cpu":"0.0","mem":"0.5"},"25":{"cpu":"0.0","mem":"0.0"},"26":{"cpu":"0.0","mem":"0.0"},"27":{"cpu":"0.0","mem":"0.0"},"2708":{"cpu":"0.0","mem":"3.8"},"2714":{"cpu":"0.3","mem":"0.4"},"2715":{"cpu":"0.0","mem":"4.8"},"2716":{"cpu":"0.7","mem":"4.2"},"2720":{"cpu":"1.3","mem":"4.4"},"2723":{"cpu":"0.0","mem":"0.7"},"2725":{"cpu":"0.7","mem":"4.6"},"2726":{"cpu":"0.0","mem":"3.3"},"2727":{"cpu":"1.0","mem":"4.0"},"2733":{"cpu":"0.7","mem":"4.0"},"2735":{"cpu":"3.3","mem":"1.3"},"2743":{"cpu":"2.3","mem":"0.9"},"275":{"cpu":"0.0","mem":"0.5"},"28":{"cpu":"0.0","mem":"0.0"},"29":{"cpu":"0.0","mem":"0.0"},"297":{"cpu":"0.0","mem":"0.5"},"30":{"cpu":"0.0","mem":"0.0"},"31":{"cpu":"0.0","mem":"0.0"},"32":{"cpu":"0.0","mem":"0.0"},"326":{"cpu":"0.0","mem":"0.5"},"360":{"cpu":"0.0","mem":"0.5"},"3751":{"cpu":"4.3","mem":"1.4"},"3753":{"cpu":"11.3","mem":"0.9"},"3798":{"cpu":"0.0","mem":"0.0"},"3808":{"cpu":"0.0","mem":"0.1"},"398":{"cpu":"0.0","mem":"0.5"},"41":{"cpu":"0.0","mem":"0.0"},"42":{"cpu":"0.0","mem":"0.0"},"447":{"cpu":"0.0","mem":"0.5"},"500":{"cpu":"0.0","mem":"0.5"},"542":{"cpu":"0.0","mem":"0.5"},"79":{"cpu":"0.0","mem":"0.0"},"790":{"cpu":"0.0","mem":"0.5"},"795":{"cpu":"0.0","mem":"0.5"},"796":{"cpu":"0.0","mem":"0.5"},"798":{"cpu":"0.0","mem":"0.5"},"800":{"cpu":"0.0","mem":"0.5"},"808":{"cpu":"0.0","mem":"0.5"},"81":{"cpu":"0.0","mem":"0.0"},"82":{"cpu":"0.0","mem":"0.0"},"827":{"cpu":"0.0","mem":"0.5"},"851":{"cpu":"0.0","mem":"0.5"},"88":{"cpu":"0.0","mem":"1.0"},"886":{"cpu":"0.0","mem":"0.5"},"913":{"cpu":"0.0","mem":"0.5"},"941":{"cpu":"0.0","mem":"0.5"},"967":{"cpu":"0.0","mem":"0.5"},"97":{"cpu":"0.0","mem":"0.1"},"98":{"cpu":"1.3","mem":"9.2"},"Tasks:":{"cpu":"stopped,","mem":"0.0"},"top":{"cpu":"average:","mem":"0.0"}},"detection_fps":0.8,"detectors":{"coral":{"detection_start":0.0,"inference_speed":38.86,"pid":2715}},"doorbell":{"camera_fps":7.0,"capture_pid":2733,"detection_enabled":1,"detection_fps":0.8,"ffmpeg_pid":3751,"pid":2725,"process_fps":7.2,"skipped_fps":0.0},"girls_cam":{"camera_fps":7.0,"capture_pid":2727,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":2735,"pid":2720,"process_fps":7.0,"skipped_fps":0.0},"service":{"last_updated":1688074407,"latest_version":"0.12.1","storage":{"/dev/shm":{"free":2145.4,"mount_type":"tmpfs","total":2147.5,"used":2.1},"/media/frigate/clips":{"free":3833591.8,"mount_type":"zfs","total":3861705.1,"used":28113.4},"/media/frigate/recordings":{"free":3833591.8,"mount_type":"zfs","total":3861705.1,"used":28113.4},"/tmp/cache":{"free":388527.7,"mount_type":"zfs","total":388540.1,"used":12.5}},"temperatures":{},"uptime":1191,"version":"0.12.1-367d724"}}

Operating system

Other Linux

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

Reolink Doorbell Wifi, Latest firmware.

Any other information that may be helpful

On TrueNAS Scale using TrueCharts Frigate app. I have a Coral passed through that seems to be working fine, no GPU.

I tried to limit to relevant logs since they repeat so much. I have 2 cameras an older C1-Pro which won’t work with HTTP and the doorbell. As you can see from commented out lines I was testing many different configurations. Same log problems when switching between http and rtsp streams.

Already upgraded to go2rtc 1.5 and the logs are empty aside from starting notes.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 31

Most upvoted comments

Edit: I spoke way too soon, log full of errors. Back to the drawing board.

Posting for others who come by the same issue. I will say to @kdill00 point about power, I did change the power cable going to the camera to the one provided by reolink. Now it’s reporting above 90% wifi experience in unifi. I had to splice it which is why i didn’t use it to begin with. I felt the 16v one I was using for the Nest Cam should’ve been fine. I would say if you are going aftermarket get a 24v one like theirs.

I just spend 5 hours in trial and error, I also gave frigate full use of my 72 cores but it still maxes out my cpu. But this config finally works, at some point recordings were choppy and green but finally all is well.

The only Errors in my log now are these, could be cuz I mapped the cache to host instead of letting it map it every time the cluster came back up. frigate.record ERROR : Error occurred when attempting to maintain recording cache frigate.record ERROR : list index out of range

Either way hope someone else can use this in time. Now on to @kdill00 HA automation!

go2rtc:
  streams:
    girls_cam:
      - rtsp://User:Password@192.168.##.##:554/h264Preview_01_main#backchannel=0
      # - http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=User&password=Password
      # - "ffmpeg:http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=User&password=Password#video=copy#audio=copy"
    doorbell:
      # - rtsp://User:Password@192.168.##.##:554/h265Preview_01_main#backchannel=0
      - http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=User&password=Password#backchannel=0
      # - "ffmpeg:http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=User&password=Password#video=copy#audio=copy#backchannel=0"
    doorbell_sub:
      # - rtsp://User:Password@192.168.##.##:554/h265Preview_01_sub
       - http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=User&password=Password#backchannel=0
  # webrtc:
  #   candidates:
  #     - 192.168.1.11:8555
  #     - stun:8555

detectors:
  coral:
    type: edgetpu
    device: usb

record:
  enabled: True
  retain:
    mode: all
  events:
    pre_capture: 10
    post_capture: 10
    retain:
      default: 90
      mode: motion

snapshots:
  enabled: True
  clean_copy: True
  timestamp: True
  bounding_box: True
  retain:
    default: 14

cameras:
  girls_cam:
    detect:
      width: 640
      height: 360
      fps: 7  
    ffmpeg:
      output_args:
          record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://User:Password@192.168.##.##:554/h264Preview_01_main
          roles:
            - record
        - path: rtsp://User:Password@192.168.##.##:554/h264Preview_01_sub
          roles:
            - detect
  doorbell:
    detect:
      width: 640
      height: 480
      fps: 5
    ffmpeg:
      input_args: preset-rtsp-restream
      output_args:
          record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/doorbell?video=copy&audio=copy
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/doorbell_sub?video=copy
          roles:
            - detect

I record high res and detect on high res. I’d rather detect on low like you’re doing and I do with my other cameras but this camera is finniky. If you look at my config it makes a connection to main using go2rtc and one to sub go2rtc does not connect to the camera unless you’re viewing. So my sub sits ready to be viewed quickly when the door bell is rung. The main one copied by go2rtc is then duplicated by putting record and detect under the same input. So only one connection exists at most times to the camera

***sorry for typos. On my phone on the move.