src.nth.io/

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-06-15 08:50:45 -0500
committerLuke Hoersten <[email protected]>2026-06-15 08:50:45 -0500
commit9e21dafedc0eb274cf7e5a4d4c42643fce749e62 (patch)
tree848285e7c2fa96f8b9016bab9e3788946cd15982
parentfd3faa934999ee3953d66d9db84f67b699e81548 (diff)
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.
-rw-r--r--scrypted/scrypted-viewport.ts8
1 files changed, 8 insertions, 0 deletions
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) →