ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
2.5k stars 291 forks source link

feat(YouTube): Monochrome thumbnails #3531

Open MaxVonMustermann opened 3 months ago

MaxVonMustermann commented 3 months ago

Feature description

There are several browser plugins that not only replace YouTube-thumbnails, but make thumbnails (whether it is the originals or altered ones), completely monochrome. Maybe an additional button for filtering out colors from thumbnails is potentially possible.

Motivation

I hope this feature is not too hard to implement. It would help focussing more on decent content than focus on colorful clickbait. It helped me a lot to have this feature on my PC and other devices, only my phone does not support it, making doomscrolling more of a danger there. Therefore, I hope other people would benefit as well.

Acknowledgements

LisoUseInAIKyrios commented 3 months ago

This could be done if the thumbnails were loaded using a localhost proxy http server, and the proxy fetches the image, modifies the image, then hands it to the YT app calling in.

I had this idea working with Alternative thumbnails, where a locally running thin http server and it worked well, but gave up because the calling YT Cronet classes require https for all connections. To work with https requires bundling a https certificate, or requires adding a manifest entry to allow unsecure http (which will never work for root installs). Most of that code is here. Maybe it's possible to patch the Cronet classes to force allow unsecure http, and if that is possible then this idea could work again.

Instead of a pure black and white filter, it would be nice to add simple image detection and suppress the contrast only from obnoxious thumbnails that have bright fake colors and look like it was made by a child with MS Paint.

MaxVonMustermann commented 3 months ago

Maybe having both, a pure black and white filter for all video thumbnails as well as a "scale down color" feature would be great, if implemented! I hope to see this feature one day! :)