Commit graph

18 commits

Author SHA1 Message Date
YusufB5
234a59301a fix: change backpressure metric to framesInFlight to avoid false positives on fast networks 2026-06-23 22:50:56 +03:00
Nate
d9480e9f85 feat: server-side frame dropping under client backpressure (#30)
The live WebSocket pushed every frame on a wall-clock schedule regardless of
whether the client could keep up. On a slow device frames piled into the client
decode queue, and the client paid the inflate+delta-patch cost for each one
before dropping the excess in its render loop. CPU spent on frames never shown.

Client now reports its decoded-frame backlog (frameBuffer depth) ~4x/sec over
the existing command channel. When the backlog exceeds BACKLOG_HIGH the server
skips frames: it advances the source cheaply (grab, no decode/encode/send) so
video stays time-aligned with audio, and crucially holds prev_frame across the
gap so the next sent frame is a correct delta against the last SENT frame. No
keyframe resync needed - deltas are always relative to the last sent frame.
MAX_CONSEC_DROPS caps the gap and guarantees liveness for slow/non-reporting
clients. Fully backward compatible: a client that never reports keeps backlog=0
and behaviour is unchanged.

test/test_backpressure_gap.js encodes a keyframe + a dropped gap via codec.py
and decodes through the shipped codec.js, asserting the post-gap frame is
reconstructed bit-exact (and is a real DELTA), matching the no-drop path.
2026-06-22 12:12:38 -04:00
YusufB5
0df68b97fe feat: yt-dlp support added and playback issues fixed 2026-06-21 10:09:57 +03:00
YusufB5
524d66be72 Performance Overhaul: Thread-pool decode, zero-copy pixel mode, and GPU seekbar UI 2026-06-19 19:51:39 +03:00
Shaku-Med
a253c17507 feat: polished player UI for live mode (hover thumbnails, skip, responsive)
Builds on the existing live seek/play/volume. Adds a polished, responsive control bar with play/pause, +/-10s skip, a played-progress fill, and a YouTube-style hover thumbnail preview on the seek bar. Thumbnails come from a small lazy /scrub endpoint that builds an in-memory sprite once per video with a single ffmpeg pass (no disk cache); easy to point at the static compiler's sprite instead.
2026-06-18 11:39:39 -04:00
YusufB5
27aeca9d20 feat: Add seek bar, pause/resume, and optimize async audio streaming 2026-06-17 14:27:52 +03:00
SteadyW
667b412994
Revert "Fix #7: startup freeze (audio master clock jumps backward on cold start)" 2026-06-14 13:30:14 +03:00
SteadyW
bb0c096ffd
Merge pull request #11 from 1Aa1k/fix-startup-freeze
Fix #7: startup freeze (audio master clock jumps backward on cold start)
2026-06-14 13:05:19 +03:00
YusufB5
7071f2b422 feat: apply security, audio session, and ffmpeg zombie fixes 2026-06-14 12:44:19 +03:00
Nate
58626d7602 fix(#7): anchor the audio master clock so it never jumps backward (startup freeze)
Cold-start root cause: on a slow first load the <audio> element starts late, so
the audio-ready gate's wall-clock fallback has already advanced playback a second
or two by the time audio finally begins at currentTime≈0. The master clock then
snapped back toward 0, every buffered frame read as "in the future", and
renderFrame() deadlocked until audio caught up — the freeze. A refresh warms the
cache, audio starts immediately, the gap (and the freeze) vanish — which is why
reloading "fixes" it.

Fix: the first time audio is genuinely playing, capture the offset between the
wall clock and the audio clock and add it back, so the master clock follows
audio's *rate* without ever moving backward. When audio starts promptly the
offset is ~0, so normal playback is unchanged.

experiments/freeze_repro.js models a 2s-late audio start with a realistic jitter
buffer + 60fps render loop: the original code and a naive `currentTime > 0` guard
render 0-1 of ~96 frames after audio starts (frozen ~4s); the anchored clock
renders 96/96 smooth. Real-browser regression (muted Chrome): normal playback
unaffected at ~29 fps.
2026-06-14 01:24:05 -04:00
YusufB5
444334cfba feat: added pause mechanism and updated user interface 2026-06-13 19:50:32 +03:00
YusufB5
ad7895b054 feat: activate adaptive codec in app.js and add debug flags 2026-06-13 12:08:29 +03:00
YusufB5
e758423338 feat: Core engine V2 (A/V Sync, Zero-Copy Pixel, FPS Decimation) & CLI shortcuts 2026-06-07 23:16:25 +03:00
YusufB5
8b31a7450a feat: Add auto-scaling rows, pixel mode flag, and command loop 2026-06-05 23:20:25 +03:00
YusufB5
5fad7c5aa9 feat: server-side volume control feature added, playlist & folder video management 2026-06-04 16:14:23 +03:00
YusufB5
2043a7bb37 feat: add invisible selection layer, audio streaming, and updated manifesto for pure performance mode 2026-05-05 13:51:27 +03:00
YusufB5
e7002173c2 Improve error handling and translate messages to English 2026-05-03 21:36:14 +03:00
YusufB5
7cd84b657b Initial commit: ASCILINE Engine - Modular & Optimized 2026-05-02 14:36:22 +03:00