Jump to content

Active video has small gap on side and bottom of screen


PrincessClevage

Recommended Posts

Setup:

ET 3.0.3

Electron 1.4.16 (yeah, took the one I had from when ET stopped self-updating)

Frame rate switching enabled (and working)

Modified refreshrate.lua script that use "nircmdc" to force maximize the window after refresh rate is changed

 

Result:

Smooth playback with correct TV/monitor refresh rate

No small gap

Set ET back into full screen if it wasn't after turning the screen off/on or if Windows displayed a notification or similar stuff

 

Doesn't work with Electron 2.0.8 because it makes a total mess when trying to maximize the window (the small gap becomes a pretty big gap...lol).

Link to post
Share on other sites

It's now been over four months since this was first reported - and we appear to be no closer to a real fix. 

 

Are we going to be stuck with having to manually downgrade to an old Electron release for the foreseeable future?

Link to post
Share on other sites
Guest asrequested

As a test, can you locate main.js in your installation, and change this line:

 

https://github.com/MediaBrowser/emby-theater-electron/blob/master/main.js#L37

 

to

playerWindow.setSize(winSize[0] + 10, winSize[1] + 10);

Let me know if that helps. Thanks.

 

 

But this also appears to work. At least when I tested :)

 

But it does cause a few seconds delay in starting. Even with refresh rate switching, turned off. It freezes on the movie splash screen, for a few seconds, then plays.

Edited by Doofus
Link to post
Share on other sites

That will not cause any starting delays. Next thing to test is lower the amount of the hack to the smallest number needed. Ideally it will just be a + 1.

Link to post
Share on other sites

That will not cause any starting delays. Next thing to test is lower the amount of the hack to the smallest number needed. Ideally it will just be a + 1.

 

This won't cause the video to be resized will it? 

Link to post
Share on other sites
Guest asrequested

That will not cause any starting delays. Next thing to test is lower the amount of the hack to the smallest number needed. Ideally it will just be a + 1.

 

This worked. And true enough, the delay is not a delay. What I was seeing is just part of the process of switching :)

playerWindow.setSize(winSize[0] + 1, winSize[1] + 1);
Edited by Doofus
Link to post
Share on other sites

I had to use +3 for both values to remove the entire gap.

 

+1 and +2 still showed a slight gap. 

 

Using different values definitely resizes the image, I took screen shots using various values and +10 caused a significant amount of resizing. +3 (at least for me) gets rid of the gaps and appears to show an unresized image. Hopefully it's not being resized twice.

 

I ripped a small test video from a Blu Ray test disk which I used in the screenshots I posted earlier.

 

If anyone else wants to check it, I've put a copy here. That particular scene is at around the 1 minute mark, pause the video and then hit Win-Printscrn and you'll get a screenshot in the windows pictures/screenshots folder.

Link to post
Share on other sites

Here's something curious. If you press "f" to window then again to fullscreen, the gap goes away. Maybe somebody already reported that?

 

Err... seriously?? I already reported it months ago (several time). I even posted modification to the lua script that do it automatically when starting playing a video...

Link to post
Share on other sites

That will not cause any starting delays. Next thing to test is lower the amount of the hack to the smallest number needed. Ideally it will just be a + 1.

 

Isn't that going depend of your Windows theme (window decoration)? And isn't the Windows shifted slightly to the left and top of the screen in the first place and not just scaled down by a few pixels? If that's the case, overscan will "hide" the problem but it will also mean that the picture is slightly resized and that a few pixels, on the left and top of the video, will be outside of the window.

Link to post
Share on other sites
Guest asrequested

Err... seriously?? I already reported it months ago (several time). I even posted modification to the lua script that do it automatically when starting playing a video...

Well I did say, maybe somebody already reported it? :P

Link to post
Share on other sites

Err... seriously?? I already reported it months ago (several time). I even posted modification to the lua script that do it automatically when starting playing a video...

Can you link to that? That's a better option. Thanks.

Link to post
Share on other sites

Can you link to that? That's a better option. Thanks.

 

 

https://emby.media/community/index.php?/topic/46763-theater-mpv-test/page-84&do=findComment&comment=487745

https://emby.media/community/index.php?/topic/46763-theater-mpv-test/?p=483845

https://emby.media/community/index.php?/topic/59225-active-video-has-small-gap-on-side-and-bottom-of-screen/page-5&do=findComment&comment=597145

and "a few" more posts... just search posts by me that contain "maximize"

 

or if you prefer, I posted the specific change to the lua script here:

https://emby.media/community/index.php?/topic/59225-active-video-has-small-gap-on-side-and-bottom-of-screen/page-4&do=findComment&comment=594219

 

What I did in the lua script is awful. There is no reason to call an external software to do it but the lua script was the easiest place that didn't need any change to ET itself (at that time, ET wasn't using officially a lua script. The script it is now using, with the new "refreshrate" utility, amount to the same and is pretty similar). Imho, you should try to force a full screen when starting to play a video directly with Electron functions and not by calling something in the lua script.

 

Yes, I know, some people are going to say "but that will force me to run ET in full screen". That's not case because you can either add an option to "run ET in full screen" or test if it looks like ET should be in full screen and only if that's the case force it (again) in full screen. 

 

I am pretty sure it's a bug with Electron/Windows: It's not because ET isn't in full screen. ET is supposed to be in full screen but for whatever reason the window is displayed incorrectly. Minimizing and maximizing again the window, even if it shouldn't be needed, fix the problem.

Link to post
Share on other sites

I just noticed that, sometime, when I bring-up the OSD, there is an extra button (the last one) in the shape of a square. But most of the time, I don't have it.

I guess this button is to toggle between full screen and windowed? I dunno how relevant it is, but my ET is supposed to be always in full screen and yet, sometime I get this button. If I click on it (while the video is playing and taking the full screen), then I get a right and bottom window border that looks like the "small gap". If I reclick on it, nothing change and the video never get back to a real full screen without any gap until I minimize/maximize the window either programmatically or by using the window buttons. 

 

I have no idea why, most of the time, ET and the video look like they are in full screen  (without any border or gap or anything) and that button isn't displayed in the OSD and why, some time, that button is displayed.

Link to post
Share on other sites

ok but as you say that's dependent on nircmd, right?

 

I am using nircmd to do it because I don't have access to ET source code. Using nircmd is just a work-around and it's definitively not how it should be done. Why don't you try to modify ET code to force a maximize of the window? I don't know Electron but I suppose there is a function to do it?

 

The square button in the OSD is proof enough that ET isn't always in fullscreen even if it seems to be. Which result in the "gap". The "gap" isn't really one: it's the window border. As I already said, it's a bug between Electron and Windows. It won't be solved by tweaking the size of the window: It it's in full screen, it should really be in full screen. Forcing a full screen, even if it shouldn't be needed, fix the problem. Adding a few pixel to the window that should already be in full screen won't fix anything: that result in overscan and a whole lot of unpleasant side effect.

Link to post
Share on other sites

A quick look at Electron doc:

When you create the window, you should use: BrowserWindow.setFullScreen(true)

 

If that's what you are already doing and it doesn't help or if you don't want to use this mode for whatever reason, then my guess would be to force a maximize when starting to play the video with: BrowserWindow.maximize()

 

Again, I only used nircmd as a proof of concept and because that's a way to do it without change anything to ET code. But that's not how it should be done in production.

  • Like 1
Link to post
Share on other sites
PrincessClevage

For the moment I have given up on frame rate switching and for that SVP which is purpose built to provide smooth playback at =+60fps

I am currently testing and will see how it goes

https://www.svp-team.com/wiki/Main_Page

i have been running this setup for a while now and quite happy with it after fixing live tv freezing issue (had deinterlace enabled in ET and also SVP,disabling it in svp fixed the issue). Movies play nice and smooth at 60fps and no longer requirement for frame rate switching. I have observed as others have pointed out that ET is not always full screen (even tho it looks like it is) and I have mapped Windows button + up arrow to a button on my remote until it gets sorted.
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...