WesselKroos / youtube-ambilight

This browser extension adds ambient light to YouTube videos
MIT License
87 stars 8 forks source link

Sometimes the black bar removal wont update #142

Closed nirgranth closed 2 years ago

nirgranth commented 2 years ago

Describe the bug Sometimes the black bar removal wont update, when changing aspect ratio

To Reproduce Go to https://youtu.be/oCmNbNhppHo?t=381 Play for 30 secs

Hide Black bars and coloured bars is on

WesselKroos commented 2 years ago

Clarification

  1. these are the required settings:
    • Remove black sidebars
    • Also remove colored bars
  2. The bug is that the vertical bars setting does not reset to 0 when transitioning from the Nitter video frame to the Wired video frame

Nitter video frame: image Wired video frame (incorrect): image Wired video frame (correct): image

Cause 3 different bars are detected in the Wired video frame, but the smallest detected bar is removed because it is the furthest away from the average detected bar size. The new detected bar width is ignored because the difference between the 2 detected bars is too great, and the previously detected bar is wider than the 2 remaining detected bars,

Fix When the detected bars have a difference that is too great, weight in all the the detected bars when checking if they are smaller than the previously detected bar.

Wired video frame (fixed): image