From cc42099ec8f14c62730cd6d6fb6b0352ae725e04 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 19 Sep 2024 12:38:24 -0600 Subject: [PATCH] Formatting --- frigate/ffmpeg_presets.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frigate/ffmpeg_presets.py b/frigate/ffmpeg_presets.py index 1cbb8af41..d34c22e67 100644 --- a/frigate/ffmpeg_presets.py +++ b/frigate/ffmpeg_presets.py @@ -185,8 +185,14 @@ def parse_preset_hardware_acceleration_scale( else: scale = PRESETS_HW_ACCEL_SCALE.get(arg, PRESETS_HW_ACCEL_SCALE["default"]) - if ",hwdownload,eq=gamma=1.05" in scale and os.environ.get("FFMPEG_DISABLE_GAMMA_EQUALIZER") is not None: - scale.replace(",hwdownload,eq=gamma=1.05", ":format=nv12,hwdownload,format=nv12,format=yuv420p") + if ( + ",hwdownload,eq=gamma=1.05" in scale + and os.environ.get("FFMPEG_DISABLE_GAMMA_EQUALIZER") is not None + ): + scale.replace( + ",hwdownload,eq=gamma=1.05", + ":format=nv12,hwdownload,format=nv12,format=yuv420p", + ) scale = scale.format(fps, width, height).split(" ") scale.extend(detect_args)