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

Select frame for thumbnail extraction #1052

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Dreamink-Official
Copy link

Changes: Instead of using the middle frame of the video, the user can now select a specific frame for thumbnail generation. If no valid value is provided, the middle frame will still be used as a fallback.

Changelog Description

  • Added get_attribute_defs() to introduce the frame selection field in the publisher.
  • Created _get_thumbnail_frame() to retrieve the correct frame.
  • Adjusted _create_frame_from_video() to select the specified frame from the video instead of using timestamps.

Additional info

This PR is related to #1051.
As mentioned in the issue, I am not entirely sure which option aligns best with the default behavior of AYON:
A. Enter the real frame number to be used as the thumbnail (e.g., 1005) (my preferred method).
B. Enter the frame number of the extracted video (e.g., 5).

In the first commit, I used my preferred method [A].

Testing notes:

  1. Create a product type that also generates a thumbnail.
  2. Enter your frame number.
  3. Publish.

image

Changes: Instead of using the middle frame of the video the user is now able to select a specific frame for the thumbnail generation. If no valid value is specified it will still use the middle frame as fallback
@ynbot ynbot added the size/S label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants