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

Low quality and distorted aspect ratio of the preview image in versions starting from 3.0.0 for at least youtube videos #427

Open
level420 opened this issue Apr 3, 2024 · 7 comments · May be fixed by #437

Comments

@level420
Copy link

level420 commented Apr 3, 2024

Up to version 2.0.3 of the embetty server, the preview image of a youtube video was rendered fine, showing the preview image with the "native" resolution and aspect ratio of the video.

From version 3.0.0 on, it seems that the preview image is forced to a resolution of 480 x 360 px with an aspect ratio of 4:3, which leads to a distorted and low quality preview.

General information

  • embetty version: 2.0.3 vs. 3.0.0 and up
  • Node.js version: image from docker hub
  • Operating system name and version: docker
  • Browser name and version: chrome, firefox, safari, edge

Steps to reproduce the behaviour

Embed a youtube video for use with embetty, e.g. RvpudFBKUbo

Expected behaviour

The preview image rendered should have a resolution of 1280 x 720 px as with embetty server up to 2.0.3

screenshot-embetty-server-2-0-3

Actual behaviour

The preview image has a resolution of 480 x 360 px (aspect ratio 4:3) from embetty server starting with version 3.0.0 which leads to a distorted and low resolution up scaled image which looks ugly

screenshot-embetty-server-3-0-0

@level420
Copy link
Author

level420 commented Apr 5, 2024

@pmb0 I've seen the latest commits were done by you. Are the issues still tracked by the heise-Team?
Some reaction would be cool! Thanks allot!

@pmb0
Copy link
Member

pmb0 commented Apr 18, 2024

Hi. At the time, I had not found a way to get the images in better quality without loading the Google code.

@level420
Copy link
Author

level420 commented Apr 19, 2024

@pmb0 thank you for your answer. As the preview images are still retreived with the correct resolution and aspect ratio with the old server version 2.0.3: couldn't that code ther be used again for version 3.x ?

@level420
Copy link
Author

level420 commented Jul 1, 2024

@pmb0 any chance that this will get fixed?

@frictionel
Copy link

Wouldn't it be sufficient to change

return `https://img.youtube.com/vi/${this.id}/hqdefault.jpg`

into: return 'https://img.youtube.com/vi/${this.id}/maxresdefault.jpg'?

Reference: https://tools.simonwillison.net/youtube-thumbnails?url=CRpHNB87gRY

@djmaze
Copy link

djmaze commented Oct 17, 2024

The fix proposed b @frictionel works for me as well. Created a PR at #437.

@level420
Copy link
Author

@pmb0 It would be very kind if an new embetty server version could be published which hat PR #437 merged.
Thank you in advance.

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 a pull request may close this issue.

4 participants