Back to Frigate Guides
Frigate

How to Fix Frigate Camera Stream Failing with FFmpeg Exit Code

Frigate GuideSecurity Cameras
hard difficulty 20-30 minutes 99 views 0 found helpful Where this fix applies: Global Updated
This guide applies to: Frigate Frigate FFmpeg Exit Issues (Frigate ingest pipeline failures)
At a glance — most common causes
  • Wrong RTSP URL / stream path
  • Unsupported codec (e.g., H.265 without hwaccel)
  • RTSP credentials wrong
20-30 minutes13 solutions coveredhard level

Expert Review & Technical Scope

DeviceFrigate Frigate FFmpeg Exit Issues
Model CoverageFrigate ingest pipeline failures
Fix Time20-30 minutes
DifficultyHard
Required Toolsfrigate logs, camera stream settings
Network / ProtocolWi-Fi / app-based troubleshooting context

Problem Description

Your Frigate camera stream fails with an FFmpeg exit code in the logs. The camera shows a black screen or 'No stream available' in the Frigate web UI. Different exit codes point to different problems: RTSP connection timeouts, codec incompatibility (H.265 without hardware decoding), out-of-memory kills, or corrupt stream data from the camera.

Why This Happens in Real Homes

A Frigate camera stream failing with an FFmpeg exit code means FFmpeg couldn't open or decode the camera's stream — the FFmpeg process that pulls each camera crashed and Frigate keeps restarting it. The usual causes are a wrong RTSP URL or credentials, an unsupported codec (H.265 without proper hardware decoding), or misconfigured hardware acceleration.

Verify the exact RTSP path and credentials by testing the URL in VLC or ffprobe from the same host, then check the codec — H.265/HEVC often needs hardware acceleration configured correctly (or a different sub-stream). Review your hwaccel_args; a wrong GPU/accelerator setting causes exit codes, so try removing it to test on CPU. Setting the RTSP transport to TCP resolves streams that fail over UDP. The FFmpeg log line right before the exit code usually names the exact fault.

Symptoms

  • FFmpeg exit code error
  • Stream fails to start
  • Camera won't connect (FFmpeg)
  • Repeated FFmpeg restarts
  • No stream from a camera
  • FFmpeg errors in the log
  • Stream drops with exit code
  • Camera offline in Frigate

Recognize these? Here's what usually causes it.

Common Causes

  • Wrong RTSP URL / stream path
  • Unsupported codec (e.g., H.265 without hwaccel)
  • RTSP credentials wrong
  • Hardware acceleration misconfigured
  • TCP vs UDP transport mismatch
  • Camera sub-stream settings incompatible
  • Network/camera unreachable
  • FFmpeg input args wrong

Most fixes happen in the first 3 steps.

Warning

Do not copy stream flags between unrelated camera models without validation.

Tools & Requirements

frigate logscamera stream settings

Step-by-Step Solution

1

Decode the FFmpeg exit code

When a camera stream fails, Frigate logs an FFmpeg error with an exit code. Common codes: Exit code 1 = generic error (usually a malformed RTSP URL or missing codec). Exit code 8 = FFmpeg received bad data from the camera (corrupt stream). Exit code -9 = the process was killed (out of memory — the system OOM killer terminated FFmpeg). Exit code 69 = RTSP connection timed out. Exit code 56 = network connection reset. Check the Frigate logs for the exact error message that accompanies the exit code — it contains specific details about what failed.

2

Fix RTSP connection errors (exit codes 69, 56)

These indicate network-level problems between Frigate and the camera. Verify the camera IP address is correct and reachable from the Frigate server: ping camera-ip. Check that the RTSP port is correct (default 554 for most cameras, 8554 for some Reolink models). Try the RTSP URL in VLC on another computer to verify the stream works outside of Frigate. If the camera uses HTTPS RTSP (RTSPS): specify the rtsp_transport in FFmpeg input args: input_args: preset-rtsp-restream with -rtsp_transport tcp.

3

Fix codec and format errors (exit code 1)

Exit code 1 with 'Invalid data found when processing input' usually means the camera is sending a codec Frigate cannot decode. Known problem: the camera is set to H.265/HEVC on the main stream but Frigate's FFmpeg build does not support hardware H.265 decoding. Switch the camera to H.264 encoding in the camera's web interface. H.264 is universally supported by all FFmpeg builds. If you need H.265 for storage efficiency: use H.264 for the detect (sub) stream and H.265 for the record (main) stream, with hardware decoding enabled.

4

Fix out-of-memory kills (exit code -9)

Exit code -9 means the Linux OOM killer terminated the FFmpeg process because the system ran out of RAM. This happens when too many cameras run at high resolution, or when hardware decoding fails and FFmpeg falls back to software decoding (uses much more RAM). Check system memory: 'free -h' or the Frigate system dashboard. Each camera's FFmpeg process uses 50-200MB depending on resolution. With 8 cameras at 4K: you may need 4+GB of RAM. Reduce camera resolution, enable hardware decoding (Intel QSV, VAAPI), or add more RAM.

5

Set FFmpeg to retry on failure

Camera streams occasionally fail due to network blips, camera reboots, or firmware bugs. Configure Frigate to retry automatically: ffmpeg: retry_interval: 10 (retries every 10 seconds). Without this setting, Frigate may stop trying to connect after repeated failures. Also set a global input timeout: ffmpeg: input_args: preset-rtsp-restream adds appropriate timeouts. If a specific camera fails repeatedly: check the camera's own logs — it may be rebooting, overheating, or running out of connections (many cameras limit concurrent RTSP sessions to 2-4).

Quick Solutions

Verify the exact RTSP URL and path
Match the codec / enable hardware acceleration
Correct the RTSP username/password
Fix or remove the hwaccel_args
Set RTSP transport to TCP if UDP fails
Adjust the camera sub-stream to a supported format
Confirm the camera is reachable from the container
Review the FFmpeg input args in config

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

Camera issues that start suddenly almost always trace back to an upload bandwidth drop — run a speed test before assuming hardware failure.

Pro Tip

Exit-code analysis is faster than blind config changes.

Real-World Insight

Live view problems that start suddenly usually trace back to an upload speed drop — the camera itself is fine, the bandwidth path to the cloud isn't.

What Usually Goes Wrong
  • Wrong RTSP URL / stream path
  • Unsupported codec (e.g., H.265 without hwaccel)
  • RTSP credentials wrong
  • Hardware acceleration misconfigured
  • TCP vs UDP transport mismatch

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 FFmpeg Exit Issues.

View Frigate FFmpeg Exit Issues 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.