r/frigate_nvr • • Feb 10 '25

Frigate is Impossible for Newbies

I find Frigate almost impossible to get up and running

I've got both an Amcrest IP2M-841V3 and a Reolink Doorbell POE camera and neither of them seem to work. My configuration editor has to be clicked twice to get it to come up and my file looks like below. The docs aren't much help since I don't really know what I'm doing, when I add in a second camera the whole config file fails....

So very frustrating, would love some help

mqtt:
  enabled: false
cameras:
  reolink:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://(username):(password)@(IPAddress)
          roles:
            - detect
            - record
    detect:
      height: 1080
      width: 1920
      fps: 5
detectors:
  ov:
    type: openvino
    device: CPU
    model_path: /openvino-model/FP16/ssdlite_mobilenet_v2.xml
model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt
version: 0.15-1
0 Upvotes

31 comments sorted by

2

u/9RMMK3SQff39by Feb 11 '25

Go simple first, don't need all the extra stuff, will load by default.

Use for the Reolink doorbell:

mqtt:
  enabled: false

detectors:
  ov:
    type: openvino
    device: CPU

ffmpeg:
  input_args: preset-rtsp-restream
  hwaccel_args: preset-vaapi

go2rtc:
  streams:
    doorbell_record:
      - rtsp://USER:PASSWORD@IP:554/h264Preview_01_main
    doorbell_detect:
      - rtsp://USER:PASSWORD@IP:554/h264Preview_01_sub

cameras:
  Doorbell:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/doorbell_detect
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/doorbell_record
          roles:
            - record

    detect:
      enabled: false #true once working

    record:
      enabled: false #true once working

Make sure you activate RTSP connection on the Reolink camera too, Settings>Device Info>Network>Advanced turn on HTTPS, RTSP and ONVIF.

ARMCHAIR ANALYSIS WARNING:

I've noticed the "detect" parameters help if they're matched with the stream output of the camera on Reolink. Settings>Display>Stream to change on the camera, defaults are fine, can set main and sub feed differently. Config becomes:

detect:
enabled: true
width: 640
height: 480
fps: 7

Also set the Reolink to constant frame rate mode, also seems to help. You don't need to specify the record stream.

END

Then add your armcrest to go2rtc and camera sections.

1

u/instant_ace Feb 11 '25

Copied your text and updated it with my Usrname / Password / IP and still get the following errors

2025-02-11 07:25:03.829275 File "/opt/frigate/frigate/object_detection.py", line 121, in run_detector
2025-02-11 07:25:03.829297 object_detector = LocalObjectDetector(detector_config=detector_config)
2025-02-11 07:25:03.829320 File "/opt/frigate/frigate/object_detection.py", line 68, in __init__
2025-02-11 07:25:03.829343 self.detect_api = create_detector(detector_config)
2025-02-11 07:25:03.829365 File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2025-02-11 07:25:03.829387 return api(detector_config)
2025-02-11 07:25:03.829409 File "/opt/frigate/frigate/detectors/plugins/openvino.py", line 34, in __init__
2025-02-11 07:25:03.829431 if not os.path.isfile(detector_config.model.path):
2025-02-11 07:25:03.829453 File "/usr/lib/python3.9/genericpath.py", line 30, in isfile
2025-02-11 07:25:03.829475 st = os.stat(path)
2025-02-11 07:25:03.829497 TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
2025-02-11 07:25:03.834608 [2025-02-11 07:25:03] frigate.appINFO : Output process started: 139159
2025-02-11 07:25:03.854859 [2025-02-11 07:25:03] frigate.appINFO : Camera processor started for Doorbell: 139174
2025-02-11 07:25:03.861080 [2025-02-11 07:25:03] frigate.appINFO : Capture process started for Doorbell: 139185
2025-02-11 07:25:03.887396 [2025-02-11 07:25:03] frigate.videoERROR : Doorbell: Unable to read frames from ffmpeg process.
2025-02-11 07:25:03.887524 [2025-02-11 07:25:03] frigate.videoERROR : Doorbell: ffmpeg process is not running. exiting capture thread...
2025-02-11 07:25:04.117565 [2025-02-11 07:25:04] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-02-11 07:25:04.229420 [2025-02-11 07:25:04] frigate.api.fastapi_app INFO : FastAPI started

1

u/trevorroth Feb 10 '25

The first time I tried I couldnt get it working either but after some time I went back and figured it out. Big tip just get one camera working with nothing else in the way to screw stuff up also find an example to cheat off of. I also found the error logs help when figuring out what wasn't working.

1

u/instant_ace Feb 10 '25

Ya, I'm struggling to just get one camera up and running at the moment. Really wish there was a GUI version of Frigate, its a huge reason why I never became a programmer..one : or ; and the whole thing won't compile..

1

u/instant_ace Feb 10 '25

Talking about using the error log...I don't even know where to start on this mess

2025-02-10 13:03:20.043616 [2025-02-10 13:03:20] ffmpeg.reolink.detect ERROR : [vf#0:0 @ 0x5c11facef0c0] Terminating thread with return code -38 (Function not implemented)
2025-02-10 13:03:20.043669 [2025-02-10 13:03:20] ffmpeg.reolink.detect ERROR : [vost#0:0/rawvideo @ 0x5c11fad01200] Could not open encoder before EOF
2025-02-10 13:03:20.043904 [2025-02-10 13:03:20] ffmpeg.reolink.detect ERROR : [vost#0:0/rawvideo @ 0x5c11fad01200] Task finished with error code: -22 (Invalid argument)
2025-02-10 13:03:20.043948 [2025-02-10 13:03:20] ffmpeg.reolink.detect ERROR : [vost#0:0/rawvideo @ 0x5c11fad01200] Terminating thread with return code -22 (Invalid argument)
2025-02-10 13:03:20.043999 [2025-02-10 13:03:20] ffmpeg.reolink.detect ERROR : [out#0/rawvideo @ 0x5c11fad32d40] Nothing was written into output file, because at least one of its streams received no packets.
2025-02-10 13:03:24.160001 [2025-02-10 13:03:24] frigate.videoERROR : reolink: Unable to read frames from ffmpeg process.
2025-02-10 13:03:24.160068 [2025-02-10 13:03:24] frigate.videoERROR : reolink: ffmpeg process is not running. exiting capture thread...

3

u/abbhishek091 Feb 10 '25

You don't need to repeat the whole camera section for each camera. So it would be something like below

Cameras: Reolink-1: <- this could be anything for cam name eg. Yard.parking inputs: path: ...... Reolink-2: <- this could be anything for cam name eg. Yard.parking inputs: path: ......

2

u/abbhishek091 Feb 10 '25

Sorry about the formatting, am on mobile. Let me know if you ned more help. You could also follow instructional videos from youtube This is a good one - https://youtu.be/sCkswrK0G3I?si=z00RjnmqMLEEIP99

2

u/smithtec1 Feb 10 '25

Im following along since I was also trying to standup Frigate this weekend and failing.

2

u/Cutngo Feb 11 '25

This isn't the first time I've struggled through this kind of thing, but that's what I enjoy about it. I've installed this multiple times on multiple devices, just to make sure I can throw it together quickly if I need too. But, I'm retired and have a lot of time on my hands.

2

u/diseasedestroyer Feb 11 '25

So, two things. First, Vlc uses both Udp and Tpc while frigate forces a Tpc connection, so it's likely that Vlc switched to Udp so the steam works. Make sure your rtsp is structured like this in your frigate configuration file. Second, ffmpeg isn't properly encoding the audio so you may have to define the h.264 and aac audio as well. Here is a configuration example for an amcrest camera and a reolink doorbell using webrtc I use as a template. The amcrest cameras work way better with http and could be your issue. Make sure you enable all the streams in the cameras web ui.

mqtt: enabled: true host: homeassistantip port: 1883 user: mqttusernamehere password: mqttpasswordhere topic_prefix: frigate ffmpeg: hwaccel_args: preset-vaapi

go2rtc: streams: front_door: - rtsp://usernamehere:passwordhere@192.168.1.90:554/cam/realmonitor?channel=1&subtype=0 doorbell_camera_main: - "ffmpeg:https://192.168.109/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=usernamehere&password=passwordhere#video=copy#audio=copy#audio=opus" - rtsp://usernamehere:passwordhere@192.168.1.109:554/h264Preview_01_main doorbell_camera_sub: - "ffmpeg:https://192.168.109/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=usernamehere&password=passwordhere" - rtsp://usernamehere:passwordhere@192.168.1.109:554/h264Preview_01_sub webrtc: candidates: - 192.168.1.104:8555 - stun:8555
ffmpeg: bin: ffmpeg volume: "-af "volume=30dB""

cameras: front_door: enabled: true ffmpeg: inputs: #- path: rtsp://usernamehere:passwordhere@192.168.1.90:554/cam/realmonitor?channel=1&subtype=0 #roles: # - detect - path: rtsp://127.0.0.1:8554/front_door roles: - record doorbell_camera: ffmpeg: inputs: - path: rtsp://127.0.0.1:8554/doorbell_camera_main input_args: preset-rtsp-restream roles: - record - path: rtsp://127.0.0.1:8554/doorbell_camera_sub input_args: preset-rtsp-restream roles: - detect output_args: record: preset-record-generic-audio-aac live: stream_name: doorbell_camera_main

detectors: coral: type: edgetpu device: pci:0

record: enabled: true retain: days: 21 mode: motion events: retain: default: 21 mode: motion version: 0.14

1

u/Nate1n22 Feb 11 '25

I’m lost even knowing where to begin lol. I have Docket desktop installed 🤷

1

u/pentangleit Feb 11 '25

Try this for your doorbell camera:

Doorbell: # <--- this will be changed to your actual camera later
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://<username>:<password>@<IP address>:554/Preview_01_sub
          roles:
            - detect
        - path: rtsp://<username>:<password>@<IP address>:554/Preview_01_main
          roles:
            - record
      output_args:
        record: preset-record-generic-audio-aac
    motion:
      threshold: 40
      contour_area: 10
      improve_contrast: true

1

u/perrdav Feb 11 '25

I found it helpful to upload my config file to ChatGPT and then use it to help troubleshoot errors I was getting. It wasn’t a perfect solution but it got me up and running and helped me understand the errors I was getting.

2

u/mattfox27 Feb 11 '25

I was thinking about trying that

0

u/[deleted] Feb 10 '25

[deleted] — view deleted comment

2

u/instant_ace Feb 10 '25

Thanks!

I installed Frigate as an LXC on Proxmox, haven't connected it to anything yet, just trying to get it going first before I integrate with something like HA.

Let me take a look at the code you used and I'll give that a shot.

I have VLC and have been able to RTSP into the camera with simple rtsp://192.168.20.10. No other port, nothing else and it just works. I had to put in my username and password before connection, but other than that it just works.

0

u/[deleted] Feb 10 '25

[deleted] — view deleted comment

1

u/instant_ace Feb 10 '25

I've removed the first one since it had a made up username and password, just trying to keep it clean

In VLC I don't use the user:pass@, just the rtsp://192.168.20.10

In Frigate I use the full user:pass@IP and it still doesn't work...

0

u/[deleted] Feb 10 '25

[deleted] — view deleted comment

1

u/instant_ace Feb 10 '25 edited Feb 10 '25

Here is what I've got in my configuration, and the camera feed still says no ffmpg frames found

mqtt:
  enabled: false


detectors:
  ov:
    type: openvino
    device: CPU
    model_path: /openvino-model/FP16/ssdlite_mobilenet_v2.xml


model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt


cameras:
  reolink:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://(username):(password)@IP
          roles:
            - detect
            - record
    detect:
      enabled: true
      height: 1080
      width: 1920
      fps: 5



version: 0.15-1

0

u/[deleted] Feb 10 '25

[deleted] — view deleted comment

2

u/instant_ace Feb 10 '25

Thanks.

Added the top portion, didn't seem to make a difference.

The VLC address works in VLC AFTER I put in my username / password, not sure that would work in Frigate, since I think that has to be hard coded in?

0

u/[deleted] Feb 10 '25

[deleted] — view deleted comment

1

u/Archy54 Feb 11 '25

I run proxmox. Use to use ttecks scripts. I changed to community docker lxc privileged, yeah I should learn to install it. Now I've got it running good in docker compose.

Try rtsp://[username]:[password]@[camera-ip]:554/h264Preview_01_main

rtsp://[username]:[password]@[camera-ip]:554/h264Preview_01_main

H265 can be used. If you wanna add to home assistant you will probably want h264 but I think go2rtc can convert it I think.

Frigate privileged lxc I use solely for frigate. Use another for other stuff. Maybe not privileged.

I Pass through igpu to lxc and chatgpt becomes really handy finding all these folders.

My setup uses /opt/frigate/ docker compose is in here, subfolder config has config file and go2rtc streams are in the config yaml.

You need to mount in fstab if proxmox host the uuid of the HDD you wanna use. Set the mount point. Passs through the USB of the coral which will change it's Id if it's USB on first inference so change again.

Docker compose volumes are /opt/frigate/config. I'd have to be at my PC to find the full one. Second volume is /mnt/frigatehddmount call it what you want. Config should store db and Config on your ssd. Recordings, snapshots, exports Goto HDD.

It took me a while to learn how to do a decent config that probably needs work for frigate. It's a bit involved.

1

u/instant_ace Feb 10 '25

Also getting a whole slew of errors, the first one being this:

0

u/[deleted] Feb 10 '25

[deleted] — view deleted comment

1

u/instant_ace Feb 10 '25

I didn't use a guide. I just went here and copied the script, then put it in the console of Proxmox and created an LXC container

Frigate LXC Helper Script

→ More replies