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

[Bug] First storyboard is always broken #3441

Closed
iBicha opened this issue Nov 27, 2022 · 2 comments · Fixed by #4153
Closed

[Bug] First storyboard is always broken #3441

iBicha opened this issue Nov 27, 2022 · 2 comments · Fixed by #4153
Labels
bug Something isn't working module:player Impacts the video player of Invidious

Comments

@iBicha
Copy link
Contributor

iBicha commented Nov 27, 2022

Describe the bug
/videos/:id consistently returns storyboards where the first one has interval set to zero, and the link to the image does not work

Steps to Reproduce

  1. /api/v1/videos/UhbixyxgsiU
  2. returns 3 storyboards. The first storyboard returns
         "url":"/api/v1/storyboards/UhbixyxgsiU?width=48&height=27",
         "templateUrl":"https://i.ytimg.com/sb/UhbixyxgsiU/storyboard3_L0/M$M.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgjBmdybBg%3D%3D&sigh=rs%24AOn4CLCylqTadmdG47eeeabSoPONMNLC8g",
         "width":48,
         "height":27,
         "count":100,
         "interval":0,
         "storyboardWidth":10,
         "storyboardHeight":10,
         "storyboardCount":1

"interval":0 and link does not work

@iBicha iBicha added the bug Something isn't working label Nov 27, 2022
@SamantazFox SamantazFox added the module:player Impacts the video player of Invidious label Nov 29, 2022
@SamantazFox
Copy link
Member

Thanks for reporting :)

@ChunkyProgrammer
Copy link
Contributor

This is what was done in FreeTube and may be adapted for Crystal (I'm not familiar with the storyboard parsing in the Invidious code base)
FreeTubeApp/FreeTube#3128

  const numberOfSubImagesPerImage = storyboard.columns * storyboard.rows
  // the number of storyboard images
  const numberOfImages = Math.ceil(storyboard.thumbnail_count / numberOfSubImagesPerImage)
let intervalInSeconds
  if (storyboard.interval > 0) {
    intervalInSeconds = storyboard.interval / 1000
  } else {
    intervalInSeconds = videoLengthSeconds / (numberOfImages * numberOfSubImagesPerImage)
  }

@github-actions github-actions bot added the stale label Feb 8, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2024
@SamantazFox SamantazFox removed the stale label Aug 16, 2024
@SamantazFox SamantazFox reopened this Aug 16, 2024
@iv-org iv-org deleted a comment from github-actions bot Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:player Impacts the video player of Invidious
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants