Add ability to select GPU for ffmpeg (#20455)

* Add ability to set selected GPU for ffmpeg

* Cleanup

* Cleanup

* Improve handling
This commit is contained in:
Nicolas Mowen
2025-10-13 09:59:38 -06:00
committed by GitHub
parent 6e10fc21c3
commit 423693d14d
4 changed files with 51 additions and 20 deletions
+2
View File
@@ -235,6 +235,7 @@ class CameraConfig(FrigateBaseModel):
self.detect.fps,
self.detect.width,
self.detect.height,
self.ffmpeg.gpu,
)
or ffmpeg_input.hwaccel_args
or parse_preset_hardware_acceleration_decode(
@@ -242,6 +243,7 @@ class CameraConfig(FrigateBaseModel):
self.detect.fps,
self.detect.width,
self.detect.height,
self.ffmpeg.gpu,
)
or camera_arg
or []
+1
View File
@@ -67,6 +67,7 @@ class FfmpegConfig(FrigateBaseModel):
default=False,
title="Set tag on HEVC (H.265) recording stream to improve compatibility with Apple players.",
)
gpu: int = Field(default=0, title="GPU index to use for hardware acceleration.")
@property
def ffmpeg_path(self) -> str: