From fc348007f49742aa2a185bfb2caa05b8f1372c1b Mon Sep 17 00:00:00 2001 From: ryzendigo <48058157+ryzendigo@users.noreply.github.com> Date: Mon, 16 Mar 2026 14:29:04 +0800 Subject: [PATCH] fix: wrong index for FPS replacement in preset-http-jpeg-generic parse_preset_input() uses input[len(_user_agent_args) + 1] to find the FPS placeholder, but preset-http-jpeg-generic does not include _user_agent_args at the start of its list (only preset-http-mjpeg-generic does). The FPS placeholder '{}' is at index 1, not index 3. This means the detect_fps value overwrites '-1' (the stream_loop argument) instead of the '{}' FPS placeholder, so the preset always uses the literal string '{}' as the framerate. --- frigate/ffmpeg_presets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/ffmpeg_presets.py b/frigate/ffmpeg_presets.py index 43272a6d1..1781cfb50 100644 --- a/frigate/ffmpeg_presets.py +++ b/frigate/ffmpeg_presets.py @@ -436,7 +436,7 @@ def parse_preset_input(arg: Any, detect_fps: int) -> list[str]: if arg == "preset-http-jpeg-generic": input = PRESETS_INPUT[arg].copy() - input[len(_user_agent_args) + 1] = str(detect_fps) + input[1] = str(detect_fps) return input return PRESETS_INPUT.get(arg, None)