Add Segments view: multi-timestamp video preview grid - #980
Open
kelvincht wants to merge 2 commits into
Open
Conversation
Adds a new gallery view mode showing every extracted clip snippet of a video side by side in one row, so all sampled timestamps are visible and playable at once (inspired by fc2daily-style preview grids), complementing the existing Filmstrip (static, all timestamps) and Clips (single playing preview) views. No new extraction or .vha2 schema change: it reuses the existing clips/<hash>.mp4 file, since that already concatenates N uniform snippets back to back. Each cell seeks into and loops within its own segment window client-side. - New `SegmentsComponent`, registered as `showSegments` alongside the other gallery views (ribbon button, zoom, keyboard shortcut `8`, settings restore). - Clicking a segment opens the video at its real source timestamp via a new optional `timeSeconds` field on `VideoClickEmit`. - Default mode parks each cell on its snippet's still frame (near-zero CPU); hover-to-play and an opt-in "autoplay all" mode reuse the existing Clips-view settings buttons and pause on window blur. - Clip encoding now sets `-pix_fmt yuv420p -movflags +faststart` so newly-extracted clips are hardware-decodable and start instantly. - Backward/forward compatible: `.vha2` and extracted assets are unchanged; new `settings.json` keys are additive with fallbacks for older files, and an unrecognized `currentView` value falls back to Thumbnails instead of showing a blank gallery. - Raised the wizard's clip-snippet cap from 15 to 20.
Owner
|
@kelvincht OH WOW 🤩 I'll try this out - sounds interesting from the description 😁 I suspect I'll like it enough to merge in before the I just finished updating my https://github.com/whyboris/Simplest-File-Renamer and am trying to get https://github.com/whyboris/Simple-Image-Browser released at the same time as Video Hub App - probably mid August (all three at the same time). I'll likely get to this PR later this month / early next month. Please let me know if you prefer I try before then 🤝 Cheers ❤️ |
This was referenced Jul 12, 2026
… current zoom When a video has more snippets than fit at the current zoom, the row always showed the first N (e.g. segments 0-9 of 20) -- the back half of the video was never visible without zooming out. `segmentIndexes()` now evenly samples across the full range when zoomed in, always including the first and last snippet, using the standard "k evenly-spaced points across N items" formula. `maxVisibleTiles` (home.component.ts's `currentImgsPerRow`, already computed for this exact purpose) is passed in to know how many tiles actually fit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
Adds a new gallery view, Segments, that shows every extracted clip snippet of a video side by side in one row — all sampled timestamps visible and playable at once — complementing the existing Filmstrip (static, all timestamps) and Clips (single playing preview) views.
clips/<hash>.mp4file (no new extraction, no.vha2schema change): the clip already concatenates N uniform snippets back to back, so each cell just seeks/loops within its own segment window client-side.-pix_fmt yuv420p -movflags +faststartso newly-extracted clips are hardware-decodable and start instantly.8), settings persistence.Compatibility
.vha2and extracted assets are untouched. Newsettings.jsonkeys are additive with fallbacks for older files, and an unrecognizedcurrentViewvalue falls back to Thumbnails instead of showing a blank gallery. Verified with real pre-feature and post-feature builds round-tripping the samesettings.jsonin both directions with no crashes or data loss.Test plan
tsc --noEmit(renderer + main process)settings.jsonold → new → old)