youtube-ambilight icon indicating copy to clipboard operation
youtube-ambilight copied to clipboard

Removing bars and "Fill video to screen" does not work on 4:3 videos where YouTube zooms in the video

Open zachpoblete opened this issue 1 year ago • 11 comments

Bug description

When in theater mode and "Hide everything in theater mode" is on, toggling "Fill video to screen" seems to have no effect.

Steps to reproduce the behavior

  1. Enter theater mode.
  2. Enable "Enabled."
  3. Enable "Hide everything in theater mode."
  4. Enable "Fill video to screen."
  5. Find that nothing has changed.

Maybe "Fill video to screen" is supposed to work under other conditions, but as a first-time user, I would expect that the setting would definitely work when in theater mode and "Hide everything in theater mode" is on, but still, nothing changes when I toggle "Fill video to screen."

Browser

Chrome, Microsoft Edge, Firefox

Operating system

Windows

Extension version

2.38.1

The bug still happens in these conditions

  • [X] The bug still persist when I disable all other extensions (ex. in incognito mode with only this extension enabled)
  • [X] When I logged out of my YouTube account (ex. in incognito mode)
  • [X] In incognito mode

Additional context and/or screenshots

I would expect that the borders of the video would extend until they hit the borders of the visible page, but there remains space between all the borders.

Screenshot 2024-01-21 01_02_19

Testing on other videos, the other settings under "Remove black & colored bars," e.g. "Remove black bars," seem to work.

zachpoblete avatar Jan 20 '24 18:01 zachpoblete

"Fill video to screen." only zooms the video to the available space in the video player when black bars are detected and removed.

I can see where the confusion comes from. Renaming the setting seems like a good solution. What name would you suggest for this feature?

WesselKroos avatar Jan 20 '24 20:01 WesselKroos

Oh, in that case, I would suggest, "Fill video to removed bars."

But hmm, now I've run into a different issue.

I was trying to see if "Fill video to screen" would work for this video ~which has both vertical and horizontal bars.~

However, when I'm in theater mode and enable "Remove black bars," it crops the top and bottom of the video.

"Remove black bars" works in default mode, but "Fill video to screen" isn't doing anything.

Mode "Remove black bars" $\color{Red}{\textsf{OFF}}$ ("Fill video to screen" on) "Remove black bars" $\color{Green}{\textsf{ON}}$ ("Fill video to screen" on)
Theater image image
Default image image

Is "Remove black bars" cropping the top and bottom of the video a new issue?

zachpoblete avatar Jan 21 '24 06:01 zachpoblete

work for this video which has both vertical and horizontal bars.

Interesting... It looks like YouTube is cropping top and bottom black bars on videos with an aspect ratio of 4:3 by themselves now? That's new, and seems to cause the video to be moved down instead. Btw, the source video has only black bars at the top and the bottom, not on the sides.

Anyway, here is a video on which it still correctly works: https://www.youtube.com/watch?v=oSxqkER3N6Y

Original Removed black bars Removed black bars + fill to screen
image image image

WesselKroos avatar Jan 21 '24 12:01 WesselKroos

By the way, what's an example of colored bars being removed?

zachpoblete avatar Jan 22 '24 20:01 zachpoblete

It's most often usefull for videos with white bars https://www.youtube.com/watch?v=O1LPzQsty8U And there are also old videos with grey bars or you could encounter music videos with colored bars.

WesselKroos avatar Jan 22 '24 20:01 WesselKroos

Ah, I see. I was confused as to why it didn't do anything for this video, but now I understand it's for whites and grays.

Is a delay in removing the bars to be expected whenever the bar size changes?

zachpoblete avatar Jan 22 '24 20:01 zachpoblete

It also works on colored bars. But it does not work on that video because it has large vertical and horizontal bars. Because there is no distinction between the horizontal and vertical bars in the corners.

Yes, it throttles detection for an x amount of frames to prevent false-positives. Like a concert video shot that pans upwards a rectangle stage where, at night, the sky and the crowd can both be black.

You can turn down the delay though, by turning down the average frames in the advanced bar settings.

WesselKroos avatar Jan 22 '24 22:01 WesselKroos

There seems to be a false positive in this video when enabling "Remove black sidebars" along with "Also remove colored bars."

After the video pans to the right from 1:11–1:12, the gray backgrounds of Premiere are mistaken for bars even though there are UI elements in the portions that are being cropped.

Original Remove sidebars ON
image image

zachpoblete avatar Jan 23 '24 05:01 zachpoblete

That's because of the small blue line on the left side. There will be many more false-positives with colored bar detection on.

WesselKroos avatar Jan 23 '24 07:01 WesselKroos

Styling these kind of videos seems to be more difficult than expected.

WesselKroos avatar Feb 18 '24 20:02 WesselKroos

There seems to be a false positive in this video when enabling "Remove black sidebars" along with "Also remove colored bars."

That's because of the small blue line on the left side. There will be many more false-positives with colored bar detection on.

@zachpoblete Since #225 has been released in 2.38.2 it is now possible to tune the aggressiveness of the bar removal feature via the "Detection: Ignored elements" slider.

WesselKroos avatar May 10 '24 15:05 WesselKroos

Apparently YouTube zooms in on a video in theater view when it has a yt:crop value in it's keywords. https://youtu.be/RyVXzzXP7Jg has a yt:crop value of 16:9 <meta name="keywords" content="keywoord1, ..., yt:crop=16:9">

Removing that keyword from the player's internal list of keywords via the updateVideoData function, when the ambient light is enabled, seems to workaround this problem: document.querySelector('#movie_player').updateVideoData({ keywords: "keyword1,..." })

WesselKroos avatar Jul 04 '24 18:07 WesselKroos