From 9e21dafedc0eb274cf7e5a4d4c42643fce749e62 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Mon, 15 Jun 2026 08:50:45 -0500 Subject: scrypted: log the exact ffmpeg filter chain on stream start Triage signal for the persistent "expected 800x480, got 480x800" dimension mismatch. The error has survived two filter rewrites; logs on the user's side still reference old script.js line numbers, which suggests the Scrypted Script editor isn't picking up re-pasted code. Emit the orientation + panel dims + actual `-vf` string once per stream start. If the log shows up, we know the latest code is live and the problem is the filter; if it doesn't, the script never updated. --- scrypted/scrypted-viewport.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scrypted/scrypted-viewport.ts b/scrypted/scrypted-viewport.ts index 22f233a..693a2a6 100644 --- a/scrypted/scrypted-viewport.ts +++ b/scrypted/scrypted-viewport.ts @@ -626,6 +626,14 @@ class ScryptedViewportProvider extends ScryptedDeviceBase ? `transpose=1,scale=${panelW}:${panelH}:flags=lanczos,setsar=1` : `scale=${panelW}:${panelH}:flags=lanczos,setsar=1`; const fps = Math.max(1, Math.round(1000 / v.frameIntervalMs)); + // Diagnostic — confirms which filter chain the *currently loaded* + // script is actually using. If you don't see this line in the + // plugin log, the Scrypted Script editor is still on stale code + // and a re-paste/save didn't take. If you do see it but the + // firmware still rejects 480x800, the rotation didn't apply + // (very rare ffmpeg build issue) and we'd need to look at + // installed ffmpeg version. + this.console.log(`stream "${v.name}": orientation=${v.orientation} panel=${panelW}x${panelH} vf="${vf}"`); // Pull the camera's video stream, convert to ffmpeg input args, and // pipe through a single ffmpeg child: input → scale(lanczos) → -- cgit v1.2.3