From eeb17ae2b84c53987a4535dea03663e9f8113047 Mon Sep 17 00:00:00 2001 From: Faberto Date: Sun, 22 Mar 2026 19:05:03 +0100 Subject: [PATCH] faster transcode and debug --- frigate/api/transcode.py | 7 +++++-- web/src/utils/codecUtil.ts | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frigate/api/transcode.py b/frigate/api/transcode.py index 71c246f4d..a469a9c5e 100644 --- a/frigate/api/transcode.py +++ b/frigate/api/transcode.py @@ -93,13 +93,16 @@ def _build_ffmpeg_cmd( "pipe,file,http,tcp", "-i", input_url, + # Scale down to 720p max, preserve aspect ratio + "-vf", + "scale=-2:'min(720,ih)'", # Encode to H.264 (software — universally available) "-c:v", "libx264", "-preset", - "fast", + "ultrafast", "-crf", - "23", + "26", "-profile:v", "high", "-level:v", diff --git a/web/src/utils/codecUtil.ts b/web/src/utils/codecUtil.ts index 729da8592..43299f772 100644 --- a/web/src/utils/codecUtil.ts +++ b/web/src/utils/codecUtil.ts @@ -10,6 +10,7 @@ let hevcResult: boolean | null = null; * Result is cached after the first call. */ export function isHevcSupported(): boolean { + if (localStorage.getItem("forceTranscode") === "true") return false; if (hevcResult !== null) return hevcResult; const codecs = [