Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Vips thumbnails aspect ratio and implement thumbnail preview feature on the frontend #762

Merged
merged 85 commits into from
Feb 16, 2024

Conversation

gkourie
Copy link
Contributor

@gkourie gkourie commented Jan 27, 2024

  • Fixes an issue with the aspect ratio of Vips thumbnails buffer by setting the size to force (see issue-75).
  • Implements the thumbnail preview feature on the frontend.
  • Adjusts the corresponding test cases to reflect these changes.

lehecht and others added 30 commits November 30, 2023 08:06
Co-authored-by: Martin Zurowietz <mzur@users.noreply.github.com>
Adapt core templates (master) to work with the geo module
The default database is now used as vector database, too.

References biigle/maia#150
Set seeking on false again after loading video,
because seek() is called everytime a video is loaded.

Fixes biigle#695.
Fix active spinning wheel after video finished loading
Replace seeked event by timeupdate, because seeked event
does not always reset time after switching videos.

Fix biigle#724
If single and clip annotations are linked
and are not touching each other, then null is added.
When deleting the single frame annotation, delete also the null.

Fix biigle#488
mzur and others added 3 commits January 30, 2024 11:05
fix error on console command creating new user without admin rights
Add missing pandas requirement
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Really well done 👏

I have a few minor comments (see below). These are the major points:

  1. The preview thumbnail often briefly flashes before it repositions itself when the image is loaded or hides itself if the loading failed. Flashing with image:

    Screencast.from.01.02.2024.16.01.41.webm

    Flashing without image:

    Screencast.from.01.02.2024.16.03.34.webm
  2. The thumbnail does not show when I start at the left of the timeline. Once I cross some sort of threshold, it shows. Then I can move backwards again and it keeps showing (the correct images, too). I use Firefox if that matters.

    Screencast.from.01.02.2024.16.02.40.webm
  3. I was going to say that we have to take care of deleting the sprites when a video is deleted but luckily the existing code just deletes the whole directory. So nothing to do here 👍

  4. Please add a paragraph to the manual that explains the new button.

That's it! After this is merged I will check the issue with ['size' => 'force'] and implement the console command to generate missing sprites.

app/Http/Controllers/Views/Videos/VideoController.php Outdated Show resolved Hide resolved
resources/assets/js/videos/components/thumbnailPreview.vue Outdated Show resolved Hide resolved
resources/assets/js/videos/components/thumbnailPreview.vue Outdated Show resolved Hide resolved
resources/assets/js/videos/components/thumbnailPreview.vue Outdated Show resolved Hide resolved
resources/assets/js/videos/main.js Outdated Show resolved Hide resolved
@mzur
Copy link
Member

mzur commented Feb 1, 2024

Also can you please sync the dev-modules branch of your fork? Then the test-modules check should work, too.

@gkourie
Copy link
Contributor Author

gkourie commented Feb 1, 2024

Also can you please sync the dev-modules branch of your fork? Then the test-modules check should work, too.

I did, but still not working.

Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks even better now. One final thing came to my attention:

If the sprites do not exist, the thumbnail component sends an HTTP request basically on each mousemove event. Instead, I suggest that a) the component should try each URL only once or twice and then give up (it will try again if the mouse is moved away and then back again, creating the component anew) or b) try each URL only once each 10, 20 or 30 seconds.

@mzur
Copy link
Member

mzur commented Feb 2, 2024

Also can you please sync the dev-modules branch of your fork? Then the test-modules check should work, too.

I did, but still not working.

Sorry, it seems like master had to be synced instead. I did this now and the tests pass.

@gkourie gkourie requested a review from mzur February 4, 2024 18:22
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@mzur mzur merged commit bcbb815 into biigle:video-sprites Feb 16, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants