Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Fix and clarify which /dev/video devices to use with Raspberry Pi #9509

Merged
merged 3 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 30 additions & 7 deletions docs/docs/configuration/hardware_acceleration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ It is recommended to update your configuration to enable hardware accelerated de

## Raspberry Pi 3/4

Ensure you increase the allocated RAM for your GPU to at least 128 (raspi-config > Performance Options > GPU Memory).
**NOTICE**: If you are using the addon, you may need to turn off `Protection mode` for hardware acceleration.
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 addon, 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
Expand All @@ -26,16 +26,39 @@ ffmpeg:

:::note

If running Frigate in docker, you either need to run in priviliged mode or be sure to map the /dev/video1x devices to Frigate
If running Frigate in Docker, you either need to run in privileged mode or
map the `/dev/video*` devices to Frigate. With Docker compose add:

```yaml
services:
frigate:
...
devices:
- /dev/video11:/dev/video11
```

Or with `docker run`:

```bash
docker run -d \
--name frigate \
...
--device /dev/video10 \
ghcr.io/blakeblackshear/frigate:stable
--name frigate \
...
--device /dev/video11 \
ghcr.io/blakeblackshear/frigate:stable
```

`/dev/video11` is the correct device (on Raspberry Pi 4B). You can check
by running the following and looking for `H264`:

```bash
for d in /dev/video*; do
echo -e "---\n$d"
v4l2-ctl --list-formats-ext -d $d
done
```

Or map in all the `/dev/video*` devices.

:::

## Intel-based CPUs
Expand Down
7 changes: 4 additions & 3 deletions docs/docs/frigate/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ services:
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "64mb" # 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/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
- /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/video11:/dev/video11 # For Raspberry Pi 4B
- /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /path/to/your/config:/config
Expand Down