From 40a1b82bbf73768a79d8ed4eb8de3122bbed2a86 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sun, 31 Dec 2023 15:44:14 -0700 Subject: [PATCH] Use auto for hwaccel args --- docs/docs/configuration/index.md | 4 ++-- frigate/config.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 6c5478a2b..dfd84f457 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -195,9 +195,9 @@ birdseye: ffmpeg: # Optional: global ffmpeg args (default: shown below) global_args: -hide_banner -loglevel warning -threads 2 - # Optional: global hwaccel args (default: shown below) + # Optional: global hwaccel args (default: auto detect) # NOTE: See hardware acceleration docs for your specific device - hwaccel_args: [] + hwaccel_args: "auto" # Optional: global input args (default: shown below) input_args: preset-rtsp-generic # Optional: global output args diff --git a/frigate/config.py b/frigate/config.py index 98d4e87fb..4ee51a1f9 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -599,8 +599,8 @@ class FfmpegConfig(FrigateBaseModel): global_args: Union[str, List[str]] = Field( default=FFMPEG_GLOBAL_ARGS_DEFAULT, title="Global FFmpeg arguments." ) - hwaccel_args: Optional[Union[str, List[str]]] = Field( - default=None, title="FFmpeg hardware acceleration arguments." + hwaccel_args: Union[str, List[str]] = Field( + default="auto", title="FFmpeg hardware acceleration arguments." ) input_args: Union[str, List[str]] = Field( default=FFMPEG_INPUT_ARGS_DEFAULT, title="FFmpeg input arguments." @@ -1098,7 +1098,7 @@ class FrigateConfig(FrigateBaseModel): config.objects.filters[attribute].min_score = 0.7 # auto detect hwaccel args - if config.ffmpeg.hwaccel_args is None: + if config.ffmpeg.hwaccel_args == "auto": config.ffmpeg.hwaccel_args = auto_detect_hwaccel() # Global config to propagate down to camera level