src.nth.io/

summaryrefslogtreecommitdiff
tag namev1.1.0 (2230c1e44297abab2248d2425143e9d038bc7abf)
tag date2026-06-20 12:26:40 -0500
tagged byLuke Hoersten <[email protected]>
tagged objectcommit 3729f04458...
v1.1.0 — cleanup + glass-to-glass instrumentation + buffer cap
Comprehensive cleanup of HTTP-streaming-era dead code, deep instrumentation for the 'where does latency live' question, the snapshot quality bump, and a configurable Node-side buffer cap with destroy+reconnect on overrun. Major changes since v1.0.0: - Phase 1/2 cleanup: deleted ~200 lines of dead code across firmware (X-Frame-Seq, X-Frame-Drop, Server-Timing, TCP_NODELAY on /frame, s_last_painted_seq, s_last_post_us) and script (http.Agent pool, httpRequest helper, frameSeq Map). Comments rewritten throughout to reflect the streaming pivot, not the HTTP-streaming era. - Phase 3 timing trace: per-stage 'since-event' anchored logging for both snapshot and stream paths. Confirms parallel startup and isolates where wall-clock goes between event arrival and first paint. - Phase 4 glass-to-glass: extended TCP stream header from 8 → 16 bytes with VPRT magic + per-frame event_us_low. Firmware echoes the most-recent painted frame's event_us_low via /state's new 'stream' sub-object. Script polls /state and computes display age live. - Phase 5 snapshot quality: sharp settings overhaul — quality 100 ceiling, 4:4:4 chroma at jpegQuality≤2. mozjpeg disabled (was 4x slower for 5% file size win nobody could see). - Phase 6 perf playbook: TESTING.md documents the capture methodology + alarm thresholds. UDP-vs-TCP rationale comment in stream_server.c so the decision isn't re-litigated. - Listener leak fix: globalThis cleanup of orphaned cam.listen() registrations across script reloads (same pattern as the setInterval fix in v1.0.0). - Sent-vs-painted unified log: one line per 10s window combining Scrypted-side counters with firmware-side window stats from /state polling. - node_buf cap with destroy+reconnect: configurable Max Scrypted-side buffer (MB) setting. When Node's TCP write queue exceeds the cap, the stream socket is destroyed; firmware's accept loop picks up the next connection within ~500ms and the pipeline restarts on a fresh frame. Default 20MB. - Settings page Status (live): sequential /state + /config fetches with 3s timeout (was parallel + 1.5s, which collided with the reduced max_open_sockets=2). Tested at 22-25 fps painted with sub-second snapshot first-paint, g2g matching the configured buffer cap, and zero stale-painted frames in steady state thanks to FIONREAD skip on the firmware.