camera setup in Frigate NVR: a guide with examples

Frigate NVR is a much-lauded security camera application with a huge following. Setting it up requires skills, knowledge and time.

Frigate NVR – camera discovery and setup

Camera configuration is one of Frigate NVR’s strengths and weaknesses. The strength is the customising you can do to pick up or ignore types of movement. There’s even a way to measure the speed of a passing car or identify birds. The weakness is that camera ‘discovery’ and exploiting these features is down to you. I’ve assumed that your first priority will be to see your images in Frigate – this page helps with that. It also deals with a second priority which is to fixate on matching what your cameras are capable of with what Frigate handles best. And I’ve added some rare tips.

Your favorite AI chatbot will help with fine tuning how much you record and retain as well as fine tuning what you want Frigate to react or not react to. For example, a Chatbot will be able to look at a image and tell you how to code for very small fast moving objects or very big stationary objects.

Roger’s tips for setting up Frigate NVR cameras:

Before anything else, decide whether to buy a kit (with cameras plus a recorder and software) as everything that follows uses time on a hobby scale. 

Verify that your camera will give you a URL where you can view the image (the ‘stream’). You’ll need research to find this URL. Only some consumer-friendly cloud cameras’ will have this URL. 

Either get your IP camera to self-assign its IP address OR better still get your router to always assign the camera the same IP address (because this way you’re less likely to get conflicting duplicate IP addresses). Name your camera eg ‘front166’ to match this IP address.

Set up two streams per camera, named eg front166_sub for detection and front166 - the full fat (higher-res) version for recording clips.

Initially give all your cameras a similar ‘username’ and password’. You can complicate this password later if needed.  

Use the probing tools below to find details on your image dimensions and stream URLs

on this page: camera configuration and tools

  • Reolink cameras
  • ONVIF and professional cameras
  • Probing tools for testing the stream
  • Cameras that probably don’t work
  • Common resolutions, megapixels, 4K, VGA.

1. Reolink cameras

The Reolink 810/A is well suited to outdoor detection where 4K or better helps to show detail needed in a wider outside view.  There are at least two image qualities (aka fluent / clear H.264 / H.265 ‘streams’) on different URLs which you’ll want to know. 

After camera initialisation login to the camera IP or use the app, set the stream info as follows. As Frigate will do all the event detection and recording, you may turn OFF detection and recording in the camera app settings. In the network settings you can have the camera self-assign the IP (else let the router do this). Also in network settings turn ON all of the services including RTMP.

Back in Frigate camera configuration, the camera needs to be set up in two places (or under two keys).  1) Under the ‘gortc: key’ you tell Frigate where to get the image stream. 2) Under the ‘cameras: key’ you tell Frigate what to do with it.

The other general parts of Frigate’s configuration can be seen as the settings that apply to every camera (aka ‘global’ settings). There’s no need to repeat these global settings under the cameras: key – but you might repeat and tweak a setting to achieve an effect (such as ensuring the camera ignores a stationary car).

# GORTC section for Reolink 810 camera

go2rtc:
streams:

# you can list all these (four alternatives) in your Frigate config. The URL is on one line.
front110REOflv_sub:
http://192.168.1.110/flv?port=1935&app=bcreolive&stream=h264Preview_01_sub&user=admin&password=PASSWORD
front110flvREO:
http://192.168.1.110/flv?port=1935&app=bcreolive&stream=h264Preview_01_main&user=admin&password=PASSWORD

# these work for me
front110REO_sub:
- rtsp://admin:PASSWORD@192.168.1.110:554/h264Preview_01_sub
front110REO:
- rtsp://admin:PASSWORD@192.168.1.110:554/h264Preview_01_main

cameras:
# --------------------
# front110REO
# --------------------
front110REO:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front110REO_sub
input_args: preset-rtsp-restream
hwaccel_args: preset-intel-qsv-h264
roles:
- detect
- path: rtsp://127.0.0.1:8554/front110REO
input_args: preset-rtsp-restream
hwaccel_args: preset-intel-qsv-h265
roles:
- record
detect:
width: 640
height: 360
fps: 4
enabled: true

2. Standard ONVIF camera with or without pan tilt zoom (PTZ)

Professional security cameras may use ‘ONVIF’ which enables camera discovery but on other camera apps. If the camera has PTZ, Frigate will handle this if the ONVIF settings are included as below.  

After setting up the camera in the app. Frigate will do motion detection and recording so you may turn OFF such features in the app settings. In the network settings you can have the camera self-assign the IP (else let the router do this). In the app set the camera user/password.

In the Frigate camera configuration, the camera needs to be set up in two places (or under two keys).  1) Under the ‘gortc: key’ you tell Frigate where to get the image stream. 2) Under the ‘cameras: key’ you tell Frigate what to do with it. The other parts of Frigate’s configuration can be seen as the settings that apply to every camera (aka ‘global’ settings). There’s no need to repeat these global settings under the cameras: key – but you might repeat and tweak a setting to achieve an effect (such as ensuring the camera ignores a stationary car).

# GORTC section for standard ONVIF camera

# you can list all these (four alternatives) in your Frigate config

gortc:
chicks154_sub:
- rtsp://admin:PASSWORD@192.168.1.154:554/tcp/av0_1
chicks154:
- rtsp://admin:PASSWORD@192.168.1.154:554/tcp/av0_0
chicks154_onvif:
- onvif://admin:PASSWORD@192.168.1.154:10080?subtype=PROFILE_000
chicks154_onvif2
- onvif://admin:PASSWORD@192.168.1.154:10080/onvif/device_service
chicks154_onvif_sub:
- onvif://admin:PASSWORD@192.168.1.154:10080?subtype=PROFILE_001


chicks154:
ffmpeg:
hwaccel_args: preset-intel-qsv-h264
inputs:
- path: rtsp://127.0.0.1:8554/chicks154_onvif_sub
input_args: preset-rtsp-restream
hwaccel_args: preset-intel-qsv-h264
roles:
- detect
- path: rtsp://127.0.0.1:8554/chicks154_onvif
input_args: preset-rtsp-restream
hwaccel_args: preset-intel-qsv-h264
roles:
- record

onvif:
host: 192.168.1.154
port: 10080
user: admin
password: PASSWORD
detect:
width: 640
height: 360
fps: 3
objects:
track:
- cat
- dog

3. Standard RTSP camera eg Wansview  

The Wansview W5 is an inexpensive outdoor wired or wireless FHD camera. There are two image qualities on different URLs which are explicitly shown in the Wansview app.

After setting up the camera in the app. Frigate will do motion detection and recording so you may turn OFF such features in the app settings. In the network settings you can have the camera self-assign the IP (else let the router do this). In the app setting ‘Local applications’  turn ON all of the services (RTSP/onvif) and set the camera user/password. You may notice some ONVIF capability in the Wansview camera app – this is not useful at all to Frigate which can’t use Wansview’s proprietary PTZ features. Wansview’s ONVIF will help with camera discovery in other camera applications.

In the Frigate camera configuration, the camera needs to be set up in two places (or under two keys).  1) Under the ‘gortc: key’ you tell Frigate where to get the image stream. 2) Under the ‘cameras: key’ you tell Frigate what to do with it. The other parts of Frigate’s configuration can be seen as the settings that apply to every camera (aka ‘global’ settings). There’s no need to repeat these global settings under the cameras: key – but you might repeat and tweak a setting to achieve an effect (such as ensuring the camera ignores a stationary car).

# GORTC section for standard RTSP camera

go2rtc:
streams:

# list all these in your Frigate config

bees153_sub:
- rtsp://admin:PASSWORD@192.168.1.153:554/live/ch1 # LOWRES
bees153:
- rtsp://admin:PASSWORD@192.168.1.153:554/live/ch0 # HIGHRES


cameras:

bees153:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/bees153_sub
input_args: preset-rtsp-restream
hwaccel_args: preset-intel-qsv-h264
roles:
- detect
- path: rtsp://127.0.0.1:8554/bees153
input_args: preset-rtsp-restream
hwaccel_args: preset-intel-qsv-h264
roles:
- record
detect:
width: 640
height: 360
fps: 15
objects:
track:
- person
- cat

Probe the stream after you’ve added cameras to the Frigate config

You may struggle to find what image your camera actually sends out – and whether you have the best URL. These tools helped me correct my configuration.

ffprobe tool:

If you’re using Portainer alongside Frigate it’s an easy matter to install a tool (FFmpeg) inside the Frigate container to see what the camera is actually sending. Use this data to match your camera detect parameters (width, height, and FPS) to what is streaming. This match eliminates some CPU overhead from having to rescale the incoming stream. 

# get inside the Frigate container via Portainer > Frigate > Console. BTW this installed app will # disappear when you next update the frigate container. 

apt update && apt install -y ffmpeg 

# now enter the url you want to use under the cameras key.

ffprobe -rtsp_transport tcp rtsp://127.0.0.1:8554/back154_sub

or in general 

ffprobe -rtsp_transport tcp rtsp://127.0.0.1:8554/FRIGATE-CAMERA-NAME

or simply, but ignore the error because this command looks for UDP and TCP streams

ffprobe rtsp://127.0.0.1:8554/FRIGATE-CAMERA-NAME

port 1984 tool: 

You can inspect and create URLs with the Frigate 1984 tool. I found the ‘add’ section useful for debugging and testing sream URLs. Go there using

http:/ /IP of FRIGATE:1984 

4. Cameras that don’t work in Frigate NVR:

  • Battery cameras on the whole are less likely to supply an always-on stream. Some tapo cameras offer a URL but you may have a harder time getting the url for consumer-friendly security cameras that, out-of-the-box, do it all for you (Blink; Ring; Arlo; Logi Circle; Nest; echo show; Eufy. These brands may upload recordings to a paid cloud service or they record on an internal microSD card. You’d need access to the cameras feed and this might be well secured. Home Assistant has some integrations that access certain cameras (eg Blink doorbell snapshots). No worries – I’d continue to use the proprietary camera with its easy app.
  • USB cameras aka webcams are unlikely to work … an exception is a webcam connected to the PC running Frigate NVR via USB. You need to map the device into a Frigate docker container. This link adds some details HomeAutomationGuy’s guide.
object detection: the computer identifies particular things – here a bicycle with 82% probability and a person with 54%.

5. Popular resolutions, megapixels and their names:

  • 8K UHD (33.2mp or 7680 x 4320) 16:9 aspect ratio – broadcasting
  • 5K Apple Studio (14.7mp or 5120 x 2880)
  • 4K (9mp or 4096 × 2160); 1:91 ratio – cinema
  • UHD (8mp or 3840 × 2160); 16:9 ratio – consumer TV
  • QHD/1440p (3.7mp or 2560 × 1440) 16:9 ratio – gaming / mobile phone
  • FHD/2K (2mp or 1920 x 1080) 16:9 ratio – web and TV
  • HD (1mp or 1280 x 720) 16:9 ratio – minimum for ‘HD’
  • SD (0.4mp or 720 × 576) 4:3 ratio – old TV/DVD
  • VGA (0.3mp or 640 x 480) 4:3 ratio – old computer monitor / webcam

Leave a Reply

Your email address will not be published. Required fields are marked *