src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/state_client.h
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-06-15 09:02:58 -0500
committerLuke Hoersten <[email protected]>2026-06-15 09:02:58 -0500
commit676bb4eb1e9bd17aaf251574cbbe4c39a1bdf4e1 (patch)
treec90a781008411b58479c80ae061c91157029b80d /main/state_client.h
parent9acb99ba3f23aebf48c8c82f148f6cd3441d4efa (diff)
scrypted: cut ~10s glass-to-glass latency by picking the low-latency substream + dropping queued frames
Two compounding causes of the lag: - destination:"remote-recorder" returned the high-bitrate main encoder with the camera's own ~10s prebuffer baked in. Walk substreams low-resolution → medium-resolution → local → remote → remote-recorder and take the first that resolves. The low-res preview is what Scrypted itself uses for grid views — it's near-realtime. - ffmpeg's output queue had no drop policy, so whenever the encode + push pipeline fell behind for a second the queue just kept growing, and we'd play back a steadily-older view of the world. Added -fps_mode drop so late frames hit the floor. Plus a few input-side latency knobs (-probesize 32, -analyzeduration 0, -avioflags direct, -fflags +discardcorrupt) so ffmpeg stops sitting on the first chunk to probe the stream layout.
Diffstat (limited to 'main/state_client.h')
0 files changed, 0 insertions, 0 deletions