[HW Accel Support]: processor doing the work instead of nvenc #15239
-
Describe the problem you are havingi've been at it for a couple of days and am just a little confused now with much of what i read. figured it would be easier if folks can point out what i am doing wrong. am not a developer or a linux guy so this was a great learning journey for me, just need a little guidance. i managed to get h265 from the camera converted to h264 via go2rtc working but noticed it's the cpu doing the heavy lifting instead of my nvidia gpu. Version0.14.1-f4f3cfa Frigate config filemqtt:
enabled: false
timestamp_style:
position: br
detectors:
coral1:
type: edgetpu
device: pci:0
coral2:
type: edgetpu
device: pci:1
ffmpeg:
hwaccel_args:
- -hwaccel
- nvdec
go2rtc: # Built-in RTSP proxy configuration with NVIDIA hardware decoding
streams:
perimetercam1_main: >
ffmpeg:rtsp://*username*:*password*@10.10.21.6:554/h265Preview_01_main#video=h264#hardware #Convert
to H.264
perimetercam1_sub: >
ffmpeg:rtsp://*username*:*password*@10.10.21.6:554/h264Preview_01_sub
perimetercam2_main: >
ffmpeg:rtsp://*username*:*password*@10.10.21.7:554/h265Preview_01_main#video=h264#hardware #Convert to H.264
perimetercam2_sub: >
ffmpeg:rtsp://*username*:*password*@10.10.21.7:554/h264Preview_01_sub
perimetercam3_main: >
ffmpeg:rtsp://*username*:*password*@10.10.21.8:554/h265Preview_01_main#video=h264#hardware #Convert to H.264
perimetercam3_sub: >
ffmpeg:rtsp://*username*:*password*@10.10.21.8:554/h264Preview_01_sub
perimetercam4_main: >
ffmpeg:rtsp://*username*:*password*@10.10.21.9:554/h265Preview_01_main#video=h264#hardware #Convert to H.264
perimetercam4_sub: >
ffmpeg:rtsp://*username*:*password*@10.10.21.9:554/h264Preview_01_sub
api:
enabled: true # Enable the go2rtc API for stream management.
rtsp:
enabled: true # Enable RTSP server for re-streaming.
port: 8554 # Custom port for RTSP re-streams.
webrtc:
enabled: true # Enable WebRTC streaming for low-latency viewing.
port: 8555 # Custom port for WebRTC streams.
objects:
track:
- person
- car
- motorcycle
- bicycle
- dog
- cat
filters:
person:
threshold: 0.75
car:
threshold: 0.75
motorcycle:
threshold: 0.75
bicycle:
threshold: 0.75
record:
enabled: true # Enable video recording.
retain:
days: 7 # Keep continuous recordings for 7 days.
mode: motion # Only record when motion is detected.
events:
retain:
default: 30 # Keep motion event recordings for 30 days.
mode: motion
cameras:
Perimetercam1:
enabled: true
ffmpeg:
inputs:
- path: rtsp://localhost:8554/perimetercam1_main # Use go2rtc for the main stream (recording).
roles:
- record
- path: rtsp://localhost:8554/perimetercam1_sub # Use go2rtc for the substream (detection).
roles:
- detect
detect:
enabled: true
width: 640 # Resolution of the detection stream.
height: 360
fps: 5 # Detection FPS.
record:
enabled: true
retain:
days: 7 # Retain recordings for 7 days.
events:
retain:
default: 30 # Retain event clips for 30 days.
motion:
mask: 0.311,0.024,0.313,0.066,0.66,0.071,0.659,0.019 # Areas to ignore during motion detection.
Perimetercam2:
enabled: true
ffmpeg:
inputs:
- path: rtsp://localhost:8554/perimetercam2_main # Use go2rtc for the main stream (recording).
roles:
- record
- path: rtsp://localhost:8554/perimetercam2_sub # Use go2rtc for the substream (detection).
roles:
- detect
detect:
enabled: true
width: 640 # Resolution of the detection stream.
height: 360
fps: 5 # Detection FPS.
record:
enabled: true
retain:
days: 7 # Retain recordings for 7 days.
events:
retain:
default: 30 # Retain event clips for 30 days.
motion:
mask: 0.348,0.026,0.351,0.072,0.646,0.069,0.642,0.023 # Areas to ignore during motion detection.
Perimetercam3:
enabled: true
ffmpeg:
inputs:
- path: rtsp://localhost:8554/perimetercam3_main # Use go2rtc for the main stream (recording).
roles:
- record
- path: rtsp://localhost:8554/perimetercam3_sub # Use go2rtc for the substream (detection).
roles:
- detect
detect:
enabled: true
width: 640 # Resolution of the detection stream.
height: 360
fps: 5 # Detection FPS.
record:
enabled: true
retain:
days: 7 # Retain recordings for 7 days.
events:
retain:
default: 30 # Retain event clips for 30 days.
motion:
mask: 0.348,0.026,0.351,0.072,0.646,0.069,0.642,0.023 # Areas to ignore during motion detection.
Perimetercam4:
enabled: true
ffmpeg:
inputs:
- path: rtsp://localhost:8554/perimetercam4_main # Use go2rtc for the main stream (recording).
roles:
- record
- path: rtsp://localhost:8554/perimetercam4_sub # Use go2rtc for the substream (detection).
roles:
- detect
detect:
enabled: true
width: 640 # Resolution of the detection stream.
height: 360
fps: 5 # Detection FPS.
record:
enabled: true
retain:
days: 7 # Retain recordings for 7 days.
events:
retain:
default: 30 # Retain event clips for 30 days.
motion:
mask: 0.348,0.026,0.351,0.072,0.646,0.069,0.642,0.023 # Areas to ignore during motion detection.
version: 0.14 docker-compose file or Docker CLI commandversion: "3.9"
services:
frigate:
container_name: frigate
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
runtime: nvidia # Use NVIDIA runtime for GPU support
environment:
- NVIDIA_VISIBLE_DEVICES=all # Use all available GPUs
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video # Allow compute, video, and utility capabilities
- CAMERA_USERNAME=${CAMERA_USERNAME} # Pass the variable
- CAMERA_PASSWORD=${CAMERA_PASSWORD} # Pass the variable
volumes:
- /opt/frigate/config:/config # Frigate configuration
- /mnt/videos:/media/frigate # Video storage on HDD
- /opt/frigate/logs:/var/log/frigate # Persistent logs
- type: tmpfs
target: /tmp/cache # Temporary files in RAM
tmpfs:
size: 15g
shm_size: 10g # Shared memory size
devices:
- "/dev/apex_0:/dev/apex_0" # Coral TPU
- "/dev/apex_1:/dev/apex_1" # Coral TPU
ports:
- "8971:8971" # Web UI
- "8554:8554" # RTSP feeds
healthcheck:
test: ["CMD-SHELL", "curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1"]
interval: 15s
timeout: 5s
retries: 3 Relevant Frigate log outputn/a Relevant go2rtc log outputn/a FFprobe output from your cameran/a Install methodDocker Compose Object DetectorCoral Network connectionWired Camera make and modelreolink e1 outdoor pro Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulam running on bare metal debian 12, 1080ti, dual coral using pci adapter |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You may try explicitly setting #hardware=cuda |
Beta Was this translation helpful? Give feedback.
-
thank you @NickM-27 that definitely turned on the gpu hardware. |
Beta Was this translation helpful? Give feedback.
You may try explicitly setting #hardware=cuda