Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 61 additions & 3 deletions docs/docs/configuration/hardware_acceleration_video.md
Original file line number Diff line number Diff line change
Expand Up @@ -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** <CommunityBadge />

Expand Down Expand Up @@ -298,11 +305,11 @@ Navigate to <NavPath path="Settings > Global configuration > FFmpeg" /> and set
<TabItem value="yaml">

```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
```
Expand Down Expand Up @@ -347,6 +354,57 @@ 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 and Frigate releases up to 0.17.x (bundled with FFmpeg 5)**, enabling **H.265 (HEVC) hardware decoding** with may cause **green or blank live-view previews** and **object detection to stop working correctly**.
Comment thread
NickM-27 marked this conversation as resolved.
Outdated
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 and Frigate up to 0.17.2**, as well as **Home Assistant OS 17.x**, 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
Expand Down
10 changes: 7 additions & 3 deletions docs/docs/frigate/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://amzn.to/3a2mH0P" target="_blank" rel="nofollow noopener sponsored">this</a> (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

Expand Down