avi12 / youtube-auto-hd

A simple browser extension for changing YouTube videos' quality based on FPS.
https://avi12.com/youtube-auto-hd
GNU General Public License v3.0
235 stars 28 forks source link

[Bug] Don't show or don't apply resolutions higher than viewport & screen (which wastes electricity) #40

Closed ImprovedTube closed 2 years ago

ImprovedTube commented 2 years ago

for example 4K is not reasonable scaled down below a view port of 1440p such as 1080p or little more. many smiles 👋

@sameernyaupane

avi12 commented 2 years ago

The extension's goal is not to make the calculation and apply suggestions on behalf of the user but rather to let him decide what quality he wants to use

When I first made the extension, my computer back then could not correctly render 1080p 60 FPS due to the graphics card, which made the browser lag quite a bit So I made this extension so I could make it pick 720p 60 FPS or 1080p 30 FPS

ImprovedTube commented 2 years ago

Hi @avi12, while many of your users will have a good reason, also many users searching auto HD are not technical though (as for many/most apps) and just want 'the best'. So they will select 4k. Plus have a good computer and bandwidth. Still that bandwidth & cpu can be saved easily...

Nobody else but you or contributors in this repo can do this. If we can afford just a few working hours to potentiallly save tons of co2, then we should already be at it.

Ps: removed the link that came in the spirit of open source. No idea what you are competing for

avi12 commented 2 years ago

My goal is to deliver the best user experience, not take actions on behalf of the user that I think "are the right ones". I'm giving the user the option to do whatever he wishes to. It's up to him to trial and error on videos to find the best qualities to use for each FPS.

ImprovedTube commented 2 years ago

Hi! It is also a better user experience not to allow spending bandwidth for nothing. Even if some users might never notice their mistake and not count the seconds and electricity they lose through it. We don't need to offer a useless option, when checking compatibility will be efficient. (Such can also make menus shorter, by one item at a time (for most userswhile 4k and 8k screens are still the minority))

avi12 commented 2 years ago

You're welcome to open a PR then I have a full-time job to take care of, hence browser extensions like this one are just side projects

ImprovedTube commented 2 years ago

For today, was trying to send this issue developers from ImprovedTube where a similar issue is pinned and seen.

avi12 commented 2 years ago

FYI, the extension does select by default the quality closest to the user's resolution https://github.com/avi12/youtube-auto-hd/blob/5213fcb02d301f3c3193ea950ff8116649799e53/src/shared-scripts/ythd-setup.ts#L6

ImprovedTube commented 1 year ago

hi, ...on the contrary, just wondered what might be your insight/take on this:

Setting resolution above monitor physical max is often used when watching something that YT compression is not good at. For example drone racing in the forest is unwatchable in normal 1080p, so youtubers take their own 1080 footage and encode it in 4K, then if you watch tht 4K version you will get better bitrate thus better quality. Blocking users from watching higher res than monitor is imo not a good idea.

( https://github.com/code-charity/youtube/issues/1580#issuecomment-1530763946 )

avi12 commented 1 year ago

That's an interesting point, I wasn't aware of that

I think YouTube already does something similar on mobile: it only shows up to 1440p as an option, even if the video has 2160p if your phone resolution is 1080p

But if I implemented your suggestion as a feature, it might annoy some users who want to choose their quality settings

Maybe I could show a message to the user that explains that choosing a quality higher than their screen resolution won't make a difference, because YouTube will scale down the video to fit their screen. For example, if you have a 1080p screen and you watch a 2160p video, it will be scaled down to 1080p

Another possible feature is to lower the quality automatically when the video is not visible on the screen, to save some computing power and electricity. But this could also affect the user experience, because changing the quality would make YouTube reload the video, which could cause delays or buffering issues, especially for users with slow internet connections