diff --git a/docs/docs/configuration/hardware_acceleration_video.md b/docs/docs/configuration/hardware_acceleration_video.md index b9312c327f..f00dde8f4b 100644 --- a/docs/docs/configuration/hardware_acceleration_video.md +++ b/docs/docs/configuration/hardware_acceleration_video.md @@ -33,7 +33,14 @@ Frigate supports presets for optimal hardware accelerated video decoding: **Raspberry Pi 3/4** -- [Raspberry Pi](#raspberry-pi-34): Frigate can utilize the media engine in the Raspberry Pi 3 and 4 to slightly accelerate video decoding. +- [Raspberry Pi 3/4](#raspberry-pi-34): Frigate can utilize the media engine in the Raspberry Pi 3 and 4 to slightly accelerate video decoding. + + - **Raspberry Pi 3:** H.264 only + - **Raspberry Pi 4:** H.264 and H.265 (HEVC) + +**Raspberry Pi 5** + +- [Raspberry Pi 5](#raspberry-pi-5): Hardware decoding is only available for H.265 (HEVC) streams. H.264 streams are decoded in software on the CPU. **Nvidia Jetson** @@ -298,11 +305,11 @@ Navigate to and set ```yaml -# if you want to decode a h264 stream +# if you want to decode a h264 stream on Raspberry Pi 3/4: ffmpeg: hwaccel_args: preset-rpi-64-h264 -# if you want to decode a h265 (hevc) stream +# if you want to decode a h265 (hevc) stream on Raspberry Pi 4: ffmpeg: hwaccel_args: preset-rpi-64-h265 ``` @@ -347,6 +354,56 @@ Or map in all the `/dev/video*` devices. ::: +## Raspberry Pi 5 + +H.265 (HEVC) hardware decoding can be enabled globally or per camera by configuring Frigate as follows: + +```yaml +ffmpeg: + hwaccel_args: -hwaccel drm +``` + +:::note + +If running Frigate through Docker, you either need to run in privileged mode or map the required video and media devices into the container. + +```yaml +services: + frigate: + devices: + - /dev/media0:/dev/media0 + - /dev/media1:/dev/media1 + - /dev/media2:/dev/media2 + - /dev/video19:/dev/video19 +``` + +Device numbers may vary between Raspberry Pi OS releases and kernel versions. +The Raspberry Pi 5 HEVC decoder devices can be identified with: + +```bash +v4l2-ctl --list-devices +``` + +::: + +:::warning Known issues + +On some configurations, particularly **RPi Trixie OS with Linux kernel 6.18**, enabling **H.265 (HEVC) hardware decoding** may cause **green or blank live-view previews** and **object detection to stop working correctly**. Similar reports have also been observed on **Home Assistant OS 18.x**, which uses the **Linux 6.18 kernel series**. + +The latest known configuration reported to work reliably is **RPi Bookworm OS with Linux kernel 6.12**, where HEVC hardware decoding has been reported to work correctly without causing the issues described above. + +::: + +:::note + +If you encounter errors such as 'cannot allocate memory' or 'alloc failed', increase the **CMA** allocation in the **Raspberry Pi OS configuration** by editing '/boot/firmware/config.txt' and reboot the system to take effect: + +```bash +dtoverlay=vc4-kms-v3d,cma-512 +``` + +::: + # Community Supported ## NVIDIA Jetson diff --git a/docs/docs/frigate/installation.md b/docs/docs/frigate/installation.md index 14c85ec4f3..3a46d2cd8c 100644 --- a/docs/docs/frigate/installation.md +++ b/docs/docs/frigate/installation.md @@ -114,11 +114,15 @@ services: 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 +### Raspberry Pi 3/4/5 -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). +By default, the Raspberry Pi 3/4 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.com/documentation/computers/legacy_config_txt.html#legacy-memory-options). -Additionally, the USB Coral draws a considerable amount of power. If using any other USB devices such as an SSD, you will experience instability due to the Pi not providing enough power to USB devices. You will need to purchase an external USB hub with its own power supply. Some have reported success with this (affiliate link). +Raspberry Pi 5 does not allocate GPU memory on behalf of the OS, so the above settings have no effect. + +Hardware acceleration support differs between Raspberry Pi generations, and Raspberry Pi 3/4 and Raspberry Pi 5 require different configuration steps. See the [Hardware Acceleration](https://docs.frigate.video/configuration/hardware_acceleration_video/) section of the Frigate documentation for the recommended Raspberry Pi FFmpeg presets and configuration examples. + +Additionally, USB peripherals such as external hard drives, USB Coral TPUs, and other accessories can significantly increase the total power consumption of a Raspberry Pi system. Insufficient power delivery may result in instability, unexpected reboots, USB device disconnects, and other issues. You may need to purchase an external USB hub with its own power supply. Some users have reported success with [this](https://amzn.to/3a2mH0P) (affiliate link). ### Hailo-8