Commit graph

88 commits

Author SHA1 Message Date
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
SteadyW
cacf262d61
Replace ASCII logo with styled text logo 2026-06-22 18:26:57 +03:00
SteadyW
2f7debb7d6
Enhance README with ASCII art and project details
Added ASCII art logo and improved project description.
2026-06-22 14:58:23 +03:00
SteadyW
8e70e3feb6
Rename test_ytdl_normalize.py to test_ytdl_normalize.py 2026-06-21 11:29:45 +03:00
SteadyW
cca6f170a9
Rename test_ytdl_hardening.py to test_ytdl_hardening.py 2026-06-21 11:29:30 +03:00
SteadyW
9cc93a0a36
Add test_ytdl.py for testing functionality 2026-06-21 11:29:13 +03:00
SteadyW
52ae40ec9c
Rename test_e2e.js to test_e2e.js 2026-06-21 11:28:38 +03:00
SteadyW
8321fc4eb8
Rename test_ytdl.py to experiments/test_ytdl.py 2026-06-21 11:27:41 +03:00
SteadyW
c59b0ebc20
Add test for ytdl normalization 2026-06-21 11:27:25 +03:00
SteadyW
d857b31daa
Rename test_ytdl_hardening.py to experiments/test_ytdl_hardening.py 2026-06-21 11:26:46 +03:00
YusufB5
0df68b97fe feat: yt-dlp support added and playback issues fixed 2026-06-21 10:09:57 +03:00
Nate
6047f8ed22 fix(ytdl): instant cache hits via URL id regex + force playlist expansion
Address PR #27 review:
- download() now parses the video id straight from the URL and returns a
  cached file without calling _probe_remote(), so cached reruns no longer
  hit YouTube on every startup. Unrecognized URLs fall through to the probe.
- expand_playlist() passes --yes-playlist so a watch?v=...&list=... URL
  expands the full list instead of queuing a single video.
2026-06-20 13:51:54 -04:00
Nate
bfbf94637b feat(#5): play YouTube/yt-dlp URLs and playlists, rebased on new pipeline
Pass any yt-dlp-supported URL where a video file goes. A single video is
downloaded (<=480p, ASCILINE only needs a tiny grid), normalized to
H.264/AAC/CFR mp4, and cached in videos/ by id so replays and --loop are
instant. A playlist/channel URL expands into one queue entry per video,
each fetched lazily as it plays so a long playlist starts immediately.

Also fixes the playlist.json eager-download bug Yusuf reported: URL entries
in a JSON playlist are now left unresolved by load_playlist and fetched
on demand by the playback loop, instead of synchronously downloading every
link before the server starts.

Ported onto the new thread-pool/zero-copy main; all integration points
(resolve_video_path, load_playlist, build_queue, websocket loop) updated.
2026-06-19 14:16:46 -04:00
SteadyW
51efdaf39f
Update Adaptive Frame Codec section in README 2026-06-19 20:51:55 +03:00
SteadyW
3e9243fd51
Clarify Adaptive Frame Codec opt-in validity
Updated Adaptive Frame Codec section to clarify opt-in validity range.
2026-06-19 20:46:59 +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
SteadyW
dc08a47de7
Revise hover preview section in README
Updated hover preview instructions for clarity and conciseness.
2026-06-19 11:13:07 +03:00
SteadyW
c24076e0bd
Fix typo in Low-Overhead Binary Protocol description 2026-06-19 11:08:13 +03:00
SteadyW
8bbbc66733
Update README to simplify player controls section
Removed detailed player controls section and hover previews explanation from README.
2026-06-19 11:05:25 +03:00
SteadyW
0dd557dce8
Merge pull request #24 from Shaku-Med/feat/player-ui and thumbnails
Live player UI: control bar with hover thumbnails, skip, and responsive layout
2026-06-19 10:27:07 +03:00
Shaku-Med
c230c6b7d7 feat: make hover thumbnails optional (--no-thumbnails)
Thumbnails stay on by default. --no-thumbnails skips building the preview sprite, so the server does no extra work and the rest of the player still works. The frontend already shows no preview when the sprite is unavailable.
2026-06-19 00:14:34 -04:00
Shaku-Med
41f430d46d docs: document the player controls in the README 2026-06-19 00:07:52 -04:00
Shaku-Med
743e6e933c test: cover the scrub sprite endpoint (hover thumbnails)
Self-contained: generates a tiny video, checks the sprite grid math, the JPEG output, and the /scrub + /scrub_sprite endpoints. The ffmpeg parts skip if ffmpeg is missing.
2026-06-18 11:41:49 -04: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
SteadyW
461e0bd939
Revise feature list in README.md
Updated README to enhance clarity on ASCILINE's features.
2026-06-17 14:41:47 +03:00
YusufB5
27aeca9d20 feat: Add seek bar, pause/resume, and optimize async audio streaming 2026-06-17 14:27:52 +03:00
SteadyW
88b261eae9
Revise bandwidth requirements and remove license details
Updated the README to clarify bandwidth and GPU compatibility, and removed ethical guardrail explanation.
2026-06-15 15:59:20 +03:00
SteadyW
d06cf0af05
Revise README for Windows user shortcuts
Updated Windows user instructions for running scripts.
2026-06-15 15:50:26 +03:00
SteadyW
b1415e75ea
Delete play.bat 2026-06-15 15:48:38 +03:00
SteadyW
d9e2ea48e4
Delete serve.bat 2026-06-15 15:48:23 +03:00
SteadyW
a879b2b49c
Update README with developer note on static files
Added note for developers about using Compiler.py to generate static files.
2026-06-15 15:36:34 +03:00
SteadyW
151d2400d6
Update license section with anti-ad restriction
Clarified ethical guardrails regarding ad usage.
2026-06-15 15:36:02 +03:00
SteadyW
c07a7f7288
Revise license section and contact information in README
Updated the README to clarify the license and ethical guidelines.
2026-06-15 15:33:08 +03:00
SteadyW
4294e312e5
Add live interactive showcase section to README
Added a section for the live interactive showcase of the ASCILINE engine.
2026-06-15 15:19:39 +03:00
SteadyW
ef8dacaa48
Add LAN streaming instructions to README
Added instructions for LAN/Network streaming using the stream server.
2026-06-14 21:27:34 +03:00
SteadyW
bc53f91793
Add contact email to README 2026-06-14 19:38:01 +03:00
SteadyW
5731cfa928
Update contact information format in README 2026-06-14 19:36:55 +03:00
SteadyW
331becf6c4
Add contact information to README 2026-06-14 19:34:22 +03:00
SteadyW
b43808142e
Merge pull request #15 from YusufB5/revert-11-fix-startup-freeze
Revert "Fix #7: startup freeze (audio master clock jumps backward on cold start)"
2026-06-14 13:36:07 +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
SteadyW
e130b0cc2f
Reorganize README with Star History and Support info
Added a section for Star History and support options while retaining the License section.
2026-06-13 23:27:06 +03:00
SteadyW
7085d33bcd
Add crypto donation options to README
Added donation information for project support.
2026-06-13 22:00:06 +03:00
YusufB5
444334cfba feat: added pause mechanism and updated user interface 2026-06-13 19:50:32 +03:00
SteadyW
f0a411e349
Update README with installation instructions
Added installation instructions to the README.
2026-06-13 13:27:29 +03:00
SteadyW
e3acb79c9b
Add real-time bandwidth monitoring instructions
Added instructions for monitoring bandwidth in real-time using the --debug flag.
2026-06-13 13:14:05 +03:00
SteadyW
e58a572316
Add quality and debug options to stream server help 2026-06-13 13:03:09 +03:00
YusufB5
ad7895b054 feat: activate adaptive codec in app.js and add debug flags 2026-06-13 12:08:29 +03:00