Use auto for hwaccel args

This commit is contained in:
Nick Mowen 2023-12-31 15:44:14 -07:00
parent d1b371bfb2
commit 40a1b82bbf
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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