diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3204244a6..05a75ca5f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,17 +1,17 @@ +_Please read the [contributing guidelines](https://github.com/blakeblackshear/frigate/blob/dev/CONTRIBUTING.md) before submitting a PR._ + ## Proposed change - ## Type of change - [ ] Dependency upgrade @@ -26,6 +26,44 @@ - This PR fixes or closes issue: fixes # - This PR is related to issue: +## For new features + + + +- [ ] There is an existing feature request or discussion with community interest for this change. + - Link: + +## AI disclosure + + + +- [ ] No AI tools were used in this PR. +- [ ] AI tools were used in this PR. Details below: + +**AI tool(s) used** (e.g., Claude, Copilot, ChatGPT, Cursor): + +**How AI was used** (e.g., code generation, code review, debugging, documentation): + +**Extent of AI involvement** (e.g., generated entire implementation, assisted with specific functions, suggested fixes): + +**Human oversight**: Describe what manual review, testing, and validation you performed on the AI-generated portions. + ## Checklist Debug) to ensure that `face` is being detected along with `person`. - You may need to adjust the `min_score` for the `face` object if faces are not being detected. If you are **not** using a Frigate+ or `face` detecting model: - - Check your `detect` stream resolution and ensure it is sufficiently high enough to capture face details on `person` objects. - You may need to lower your `detection_threshold` if faces are not being detected. 2. Any detected faces will then be _recognized_. - - Make sure you have trained at least one face per the recommendations above. - Adjust `recognition_threshold` settings per the suggestions [above](#advanced-configuration). diff --git a/docs/docs/configuration/genai/config.md b/docs/docs/configuration/genai/config.md index 67bbb9fe4..4026158b7 100644 --- a/docs/docs/configuration/genai/config.md +++ b/docs/docs/configuration/genai/config.md @@ -187,7 +187,7 @@ genai: To use a different Gemini-compatible API endpoint, set the `provider_options` with the `base_url` key to your provider's API URL. For example: -``` +```yaml {4,5} genai: provider: gemini ... @@ -220,6 +220,29 @@ genai: model: gpt-4o ``` +:::note + +To use a different OpenAI-compatible API endpoint, set the `OPENAI_BASE_URL` environment variable to your provider's API URL. + +::: + +:::tip + +For OpenAI-compatible servers (such as llama.cpp) that don't expose the configured context size in the API response, you can manually specify the context size in `provider_options`: + +```yaml {5,6} +genai: + provider: openai + base_url: http://your-llama-server + model: your-model-name + provider_options: + context_size: 8192 # Specify the configured context size +``` + +This ensures Frigate uses the correct context window size when generating prompts. + +::: + ### Azure OpenAI Microsoft offers several vision models through Azure OpenAI. A subscription is required. diff --git a/docs/docs/configuration/genai/review_summaries.md b/docs/docs/configuration/genai/review_summaries.md index c6f5e53ec..8045f5aa3 100644 --- a/docs/docs/configuration/genai/review_summaries.md +++ b/docs/docs/configuration/genai/review_summaries.md @@ -80,6 +80,7 @@ By default, review summaries use preview images (cached preview frames) which ha review: genai: enabled: true + # highlight-next-line image_source: recordings # Options: "preview" (default) or "recordings" ``` @@ -104,7 +105,7 @@ If recordings are not available for a given time period, the system will automat Along with the concern of suspicious activity or immediate threat, you may have concerns such as animals in your garden or a gate being left open. These concerns can be configured so that the review summaries will make note of them if the activity requires additional review. For example: -```yaml +```yaml {4,5} review: genai: enabled: true @@ -116,7 +117,7 @@ review: By default, review summaries are generated in English. You can configure Frigate to generate summaries in your preferred language by setting the `preferred_language` option: -```yaml +```yaml {4} review: genai: enabled: true diff --git a/docs/docs/configuration/hardware_acceleration_video.md b/docs/docs/configuration/hardware_acceleration_video.md index bbbf5a640..318e1b23e 100644 --- a/docs/docs/configuration/hardware_acceleration_video.md +++ b/docs/docs/configuration/hardware_acceleration_video.md @@ -10,6 +10,7 @@ import CommunityBadge from '@site/src/components/CommunityBadge'; It is highly recommended to use an integrated or discrete GPU for hardware acceleration video decoding in Frigate. Some types of hardware acceleration are detected and used automatically, but you may need to update your configuration to enable hardware accelerated decoding in ffmpeg. To verify that hardware acceleration is working: + - Check the logs: A message will either say that hardware acceleration was automatically detected, or there will be a warning that no hardware acceleration was automatically detected - If hardware acceleration is specified in the config, verification can be done by ensuring the logs are free from errors. There is no CPU fallback for hardware acceleration. @@ -67,7 +68,7 @@ Frigate can utilize most Intel integrated GPUs and Arc GPUs to accelerate video :::note -The default driver is `iHD`. You may need to change the driver to `i965` by adding the following environment variable `LIBVA_DRIVER_NAME=i965` to your docker-compose file or [in the `config.yml` for HA Add-on users](advanced.md#environment_vars). +The default driver is `iHD`. You may need to change the driver to `i965` by adding the following environment variable `LIBVA_DRIVER_NAME=i965` to your docker-compose file or [in the `config.yml` for HA App users](advanced.md#environment_vars). See [The Intel Docs](https://www.intel.com/content/www/us/en/support/articles/000005505/processors.html) to figure out what generation your CPU is. @@ -116,12 +117,13 @@ services: frigate: ... image: ghcr.io/blakeblackshear/frigate:stable + # highlight-next-line privileged: true ``` ##### Docker Run CLI - Privileged -```bash +```bash {4} docker run -d \ --name frigate \ ... @@ -135,7 +137,7 @@ Only recent versions of Docker support the `CAP_PERFMON` capability. You can tes ##### Docker Compose - CAP_PERFMON -```yaml +```yaml {5,6} services: frigate: ... @@ -146,7 +148,7 @@ services: ##### Docker Run CLI - CAP_PERFMON -```bash +```bash {4} docker run -d \ --name frigate \ ... @@ -188,7 +190,7 @@ Frigate can utilize modern AMD integrated GPUs and AMD GPUs to accelerate video ### Configuring Radeon Driver -You need to change the driver to `radeonsi` by adding the following environment variable `LIBVA_DRIVER_NAME=radeonsi` to your docker-compose file or [in the `config.yml` for HA Add-on users](advanced.md#environment_vars). +You need to change the driver to `radeonsi` by adding the following environment variable `LIBVA_DRIVER_NAME=radeonsi` to your docker-compose file or [in the `config.yml` for HA App users](advanced.md#environment_vars). ### Via VAAPI @@ -213,7 +215,7 @@ Additional configuration is needed for the Docker container to be able to access #### Docker Compose - Nvidia GPU -```yaml +```yaml {5-12} services: frigate: ... @@ -230,7 +232,7 @@ services: #### Docker Run CLI - Nvidia GPU -```bash +```bash {4} docker run -d \ --name frigate \ ... @@ -292,7 +294,7 @@ These instructions were originally based on the [Jellyfin documentation](https:/ ## Raspberry Pi 3/4 Ensure you increase the allocated RAM for your GPU to at least 128 (`raspi-config` > Performance Options > GPU Memory). -If you are using the HA Add-on, you may need to use the full access variant and turn off _Protection mode_ for hardware acceleration. +If you are using the HA App, you may need to use the full access variant and turn off _Protection mode_ for hardware acceleration. ```yaml # if you want to decode a h264 stream @@ -309,7 +311,7 @@ ffmpeg: If running Frigate through Docker, you either need to run in privileged mode or map the `/dev/video*` devices to Frigate. With Docker Compose add: -```yaml +```yaml {4-5} services: frigate: ... @@ -319,7 +321,7 @@ services: Or with `docker run`: -```bash +```bash {4} docker run -d \ --name frigate \ ... @@ -351,7 +353,7 @@ You will need to use the image with the nvidia container runtime: ### Docker Run CLI - Jetson -```bash +```bash {3} docker run -d \ ... --runtime nvidia @@ -360,7 +362,7 @@ docker run -d \ ### Docker Compose - Jetson -```yaml +```yaml {5} services: frigate: ... @@ -451,14 +453,14 @@ Restarting ffmpeg... you should try to uprade to FFmpeg 7. This can be done using this config option: -``` +```yaml ffmpeg: path: "7.0" ``` You can set this option globally to use FFmpeg 7 for all cameras or on camera level to use it only for specific cameras. Do not confuse this option with: -``` +```yaml cameras: name: ffmpeg: @@ -480,7 +482,7 @@ Make sure to follow the [Synaptics specific installation instructions](/frigate/ Add one of the following FFmpeg presets to your `config.yml` to enable hardware video processing: -```yaml +```yaml {2} ffmpeg: hwaccel_args: -c:v h264_v4l2m2m input_args: preset-rtsp-restream diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index ac5247000..be546ca30 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -3,7 +3,7 @@ id: index title: Frigate Configuration --- -For Home Assistant Add-on installations, the config file should be at `/addon_configs//config.yml`, where `` is specific to the variant of the Frigate Add-on you are running. See the list of directories [here](#accessing-add-on-config-dir). +For Home Assistant App installations, the config file should be at `/addon_configs//config.yml`, where `` is specific to the variant of the Frigate App you are running. See the list of directories [here](#accessing-app-config-dir). For all other installation types, the config file should be mapped to `/config/config.yml` inside the container. @@ -25,11 +25,11 @@ cameras: - detect ``` -## Accessing the Home Assistant Add-on configuration directory {#accessing-add-on-config-dir} +## Accessing the Home Assistant App configuration directory {#accessing-app-config-dir} -When running Frigate through the HA Add-on, the Frigate `/config` directory is mapped to `/addon_configs/` in the host, where `` is specific to the variant of the Frigate Add-on you are running. +When running Frigate through the HA App, the Frigate `/config` directory is mapped to `/addon_configs/` in the host, where `` is specific to the variant of the Frigate App you are running. -| Add-on Variant | Configuration directory | +| App Variant | Configuration directory | | -------------------------- | ----------------------------------------- | | Frigate | `/addon_configs/ccab4aaf_frigate` | | Frigate (Full Access) | `/addon_configs/ccab4aaf_frigate-fa` | @@ -38,11 +38,11 @@ When running Frigate through the HA Add-on, the Frigate `/config` directory is m **Whenever you see `/config` in the documentation, it refers to this directory.** -If for example you are running the standard Add-on variant and use the [VS Code Add-on](https://github.com/hassio-addons/addon-vscode) to browse your files, you can click _File_ > _Open folder..._ and navigate to `/addon_configs/ccab4aaf_frigate` to access the Frigate `/config` directory and edit the `config.yaml` file. You can also use the built-in file editor in the Frigate UI to edit the configuration file. +If for example you are running the standard App variant and use the [VS Code App](https://github.com/hassio-addons/addon-vscode) to browse your files, you can click _File_ > _Open folder..._ and navigate to `/addon_configs/ccab4aaf_frigate` to access the Frigate `/config` directory and edit the `config.yaml` file. You can also use the built-in file editor in the Frigate UI to edit the configuration file. ## VS Code Configuration Schema -VS Code supports JSON schemas for automatically validating configuration files. You can enable this feature by adding `# yaml-language-server: $schema=http://frigate_host:5000/api/config/schema.json` to the beginning of the configuration file. Replace `frigate_host` with the IP address or hostname of your Frigate server. If you're using both VS Code and Frigate as an Add-on, you should use `ccab4aaf-frigate` instead. Make sure to expose the internal unauthenticated port `5000` when accessing the config from VS Code on another machine. +VS Code supports JSON schemas for automatically validating configuration files. You can enable this feature by adding `# yaml-language-server: $schema=http://frigate_host:5000/api/config/schema.json` to the beginning of the configuration file. Replace `frigate_host` with the IP address or hostname of your Frigate server. If you're using both VS Code and Frigate as an App, you should use `ccab4aaf-frigate` instead. Make sure to expose the internal unauthenticated port `5000` when accessing the config from VS Code on another machine. ## Environment Variable Substitution @@ -50,6 +50,7 @@ Frigate supports the use of environment variables starting with `FRIGATE_` **onl ```yaml mqtt: + host: "{FRIGATE_MQTT_HOST}" user: "{FRIGATE_MQTT_USER}" password: "{FRIGATE_MQTT_PASSWORD}" ``` @@ -60,7 +61,7 @@ mqtt: ```yaml onvif: - host: 10.0.10.10 + host: "192.168.1.12" port: 8000 user: "{FRIGATE_RTSP_USER}" password: "{FRIGATE_RTSP_PASSWORD}" @@ -82,10 +83,10 @@ genai: Here are some common starter configuration examples. Refer to the [reference config](./reference.md) for detailed information about all the config values. -### Raspberry Pi Home Assistant Add-on with USB Coral +### Raspberry Pi Home Assistant App with USB Coral - Single camera with 720p, 5fps stream for detect -- MQTT connected to the Home Assistant Mosquitto Add-on +- MQTT connected to the Home Assistant Mosquitto App - Hardware acceleration for decoding video - USB Coral detector - Save all video with any detectable motion for 7 days regardless of whether any objects were detected or not diff --git a/docs/docs/configuration/license_plate_recognition.md b/docs/docs/configuration/license_plate_recognition.md index ac7942675..a44006b63 100644 --- a/docs/docs/configuration/license_plate_recognition.md +++ b/docs/docs/configuration/license_plate_recognition.md @@ -30,7 +30,7 @@ In the default mode, Frigate's LPR needs to first detect a `car` or `motorcycle` ## Minimum System Requirements -License plate recognition works by running AI models locally on your system. The YOLOv9 plate detector model and the OCR models ([PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)) are relatively lightweight and can run on your CPU or GPU, depending on your configuration. At least 4GB of RAM is required. +License plate recognition works by running AI models locally on your system. The YOLOv9 plate detector model and the OCR models ([PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)) are relatively lightweight and can run on your CPU or GPU, depending on your configuration. At least 4GB of RAM and a CPU with AVX + AVX2 instructions is required. ## Configuration @@ -43,7 +43,7 @@ lpr: Like other enrichments in Frigate, LPR **must be enabled globally** to use the feature. You should disable it for specific cameras at the camera level if you don't want to run LPR on cars on those cameras: -```yaml +```yaml {4,5} cameras: garage: ... @@ -375,7 +375,6 @@ Use `match_distance` to allow small character mismatches. Alternatively, define Start with ["Why isn't my license plate being detected and recognized?"](#why-isnt-my-license-plate-being-detected-and-recognized). If you are still having issues, work through these steps. 1. Start with a simplified LPR config. - - Remove or comment out everything in your LPR config, including `min_area`, `min_plate_length`, `format`, `known_plates`, or `enhancement` values so that the only values left are `enabled` and `debug_save_plates`. This will run LPR with Frigate's default values. ```yaml @@ -386,31 +385,28 @@ Start with ["Why isn't my license plate being detected and recognized?"](#why-is ``` 2. Enable debug logs to see exactly what Frigate is doing. - - Enable debug logs for LPR by adding `frigate.data_processing.common.license_plate: debug` to your `logger` configuration. These logs are _very_ verbose, so only keep this enabled when necessary. Restart Frigate after this change. ```yaml logger: default: info logs: + # highlight-next-line frigate.data_processing.common.license_plate: debug ``` 3. Ensure your plates are being _detected_. If you are using a Frigate+ or `license_plate` detecting model: - - Watch the debug view (Settings --> Debug) to ensure that `license_plate` is being detected. - View MQTT messages for `frigate/events` to verify detected plates. - You may need to adjust your `min_score` and/or `threshold` for the `license_plate` object if your plates are not being detected. If you are **not** using a Frigate+ or `license_plate` detecting model: - - Watch the debug logs for messages from the YOLOv9 plate detector. - You may need to adjust your `detection_threshold` if your plates are not being detected. 4. Ensure the characters on detected plates are being _recognized_. - - Enable `debug_save_plates` to save images of detected text on plates to the clips directory (`/media/frigate/clips/lpr`). Ensure these images are readable and the text is clear. - Watch the debug view to see plates recognized in real-time. For non-dedicated LPR cameras, the `car` or `motorcycle` label will change to the recognized plate when LPR is enabled and working. - Adjust `recognition_threshold` settings per the suggestions [above](#advanced-configuration). diff --git a/docs/docs/configuration/live.md b/docs/docs/configuration/live.md index 910cb69f1..8e7eff163 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. 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 @@ -77,7 +77,7 @@ Configure the `streams` option with a "friendly name" for your stream followed b Using Frigate's internal version of go2rtc is required to use this feature. You cannot specify paths in the `streams` configuration, only go2rtc stream names. -```yaml +```yaml {3,6,8,25-29} go2rtc: streams: test_cam: @@ -114,9 +114,9 @@ cameras: WebRTC works by creating a TCP or UDP connection on port `8555`. However, it requires additional configuration: - For external access, over the internet, setup your router to forward port `8555` to port `8555` on the Frigate device, for both TCP and UDP. -- For internal/local access, unless you are running through the HA Add-on, you will also need to set the WebRTC candidates list in the go2rtc config. For example, if `192.168.1.10` is the local IP of the device running Frigate: +- For internal/local access, unless you are running through the HA App, you will also need to set the WebRTC candidates list in the go2rtc config. For example, if `192.168.1.10` is the local IP of the device running Frigate: - ```yaml title="config.yml" + ```yaml title="config.yml" {4-7} go2rtc: streams: test_cam: ... @@ -128,13 +128,13 @@ 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 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). +- 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 -This extra configuration may not be required if Frigate has been installed as a Home Assistant Add-on, as Frigate uses the Supervisor's API to generate a WebRTC candidate. +This extra configuration may not be required if Frigate has been installed as a Home Assistant App, as Frigate uses the Supervisor's API to generate a WebRTC candidate. -However, it is recommended if issues occur to define the candidates manually. You should do this if the Frigate Add-on fails to generate a valid candidate. If an error occurs you will see some warnings like the below in the Add-on logs page during the initialization: +However, it is recommended if issues occur to define the candidates manually. You should do this if the Frigate App fails to generate a valid candidate. If an error occurs you will see some warnings like the below in the App logs page during the initialization: ```log [WARN] Failed to get IP address from supervisor @@ -154,7 +154,7 @@ If not running in host mode, port 8555 will need to be mapped for the container: docker-compose.yml -```yaml +```yaml {4-6} services: frigate: ... @@ -222,34 +222,28 @@ Note that disabling a camera through the config file (`enabled: False`) removes When your browser runs into problems playing back your camera streams, it will log short error messages to the browser console. They indicate playback, codec, or network issues on the client/browser side, not something server side with Frigate itself. Below are the common messages you may see and simple actions you can take to try to resolve them. - **startup** - - What it means: The player failed to initialize or connect to the live stream (network or startup error). - What to try: Reload the Live view or click _Reset_. Verify `go2rtc` is running and the camera stream is reachable. Try switching to a different stream from the Live UI dropdown (if available) or use a different browser. - Possible console messages from the player code: - - `Error opening MediaSource.` - `Browser reported a network error.` - `Max error count ${errorCount} exceeded.` (the numeric value will vary) - **mse-decode** - - What it means: The browser reported a decoding error while trying to play the stream, which usually is a result of a codec incompatibility or corrupted frames. - What to try: Check the browser console for the supported and negotiated codecs. Ensure your camera/restream is using H.264 video and AAC audio (these are the most compatible). If your camera uses a non-standard audio codec, configure `go2rtc` to transcode the stream to AAC. Try another browser (some browsers have stricter MSE/codec support) and, for iPhone, ensure you're on iOS 17.1 or newer. - Possible console messages from the player code: - - `Safari cannot open MediaSource.` - `Safari reported InvalidStateError.` - `Safari reported decoding errors.` - **stalled** - - What it means: Playback has stalled because the player has fallen too far behind live (extended buffering or no data arriving). - What to try: This is usually indicative of the browser struggling to decode too many high-resolution streams at once. Try selecting a lower-bandwidth stream (substream), reduce the number of live streams open, improve the network connection, or lower the camera resolution. Also check your camera's keyframe (I-frame) interval — shorter intervals make playback start and recover faster. You can also try increasing the timeout value in the UI pane of Frigate's settings. - Possible console messages from the player code: - - `Buffer time (10 seconds) exceeded, browser may not be playing media correctly.` - `Media playback has stalled after seconds due to insufficient buffering or a network interruption.` (the seconds value will vary) @@ -270,21 +264,18 @@ When your browser runs into problems playing back your camera streams, it will l If you are using continuous streaming or you are loading more than a few high resolution streams at once on the dashboard, your browser may struggle to begin playback of your streams before the timeout. Frigate always prioritizes showing a live stream as quickly as possible, even if it is a lower quality jsmpeg stream. You can use the "Reset" link/button to try loading your high resolution stream again. Errors in stream playback (e.g., connection failures, codec issues, or buffering timeouts) that cause the fallback to low bandwidth mode (jsmpeg) are logged to the browser console for easier debugging. These errors may include: - - Network issues (e.g., MSE or WebRTC network connection problems). - Unsupported codecs or stream formats (e.g., H.265 in WebRTC, which is not supported in some browsers). - Buffering timeouts or low bandwidth conditions causing fallback to jsmpeg. - Browser compatibility problems (e.g., iOS Safari limitations with MSE). To view browser console logs: - 1. Open the Frigate Live View in your browser. 2. Open the browser's Developer Tools (F12 or right-click > Inspect > Console tab). 3. Reproduce the error (e.g., load a problematic stream or simulate network issues). 4. Look for messages prefixed with the camera name. These logs help identify if the issue is player-specific (MSE vs. WebRTC) or related to camera configuration (e.g., go2rtc streams, codecs). If you see frequent errors: - - Verify your camera's H.264/AAC settings (see [Frigate's camera settings recommendations](#camera_settings_recommendations)). - Check go2rtc configuration for transcoding (e.g., audio to AAC/OPUS). - Test with a different stream via the UI dropdown (if `live -> streams` is configured). @@ -324,9 +315,7 @@ When your browser runs into problems playing back your camera streams, it will l To prevent this, make the `detect` stream match the go2rtc live stream's aspect ratio (resolution does not need to match, just the aspect ratio). You can either adjust the camera's output resolution or set the `width` and `height` values in your config's `detect` section to a resolution with an aspect ratio that matches. Example: Resolutions from two streams - - Mismatched (may cause aspect ratio switching on the dashboard): - - Live/go2rtc stream: 1920x1080 (16:9) - Detect stream: 640x352 (~1.82:1, not 16:9) diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md index 7edf9a5b1..c16d3f5dc 100644 --- a/docs/docs/configuration/object_detectors.md +++ b/docs/docs/configuration/object_detectors.md @@ -166,7 +166,7 @@ YOLOv9 models that are compiled for TensorFlow Lite and properly quantized are s :::tip -**Frigate+ Users:** Follow the [instructions](../integrations/plus#use-models) to set a model ID in your config file. +**Frigate+ Users:** Follow the [instructions](/integrations/plus#use-models) to set a model ID in your config file. ::: @@ -577,7 +577,7 @@ $ docker run --device=/dev/kfd --device=/dev/dri \ When using Docker Compose: -```yaml +```yaml {4-6} services: frigate: ... @@ -608,7 +608,7 @@ $ docker run -e HSA_OVERRIDE_GFX_VERSION=10.0.0 \ When using Docker Compose: -```yaml +```yaml {4-5} services: frigate: ... @@ -1514,7 +1514,8 @@ model: model_type: yolo-generic width: 320 height: 320 - tensor_format: bgr + input_dtype: int + input_pixel_format: bgr labelmap_path: /labelmap/coco-80.txt ``` diff --git a/docs/docs/configuration/profiles.md b/docs/docs/configuration/profiles.md new file mode 100644 index 000000000..ef0778e18 --- /dev/null +++ b/docs/docs/configuration/profiles.md @@ -0,0 +1,188 @@ +--- +id: profiles +title: Profiles +--- + +Profiles allow you to define named sets of camera configuration overrides that can be activated and deactivated at runtime without restarting Frigate. This is useful for scenarios like switching between "Home" and "Away" modes, daytime and nighttime configurations, or any situation where you want to quickly change how multiple cameras behave. + +## How Profiles Work + +Profiles operate as a two-level system: + +1. **Profile definitions** are declared at the top level of your config under `profiles`. Each definition has a machine name (the key) and a `friendly_name` for display in the UI. +2. **Camera profile overrides** are declared under each camera's `profiles` section, keyed by the profile name. Only the settings you want to change need to be specified — everything else is inherited from the camera's base configuration. + +When a profile is activated, Frigate merges each camera's profile overrides on top of its base config. When the profile is deactivated, all cameras revert to their original settings. Only one profile can be active at a time. + +:::info + +Profile changes are applied in-memory and take effect immediately — no restart is required. The active profile is persisted across Frigate restarts (stored in the `/config/.active_profile` file). + +::: + +## Configuration + +The easiest way to define profiles is to use the Frigate UI. Profiles can also be configured manually in your configuration file. + +### Using the UI + +To create and manage profiles from the UI, open **Settings**. From there you can: + +1. **Create a profile** — Navigate to **Profiles**. Click the **Add Profile** button, enter a name (and optionally a profile ID). +2. **Configure overrides** — Navigate to a camera configuration section (e.g. Motion detection, Record, Notifications). In the top right, two buttons will appear - choose a camera and a profile from the profile selector to edit overrides for that camera and section. Only the fields you change will be stored as overrides — fields that require a restart are hidden since profiles are applied at runtime. You can click the **Remove Profile Override** button +3. **Activate a profile** — Use the **Profiles** option in Frigate's main menu to choose a profile. Alternatively, in Settings, navigate to **Profiles**, then choose a profile in the Active Profile dropdown to activate it. The active profile is also shown in the status bar at the bottom of the screen on desktop browsers. +4. **Delete a profile** — Navigate to **Profiles**, then click the trash icon for a profile. This removes the profile definition and all camera overrides associated with it. + +### Defining Profiles in YAML + +First, define your profiles at the top level of your Frigate config. Every profile name referenced by a camera must be defined here. + +```yaml +profiles: + home: + friendly_name: Home + away: + friendly_name: Away + night: + friendly_name: Night Mode +``` + +### Camera Profile Overrides + +Under each camera, add a `profiles` section with overrides for each profile. You only need to include the settings you want to change. + +```yaml +cameras: + front_door: + ffmpeg: + inputs: + - path: rtsp://camera:554/stream + roles: + - detect + - record + detect: + enabled: true + record: + enabled: true + profiles: + away: + detect: + enabled: true + notifications: + enabled: true + objects: + track: + - person + - car + - package + review: + alerts: + labels: + - person + - car + - package + home: + detect: + enabled: true + notifications: + enabled: false + objects: + track: + - person +``` + +### Supported Override Sections + +The following camera configuration sections can be overridden in a profile: + +| Section | Description | +| ------------------ | ----------------------------------------- | +| `enabled` | Enable or disable the camera entirely | +| `audio` | Audio detection settings | +| `birdseye` | Birdseye view settings | +| `detect` | Object detection settings | +| `face_recognition` | Face recognition settings | +| `lpr` | License plate recognition settings | +| `motion` | Motion detection settings | +| `notifications` | Notification settings | +| `objects` | Object tracking and filter settings | +| `record` | Recording settings | +| `review` | Review alert and detection settings | +| `snapshots` | Snapshot settings | +| `zones` | Zone definitions (merged with base zones) | + +:::note + +Only the fields you explicitly set in a profile override are applied. All other fields retain their base configuration values. For zones, profile zones are merged with the camera's base zones — any zone defined in the profile will override or add to the base zones. + +::: + +## Activating Profiles + +Profiles can be activated and deactivated from the Frigate UI. Open the Settings cog and select **Profiles** from the submenu to see all defined profiles. From there you can activate any profile or deactivate the current one. The active profile is indicated in the UI so you always know which profile is in effect. + +## Example: Home / Away Setup + +A common use case is having different detection and notification settings based on whether you are home or away. + +```yaml +profiles: + home: + friendly_name: Home + away: + friendly_name: Away + +cameras: + front_door: + ffmpeg: + inputs: + - path: rtsp://camera:554/stream + roles: + - detect + - record + detect: + enabled: true + record: + enabled: true + notifications: + enabled: false + profiles: + away: + notifications: + enabled: true + review: + alerts: + labels: + - person + - car + home: + notifications: + enabled: false + + indoor_cam: + ffmpeg: + inputs: + - path: rtsp://camera:554/indoor + roles: + - detect + - record + detect: + enabled: false + record: + enabled: false + profiles: + away: + enabled: true + detect: + enabled: true + record: + enabled: true + home: + enabled: false +``` + +In this example: + +- **Away profile**: The front door camera enables notifications and tracks specific alert labels. The indoor camera is fully enabled with detection and recording. +- **Home profile**: The front door camera disables notifications. The indoor camera is completely disabled for privacy. +- **No profile active**: All cameras use their base configuration values. diff --git a/docs/docs/configuration/record.md b/docs/docs/configuration/record.md index eb5d736e4..afd26c641 100644 --- a/docs/docs/configuration/record.md +++ b/docs/docs/configuration/record.md @@ -130,7 +130,7 @@ When exporting a time-lapse the default speed-up is 25x with 30 FPS. This means To configure the speed-up factor, the frame rate and further custom settings, the configuration parameter `timelapse_args` can be used. The below configuration example would change the time-lapse speed to 60x (for fitting 1 hour of recording into 1 minute of time-lapse) with 25 FPS: -```yaml +```yaml {3-4} record: enabled: True export: @@ -162,6 +162,8 @@ Normal operation may leave small numbers of orphaned files until Frigate's sched The Maintenance pane in the Frigate UI or an API endpoint `POST /api/media/sync` can be used to trigger a media sync. When using the API, a job ID is returned and the operation continues on the server. Status can be checked with the `/api/media/sync/status/{job_id}` endpoint. +Setting `verbose: true` writes a detailed report of every orphaned file and database entry to `/config/media_sync/.txt`. For recordings, the report separates orphaned database entries (DB records whose files are missing from disk) from orphaned files (files on disk with no corresponding database record). + :::warning This operation uses considerable CPU resources and includes a safety threshold that aborts if more than 50% of files would be deleted. Only run when necessary. If you set `force: true` the safety threshold will be bypassed; do not use `force` unless you are certain the deletions are intended. diff --git a/docs/docs/configuration/reference.md b/docs/docs/configuration/reference.md index cac508195..c6ac207aa 100644 --- a/docs/docs/configuration/reference.md +++ b/docs/docs/configuration/reference.md @@ -16,6 +16,8 @@ mqtt: # Optional: Enable mqtt server (default: shown below) enabled: True # Required: host name + # NOTE: MQTT host can be specified with an environment variable or docker secrets that must begin with 'FRIGATE_'. + # e.g. host: '{FRIGATE_MQTT_HOST}' host: mqtt.server.com # Optional: port (default: shown below) port: 1883 @@ -616,13 +618,12 @@ record: # never stored, so setting the mode to "all" here won't bring them back. mode: motion -# Optional: Configuration for the jpg snapshots written to the clips directory for each tracked object +# Optional: Configuration for the snapshots written to the clips directory for each tracked object +# Timestamp, bounding_box, crop and height settings are applied by default to API requests for snapshots. # NOTE: Can be overridden at the camera level snapshots: - # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below) + # Optional: Enable writing snapshot images to /media/frigate/clips (default: shown below) enabled: False - # Optional: save a clean copy of the snapshot image (default: shown below) - clean_copy: True # Optional: print a timestamp on the snapshots (default: shown below) timestamp: False # Optional: draw bounding box on the snapshots (default: shown below) @@ -640,8 +641,8 @@ snapshots: # Optional: Per object retention days objects: person: 15 - # Optional: quality of the encoded jpeg, 0-100 (default: shown below) - quality: 70 + # Optional: quality of the encoded snapshot image, 0-100 (default: shown below) + quality: 60 # Optional: Configuration for semantic search capability semantic_search: @@ -950,6 +951,8 @@ cameras: onvif: # Required: host of the camera being connected to. # NOTE: HTTP is assumed by default; HTTPS is supported if you specify the scheme, ex: "https://0.0.0.0". + # NOTE: ONVIF user, and password can be specified with environment variables or docker secrets + # that must begin with 'FRIGATE_'. e.g. host: '{FRIGATE_ONVIF_USERNAME}' host: 0.0.0.0 # Optional: ONVIF port for device (default: shown below). port: 8000 @@ -1026,6 +1029,49 @@ cameras: actions: - notification + # Optional: Named config profiles with partial overrides that can be activated at runtime. + # NOTE: Profile names must be defined in the top-level 'profiles' section. + profiles: + # Required: name of the profile (must match a top-level profile definition) + away: + # Optional: Enable or disable the camera when this profile is active (default: not set, inherits base) + enabled: true + # Optional: Override audio settings + audio: + enabled: true + # Optional: Override birdseye settings + # birdseye: + # Optional: Override detect settings + detect: + enabled: true + # Optional: Override face_recognition settings + # face_recognition: + # Optional: Override lpr settings + # lpr: + # Optional: Override motion settings + # motion: + # Optional: Override notification settings + notifications: + enabled: true + # Optional: Override objects settings + objects: + track: + - person + - car + # Optional: Override record settings + record: + enabled: true + # Optional: Override review settings + review: + alerts: + labels: + - person + - car + # Optional: Override snapshot settings + # snapshots: + # Optional: Override or add zones (merged with base zones) + # zones: + # Optional ui: # Optional: Set a timezone to use in the UI (default: use browser local time) @@ -1092,4 +1138,14 @@ camera_groups: icon: LuCar # Required: index of this group order: 0 + +# Optional: Profile definitions for named config overrides +# NOTE: Profile names defined here can be referenced in camera profiles sections +profiles: + # Required: name of the profile (machine name used internally) + home: + # Required: display name shown in the UI + friendly_name: Home + away: + friendly_name: Away ``` diff --git a/docs/docs/configuration/restream.md b/docs/docs/configuration/restream.md index a3c11f2d0..ac3bcc503 100644 --- a/docs/docs/configuration/restream.md +++ b/docs/docs/configuration/restream.md @@ -34,7 +34,7 @@ To improve connection speed when using Birdseye via restream you can enable a sm The go2rtc restream can be secured with RTSP based username / password authentication. Ex: -```yaml +```yaml {2-4} go2rtc: rtsp: username: "admin" @@ -147,6 +147,7 @@ For example: ```yaml go2rtc: streams: + # highlight-error-line my_camera: rtsp://username:$@foo%@192.168.1.100 ``` @@ -155,6 +156,7 @@ becomes ```yaml go2rtc: streams: + # highlight-next-line my_camera: rtsp://username:$%40foo%25@192.168.1.100 ``` diff --git a/docs/docs/configuration/review.md b/docs/docs/configuration/review.md index 752c496a3..d8769749b 100644 --- a/docs/docs/configuration/review.md +++ b/docs/docs/configuration/review.md @@ -71,7 +71,7 @@ To exclude a specific camera from alerts or detections, simply provide an empty For example, to exclude objects on the camera _gatecamera_ from any detections, include this in your config: -```yaml +```yaml {3-5} cameras: gatecamera: review: diff --git a/docs/docs/configuration/semantic_search.md b/docs/docs/configuration/semantic_search.md index 4a880fd5c..4c646f79a 100644 --- a/docs/docs/configuration/semantic_search.md +++ b/docs/docs/configuration/semantic_search.md @@ -13,7 +13,7 @@ Semantic Search is accessed via the _Explore_ view in the Frigate UI. Semantic Search works by running a large AI model locally on your system. Small or underpowered systems like a Raspberry Pi will not run Semantic Search reliably or at all. -A minimum of 8GB of RAM is required to use Semantic Search. A GPU is not strictly required but will provide a significant performance increase over CPU-only systems. +A minimum of 8GB of RAM is required to use Semantic Search. A CPU with AVX + AVX2 instructions is required to run Semantic Search. A GPU is not strictly required but will provide a significant performance increase over CPU-only systems. For best performance, 16GB or more of RAM and a dedicated GPU are recommended. diff --git a/docs/docs/configuration/snapshots.md b/docs/docs/configuration/snapshots.md index 01c034a04..2f339b210 100644 --- a/docs/docs/configuration/snapshots.md +++ b/docs/docs/configuration/snapshots.md @@ -3,7 +3,7 @@ id: snapshots title: Snapshots --- -Frigate can save a snapshot image to `/media/frigate/clips` for each object that is detected named as `-.jpg`. They are also accessible [via the api](../integrations/api/event-snapshot-events-event-id-snapshot-jpg-get.api.mdx) +Frigate can save a snapshot image to `/media/frigate/clips` for each object that is detected named as `--clean.webp`. They are also accessible [via the api](../integrations/api/event-snapshot-events-event-id-snapshot-jpg-get.api.mdx) Snapshots are accessible in the UI in the Explore pane. This allows for quick submission to the Frigate+ service. @@ -13,21 +13,19 @@ Snapshots sent via MQTT are configured in the [config file](/configuration) unde ## Frame Selection -Frigate does not save every frame — it picks a single "best" frame for each tracked object and uses it for both the snapshot and clean copy. As the object is tracked across frames, Frigate continuously evaluates whether the current frame is better than the previous best based on detection confidence, object size, and the presence of key attributes like faces or license plates. Frames where the object touches the edge of the frame are deprioritized. The snapshot is written to disk once tracking ends using whichever frame was determined to be the best. +Frigate does not save every frame. It picks a single "best" frame for each tracked object based on detection confidence, object size, and the presence of key attributes like faces or license plates. Frames where the object touches the edge of the frame are deprioritized. That best frame is written to disk once tracking ends. MQTT snapshots are published more frequently — each time a better thumbnail frame is found during tracking, or when the current best image is older than `best_image_timeout` (default: 60s). These use their own annotation settings configured under `cameras -> your_camera -> mqtt`. -## Clean Copy +## Rendering -Frigate can produce up to two snapshot files per event, each used in different places: +Frigate stores a single clean snapshot on disk: -| Version | File | Annotations | Used by | -| --- | --- | --- | --- | -| **Regular snapshot** | `-.jpg` | Respects your `timestamp`, `bounding_box`, `crop`, and `height` settings | API (`/api/events//snapshot.jpg`), MQTT (`/