[Config Support]: Buffering video in go2rtc live streaming #20041
Replies: 27 comments 26 replies
-
|
The buffering you're experiencing is likely due to several configuration issues in your setup. First, there's an invalid role in your camera configuration. You're using For streaming-only cameras, you should configure them in go2rtc and not assign any roles in the camera inputs, or disable the camera entirely while keeping the go2rtc stream active (2)(3). Your frequent FFmpeg crashes shown in the logs suggest connection issues with your cameras. The retry interval might be too low for your network conditions. You can adjust this with the ffmpeg:
hwaccel_args: preset-vaapi
retry_interval: 30 # Increase from default 10 secondsFor better live streaming performance, ensure your go2rtc streams are properly configured. Since you're experiencing buffering, you might want to add specific stream configurations (4): go2rtc:
streams:
garage_fixed:
- rtsp://xxxxxx:[email protected]:554/live/ch01_0
- "ffmpeg:garage_fixed#video=copy#audio=aac"
soggiorno_fixed:
- rtsp://xxxxxx:[email protected]:554/live/ch01_0
- "ffmpeg:soggiorno_fixed#video=copy#audio=aac"The buffering circle in Home Assistant is often related to stream startup delays or network issues. Frigate uses smart streaming by default, where camera images update once per minute when no activity is detected, then switch to live streams when motion or objects are detected (2). To troubleshoot further, check the go2rtc web interface at port 1984 to see if your streams are being received properly (4). You can also check Consider removing the invalid 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
La tua configurazione presenta ancora alcuni problemi che stanno causando gli errori FFmpeg e go2rtc. Il problema principale è che hai configurato le telecamere Per telecamere dedicate solo allo streaming, hai due opzioni: Opzione 1: Disabilitare completamente le telecamere garage_fixed:
enabled: false
soggiorno_fixed:
enabled: falseOpzione 2: Rimuovere completamente le definizioni delle telecamere Il problema con la configurazione go2rtc è che stai creando una dipendenza circolare. La configurazione FFmpeg in go2rtc sta tentando di utilizzare se stessa come input (3): garage_fixed:
- rtsp://xxxxxx:[email protected]:554/live/ch01_0
- "ffmpeg:garage_fixed#video=copy#audio=aac" # Questo crea un loopSemplifica la configurazione go2rtc così: go2rtc:
streams:
garage_ptz:
- rtsp://xxxxxx:[email protected]:554/live/ch00_0
garage_fixed:
- rtsp://xxxxxx:[email protected]:554/live/ch01_0
soggiorno_ptz:
- rtsp://xxxxxx:[email protected]:554/live/ch00_0
soggiorno_fixed:
- rtsp://xxxxxx:[email protected]:554/live/ch01_0Se hai bisogno di transcodifica audio, usa questa sintassi invece: garage_fixed:
- rtsp://xxxxxx:[email protected]:554/live/ch01_0
- "ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch01_0#video=copy#audio=aac"Per migliorare la stabilità delle telecamere PTZ che continuano a crashare, considera di aumentare ulteriormente il ffmpeg:
hwaccel_args: preset-vaapi
retry_interval: 60 # Aumenta ancora di più per telecamere problematicheGli errori "streams: EOF" in go2rtc indicano che le telecamere stanno chiudendo inaspettatamente le connessioni. Questo è spesso dovuto a limitazioni hardware delle telecamere economiche o problemi di rete (4). 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Your configuration still has the same fundamental issue. You're assigning the For the Option 1: Remove the roles entirely garage_fixed:
ffmpeg:
inputs:
- path: rtsp://xxxxxx:[email protected]:554/live/ch01_0
# No roles assigned - Frigate won't process this stream
detect:
enabled: false
snapshots:
enabled: false
record:
enabled: falseOption 2: Use the restream approach (recommended) garage_fixed:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage_fixed
input_args: preset-rtsp-restream
# No roles assigned
detect:
enabled: false
snapshots:
enabled: false
record:
enabled: falseThis approach reduces connections to your cameras and improves stability (2). Regarding the retry_interval maximum value: The documentation doesn't specify a maximum value for You can set it higher than 60 seconds if needed, but consider the trade-off between connection stability and potential footage loss during outages (1). For problematic cameras like yours, you might try values like 120 or 180 seconds. Additional recommendations: Since all your cameras are failing, this suggests a broader network or camera firmware issue rather than just configuration problems. Consider:
📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
I would suggest trying the ffmpeg module in go2rtc: |
Beta Was this translation helpful? Give feedback.
-
|
Hi guys, thank you for your help. for the "fixed" camera ikeep told me to define always a role, but I want to use them only for streaming (for detect I wanna use PTZ camera). I don't see all the errors like before, but I need to continue to test it (only one error for now): In Advaced Camera Cards somethimes I see the buffers like described in the video linked in OP (but less than before). |
Beta Was this translation helpful? Give feedback.
-
|
as unsaid... |
Beta Was this translation helpful? Give feedback.
-
|
Based on the "Connection reset by peer" errors and the fact that your cameras can't handle multiple connections, you should configure restreaming to reduce camera load. Here's how to reconfigure your setup: Use restreaming to reduce connections to cameras (1): go2rtc:
streams:
garage_ptz:
- ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch00_0
garage_fixed:
- ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch01_0
soggiorno_ptz:
- ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch00_0
soggiorno_fixed:
- ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch01_0
cameras:
garage_ptz:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage_ptz
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 960
height: 540
fps: 2
objects:
track:
- person
motion:
threshold: 35
contour_area: 10
improve_contrast: true
garage_fixed:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage_fixed
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: false
snapshots:
enabled: false
record:
enabled: false
soggiorno_ptz:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/soggiorno_ptz
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 960
height: 540
fps: 2
objects:
track:
- person
motion:
threshold: 35
contour_area: 10
improve_contrast: true
soggiorno_fixed:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/soggiorno_fixed
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: false
snapshots:
enabled: false
record:
enabled: falseThis configuration creates only one connection per camera stream to go2rtc, then Frigate connects to the restream instead of directly to the cameras (1). The Enable go2rtc trace logging to get more detailed information (2): go2rtc:
streams:
# ... your streams ...
log:
rtsp: trace
exec: traceThis approach should significantly reduce the load on your cameras since each camera stream will only have one connection instead of multiple simultaneous connections (1). 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
@inkeep More log from go2rtc: |
Beta Was this translation helpful? Give feedback.
-
|
The error shows that go2rtc's ffmpeg module can't determine the codec parameters for your camera stream (2). The "Could not find codec parameters" and "unspecified size" errors indicate the stream format isn't being properly detected (2). Since the ffmpeg module in go2rtc isn't working with your cameras, try adjusting the FFmpeg parameters in your go2rtc configuration (2): go2rtc:
streams:
garage_ptz:
- "ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch00_0#video=copy#audio=copy"
garage_fixed:
- "ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch01_0#video=copy#audio=copy"
soggiorno_ptz:
- "ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch00_0#video=copy#audio=copy"
soggiorno_fixed:
- "ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch01_0#video=copy#audio=copy"If that doesn't work, the documentation suggests using additional FFmpeg parameters to handle problematic streams (2): go2rtc:
streams:
soggiorno_fixed:
- "ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch01_0#video=copy#audio=copy#analyzeduration=10000000#probesize=32768"The error message specifically mentions increasing As an alternative approach, you might want to go back to direct RTSP connections in go2rtc instead of using the ffmpeg module (2): go2rtc:
streams:
garage_ptz:
- rtsp://xxxxxx:[email protected]:554/live/ch00_0
garage_fixed:
- rtsp://xxxxxx:[email protected]:554/live/ch01_0
soggiorno_ptz:
- rtsp://xxxxxx:[email protected]:554/live/ch00_0
soggiorno_fixed:
- rtsp://xxxxxx:[email protected]:554/live/ch01_0This removes the ffmpeg module from go2rtc entirely and uses direct RTSP connections, which may be more compatible with your specific camera model (2). 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Your current configuration looks good! Let me help you optimize it further for CPU/GPU load, face recognition, and ONVIF setup. Face Recognition OptimizationYour face recognition is properly configured, but to prevent snapshots for recognized family members, you need to configure conditional snapshots (1). Face recognition works by first detecting a To verify face recognition is working:
For better recognition accuracy, follow these guidelines when uploading family photos (1):
CPU/GPU Load OptimizationYour current settings are already optimized for your Intel N150: face_recognition:
enabled: true
model_size: small # Optimal for Intel N150
unknown_score: 0.7To further optimize:
face_recognition:
enabled: true
model_size: small
unknown_score: 0.7
min_area: 1000 # Increase from default 500 to process fewer small facesONVIF PTZ SetupFor ONVIF to work, add the onvif section to your PTZ cameras (5): cameras:
garage_ptz:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage_ptz
roles:
- detect
onvif:
host: 192.168.1.179
port: 80 # or 8000, check your camera documentation
user: your_camera_username
password: your_camera_password
detect:
width: 960
height: 540
fps: 2
objects:
track:
- person
motion:
threshold: 35
contour_area: 10
improve_contrast: true
soggiorno_ptz:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/soggiorno_ptz
roles:
- detect
onvif:
host: 192.168.1.180
port: 80 # or 8000, check your camera documentation
user: your_camera_username
password: your_camera_password
detect:
width: 960
height: 540
fps: 2
objects:
track:
- person
motion:
threshold: 35
contour_area: 10
improve_contrast: trueIf your cameras don't require authentication, you may still need to specify empty strings (5): user: ""
password: ""The ONVIF port is commonly 80 or 8000 - check your camera's documentation or try both (5). If successful, PTZ controls will appear in the Frigate WebUI (5). Additional RecommendationsSince your configuration is working well now, you might also consider:
Your current setup with go2rtc re-encoding should provide stable streams while maintaining audio functionality. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
The "ActionNotSupported" error indicates that your cameras don't support the specific ONVIF commands that Frigate is trying to use (1). Even though your cameras work with other ONVIF applications, they may not support all the ONVIF features that Frigate requires for PTZ control (1). Based on the GitHub issue, this type of ONVIF compatibility problem is not uncommon (2). The error suggests that while your cameras implement ONVIF, they don't support the particular action Frigate is attempting to perform (2). For troubleshooting ONVIF issues, you can try these configuration adjustments (1): onvif:
host: 192.168.1.x
port: 8899
user: xxx
password: xxx
tls_insecure: True # Try if using HTTPS
ignore_time_mismatch: True # Only in safe environmentsHowever, given that the error is "ActionNotSupported", this suggests a fundamental compatibility issue rather than a configuration problem (2). Regarding your missing snapshots, this is likely because you have snapshots disabled on your cameras that have detection enabled (3). In your current configuration:
To restore snapshots, ensure they're enabled on cameras where you want them (3): cameras:
garage_ptz:
# ... existing config ...
snapshots:
enabled: true
timestamp: true
bounding_box: true
crop: true
soggiorno_ptz:
# ... existing config ...
snapshots:
enabled: true
timestamp: true
bounding_box: true
crop: trueYour global snapshots configuration should apply to cameras that don't have snapshots explicitly disabled, but it's safer to be explicit (3). For the ONVIF issue, unfortunately, if your cameras don't support the required ONVIF actions, there may not be a workaround within Frigate. You might need to continue using other applications for PTZ control while using Frigate for detection and recording. 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Here's a breakdown for each of your problems based on the sources: 1. Snapshots and Events Not Saved
2. CPU Load High, GPU Load 0%
3. Email Notifications Not Working
Summary of Actions
References: If you want more details on how to integrate email notifications via Home Assistant or external automation, let me know. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
@inkeep I wanna snapshot only for PTZ camera. In Home Assistant I see this for Soggiorno PTZ. Why is active "Motion" and not "Decect" like defined inside Frigate configuration yaml? |
Beta Was this translation helpful? Give feedback.
-
|
Here are answers for each of your questions, strictly based on the documentation: 1. Intel N150 Integrated GPU (OpenVINO Support)The documentation states that OpenVINO can use detectors:
ov:
type: openvino
device: GPUand the GPU is not compatible or drivers aren’t correct, OpenVINO will automatically fall back to CPU inference(1). There is no explicit confirmation in the documentation that Intel N150’s integrated GPU is supported, so the only way to know is to test with 2. Snapshots Only for PTZ CameraSnapshots are only created for cameras with detection enabled and snapshots:
enabled: true
timestamp: true
bounding_box: true
crop: trueand detection must be enabled for that camera(1). If you want snapshots only for PTZ cameras, ensure the fixed cameras have 3. Home Assistant Shows “Motion” Instead of “Detect”The Frigate integration with Home Assistant exposes separate toggles for “Detect” (AI object detection) and “Motion” (pixel-level motion detection)(1). If “Detect” is off in the HA UI but enabled in your YAML, it usually means Home Assistant is overriding or not syncing the Frigate config correctly, or Frigate is not running detection due to a configuration or stream issue(1). Double-check that the Frigate UI (not just Home Assistant) shows detection is running for that camera. Also, ensure the camera’s detection stream is healthy(1). 4. Email Notification in Frigate UIThe documentation does not list native email support in the notifications configuration(1). The only notification config options officially documented are for enabling the notification service and specifying an email for push service registration purposes (not for sending email notifications)(1). Email alerts must be handled by external automations—typically via Home Assistant or an MQTT integration(1). If you see email options in the UI, they are not documented as part of the Frigate notification delivery system(1). Summary:
📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
@inkeep with this: the CPU usage drop from a stable 70% to a maximum of 20%. |
Beta Was this translation helpful? Give feedback.
-
|
Switching your go2rtc streams from the ffmpeg module (which re-encodes or copies streams) to direct RTSP connections (no ffmpeg:) significantly reduces CPU usage because go2rtc is no longer decoding and re-encoding the video—it's simply relaying the stream as-is. This is consistent with the documentation: direct RTSP streams are the most efficient and should be preferred when your camera's codec and format are compatible with your playback and detection pipeline(1). If you don't need to transcode, always use direct RTSP URLs in go2rtc for the lowest CPU load(1). Only use the ffmpeg module in go2rtc when you must change codecs or container formats to achieve compatibility(1). 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
OK @inkeep, restart from here. What ado you think about it? How can I improve it? |
Beta Was this translation helpful? Give feedback.
-
|
Your configuration is close to optimal for Frigate, but there are a few points you can further refine or clarify: 1. Hardware Acceleration / Offloading AI InferenceYou set 2. Roles and Camera Inputs
3. SnapshotsYour snapshot settings are correct for the PTZ cameras. Snapshots will only be created for tracked objects (e.g., people) if detection is working(2). If you want to further customize retention or snapshot quality per camera, you can do so at the camera level(2). 4. Motion vs. Detect in Home AssistantIf "Motion" is shown as active in the UI and not "Detect," it means Frigate is seeing pixel-level changes but may not be detecting/tracking objects at that moment(2)(3). This is expected if no person is present in the frame. If you want more sensitive detection, you can tune 5. Notifications and EmailFrigate's native notification system is primarily for push notifications and MQTT integration(2). The 6. CPU/GPU Load
7. General Advice
References: If you want details on specific tuning (motion, detection, or notifications), let me know which area you want to optimize further. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
@inkeep About point 7. General Advice you told me: "If you want to disable all processing on fixed cameras, you can omit them from the Frigate config entirely and only use them in go2rtc for streaming.". Send me the code example (based on my own code) to make it. |
Beta Was this translation helpful? Give feedback.
-
|
Hardware Acceleration / Offloading AI Inference Your Frigate logs do not show any line indicating that OpenVINO is running the detection on the GPU. When Frigate is using OpenVINO, you must set For Intel GPUs, OpenVINO GPU support requires a supported Intel platform and proper drivers(1). If your hardware is not supported, or the drivers are missing, OpenVINO will default to CPU. Example detector configuration for explicit GPU attempt: detectors:
ov:
type: openvino
device: GPUIf you want to force CPU, use For your Intel N150, you should check if it is a supported Intel platform by OpenVINO for GPU inference. If not, only CPU will be used(1). How to Use go2rtc-Only Streams for Fixed Cameras If you want to completely disable all Frigate processing for your fixed cameras and only use them for streaming, simply omit them from the Example based on your code: go2rtc:
streams:
ipcam_garage_ptz:
- ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch00_0#video=h264#audio=copy
ipcam_garage_fixed:
- ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch01_0#video=h264#audio=copy
ipcam_soggiorno_ptz:
- ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch00_0#video=h264#audio=copy
ipcam_soggiorno_fixed:
- ffmpeg:rtsp://xxxxxx:[email protected]:554/live/ch01_0#video=h264#audio=copy
cameras:
ipcam_garage_ptz:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/ipcam_garage_ptz
roles:
- detect
# ... other config ...
ipcam_soggiorno_ptz:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/ipcam_soggiorno_ptz
roles:
- detect
# ... other config ...Do not list Summary:
📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
@inkeep |
Beta Was this translation helpful? Give feedback.
-
|
Snapshots are only saved in the Review tab if a tracked object event occurs (e.g., a detected person) and snapshots are enabled for that camera(1). If you only see snapshots in the Face Library and not in Review, it means Frigate is detecting faces and saving images for face training, but object tracking events are not generating snapshots for review. Check these points:
If detection is working (you see people detected), but no review snapshots are saved:
To summarize:
If you want to save snapshots for tracked people in Review, ensure your config has: cameras:
ipcam_soggiorno_ptz:
snapshots:
enabled: true
# other options...
detect:
enabled: true
# other options...
objects:
track:
- person📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Your config for detection is correct as written. In the camera block, the detect:
width: 960
height: 540
fps: 2is valid and detection will be enabled for that camera unless you explicitly set You do not need to add If you are not seeing detection events or snapshots:
Regarding your use of OpenVINO with Summary:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
@inkeep |
Beta Was this translation helpful? Give feedback.
-
|
@inkeep |
Beta Was this translation helpful? Give feedback.
-
|
@inkeep What do you think about it? |
Beta Was this translation helpful? Give feedback.
-
|
The 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.






Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem you are having
Hi,
it's normal that I see this buffering circle in the Home Assistant dashboard?
https://github.com/user-attachments/assets/0d0f3797-5e5c-435f-9420-f7971d969eb6
I'm using Advanced Camera Card with this yaml:
First card:
Second card:
Frigate Addon and Integration are in installed on Home Assistant. All the system run on a Geekom air12 with Intel n150.
Both ipcam have 2 camera. This is the model: https://it.aliexpress.com/item/1005005860139385.html
My configuration is to use the fixed camera only for streaming, anche PTZ only for detect.
I was unable to make PTZ Control working.
Version
0.16.1-e664cb2
Frigate config file
Relevant Frigate log output
Relevant go2rtc log output
Frigate stats
No response
Operating system
Home Assistant OS
Install method
Home Assistant Add-on
docker-compose file or Docker CLI command
Sorry, I don't know where to find it...Object Detector
OpenVino
Screenshots of the Frigate UI's System metrics pages
Any other information that may be helpful
No response
Beta Was this translation helpful? Give feedback.
All reactions