Back to Frigate Guides
Frigate

How to Fix Frigate RTSP Authentication Failures

Frigate GuideSecurity Cameras
medium difficulty 15-20 minutes 70 views 0 found helpful Where this fix applies: Global Updated
This guide applies to: Frigate Frigate Camera Authentication (RTSP credentials and camera access)
At a glance — most common causes
  • Wrong RTSP username/password
  • Special characters in the password not URL-encoded
  • Camera requires a specific auth (digest/basic)
15-20 minutes13 solutions coveredmedium level

Expert Review & Technical Scope

DeviceFrigate Frigate Camera Authentication
Model CoverageRTSP credentials and camera access
Fix Time15-20 minutes
DifficultyMedium
Required Toolscamera admin, frigate config, rtsp test tool
Network / ProtocolWi-Fi / app-based troubleshooting context

Problem Description

Frigate cannot connect to your camera's RTSP stream — the logs show "401 Unauthorized", "Authentication failed", or "Connection refused." The RTSP URL format varies by camera brand, passwords with special characters need URL encoding, and the authentication method (Basic vs. Digest) must match between FFmpeg and the camera.

Why This Happens in Real Homes

Frigate RTSP authentication failures mean the camera rejected the login for its stream — the credentials in your config don't match what the camera expects. The most common cause is a wrong username or password, but a very frequent gotcha is special characters in the password that aren't URL-encoded, since RTSP URLs embed the credentials.

Verify the exact RTSP username and password (test the full URL in VLC), and if the password contains special characters like @, :, or #, URL-encode them in the config so they don't break the URL. Make sure the account has permission to access the stream, and confirm the correct RTSP port and path. If the camera's credentials were changed, update Frigate to match. Escaping the password correctly in the YAML resolves the majority of these.

Symptoms

  • RTSP authentication fails
  • 401 Unauthorized on the stream
  • Wrong credentials error
  • Camera won't authenticate
  • Auth failure in the log
  • Stream rejected (auth)
  • Credentials not accepted
  • Can't log into the RTSP stream

Recognize these? Here's what usually causes it.

Common Causes

  • Wrong RTSP username/password
  • Special characters in the password not URL-encoded
  • Camera requires a specific auth (digest/basic)
  • Credentials changed on the camera
  • Account lacks stream permission
  • Wrong RTSP port/path
  • Camera user disabled
  • Config not escaping characters

Most fixes happen in the first 3 steps.

Warning

Do not use admin accounts when a limited stream account is available.

Tools & Requirements

camera adminfrigate configrtsp test tool

Step-by-Step Solution

1

Verify the RTSP URL format for your camera brand

Each camera brand uses a different RTSP URL format. Common formats: Amcrest/Dahua: rtsp://user:pass@ip/cam/realmonitor?channel=1&subtype=0 (main) or subtype=1 (sub). Hikvision: rtsp://user:pass@ip/Streaming/Channels/101 (main) or 102 (sub). Reolink: rtsp://user:pass@ip/h264Preview_01_main (main) or _sub. Unifi Protect: rtsp://ip:7447/camera-id. If the URL format is wrong: the camera rejects the connection with a 401 or RTSP error. Check your camera's documentation for the exact format.

2

Check username and password encoding

RTSP URLs embed credentials directly: rtsp://username:password@ip. If the password contains special characters (@, #, :, /): they must be URL-encoded. @ becomes %40, # becomes %23, : becomes %3A, / becomes %2F. Example: password 'MyP@ss#1' becomes 'MyP%40ss%231'. In frigate.yml, you can alternatively use environment variables: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@ip/stream and set the variables in your Docker environment.

3

Disable Digest authentication if using Basic

Some cameras default to RTSP Digest authentication, while FFmpeg defaults to Basic. If the camera uses Digest but FFmpeg sends Basic credentials: the camera returns 401 Unauthorized. In frigate.yml, add the FFmpeg input arg: -rtsp_transport tcp -rtsp_flags prefer_tcp. For cameras requiring Digest auth specifically: FFmpeg handles it automatically in most versions. If authentication still fails: update FFmpeg to the latest version bundled with your Frigate release.

4

Create a dedicated camera user for Frigate

Using the camera's admin account for RTSP streaming is not recommended — some cameras limit concurrent sessions for admin users, or lock the admin account after failed login attempts from other sources. Create a dedicated RTSP user on the camera with viewer/streaming permissions only. In the camera's web interface: go to user management and create a new user with 'live view' or 'streaming' privileges. Use this account in the Frigate RTSP URL.

5

Test the RTSP URL outside of Frigate

Verify the RTSP URL works independently: on another computer, open VLC > Media > Open Network Stream > paste the full RTSP URL. If VLC connects and shows video: the URL and credentials are correct, and the issue is in how Frigate connects (network, Docker networking, or FFmpeg settings). If VLC also fails: the camera URL or credentials are wrong. Also test with: ffprobe rtsp://user:pass@ip/stream — this shows the exact error message without trying to display video.

Quick Solutions

Verify the RTSP username and password
URL-encode special characters in the password
Match the camera's auth type (digest/basic)
Update credentials after any camera change
Use an account with stream access
Confirm the correct RTSP port and path
Enable/create the camera user
Escape special characters in the YAML config

Still having issues? This is usually the deeper cause below.

If this comes back after following these steps, check whether a recent app or firmware update reset a default setting — the fix works, but the setting gets reverted silently.

Pro Tip

Rotate RTSP passwords with config management to avoid drift.

Real-World Insight

This issue almost always looks more complex than it is — the majority of cases trace back to a single setting, a stale credential, or a default that shipped wrong.

What Usually Goes Wrong
  • Wrong RTSP username/password
  • Special characters in the password not URL-encoded
  • Camera requires a specific auth (digest/basic)
  • Credentials changed on the camera
  • Account lacks stream permission

Official Manufacturer Manual

Frigate provides official product documentation through their online manual rather than downloadable PDF. Access setup guides, troubleshooting steps, and product specifications for your Frigate Camera Authentication.

View Frigate Camera Authentication Online Manual

Source: docs.frigate.video

Need More Help? Frigate Support

Note: The contact information below connects you directly to Frigate's official customer support team, not Trunetto. They can help with warranty claims, device replacements, and advanced technical issues.