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

Support storyboards on very short shorts #3128

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Jan 29, 2023

Support storyboards on very short shorts

Pull Request Type

  • Bugfix

Related issue

Issue noticed in #3093

Description

For long videos, YouTube returns storyboards with an image for every 10 seconds, as you are unlikely to notice it as the progress bar can only be so wide, so making them more granular would be pointless. However for very short videos like the one in the test case below, which is only 13 seconds long, it's definitely worth having more granular thumbnails, so YouTube returns them in a sub one seconds intervals (for that video 0.14s), so that means that the interval value in the storyboards, which is an integer is 0. The current code relies on that interval always being larger than 0.

This pull request adds support for those 0 interval storyboards by dividing the length of the video by the number of thumbnails on the storyboards. Unfortunately YouTube also only returns very low quality thumbnails for those videos, so we can either leave them being tiny like they are now, or stretch them to be larger like YouTube does, which looks bad too.

Testing

https://www.youtube.com/shorts/Jj9PmISOzCQ

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.18.0

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 29, 2023 11:22
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 29, 2023
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

image

@absidue
Copy link
Member Author

absidue commented Feb 4, 2023

@ChunkyProgrammer @efb4f5ff-1298-471a-8973-3d47447115dc please review 🥺

@PikachuEXE
Copy link
Collaborator

Let's get 3 pokemons to drink water approvals
FlPNYZMaYAEoGL1

@FreeTubeBot FreeTubeBot merged commit 29f5113 into FreeTubeApp:development Feb 5, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Feb 5, 2023
@absidue absidue deleted the shorts-storyboards branch February 5, 2023 19:44
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