pietervanheijningen / clickbait-remover-for-youtube

Replaces thumbnails and modifies titles of videos on youtube.com
https://chrome.google.com/webstore/detail/clickbait-remover-for-you/omoinegiohhgbikclijaniebjpkeopip
MIT License
354 stars 21 forks source link

Use higher resolution thumbnail images #59

Closed LisoUseInAIKyrios closed 9 months ago

LisoUseInAIKyrios commented 10 months ago

The replacement thumbnail images are somewhat low quality.

For example the plugin currently replaces thumbnails with: https://i.ytimg.com/vi/bu5-VERN3XY/hq1.jpg https://i.ytimg.com/vi/bu5-VERN3XY/hq2.jpg https://i.ytimg.com/vi/bu5-VERN3XY/hq3.jpg

But there exists higher resolution images: https://i.ytimg.com/vi/bu5-VERN3XY/sd1.jpg https://i.ytimg.com/vi/bu5-VERN3XY/sd2.jpg https://i.ytimg.com/vi/bu5-VERN3XY/sd3.jpg

And even higher resolution: https://i.ytimg.com/vi/bu5-VERN3XY/hq720_1.jpg https://i.ytimg.com/vi/bu5-VERN3XY/hq720_2.jpg https://i.ytimg.com/vi/bu5-VERN3XY/hq720_3.jpg

Additionally, webp images also appear to exist for all videos (which have the same resolution and visual quality but are half the file size): https://i.ytimg.com/vi_webp/bu5-VERN3XY/hq720_1.webp https://i.ytimg.com/vi_webp/bu5-VERN3XY/hq720_2.webp https://i.ytimg.com/vi_webp/bu5-VERN3XY/hq720_3.webp

The only downside to using these higher quality images, is the '720_N' images are not available for live stream videos and the also not available for random low view videos. So the plugin would need to first try to use the high resolution thumbnail, but fallback on using the lower resolution thumbnail.

Lastly on an slightly different topic, there also exists a max resolution thumbnail, which the plugin does not check for. I don't know if YouTube.com ever uses it, but the plugin should probably replace these if they ever somehow show up: https://i.ytimg.com/vi/bu5-VERN3XY/maxresdefault.jpg