Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raszpl patch 2 #1671

Merged
merged 12 commits into from
May 8, 2023
Merged

Raszpl patch 2 #1671

merged 12 commits into from
May 8, 2023

Conversation

raszpl
Copy link
Contributor

@raszpl raszpl commented May 4, 2023

'up next autoplay' moved next to autoplay, quality moved next to codec options
added helper modal function, "Codec h.264" sets "Codecs", "Codecs" disable "Codec h.264"
Improved modal dialog handling, clicking outside tries to Cancel, previously clicking outside just force removed dialog.
removing "block_vp8", YT doesnt use it anymore. "Codecs" works now, can pick individual codecs to block.
more work on ModalHelper, popup warnings for disabling all video decoders.
more h264/codec interaction work, now switching one automatically updates another.

  • Preliminary optimize_codec_for_hardware_acceleration implementation.
    • Needs a list of GPUs with supported hardware codecs.

raszpl added 11 commits May 3, 2023 01:35
typo in comment, missing semicolon, spaces to tabs
alignment, spaces to tabs
more code alignment
'up next autoplay' moved next to autoplay, quality moved next to codec options
added helper modal function, "Codec h.264" sets "Codecs", "Codecs" disable "Codec h.264"
Improved modal dialog handling, clicking outside tries to Cancel, previously clicking outside just force removed dialog.
fixing previous commit duplicate lines
removing "block_vp8", YT doesnt use it anymore. "Codecs" works now, can pick individual codecs to block.
removed block_vp8
more work on ModalHelper, popup warnings for disabling all video decoders.
more h264/codec interaction work, now switching one automatically updates another. Preliminary optimize_codec_for_hardware_acceleration implementation. Needs a list of GPUs with supported hardware codecs.
@raszpl
Copy link
Contributor Author

raszpl commented May 4, 2023

Few strings like 'Optimize Codec for hardware acceleration' 'You need either VP9 or H264 enabled for Youtube to work. Disabling both will break Video.' will need localization.

@ImprovedTube
Copy link
Member

ImprovedTube commented May 8, 2023

hey, thanks!!😮😮😮 regret to be late!

'You need either VP9 or H264 enabled for Youtube to work. Disabling both will break Video.'

tried to say in #1211 "2."
the switches should start with the newest:
"avoid AV1...
especially we dont need the "block h264" at first (all GPUs support it.)
neednt have the current switches with 5² possible combinations,
Afaik only 4 Options make sense:

  1. "Prefer VP9, VP8, h264 = Avoid AV1 codec & newer"
    ( = common in 2023, good for almost everybody, while more GPUs with VP8 & VP9 are still increasing )

2. " Prefer VP9 & h264 = Avoid AV1 + VP8 codec "
( Because some GPUs can do VP9 but not VP8: 8 Nvidia GPU Names: GT 1030 GTX 1050 / GTX 1050 Ti / MX350 GTX 1060 GTX 1080 Ti GTX Titan X Titan Xp )

  1. " Prefer VP8 & h264 = Avoid VP9 & AV1" ( still very common)

3. " avoid VP8 codec and newer(=VP9 & AV1)" ( same as h264ify) (=old now & getting rarer)


2003 H.264 was released

2008 VP8   
2012 VP9

2018 AV1

@ImprovedTube ImprovedTube merged commit d6e9b8f into code-charity:master May 8, 2023
@ImprovedTube
Copy link
Member

mario-kart-ds-mario-kart

@ImprovedTube
Copy link
Member

ImprovedTube commented May 8, 2023

*didnt see all at first! 🤩 thanks!

@raszpl
Copy link
Contributor Author

raszpl commented May 9, 2023

Afaik VP8 no longer exist on YT, that is YT doesnt server any VP8 content anymore. Every time a page loads YT queries browser for its codec capabilities, you can

  • open devtools
  • go to Sources
  • find 'Improved Youtube' in the list on the left
  • find core.js, click on it to open
  • scroll down to line ~77 "if (localStorage['it-codec']) {"
  • set Breakpoint
  • reload page

in every breakpoint look at mime variable, it will contain codec String Youtube is testing. Afaik it will be around 20 tests, different codecs and capabilities (50/60fps etc). Im not sure if its different depending on video sources available. This will give you an idea of what YT uses.

@raszpl
Copy link
Contributor Author

raszpl commented May 9, 2023

Codecs were listed from oldest to newest. That is the usual convention.
Speaking of order all modal dialogs are cancel/accept instead of accept/cancel like everything else in the browser :( feels like using Arabic software :)

@ImprovedTube ImprovedTube added Knowledge Base / Dokumenation for developers We should repurpose this for future reference / Wiki / Education / Introduction Exemplary! worth reading & repeating. labels May 10, 2023
@ImprovedTube
Copy link
Member

ImprovedTube commented May 10, 2023

Hi 🤩 please keep it up 😀 your methods are advanced. Somebody should make them wikipages.

Afaik VP8 no longer exist on YT

also wondered to remember something

so all-together, its just 2 options , for YouTube

  1. Auto (default)
  2. Avoid AV1 (the "new/future h264ify") ( GPUs produced before 2021)
  3. Avoid AV1 & VP9 (& reduce resolution if CPU rendering would make my CPU run hot at low framerate ( unless we find youtube does enough of that (= avoid 4k, unless special & relatively recent CPUs) ( while "2." equals h264ify. )
  4. Off / Do nothing

( so it could be just a 3-way-switch, )
while always keeping your indicator to make it easy/clear 👍

(or keeping all switches just in case we are missing a relevant reason to block all, just probably we aren't.)

@ImprovedTube
Copy link
Member

ImprovedTube commented May 10, 2023

UI:

oldest

"most common first" is efficent /more useful to people who hurry or dont know much yet & might just try whats good

modals .... .(

yes, we can make it / change it 👍 (+one could claim breaking standards can be worth it, if users need focus/not click mindlessly, but anti-UX might rarely really make sense)

Seems a bit hard to define the standard:
For messengers the "send"-button is on the bottom right.
While for Website forms, like gmail "send" might be on the left and "delete" on the right.


Also our toggles, are on right visually, like mobile Apps, unlike most extensions,
which might have checkboxes, on the left.

I think all at once wouldnt harm: a check at the right and left & the whole item also reacting like a big key, shrinking in size when active (pressed in) (=less scrolling!) (- and getting a slight shadow, or slight lightning or partical lightning certain mechanical)

@raszpl raszpl deleted the raszpl-patch-2 branch May 11, 2023 16:43
@ImprovedTube ImprovedTube added the Open! Not to forget. Unfinished (or waiting for a requirement) (unless combined with label: riddle) label Jul 9, 2024
@ImprovedTube ImprovedTube self-requested a review August 9, 2024 18:46
@ImprovedTube
Copy link
Member

Greetings! @raszpl

@ImprovedTube ImprovedTube self-assigned this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Exemplary! worth reading & repeating. Knowledge Base / Dokumenation for developers We should repurpose this for future reference / Wiki / Education / Introduction Open! Not to forget. Unfinished (or waiting for a requirement) (unless combined with label: riddle)
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants