fix(main): thumbnail the timeline's true first frame#61
Merged
Conversation
… at 0.8s The poster was cut from the first video asset declared in the EDL at a fixed 0.8s seek — asset order doesn't follow timeline order, so the thumbnail could show a different clip (and always a different frame) than the video opens on. Now picks the earliest clip across video tracks (ties go to the top-rendered layer) at its exact `in` offset, supports image openers, and versions the cache file so stale v1 thumbs regenerate. Co-authored-by: Cursor <cursoragent@cursor.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
-ss 0.8— but asset order doesn't follow timeline order, so the poster could show a completely different clip (and always a different frame) than the rendered video opens on. Verified on real data:day-trip-to-napa-valleyopens withIMG_8538.MOVatin=1.2s, yet the thumb came fromIMG_8413.MOVat 0.8s.ensureThumbnailnow resolves the earliest clip across all video tracks (start-time ties go to the later track, which renders on top) and seeks to that clip's exactinoffset. Image openers are supported. Fallbacks (any video asset, thenassets/scan) keep pre-EDL projects working..thumb-v2.jpg) so existing stale posters regenerate on next load; old.thumb.jpgfiles are cleaned up opportunistically.Test plan
npm run typecheck && npm test && npm run buildMain-process change — requires restarting
npm run dev(HMR only covers the renderer).Made with Cursor