From 5d038b5c759b97f925b7b73cdfaf521e9e63cde2 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 26 Oct 2025 05:39:09 -0600 Subject: [PATCH 01/17] Update PWA requirements and add usage section (#20562) Added VPN as a secure context option for PWA installation and included a usage section. --- docs/docs/configuration/pwa.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/configuration/pwa.md b/docs/docs/configuration/pwa.md index fd1aae554..fbcbdff62 100644 --- a/docs/docs/configuration/pwa.md +++ b/docs/docs/configuration/pwa.md @@ -11,7 +11,7 @@ This adds features including the ability to deep link directly into the app. In order to install Frigate as a PWA, the following requirements must be met: -- Frigate must be accessed via a secure context (localhost, secure https, etc.) +- Frigate must be accessed via a secure context (localhost, secure https, VPN, etc.) - On Android, Firefox, Chrome, Edge, Opera, and Samsung Internet Browser all support installing PWAs. - On iOS 16.4 and later, PWAs can be installed from the Share menu in Safari, Chrome, Edge, Firefox, and Orion. @@ -22,3 +22,7 @@ Installation varies slightly based on the device that is being used: - Desktop: Use the install button typically found in right edge of the address bar - Android: Use the `Install as App` button in the more options menu for Chrome, and the `Add app to Home screen` button for Firefox - iOS: Use the `Add to Homescreen` button in the share menu + +## Usage + +Once setup, the Frigate app can be used wherever it has access to Frigate. This means it can be setup as local-only, VPN-only, or fully accessible depending on your needs. From 6fd7f862f51bdd2efc0634d6db7b92ca75547fbb Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 26 Oct 2025 05:56:01 -0600 Subject: [PATCH 02/17] Update coral docs / links (#20674) * Revise GPU and AI accelerator recommendations Updated hardware recommendations for AI acceleration. * Revise PCIe Coral driver installation instructions Updated instructions for PCIe Coral driver installation. * Revise Coral driver installation instructions Updated driver installation instructions for PCIe and M.2 versions of Google Coral. * Change PCIe Coral driver link in getting_started.md Updated the link for PCIe Coral driver instructions. * Change PCIe Coral driver link in installation guide Updated the link for PCIe Coral driver instructions. * Update Coral TPU recommendation in hardware documentation Added a warning about the Coral TPU's recommendation status for new Frigate installations and suggested alternatives. --- README.md | 2 +- docs/docs/frigate/hardware.md | 8 +++++++- docs/docs/frigate/installation.md | 2 +- docs/docs/guides/getting_started.md | 2 +- docs/docs/troubleshooting/edgetpu.md | 3 +-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 35e8cb7e9..825a62884 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A complete and local NVR designed for [Home Assistant](https://www.home-assistant.io) with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras. -Use of a GPU or AI accelerator such as a [Google Coral](https://coral.ai/products/) or [Hailo](https://hailo.ai/) is highly recommended. AI accelerators will outperform even the best CPUs with very little overhead. +Use of a GPU, Integrated GPU, or AI accelerator such as a [Hailo](https://hailo.ai/) is highly recommended. Dedicated hardware will outperform even the best CPUs with very little overhead. - Tight integration with Home Assistant via a [custom component](https://github.com/blakeblackshear/frigate-hass-integration) - Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary diff --git a/docs/docs/frigate/hardware.md b/docs/docs/frigate/hardware.md index fcb98573f..61c3df712 100644 --- a/docs/docs/frigate/hardware.md +++ b/docs/docs/frigate/hardware.md @@ -104,10 +104,16 @@ In real-world deployments, even with multiple cameras running concurrently, Frig ### Google Coral TPU +:::warning + +The Coral is no longer recommended for new Frigate installations, except in deployments with particularly low power requirements or hardware incapable of utilizing alternative AI accelerators for object detection. Instead, we suggest using one of the numerous other supported object detectors. Frigate will continue to provide support for the Coral TPU for as long as practicably possible given its still one of the most power-efficient devices for executing object detection models. + +::: + Frigate supports both the USB and M.2 versions of the Google Coral. - The USB version is compatible with the widest variety of hardware and does not require a driver on the host machine. However, it does lack the automatic throttling features of the other versions. -- The PCIe and M.2 versions require installation of a driver on the host. Follow the instructions for your version from https://coral.ai +- The PCIe and M.2 versions require installation of a driver on the host. https://github.com/jnicolson/gasket-builder should be used. A single Coral can handle many cameras using the default model and will be sufficient for the majority of users. You can calculate the maximum performance of your Coral based on the inference speed reported by Frigate. With an inference speed of 10, your Coral will top out at `1000/10=100`, or 100 frames per second. If your detection fps is regularly getting close to that, you should first consider tuning motion masks. If those are already properly configured, a second Coral may be needed. diff --git a/docs/docs/frigate/installation.md b/docs/docs/frigate/installation.md index 88decf7c9..ecd15ef61 100644 --- a/docs/docs/frigate/installation.md +++ b/docs/docs/frigate/installation.md @@ -200,7 +200,7 @@ services: shm_size: "512mb" # update for your cameras based on calculation above devices: - /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions - - /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux + - /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://github.com/jnicolson/gasket-builder - /dev/video11:/dev/video11 # For Raspberry Pi 4B - /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware volumes: diff --git a/docs/docs/guides/getting_started.md b/docs/docs/guides/getting_started.md index 89176ad4b..3b07d8d5b 100644 --- a/docs/docs/guides/getting_started.md +++ b/docs/docs/guides/getting_started.md @@ -202,7 +202,7 @@ services: ... devices: - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions - - /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux + - /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://github.com/jnicolson/gasket-builder ... ``` diff --git a/docs/docs/troubleshooting/edgetpu.md b/docs/docs/troubleshooting/edgetpu.md index f5cb3587f..af94a3d84 100644 --- a/docs/docs/troubleshooting/edgetpu.md +++ b/docs/docs/troubleshooting/edgetpu.md @@ -68,8 +68,7 @@ The USB Coral can become stuck and need to be restarted, this can happen for a n The most common reason for the PCIe Coral not being detected is that the driver has not been installed. This process varies based on what OS and kernel that is being run. -- In most cases [the Coral docs](https://coral.ai/docs/m2/get-started/#2-install-the-pcie-driver-and-edge-tpu-runtime) show how to install the driver for the PCIe based Coral. -- For some newer Linux distros (for example, Ubuntu 22.04+), https://github.com/jnicolson/gasket-builder can be used to build and install the latest version of the driver. +- In most cases https://github.com/jnicolson/gasket-builder can be used to build and install the latest version of the driver. ## Attempting to load TPU as pci & Fatal Python error: Illegal instruction From 17d2bc240ade44a655a7ed3d0952794f1efbf391 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 4 Nov 2025 09:56:28 -0700 Subject: [PATCH 03/17] Update recommended hardware to list more models (#20777) * Update recommended hardware to list more models * Update hardware.md with new Intel models and links --- docs/docs/frigate/hardware.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/docs/frigate/hardware.md b/docs/docs/frigate/hardware.md index 61c3df712..3298a5910 100644 --- a/docs/docs/frigate/hardware.md +++ b/docs/docs/frigate/hardware.md @@ -36,9 +36,11 @@ If the EQ13 is out of stock, the link below may take you to a suggested alternat ::: -| Name | Coral Inference Speed | Coral Compatibility | Notes | -| ------------------------------------------------------------------------------------------------------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------- | -| Beelink EQ13 (Amazon) | 5-10ms | USB | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. | +| Name | Capabilities | Notes | +| ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------- | +| Beelink EQ13 (Amazon) | Can run object detection on several 1080p cameras with low-medium activity | Dual gigabit NICs for easy isolated camera network. | +| Intel 1120p ([Amazon](https://www.amazon.com/Beelink-i3-1220P-Computer-Display-Gigabit/dp/B0DDCKT9YP) | Can handle a large number of 1080p cameras with high activity | | +| Intel 125H ([Amazon](https://www.amazon.com/MINISFORUM-Pro-125H-Barebone-Computer-HDMI2-1/dp/B0FH21FSZM) | Can handle a significant number of 1080p cameras with high activity | Includes NPU for more efficient detection in 0.17+ | ## Detectors From 5cf2ae0121b60a97fc66d6f77fef0c254f39d3e1 Mon Sep 17 00:00:00 2001 From: GuoQing Liu <842607283@qq.com> Date: Wed, 5 Nov 2025 20:23:45 +0800 Subject: [PATCH 04/17] docs: remove webrtc not support H.265 tips (#20769) --- docs/docs/configuration/live.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/live.md b/docs/docs/configuration/live.md index 11339d584..93c795d2f 100644 --- a/docs/docs/configuration/live.md +++ b/docs/docs/configuration/live.md @@ -15,7 +15,7 @@ The jsmpeg live view will use more browser and client GPU resources. Using go2rt | ------ | ------------------------------------- | ---------- | ---------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | jsmpeg | same as `detect -> fps`, capped at 10 | 720p | no | no | Resolution is configurable, but go2rtc is recommended if you want higher resolutions and better frame rates. jsmpeg is Frigate's default without go2rtc configured. | | mse | native | native | yes (depends on audio codec) | yes | iPhone requires iOS 17.1+, Firefox is h.264 only. This is Frigate's default when go2rtc is configured. | -| webrtc | native | native | yes (depends on audio codec) | yes | Requires extra configuration, doesn't support h.265. Frigate attempts to use WebRTC when MSE fails or when using a camera's two-way talk feature. | +| webrtc | native | native | yes (depends on audio codec) | yes | Requires extra configuration. Frigate attempts to use WebRTC when MSE fails or when using a camera's two-way talk feature. | ### Camera Settings Recommendations @@ -127,7 +127,8 @@ WebRTC works by creating a TCP or UDP connection on port `8555`. However, it req ``` - For access through Tailscale, the Frigate system's Tailscale IP must be added as a WebRTC candidate. Tailscale IPs all start with `100.`, and are reserved within the `100.64.0.0/10` CIDR block. -- Note that WebRTC does not support H.265. + +- Note that some browsers may not support H.265 (HEVC). You can check your browser's current version for H.265 compatibility [here](https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#codecs-madness). :::tip From 3620ef27dba9225e361d028d85a8ca7d49950767 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 8 Nov 2025 12:21:15 -0700 Subject: [PATCH 05/17] Update hailo installation instructions (#20847) * Update hailo docs installation * Adjust section separation --- docs/docs/frigate/installation.md | 109 ++++++++++++++++++++++++++++-- 1 file changed, 103 insertions(+), 6 deletions(-) diff --git a/docs/docs/frigate/installation.md b/docs/docs/frigate/installation.md index ecd15ef61..ce8a28b13 100644 --- a/docs/docs/frigate/installation.md +++ b/docs/docs/frigate/installation.md @@ -94,6 +94,10 @@ $ python -c 'print("{:.2f}MB".format(((1280 * 720 * 1.5 * 20 + 270480) / 1048576 The shm size cannot be set per container for Home Assistant add-ons. However, this is probably not required since by default Home Assistant Supervisor allocates `/dev/shm` with half the size of your total memory. If your machine has 8GB of memory, chances are that Frigate will have access to up to 4GB without any additional configuration. +## Extra Steps for Specific Hardware + +The following sections contain additional setup steps that are only required if you are using specific hardware. If you are not using any of these hardware types, you can skip to the [Docker](#docker) installation section. + ### Raspberry Pi 3/4 By default, the Raspberry Pi limits the amount of memory available to the GPU. In order to use ffmpeg hardware acceleration, you must increase the available memory by setting `gpu_mem` to the maximum recommended value in `config.txt` as described in the [official docs](https://www.raspberrypi.org/documentation/computers/config_txt.html#memory-options). @@ -106,14 +110,107 @@ The Hailo-8 and Hailo-8L AI accelerators are available in both M.2 and HAT form #### Installation -For Raspberry Pi 5 users with the AI Kit, installation is straightforward. Simply follow this [guide](https://www.raspberrypi.com/documentation/accessories/ai-kit.html#ai-kit-installation) to install the driver and software. +:::warning -For other installations, follow these steps for installation: +The Raspberry Pi kernel includes an older version of the Hailo driver that is incompatible with Frigate. You **must** follow the installation steps below to install the correct driver version, and you **must** disable the built-in kernel driver as described in step 1. -1. Install the driver from the [Hailo GitHub repository](https://github.com/hailo-ai/hailort-drivers). A convenient script for Linux is available to clone the repository, build the driver, and install it. -2. Copy or download [this script](https://github.com/blakeblackshear/frigate/blob/dev/docker/hailo8l/user_installation.sh). -3. Ensure it has execution permissions with `sudo chmod +x user_installation.sh` -4. Run the script with `./user_installation.sh` +::: + +1. **Disable the built-in Hailo driver (Raspberry Pi only)**: + + :::note + + If you are **not** using a Raspberry Pi, skip this step and proceed directly to step 2. + + ::: + + If you are using a Raspberry Pi, you need to blacklist the built-in kernel Hailo driver to prevent conflicts. First, check if the driver is currently loaded: + + ```bash + lsmod | grep hailo + ``` + + If it shows `hailo_pci`, unload it: + + ```bash + sudo rmmod hailo_pci + ``` + + Now blacklist the driver to prevent it from loading on boot: + + ```bash + echo "blacklist hailo_pci" | sudo tee /etc/modprobe.d/blacklist-hailo_pci.conf + ``` + + Update initramfs to ensure the blacklist takes effect: + + ```bash + sudo update-initramfs -u + ``` + + Reboot your Raspberry Pi: + + ```bash + sudo reboot + ``` + + After rebooting, verify the built-in driver is not loaded: + + ```bash + lsmod | grep hailo + ``` + + This command should return no results. If it still shows `hailo_pci`, the blacklist did not take effect properly and you may need to check for other Hailo packages installed via apt that are loading the driver. + +2. **Run the installation script**: + + Download the installation script: + + ```bash + wget https://raw.githubusercontent.com/blakeblackshear/frigate/dev/docker/hailo8l/user_installation.sh + ``` + + Make it executable: + + ```bash + sudo chmod +x user_installation.sh + ``` + + Run the script: + + ```bash + ./user_installation.sh + ``` + + The script will: + + - Install necessary build dependencies + - Clone and build the Hailo driver from the official repository + - Install the driver + - Download and install the required firmware + - Set up udev rules + +3. **Reboot your system**: + + After the script completes successfully, reboot to load the firmware: + + ```bash + sudo reboot + ``` + +4. **Verify the installation**: + + After rebooting, verify that the Hailo device is available: + + ```bash + ls -l /dev/hailo0 + ``` + + You should see the device listed. You can also verify the driver is loaded: + + ```bash + lsmod | grep hailo_pci + ``` #### Setup From 9589c5fc24cb47cc08f4c6ca8d0d43fbc17d9359 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 18 Nov 2025 19:15:38 -0600 Subject: [PATCH 06/17] Fix rf-detr heading (#20963) The link earlier in the file was referencing "#downloading-rf-detr-model" --- docs/docs/configuration/object_detectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md index e0faaf7fc..b930f72fb 100644 --- a/docs/docs/configuration/object_detectors.md +++ b/docs/docs/configuration/object_detectors.md @@ -1002,7 +1002,7 @@ COPY --from=build /dfine/output/dfine_${MODEL_SIZE}_obj2coco.onnx /dfine-${MODEL EOF ``` -### Download RF-DETR Model +### Downloading RF-DETR Model RF-DETR can be exported as ONNX by running the command below. You can copy and paste the whole thing to your terminal and execute, altering `MODEL_SIZE=Nano` in the first line to `Nano`, `Small`, or `Medium` size. From 914ff4f1e5c2a15e93c8b61d317c9e5ffa141ae3 Mon Sep 17 00:00:00 2001 From: h-leth Date: Sat, 22 Nov 2025 19:41:13 +0100 Subject: [PATCH 07/17] add comment about unifi g5 and newer cams (#21003) --- docs/docs/configuration/camera_specific.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/docs/configuration/camera_specific.md b/docs/docs/configuration/camera_specific.md index 334e3682b..608cf3a09 100644 --- a/docs/docs/configuration/camera_specific.md +++ b/docs/docs/configuration/camera_specific.md @@ -227,6 +227,12 @@ cameras: ### Unifi Protect Cameras +:::note + +Unifi G5s cameras and newer need a Unifi Protect server to enable rtsps stream, it's not posible to enable it in standalone mode. + +::: + Unifi protect cameras require the rtspx stream to be used with go2rtc. To utilize a Unifi protect camera, modify the rtsps link to begin with rtspx. Additionally, remove the "?enableSrtp" from the end of the Unifi link. From 592c245dcd25919e7d39bdae2462847c6323850f Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 26 Nov 2025 07:27:16 -0600 Subject: [PATCH 08/17] Fixes (#21061) * require admin role to delete users * explicitly prevent deletion of admin user * Recordings playback fixes * Remove nvidia pyindex * Update version --------- Co-authored-by: Nicolas Mowen --- Makefile | 2 +- docker/main/requirements.txt | 1 - frigate/api/auth.py | 10 +- web/src/components/player/HlsVideoPlayer.tsx | 4 +- .../player/dynamic/DynamicVideoController.ts | 41 +++---- .../player/dynamic/DynamicVideoPlayer.tsx | 107 ++++++++++-------- web/src/utils/videoUtil.ts | 54 +++++++++ 7 files changed, 137 insertions(+), 82 deletions(-) diff --git a/Makefile b/Makefile index fa692b681..04eee68d5 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ default_target: local COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1) -VERSION = 0.16.2 +VERSION = 0.16.3 IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) BOARDS= #Initialized empty diff --git a/docker/main/requirements.txt b/docker/main/requirements.txt index 3ae420d07..f1ba7d9ad 100644 --- a/docker/main/requirements.txt +++ b/docker/main/requirements.txt @@ -1,2 +1 @@ scikit-build == 0.18.* -nvidia-pyindex diff --git a/frigate/api/auth.py b/frigate/api/auth.py index 9459c4ac8..95586e955 100644 --- a/frigate/api/auth.py +++ b/frigate/api/auth.py @@ -447,8 +447,14 @@ def create_user( return JSONResponse(content={"username": body.username}) -@router.delete("/users/{username}") -def delete_user(username: str): +@router.delete("/users/{username}", dependencies=[Depends(require_role(["admin"]))]) +def delete_user(request: Request, username: str): + # Prevent deletion of the built-in admin user + if username == "admin": + return JSONResponse( + content={"message": "Cannot delete admin user"}, status_code=403 + ) + User.delete_by_id(username) return JSONResponse(content={"success": True}) diff --git a/web/src/components/player/HlsVideoPlayer.tsx b/web/src/components/player/HlsVideoPlayer.tsx index 4b1bfe5ef..38896f842 100644 --- a/web/src/components/player/HlsVideoPlayer.tsx +++ b/web/src/components/player/HlsVideoPlayer.tsx @@ -6,7 +6,7 @@ import { useState, } from "react"; import Hls from "hls.js"; -import { isAndroid, isDesktop, isMobile } from "react-device-detect"; +import { isDesktop, isMobile } from "react-device-detect"; import { TransformComponent, TransformWrapper } from "react-zoom-pan-pinch"; import VideoControls from "./VideoControls"; import { VideoResolutionType } from "@/types/live"; @@ -21,7 +21,7 @@ import { ASPECT_VERTICAL_LAYOUT, RecordingPlayerError } from "@/types/record"; import { useTranslation } from "react-i18next"; // Android native hls does not seek correctly -const USE_NATIVE_HLS = !isAndroid; +const USE_NATIVE_HLS = false; const HLS_MIME_TYPE = "application/vnd.apple.mpegurl" as const; const unsupportedErrorCodes = [ MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED, diff --git a/web/src/components/player/dynamic/DynamicVideoController.ts b/web/src/components/player/dynamic/DynamicVideoController.ts index 0683481c6..b68191e16 100644 --- a/web/src/components/player/dynamic/DynamicVideoController.ts +++ b/web/src/components/player/dynamic/DynamicVideoController.ts @@ -2,7 +2,10 @@ import { Recording } from "@/types/record"; import { DynamicPlayback } from "@/types/playback"; import { PreviewController } from "../PreviewPlayer"; import { TimeRange, ObjectLifecycleSequence } from "@/types/timeline"; -import { calculateInpointOffset } from "@/utils/videoUtil"; +import { + calculateInpointOffset, + calculateSeekPosition, +} from "@/utils/videoUtil"; type PlayerMode = "playback" | "scrubbing"; @@ -68,38 +71,20 @@ export class DynamicVideoController { return; } - if ( - this.recordings.length == 0 || - time < this.recordings[0].start_time || - time > this.recordings[this.recordings.length - 1].end_time - ) { - this.setNoRecording(true); - return; - } - if (this.playerMode != "playback") { this.playerMode = "playback"; } - let seekSeconds = 0; - (this.recordings || []).every((segment) => { - // if the next segment is past the desired time, stop calculating - if (segment.start_time > time) { - return false; - } + const seekSeconds = calculateSeekPosition( + time, + this.recordings, + this.inpointOffset, + ); - if (segment.end_time < time) { - seekSeconds += segment.end_time - segment.start_time; - return true; - } - - seekSeconds += - segment.end_time - segment.start_time - (segment.end_time - time); - return true; - }); - - // adjust for HLS inpoint offset - seekSeconds -= this.inpointOffset; + if (seekSeconds === undefined) { + this.setNoRecording(true); + return; + } if (seekSeconds != 0) { this.playerController.currentTime = seekSeconds; diff --git a/web/src/components/player/dynamic/DynamicVideoPlayer.tsx b/web/src/components/player/dynamic/DynamicVideoPlayer.tsx index 836203ca7..5967fc6dc 100644 --- a/web/src/components/player/dynamic/DynamicVideoPlayer.tsx +++ b/web/src/components/player/dynamic/DynamicVideoPlayer.tsx @@ -13,7 +13,10 @@ import { VideoResolutionType } from "@/types/live"; import axios from "axios"; import { cn } from "@/lib/utils"; import { useTranslation } from "react-i18next"; -import { calculateInpointOffset } from "@/utils/videoUtil"; +import { + calculateInpointOffset, + calculateSeekPosition, +} from "@/utils/videoUtil"; import { isFirefox } from "react-device-detect"; /** @@ -99,10 +102,10 @@ export default function DynamicVideoPlayer({ const [isLoading, setIsLoading] = useState(false); const [isBuffering, setIsBuffering] = useState(false); const [loadingTimeout, setLoadingTimeout] = useState(); - const [source, setSource] = useState({ - playlist: `${apiHost}vod/${camera}/start/${timeRange.after}/end/${timeRange.before}/master.m3u8`, - startPosition: startTimestamp ? timeRange.after - startTimestamp : 0, - }); + + // Don't set source until recordings load - we need accurate startPosition + // to avoid hls.js clamping to video end when startPosition exceeds duration + const [source, setSource] = useState(undefined); // start at correct time @@ -174,7 +177,7 @@ export default function DynamicVideoPlayer({ ); useEffect(() => { - if (!controller || !recordings?.length) { + if (!recordings?.length) { if (recordings?.length == 0) { setNoRecording(true); } @@ -182,10 +185,6 @@ export default function DynamicVideoPlayer({ return; } - if (playerRef.current) { - playerRef.current.autoplay = !isScrubbing; - } - let startPosition = undefined; if (startTimestamp) { @@ -193,14 +192,12 @@ export default function DynamicVideoPlayer({ recordingParams.after, (recordings || [])[0], ); - const idealStartPosition = Math.max( - 0, - startTimestamp - timeRange.after - inpointOffset, - ); - if (idealStartPosition >= recordings[0].start_time - timeRange.after) { - startPosition = idealStartPosition; - } + startPosition = calculateSeekPosition( + startTimestamp, + recordings, + inpointOffset, + ); } setSource({ @@ -208,6 +205,18 @@ export default function DynamicVideoPlayer({ startPosition, }); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [recordings]); + + useEffect(() => { + if (!controller || !recordings?.length) { + return; + } + + if (playerRef.current) { + playerRef.current.autoplay = !isScrubbing; + } + setLoadingTimeout(setTimeout(() => setIsLoading(true), 1000)); controller.newPlayback({ @@ -215,7 +224,7 @@ export default function DynamicVideoPlayer({ timeRange, }); - // we only want this to change when recordings update + // we only want this to change when controller or recordings update // eslint-disable-next-line react-hooks/exhaustive-deps }, [controller, recordings]); @@ -253,38 +262,40 @@ export default function DynamicVideoPlayer({ return ( <> - { - if (isScrubbing) { - playerRef.current?.pause(); - } + {source && ( + { + if (isScrubbing) { + playerRef.current?.pause(); + } - if (loadingTimeout) { - clearTimeout(loadingTimeout); - } + if (loadingTimeout) { + clearTimeout(loadingTimeout); + } - setNoRecording(false); - }} - setFullResolution={setFullResolution} - onUploadFrame={onUploadFrameToPlus} - toggleFullscreen={toggleFullscreen} - onError={(error) => { - if (error == "stalled" && !isScrubbing) { - setIsBuffering(true); - } - }} - /> + setNoRecording(false); + }} + setFullResolution={setFullResolution} + onUploadFrame={onUploadFrameToPlus} + toggleFullscreen={toggleFullscreen} + onError={(error) => { + if (error == "stalled" && !isScrubbing) { + setIsBuffering(true); + } + }} + /> + )} recordings[recordings.length - 1].end_time + ) { + return undefined; + } + + let seekSeconds = 0; + + (recordings || []).every((segment) => { + // if the next segment is past the desired time, stop calculating + if (segment.start_time > timestamp) { + return false; + } + + if (segment.end_time < timestamp) { + // Add the full duration of this segment + seekSeconds += segment.end_time - segment.start_time; + return true; + } + + // We're in this segment - calculate position within it + seekSeconds += + segment.end_time - segment.start_time - (segment.end_time - timestamp); + return true; + }); + + // Adjust for HLS inpoint offset + seekSeconds -= inpointOffset; + + return seekSeconds >= 0 ? seekSeconds : undefined; +} From 9f95a5f31f1f895da3aed757ddfd8ea9de808ca6 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 1 Dec 2025 08:21:27 -0600 Subject: [PATCH 09/17] version bump in docs (#21111) --- docs/docs/frigate/updating.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/frigate/updating.md b/docs/docs/frigate/updating.md index d95ae83c5..a164f9296 100644 --- a/docs/docs/frigate/updating.md +++ b/docs/docs/frigate/updating.md @@ -5,7 +5,7 @@ title: Updating # Updating Frigate -The current stable version of Frigate is **0.16.2**. The release notes and any breaking changes for this version can be found on the [Frigate GitHub releases page](https://github.com/blakeblackshear/frigate/releases/tag/v0.16.2). +The current stable version of Frigate is **0.16.3**. The release notes and any breaking changes for this version can be found on the [Frigate GitHub releases page](https://github.com/blakeblackshear/frigate/releases/tag/v0.16.3). Keeping Frigate up to date ensures you benefit from the latest features, performance improvements, and bug fixes. The update process varies slightly depending on your installation method (Docker, Home Assistant Addon, etc.). Below are instructions for the most common setups. @@ -33,21 +33,21 @@ If you’re running Frigate via Docker (recommended method), follow these steps: 2. **Update and Pull the Latest Image**: - If using Docker Compose: - - Edit your `docker-compose.yml` file to specify the desired version tag (e.g., `0.16.2` instead of `0.15.2`). For example: + - Edit your `docker-compose.yml` file to specify the desired version tag (e.g., `0.16.3` instead of `0.15.2`). For example: ```yaml services: frigate: - image: ghcr.io/blakeblackshear/frigate:0.16.2 + image: ghcr.io/blakeblackshear/frigate:0.16.3 ``` - Then pull the image: ```bash - docker pull ghcr.io/blakeblackshear/frigate:0.16.2 + docker pull ghcr.io/blakeblackshear/frigate:0.16.3 ``` - **Note for `stable` Tag Users**: If your `docker-compose.yml` uses the `stable` tag (e.g., `ghcr.io/blakeblackshear/frigate:stable`), you don’t need to update the tag manually. The `stable` tag always points to the latest stable release after pulling. - If using `docker run`: - - Pull the image with the appropriate tag (e.g., `0.16.2`, `0.16.2-tensorrt`, or `stable`): + - Pull the image with the appropriate tag (e.g., `0.16.3`, `0.16.3-tensorrt`, or `stable`): ```bash - docker pull ghcr.io/blakeblackshear/frigate:0.16.2 + docker pull ghcr.io/blakeblackshear/frigate:0.16.3 ``` 3. **Start the Container**: From a43d294bd15da93821ca9587151ac768408ab70f Mon Sep 17 00:00:00 2001 From: munit85 <49924807+munit85@users.noreply.github.com> Date: Mon, 1 Dec 2025 09:47:01 -0800 Subject: [PATCH 10/17] Add Axis Q-6155E camera configuration details (#21105) * Add Axis Q-6155E camera configuration details Added Axis Q-6155E camera details with ONVIF service port information. * Update Axis Q-6155E ONVIF autotracking support details Added the reason for autotracking not working --- docs/docs/configuration/cameras.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index d6a8915c3..2805f1b81 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -98,6 +98,7 @@ This list of working and non-working PTZ cameras is based on user feedback. | Amcrest IP4M-S2112EW-AI | ✅ | ❌ | FOV relative movement not supported. | | Amcrest IP5M-1190EW | ✅ | ❌ | ONVIF Port: 80. FOV relative movement not supported. | | Annke CZ504 | ✅ | ✅ | Annke support provide specific firmware ([V5.7.1 build 250227](https://github.com/pierrepinon/annke_cz504/raw/refs/heads/main/digicap_V5-7-1_build_250227.dav)) to fix issue with ONVIF "TranslationSpaceFov" | +| Axis Q-6155E | ✅ | ❌ | ONVIF service port: 80; Camera does not support MoveStatus. | Ctronics PTZ | ✅ | ❌ | | | Dahua | ✅ | ✅ | Some low-end Dahuas (lite series, among others) have been reported to not support autotracking | | Dahua DH-SD2A500HB | ✅ | ❌ | | From e47e82f4be2d45d97c082c12781a3f172d2a5d75 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 2 Dec 2025 08:15:12 -0600 Subject: [PATCH 11/17] Pin onnx in rfdetr model generation command (#21127) * pin onnx in rfdetr model generation command * Apply suggestion from @NickM-27 Co-authored-by: Nicolas Mowen --------- Co-authored-by: Nicolas Mowen --- docs/docs/configuration/object_detectors.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md index b930f72fb..33c95adbf 100644 --- a/docs/docs/configuration/object_detectors.md +++ b/docs/docs/configuration/object_detectors.md @@ -1007,12 +1007,12 @@ EOF RF-DETR can be exported as ONNX by running the command below. You can copy and paste the whole thing to your terminal and execute, altering `MODEL_SIZE=Nano` in the first line to `Nano`, `Small`, or `Medium` size. ```sh -docker build . --build-arg MODEL_SIZE=Nano --output . -f- <<'EOF' +docker build . --build-arg MODEL_SIZE=Nano --rm --output . -f- <<'EOF' FROM python:3.11 AS build RUN apt-get update && apt-get install --no-install-recommends -y libgl1 && rm -rf /var/lib/apt/lists/* COPY --from=ghcr.io/astral-sh/uv:0.8.0 /uv /bin/ WORKDIR /rfdetr -RUN uv pip install --system rfdetr[onnxexport] torch==2.8.0 onnxscript +RUN uv pip install --system rfdetr[onnxexport] torch==2.8.0 onnx==1.19.1 onnxscript ARG MODEL_SIZE RUN python3 -c "from rfdetr import RFDETR${MODEL_SIZE}; x = RFDETR${MODEL_SIZE}(resolution=320); x.export(simplify=True)" FROM scratch From 7167cf57c57e24475d19f773e10f0db26d0958be Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 2 Dec 2025 08:20:50 -0600 Subject: [PATCH 12/17] pin cryptography version to fix vapid issues (#21126) --- docker/main/requirements-wheels.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/main/requirements-wheels.txt b/docker/main/requirements-wheels.txt index 2764eca43..dce124897 100644 --- a/docker/main/requirements-wheels.txt +++ b/docker/main/requirements-wheels.txt @@ -8,6 +8,7 @@ fastapi == 0.115.* uvicorn == 0.30.* slowapi == 0.1.* joserfc == 1.0.* +cryptography == 44.0.* pathvalidate == 3.2.* markupsafe == 3.0.* python-multipart == 0.0.12 From 90344540b30529d7d2d38e304577418281965b5a Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 6 Dec 2025 09:16:23 -0600 Subject: [PATCH 13/17] Fix jetson build (#21173) --- docker/main/build_pysqlite3.sh | 12 +++++++++--- docker/tensorrt/Dockerfile.arm64 | 5 +++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docker/main/build_pysqlite3.sh b/docker/main/build_pysqlite3.sh index c84c6fcf7..14d0cde44 100755 --- a/docker/main/build_pysqlite3.sh +++ b/docker/main/build_pysqlite3.sh @@ -5,21 +5,27 @@ set -euxo pipefail SQLITE3_VERSION="3.46.1" PYSQLITE3_VERSION="0.5.3" +# Install libsqlite3-dev if not present (needed for some base images like NVIDIA TensorRT) +if ! dpkg -l | grep -q libsqlite3-dev; then + echo "Installing libsqlite3-dev for compilation..." + apt-get update && apt-get install -y libsqlite3-dev && rm -rf /var/lib/apt/lists/* +fi + # Fetch the pre-built sqlite amalgamation instead of building from source if [[ ! -d "sqlite" ]]; then mkdir sqlite cd sqlite - + # Download the pre-built amalgamation from sqlite.org # For SQLite 3.46.1, the amalgamation version is 3460100 SQLITE_AMALGAMATION_VERSION="3460100" - + wget https://www.sqlite.org/2024/sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}.zip -O sqlite-amalgamation.zip unzip sqlite-amalgamation.zip mv sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}/* . rmdir sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION} rm sqlite-amalgamation.zip - + cd ../ fi diff --git a/docker/tensorrt/Dockerfile.arm64 b/docker/tensorrt/Dockerfile.arm64 index 0ae9c38e9..dd3c5de5e 100644 --- a/docker/tensorrt/Dockerfile.arm64 +++ b/docker/tensorrt/Dockerfile.arm64 @@ -112,7 +112,7 @@ RUN apt-get update \ && apt-get install -y protobuf-compiler libprotobuf-dev \ && rm -rf /var/lib/apt/lists/* RUN --mount=type=bind,source=docker/tensorrt/requirements-models-arm64.txt,target=/requirements-tensorrt-models.txt \ - pip3 wheel --wheel-dir=/trt-model-wheels -r /requirements-tensorrt-models.txt + pip3 wheel --wheel-dir=/trt-model-wheels --no-deps -r /requirements-tensorrt-models.txt FROM wget AS jetson-ffmpeg ARG DEBIAN_FRONTEND @@ -145,7 +145,8 @@ COPY --from=trt-wheels /etc/TENSORRT_VER /etc/TENSORRT_VER RUN --mount=type=bind,from=trt-wheels,source=/trt-wheels,target=/deps/trt-wheels \ --mount=type=bind,from=trt-model-wheels,source=/trt-model-wheels,target=/deps/trt-model-wheels \ pip3 uninstall -y onnxruntime \ - && pip3 install -U /deps/trt-wheels/*.whl /deps/trt-model-wheels/*.whl \ + && pip3 install -U /deps/trt-wheels/*.whl \ + && pip3 install -U /deps/trt-model-wheels/*.whl \ && ldconfig WORKDIR /opt/frigate/ From c3f596327e82f973706c48684f32f8a0ce5fa4fc Mon Sep 17 00:00:00 2001 From: GuoQing Liu <842607283@qq.com> Date: Sun, 7 Dec 2025 22:38:41 +0800 Subject: [PATCH 14/17] docs: fix the missing quotes in the Reolink example within the documentation (#21178) --- docs/docs/configuration/camera_specific.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/camera_specific.md b/docs/docs/configuration/camera_specific.md index 608cf3a09..89f8f08cf 100644 --- a/docs/docs/configuration/camera_specific.md +++ b/docs/docs/configuration/camera_specific.md @@ -188,10 +188,10 @@ go2rtc: # example for connectin to a Reolink camera that supports two way talk your_reolink_camera_twt: - "ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password#video=copy#audio=copy#audio=opus" - - "rtsp://username:password@reolink_ip/Preview_01_sub + - "rtsp://username:password@reolink_ip/Preview_01_sub" your_reolink_camera_twt_sub: - "ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=username&password=password" - - "rtsp://username:password@reolink_ip/Preview_01_sub + - "rtsp://username:password@reolink_ip/Preview_01_sub" # example for connecting to a Reolink NVR your_reolink_camera_via_nvr: - "ffmpeg:http://reolink_nvr_ip/flv?port=1935&app=bcs&stream=channel3_main.bcs&user=username&password=password" # channel numbers are 0-15 From 1de7519d1a2a3a0381f95eae084805d954355065 Mon Sep 17 00:00:00 2001 From: User873902 <92607223+User873902@users.noreply.github.com> Date: Wed, 10 Dec 2025 12:33:10 -0500 Subject: [PATCH 15/17] Update camera_specific.md for Wyze Cameras (Thingino) (#21221) * Update camera_specific.md Wyze Cameras alternative firmware considerations. * Update docs/docs/configuration/camera_specific.md Co-authored-by: Nicolas Mowen * Update docs/docs/configuration/camera_specific.md * Update camera_specific.md Moved Wyze Camera section --------- Co-authored-by: Nicolas Mowen --- docs/docs/configuration/camera_specific.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/camera_specific.md b/docs/docs/configuration/camera_specific.md index 89f8f08cf..75fda5b88 100644 --- a/docs/docs/configuration/camera_specific.md +++ b/docs/docs/configuration/camera_specific.md @@ -258,6 +258,10 @@ ffmpeg: TP-Link VIGI cameras need some adjustments to the main stream settings on the camera itself to avoid issues. The stream needs to be configured as `H264` with `Smart Coding` set to `off`. Without these settings you may have problems when trying to watch recorded footage. For example Firefox will stop playback after a few seconds and show the following error message: `The media playback was aborted due to a corruption problem or because the media used features your browser did not support.`. +### Wyze Wireless Cameras + +Some community members have found better performance on Wyze cameras by using an alternative firmware known as [Thingino](https://thingino.com/). + ## USB Cameras (aka Webcams) To use a USB camera (webcam) with Frigate, the recommendation is to use go2rtc's [FFmpeg Device](https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-ffmpeg-device) support: @@ -290,5 +294,3 @@ cameras: width: 1024 height: 576 ``` - - From 0a293aebabf0be8d278d40370e40fb2b3a1f3ee0 Mon Sep 17 00:00:00 2001 From: GuoQing Liu <842607283@qq.com> Date: Thu, 11 Dec 2025 21:31:52 +0800 Subject: [PATCH 16/17] docs: update OpenVINO D-FINE configuration default device (#21231) * docs: remove OpenVINO D-FINE configuration device * docs: change D-FINE model detectors default device --- docs/docs/configuration/object_detectors.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md index 33c95adbf..7016bf4b6 100644 --- a/docs/docs/configuration/object_detectors.md +++ b/docs/docs/configuration/object_detectors.md @@ -395,7 +395,7 @@ After placing the downloaded onnx model in your config/model_cache folder, you c detectors: ov: type: openvino - device: GPU + device: CPU model: model_type: dfine @@ -431,10 +431,10 @@ When using Docker Compose: ```yaml services: frigate: ---- -devices: - - /dev/dri - - /dev/kfd + ... + devices: + - /dev/dri + - /dev/kfd ``` For reference on recommended settings see [running ROCm/pytorch in Docker](https://rocm.docs.amd.com/projects/install-on-linux/en/develop/how-to/3rd-party/pytorch-install.html#using-docker-with-pytorch-pre-installed). @@ -462,9 +462,9 @@ When using Docker Compose: ```yaml services: frigate: - -environment: - HSA_OVERRIDE_GFX_VERSION: "10.0.0" + ... + environment: + HSA_OVERRIDE_GFX_VERSION: "10.0.0" ``` Figuring out what version you need can be complicated as you can't tell the chipset name and driver from the AMD brand name. From 1d5c2466a8adda927424d982ec77a06dc2c7b02d Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 12 Dec 2025 13:25:22 -0700 Subject: [PATCH 17/17] Update HIKVISION camera link in hardware documentation (#21256) --- docs/docs/frigate/hardware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/frigate/hardware.md b/docs/docs/frigate/hardware.md index 3298a5910..f5577a780 100644 --- a/docs/docs/frigate/hardware.md +++ b/docs/docs/frigate/hardware.md @@ -18,7 +18,7 @@ Here are some of the cameras I recommend: - Loryta(Dahua) IPC-T549M-ALED-S3 (affiliate link) - Loryta(Dahua) IPC-T54IR-AS (affiliate link) - Amcrest IP5M-T1179EW-AI-V3 (affiliate link) -- HIKVISION DS-2CD2387G2P-LSU/SL ColorVu 8MP Panoramic Turret IP Camera (affiliate link) +- HIKVISION DS-2CD2387G2P-LSU/SL ColorVu 8MP Panoramic Turret IP Camera (affiliate link) I may earn a small commission for my endorsement, recommendation, testimonial, or link to any products or services from this website.