PeerTube icon indicating copy to clipboard operation
PeerTube copied to clipboard

Increase thumbnail resolution (or make configurable)

Open aeharding opened this issue 2 years ago • 3 comments

Describe the problem to be solved

A large and growing segment of computer displays are running at 2x and larger pixel densities.

Currently, PeerTube thumbnail images are the same size as the actual container (1x):

Screenshot 2023-02-17 at 9 50 50 PM

However, this leads to thumbnails that look noticeably blurry/low quality.

Describe the solution you would like

Double the size of thumbnails, or greater (to allow for more flexibility in customizing the UI, for example zoom animations).

This would also align with what other video streaming platforms are doing, such as YouTube:

Screenshot 2023-02-17 at 9 54 53 PM

Lastly, mobile devices already use the larger PREVIEWS_SIZE as thumbnails, so increasing THUMBNAILS_SIZE would have no impact on mobile devices.

Similar issue, but for PREVIEWS_SIZE: #5464

aeharding avatar Feb 18 '23 04:02 aeharding

Hello, We suffer from the same prob, and we would love to have better quality resolution for thumbnail. Maybe a way to configure it on server side (if not already available ?)

If already exists, I would be interesting to know how to do it .

Thx in advance

eddyacthergal avatar Jan 10 '24 15:01 eddyacthergal

I'd like to see this as well.

SimplyCorbett avatar Feb 14 '24 10:02 SimplyCorbett

I am planning to do a PR for making the PREVIEWS_SIZE and THUMBNAILS_SIZE configurable from some of the configs. The default values would stay the same, so we maintain backwards compatibility:

// Videos thumbnail size
const THUMBNAILS_SIZE = {
  width: 280,
  height: 157,
  minWidth: 150
}
const PREVIEWS_SIZE = {
  width: 850,
  height: 480,
  minWidth: 400
}

What do you think ?

gergob avatar May 19 '24 05:05 gergob

Please do :)

Chocobozzz avatar May 28 '24 06:05 Chocobozzz

Implemented in https://github.com/Chocobozzz/PeerTube/commit/3fbe84918392141e16976b952932e7eac10e99be & https://github.com/Chocobozzz/PeerTube/commit/1e3a5b25c367b47e49808b443c504769db21ebe6

Chocobozzz avatar May 31 '24 07:05 Chocobozzz