Open mmuman opened 5 years ago
You mean when you upload a specific image for a video thumbnail? Or when PeerTube automatically created the thumbnail from the video?
We can't support png images for thumbnails because they are federated and it could create storage/bandwidth issues. But maybe we can improve the jpeg compression or ffmpeg thumbnail generation :thinking:
I mean uploading an existing png file. I didn't try letting it make a thumbnail from the video, but I suspect it wouldn't be any better than a jpeg.
I don't really see the problem with PNG, the size really depends on the content, a simple graphic can probably be smaller in a PNG than JPEG.
I don't really see the problem with PNG, the size really depends on the content, a simple graphic can probably be smaller in a PNG than JPEG.
Good point. We would just have to check the PNG thumbnail file is not bigger than a limit (~10ko for example) after sharp resizing.
similar issue
What about WebP? Lossless WebP tends to be significantly smaller than PNG, and has become well-supported across browsers.
Didn’t know webP could be lossless. I spin up ImageMagick real quick and make a comparison.
magick wizard.png -quality 50 -define webp:lossless=true wizard.webp
webp whielded some amazing results.
spin up ImageMagick real quick
9h later... sorry lol
ironically the jpeg above seems to be 27K big Lel
I think part of the reason the JPEG is 27 KB is that its quality is set at 95 rather than something like 80.
I can confirm the lossless WebP equivalent of the PNG is 1.8 KB. The PNG itself could be optimized to around 2 KB, but at that point conversion seems like the better choice unless compatibility is a concern for a certain use case.
WebP is awesome, especially little animated webp images. They load fast, look great and enable the designer to really do some eye-catching work.
On low resolution videos (like, capture of old computer emulators), using jpeg for thumbnails makes them very blurry. Supporting PNG would fix this.
Even though it might be a wanted effect, it's not always the case. Example: vs