src.nth.io/

summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-06-19 19:03:27 -0500
committerLuke Hoersten <[email protected]>2026-06-19 19:03:27 -0500
commit4cf36e2569a85f63aa0726cd0318dce0aa9e71bd (patch)
tree5829599197e45fbd2be2edc5f3b4697f7a89a719 /CMakeLists.txt
parent103486c722907cc4aefdebe606e28ea5c9565901 (diff)
scrypted: snapshot-then-stream for sub-second first paint on wake
ffmpeg cold-start + RTSP connect + first-keyframe-wait puts 0.5–3 seconds of dead air between a tap/event and the first stream frame landing on the panel. Most of that is unavoidable for the live stream, but Scrypted can almost always produce a snapshot in 50–300ms via camera.takePicture() (often a cache hit). New pushSnapshot path: - Fires in parallel with the main stream spawn — does NOT delay the stream path even if takePicture is slow. - takePicture → quick one-shot ffmpeg with the same transpose+scale filter chain → POST /frame, all under a 2s hard cap. - Uses the shared X-Frame-Seq counter: if a stream frame beats the snapshot to the firmware decoder (unlikely on cold start, possible on warm reconnect), the firmware silently stale-drops the snapshot. Logs "beaten by stream frame" when that happens so we can see it. - Errors are swallowed silently — a camera that doesn't support snapshots just falls through to the normal stream-only path. Net effect: the panel shows the camera near-instantly on every wake, then the snapshot gets replaced by the first ffmpeg frame whenever it lands.
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions