mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Docs: Fix and clarify which /dev/video devices to use with Raspberry Pi (#9509)
* Docs: Fix and clarify which /dev/video devices to use with Raspberry Pi * Update docs/docs/configuration/hardware_acceleration.md Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> * Update docs/docs/configuration/hardware_acceleration.md Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
		
							parent
							
								
									b5aaa6759a
								
							
						
					
					
						commit
						89f4db617a
					
				@ -11,8 +11,8 @@ It is recommended to update your configuration to enable hardware accelerated de
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## Raspberry Pi 3/4
 | 
					## Raspberry Pi 3/4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Ensure you increase the allocated RAM for your GPU to at least 128 (raspi-config > Performance Options > GPU Memory).
 | 
					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.
 | 
					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
 | 
					```yaml
 | 
				
			||||||
# if you want to decode a h264 stream
 | 
					# if you want to decode a h264 stream
 | 
				
			||||||
@ -26,16 +26,39 @@ ffmpeg:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
:::note
 | 
					:::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
 | 
					```yaml
 | 
				
			||||||
docker run -d \
 | 
					services:
 | 
				
			||||||
--name frigate \
 | 
					  frigate:
 | 
				
			||||||
...
 | 
					    ...
 | 
				
			||||||
--device /dev/video10 \
 | 
					    devices:
 | 
				
			||||||
ghcr.io/blakeblackshear/frigate:stable
 | 
					      - /dev/video11:/dev/video11
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Or with `docker run`:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					docker run -d \
 | 
				
			||||||
 | 
					  --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
 | 
					## Intel-based CPUs
 | 
				
			||||||
 | 
				
			|||||||
@ -98,9 +98,10 @@ services:
 | 
				
			|||||||
    image: ghcr.io/blakeblackshear/frigate:stable
 | 
					    image: ghcr.io/blakeblackshear/frigate:stable
 | 
				
			||||||
    shm_size: "64mb" # update for your cameras based on calculation above
 | 
					    shm_size: "64mb" # update for your cameras based on calculation above
 | 
				
			||||||
    devices:
 | 
					    devices:
 | 
				
			||||||
      - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
 | 
					      - /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/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/video11:/dev/video11  # For Raspberry Pi 4B
 | 
				
			||||||
 | 
					      - /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - /etc/localtime:/etc/localtime:ro
 | 
					      - /etc/localtime:/etc/localtime:ro
 | 
				
			||||||
      - /path/to/your/config:/config
 | 
					      - /path/to/your/config:/config
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user