From b6b10e753fa69dd5983761b0063c1227b7bcf997 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 6 Feb 2023 06:54:01 -0700 Subject: [PATCH] Update docs for H265 (#5398) * Update hwaccel docs for h265 * Update camera specific * Update hardware_acceleration.md * Update hardware_acceleration.md --- .../configuration/hardware_acceleration.md | 18 +++++++++++++++++- docs/docs/frigate/camera_setup.md | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/hardware_acceleration.md b/docs/docs/configuration/hardware_acceleration.md index 3d1dcff30..c01bf74eb 100644 --- a/docs/docs/configuration/hardware_acceleration.md +++ b/docs/docs/configuration/hardware_acceleration.md @@ -15,23 +15,39 @@ ffmpeg: hwaccel_args: preset-rpi-64-h264 ``` -### Intel-based CPUs (<10th Generation) via Quicksync +### Intel-based CPUs (<10th Generation) via VAAPI + +VAAPI supports automatic profile selection so it will work automatically with both H.264 and H.265 streams. VAAPI is recommended for all generations of Intel-based CPUs if QSV does not work. ```yaml ffmpeg: hwaccel_args: preset-vaapi ``` + **NOTICE**: With some of the processors, like the J4125, the default driver `iHD` doesn't seem to work correctly for hardware acceleration. 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 frigate.yml for HA OS users](advanced.md#environment_vars). ### Intel-based CPUs (>=10th Generation) via Quicksync +QSV must be set specifically based on the video encoding of the stream. + +#### H.264 streams + ```yaml ffmpeg: hwaccel_args: preset-intel-qsv-h264 ``` +#### H.265 streams + +```yaml +ffmpeg: + hwaccel_args: preset-intel-qsv-h265 +``` + ### AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver +VAAPI supports automatic profile selection so it will work automatically with both H.264 and H.265 streams. + **Note:** You also need to set `LIBVA_DRIVER_NAME=radeonsi` as an environment variable on the container. ```yaml diff --git a/docs/docs/frigate/camera_setup.md b/docs/docs/frigate/camera_setup.md index d1aeba087..0e53b4809 100644 --- a/docs/docs/frigate/camera_setup.md +++ b/docs/docs/frigate/camera_setup.md @@ -3,7 +3,7 @@ id: camera_setup title: Camera setup --- -Cameras configured to output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and Home Assistant. H.265 has better compression, but far less compatibility. Safari and Edge are the only browsers able to play H.265. Ideally, cameras should be configured directly for the desired resolutions and frame rates you want to use in Frigate. Reducing frame rates within Frigate will waste CPU resources decoding extra frames that are discarded. There are three different goals that you want to tune your stream configurations around. +Cameras configured to output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and Home Assistant. H.265 has better compression, but less compatibility. Chrome 108+, Safari and Edge are the only browsers able to play H.265 and only support a limited number of H.265 profiles. Ideally, cameras should be configured directly for the desired resolutions and frame rates you want to use in Frigate. Reducing frame rates within Frigate will waste CPU resources decoding extra frames that are discarded. There are three different goals that you want to tune your stream configurations around. - **Detection**: This is the only stream that Frigate will decode for processing. Also, this is the stream where snapshots will be generated from. The resolution for detection should be tuned for the size of the objects you want to detect. See [Choosing a detect resolution](#choosing-a-detect-resolution) for more details. The recommended frame rate is 5fps, but may need to be higher for very fast moving objects. Higher resolutions and frame rates will drive higher CPU usage on your server.