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 = [