Repository navigation
Fix frame stepping, halve extraction time, add a frame viewer and thumbnails - #26
Merged
Merged
Conversation
…mbnails Frame stepping landed on the boundary between two frames, so at rates like 29.97 a step repeated one frame and skipped the next. Steps now land on frame centres. Batch extraction waited for a presented-frame callback it registered after the seek had finished; where the browser paints before dispatching `seeked` that callback never fired and every frame cost the full 250 ms deadline. The callback is now registered before the seek. Also: - frame viewer: full-size image, paging and swipe, select, save, delete, and jump back to the frame's moment in the video - gallery tiles show a small thumbnail and are kept between renders instead of being rebuilt on every change - scrubbing keeps one seek in flight and takes up the latest position - batch runs hold a screen wake lock, wait while the page is in the background, and pause playback first - "Clear all" needs a second tap when more than one frame is at stake - the deploy workflow runs lint, typecheck and tests before deploying - CLAUDE.md added; README updated Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DimiAfb92oKDyKCkHLqxTa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bugs fixed
Frame stepping skipped and repeated frames.
stepByFrameslanded on the exact boundary between two frames, where rounding decides which one is shown. Measured in Chromium on a 29.97 fps clip with a burned-in frame counter, 40 presses of "next frame" showed0,1,3,3,4,6,6,7,9,9,…. Steps now land on frame centres; the same test shows1,2,3,…,40forward and39,38,…,25back. This also applies to the ±6-frame buttons.Batch extraction wasted 250 ms per frame. After each seek the extractor registered a
requestVideoFrameCallbackand waited for it. Chromium presents the frame before it dispatchesseeked, so the callback never fired and every frame ran out the 250 ms fallback deadline. The callback is now registered before the seek, and a callback for a frame more than 0.5 s from the target is treated as belonging to an earlier seek. Measured on a 1080p clip, 300 frames in every-frame mode: 113.9 s before, 52.1 s after (380 → 174 ms per frame). All 300 captured frames hash distinct, so none is a stale repeat.Added
Housekeeping
deploy.ymlnow runs lint, typecheck and tests beforewrangler deploy.CLAUDE.mdadded (checks, deploy, conventions); README features and deployment sections updated.Verification
npm run lint,npm run typecheck,npm run buildclean;npm run coverage: 421 tests pass (369 before), 98.5% lines / 90.1% branches.Not verified: anything on iOS Safari itself. In particular the size of the extraction speed-up depends on whether Safari also presents the frame before
seeked; if it does not, the new code behaves as the old code did. The wake lock needs iOS 16.4+ and is refused in Low Power Mode, in which case the run proceeds without it.Generated by Claude Code