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

Auto select gpu for hwaccel presets #5406

Merged
merged 10 commits into from
Feb 11, 2023
Prev Previous commit
Next Next commit
Fix path of device
  • Loading branch information
NickM-27 committed Feb 9, 2023
commit 3d1f3505c9f1c6b6788875d57573318d65e1edd9
4 changes: 2 additions & 2 deletions frigate/ffmpeg_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_gpu_device() -> str:
devices = list(filter(lambda d: d.startswith("render"), os.listdir("/dev/dri")))

if len(devices) < 2:
GPU_DEVICE_PARAM = "renderD128"
GPU_DEVICE_PARAM = "/dev/dri/renderD128"
return GPU_DEVICE_PARAM
else:
for device in devices:
Expand All @@ -38,7 +38,7 @@ def get_gpu_device() -> str:
logger.debug(f"{device} return vainfo status code: {check.returncode}")

if check.returncode == 0:
GPU_DEVICE_PARAM = device
GPU_DEVICE_PARAM = f"/dev/dri/{device}"
return GPU_DEVICE_PARAM

raise ValueError(
Expand Down