[HW Accel Support]: How decode video with two same model Nvidia P2000 card? #10304
Answered
by
NickM-27
rasko1974
asked this question in
Hardware Acceleration Support
-
Describe the problem you are havingCould you explain configuration file when we need decode one stream from one gpu another stream from second GPU? All GPU cards the same Nvidia cuda P2000 model. Version13.2 Frigate config filego2rtc:
ffmpeg:
streams:
cam1:
- rtsp://admin:[email protected]:554/profile1#video=copy
cam2:
- rtsp://admin:[email protected]:8087/profile1#video=copy
#
cameras:
cam1:
ffmpeg:
hwaccel_args: preset-nvidia-h265
inputs:
- path: rtsp://127.0.0.1:8554/cam1
input_args: preset-rtsp-restream
roles:
- detect
- record
output_args:
record: preset-record-generic-audio-aac
detect:
width: 2592
height: 1520
fps: 5
max_disappeared: 25
objects:
filters:
person:
mask: 2592,0,2592,1327,1265,258,1075,278,1075,0
snapshots:
enabled: true
clean_copy: true
timestamp: false
bounding_box: false
crop: true
height: 112
retain:
default: 3
record:
enabled: false
retain:
days: 0
events:
retain:
default: 3
mode: motion
pre_capture: 3
post_capture: 10
# docker-compose file or Docker CLI commandservices:
frigate:
container_name: frigate
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=1,5
- CUDA_VISIBLE_DEVICES=1,0
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "4024mb" # update for your cameras based on calculation above
devices:
- /dev/dri:/dev/dri
- /dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/apex_1
- /dev/apex_2
- /dev/apex_3
- /dev/apex_4
- /dev/apex_5
- /dev/apex_6
- /dev/apex_7
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/renderD129:/dev/dri/renderD129
# - /dev/dri/card0
# - /dev/dri/card1
# - /dev/dri/card2
- /dev/nvidia0:/dev/nvidia0
- /dev/nvidia1:/dev/nvidia1
- /dev/nvidia-caps:/dev/nvidia-caps
- /dev/nvidiactl:/dev/nvidiactl
- /dev/nvidia-modeset:/dev/nvidia-modeset
- /dev/nvidia-uvm:/dev/nvidia-uvm
- /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0','1']
# count: 2 # number of GPUs
capabilities: [gpu]
volumes:
- /etc/localtime:/etc/localtime:ro
- /root/frigate/config:/config
- /root/frigate/database/:/database
- /root/frigate/media:/media/frigate
- /root/frigate/config/a2z.png:/opt/frigate/frigate/images/birdseye.png:ro
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 2000000000
ports:
- "5000:5000"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "yildiz123"
labels:
traefik.enable: "true" Relevant log outputno errors FFprobe output from your camerano errors Operating systemOther Linux Install methodDocker Compose Network connectionWired Camera make and modelDahua Any other information that may be helpfulThanks for a support |
Beta Was this translation helpful? Give feedback.
Answered by
NickM-27
Mar 7, 2024
Replies: 2 comments
-
You can add a custom arg to |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
NickM-27
-
Thanks. Works |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can add a custom arg to
global_args
being-gpu 0
or-gpu 1
and that should choose the GPU to use