Cameras
Fregata works with anything that exposes RTSP — which is almost every IP camera made. This page is a cheat-sheet of URL patterns by brand, plus the workarounds for cameras that are shy about their streams.
URL shapes by brand
Section titled “URL shapes by brand”Replace user:pass with your camera’s credentials and IP with the
camera’s address. The “main stream” is the high-resolution feed for
recording; the “sub-stream” is a lower-resolution feed for
detection.
Reolink
Section titled “Reolink”Main: rtsp://user:pass@IP:554/h264Preview_01_mainSub: rtsp://user:pass@IP:554/h264Preview_01_subFor HEVC models, swap h264 for h265. Most modern Reolinks dual-
encode — they’ll serve H.264 even when set to H.265 in the app.
Amcrest / Dahua
Section titled “Amcrest / Dahua”Main: rtsp://user:pass@IP:554/cam/realmonitor?channel=1&subtype=0Sub: rtsp://user:pass@IP:554/cam/realmonitor?channel=1&subtype=1Multi-channel NVRs from these brands increment the channel
parameter (1, 2, 3…). The sub-stream toggle is subtype.
Hikvision
Section titled “Hikvision”Main: rtsp://user:pass@IP:554/Streaming/Channels/101Sub: rtsp://user:pass@IP:554/Streaming/Channels/102The path is 1xx (main) and 1xy (sub-stream); for additional
channels, increment the leading digit.
Most Lorex models are rebadged Dahua. Try the Dahua URL first.
Ubiquiti UniFi Protect
Section titled “Ubiquiti UniFi Protect”UniFi cameras have RTSP disabled by default. To turn it on:
- Open Protect.
- Cameras → click camera → Settings → Advanced.
- Under RTSP, enable each stream you want and copy the URL.
The URL UniFi gives you looks like
rtsps://192.168.1.1:7441/<random-key> — it’s RTSP-over-TLS, port
7441. Fregata handles rtsps://; just paste the URL as-is.
Ring / Nest / Wyze (cloud-only)
Section titled “Ring / Nest / Wyze (cloud-only)”These don’t expose RTSP. Workarounds:
- Ring — no first-party path. Some users run Wyze-Ring-RTSP-style proxies, but they’re brittle.
- Nest — Google killed the SDM API for new accounts; legacy Nest cams have community projects but nothing reliable.
- Wyze — Wyze sells official RTSP firmware for some models. If yours is supported, install that firmware and it becomes a normal RTSP camera.
If “no cloud” matters to you, buy cameras that ship RTSP first-class: Reolink, Amcrest, Dahua, Hikvision, UniFi.
Tapo / TP-Link
Section titled “Tapo / TP-Link”Main: rtsp://user:pass@IP:554/stream1Sub: rtsp://user:pass@IP:554/stream2Tapo cameras require you to enable the camera account in the Tapo app first (Settings → Camera Account → Set Up). The username/password you set there is what RTSP uses, separate from your Tapo account credentials.
rtsp://user:pass@IP/axis-media/media.ampAxis URLs accept a videocodec query param if you want to pin the
codec. Without it, the camera serves whatever’s negotiated.
Generic ONVIF
Section titled “Generic ONVIF”Cameras that follow the ONVIF spec (most of them) expose stream
URLs via the Media2 service. The easiest discovery tool is
ONVIF Device Manager,
which connects, lists profiles, and prints the RTSP URL for each.
Webcams (USB or built-in iSight)
Section titled “Webcams (USB or built-in iSight)”USB and built-in cameras don’t speak RTSP. Two options:
- Run go2rtc with a
ffmpeg:devicesource to fan out a built-in or USB camera as RTSP. go2rtc is already part of Fregata’s bundle; configure it viago2rtc.streamsinconfig.yml. See go2rtc’s README for syntax. - Plug in via Continuity Camera — your iPhone’s camera shows up as a webcam to macOS, which go2rtc can then serve. Useful for one-off “what does that camera angle look like” tests.
This isn’t the use case Fregata’s tuned for — single-purpose IP cameras are the boring, reliable choice — but the mechanism works.
Sub-streams: optional power saver
Section titled “Sub-streams: optional power saver”On Linux Frigate, the standard pattern is main stream for recording, sub-stream for detection — sub-streams are usually 720P or lower, which keeps the CPU detection path tractable. On Fregata you don’t need this. The ANE handles inference at full resolution and full FPS without breaking a sweat, and VideoToolbox decodes the main stream nearly for free. The simpler config is the default:
The camera wizard builds this for you. In the web UI, go to Settings → Global configuration → Camera management, click Add New Camera, and leave the one stream’s Detect and Record roles on (both start on) in the stream configuration step (see Add your first camera).
To look at or edit what it created:
- Settings → System → go2rtc streams holds the go2rtc stream (name and camera URL).
- Settings → Camera configuration → Streams (FFmpeg) holds the camera’s Camera inputs: the restream path, and each input’s roles.
- Settings → Camera configuration → Live playback maps the camera’s live stream name to the go2rtc stream (Live stream names).
go2rtc: streams: driveway:
cameras: driveway: live: streams: Main: driveway # must match the go2rtc.streams key above ffmpeg: inputs: - path: rtsp://127.0.0.1:8554/driveway input_args: preset-rtsp-restream roles: [record, detect]One stream in, one decode pass, both roles served from the same
buffer. The go2rtc.streams entry is required for MSE/WebRTC live
tiles in the web UI; without it the player silently falls back to
low-quality jsmpeg. The live.streams key says which go2rtc stream(s)
the camera’s live view uses. Frigate defaults it to a stream named like
the camera, so it only matters when the names differ, as with a
sub-stream. The camera wizard adds both automatically; the above is
close to what it produces for a single-stream camera.
There is still one narrow case where adding a sub-stream pays:
- Network-constrained installs. If the cameras share a congested Wi-Fi link with the Mac and packet loss is making RTSP brittle, a sub-stream halves the bytes-per-second per camera.
The sub-stream variant looks like this:
In the camera wizard (Settings → Global configuration → Camera management → Add New Camera), in the stream configuration step:
- Turn off Detect on the first stream, so it only records.
- Click Add Another Stream, pick the camera’s sub-stream in its URL drop-down, and turn on Detect for it. (A role can only be on for one stream, which is why the first stream’s Detect has to go off first.)
- Leave Reduce connections to camera on for both streams.
For a camera that already exists:
- Add the second stream on Settings → System → go2rtc streams (Add stream).
- On Settings → Camera configuration → Streams (FFmpeg), pick the camera, add the stream under Camera inputs with Detect on, and turn Detect off on the main input.
- To list the sub-stream in the live view’s stream selector, add it under Live stream names on Settings → Camera configuration → Live playback.
- Click Save on each page you changed (or Save All).
go2rtc: streams: driveway: driveway_sub:
cameras: driveway: live: streams: Main: driveway # main stream for live view Sub: driveway_sub # sub-stream also browsable ffmpeg: inputs: - path: rtsp://127.0.0.1:8554/driveway input_args: preset-rtsp-restream roles: [record] - path: rtsp://127.0.0.1:8554/driveway_sub input_args: preset-rtsp-restream roles: [detect]If your camera doesn’t expose a separate sub-stream URL, the single-stream default is what you want anyway.
Forcing TCP transport
Section titled “Forcing TCP transport”If detection is choppy and ffprobe shows the camera is reachable
over TCP but not UDP (a common Wi-Fi failure mode), pin the
transport:
- In the web UI, go to Settings → Global configuration → FFmpeg. To change one camera only, use Settings → Camera configuration → Streams (FFmpeg) and pick the camera.
- For Input arguments (under Advanced Settings on the global
page), choose Manual arguments and enter:
-avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 - Click Save.
An input that sets its own Input arguments (under Camera inputs) ignores this setting; change that input’s arguments instead.
# For every camera whose inputs don't set their own input_argsffmpeg: input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
# Or for one input of one cameracameras: driveway: ffmpeg: inputs: input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 roles: [detect, record]This is also Fregata’s default for most camera profiles — you
shouldn’t need to set it unless you’ve overridden input_args
elsewhere. An input that sets its own input_args, as the camera
wizard’s restream inputs do (preset-rtsp-restream), ignores the
global setting.
What about ONVIF auto-discovery?
Section titled “What about ONVIF auto-discovery?”Two different things use the word “ONVIF” here, worth not conflating:
- The camera wizard’s ONVIF probe (see
Add your first camera) is a
one-time setup-time query — give it the camera’s host and
credentials and it discovers the RTSP stream URLs for you, so you
never need to know the URL shapes on this page at all. That’s the
easiest path for any ONVIF-capable camera; this page’s brand
cheat-sheet is for the cameras that don’t support it, or when
you’re editing
config.ymlby hand. - The persistent
onvifconfig block on each camera is a separate, ongoing thing — it’s for PTZ control and presets, not stream discovery. It doesn’t replace the RTSP URL inffmpeg.inputs; you still need that, wizard-discovered or hand-written. The block tells Fregata “this camera’s pan-tilt-zoom is at port 8000, and here’s how to authenticate.” See the Frigate ONVIF docs for the details.
- In the web UI, go to Settings → Camera configuration → ONVIF and pick the camera.
- Set ONVIF host (the camera’s address), ONVIF port (often
8000or80), ONVIF username, and ONVIF password. - Click Save.
cameras: driveway: onvif: host: 10.0.1.20 port: 8000 user: admin password: "{FRIGATE_CAM_PW}"