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

Playlist/Auto-Play broken on 2nd screen #161

Closed
ll811 opened this issue May 6, 2020 · 45 comments
Closed

Playlist/Auto-Play broken on 2nd screen #161

ll811 opened this issue May 6, 2020 · 45 comments

Comments

@ll811
Copy link

ll811 commented May 6, 2020

Auto-play is broken when dragging the player over to my television screen. Once a file is finished playing and the next one in the playlist starts, the player exits full screen mode and removes the border of the player.

To Reproduce
Steps to reproduce the behavior:

  1. Drag player over to 2nd "extended" display
  2. Start any playlist
  3. Skip to next file in playlist
  4. See error

Player will exit full screen and border will disappear

@ll811 ll811 added the bug label May 6, 2020
@stax76
Copy link
Collaborator

stax76 commented May 6, 2020

Maybe a driver bug, what's in your mpv.conf and which OS and gx card?

@ll811
Copy link
Author

ll811 commented May 6, 2020

Maybe a driver bug, what's in your mpv.conf and which OS and gx card?

Windows 10 and GTX 960. Running the latest version of mpvnet

input-ar-delay = 500
input-ar-rate = 20
volume = 85
volume-max = 100
hwdec = yes
keep-open-pause = no
osd-playing-msg = '${filename}'
screenshot-directory = 'E:\mpvscreenshots'
input-default-bindings = no
scale = spline36
cscale = spline36
dscale = mitchell
correct-downscaling = yes
linear-downscaling = yes
sigmoid-upscaling = yes
dither-depth = auto
deband = yes
autofit-larger = 100
autofit-smaller = 40
sub-font-size = 45
sub-border-size = 2
screenshot-template = '%F %P'
screenshot-jpeg-quality = 98
script-opts = osc-vidscale=no
taskbar-progress = no
slang = 'English,eng,en'
alang = 'English,eng,en'
screenshot-png-compression = 7

and mpvnet.config

start-size = video
minimum-aspect-ratio = 0
recent-count = 0
url-whitelist = '******************'
remember-volume = no

@ghost
Copy link

ghost commented May 6, 2020

@ll811 , I tested on my setup, extended display, did the operation as you describe, and it was flawless. I had absolutely no problem!

  1. You should backup your conf files (input.conf , mpv.conf and mpvnet.conf) in an archive, delete them, and try to see if the problem occurs with the default configs...

  2. you could also try this modification in mpv.net :
    delete line hwdec=yes
    put instead:
    vo=gpu,
    hwdec=no

    copy exactly as is, the comma " , " after "gpu" is intended, you must keep it.

Please try and tell me what happens.

@ll811
Copy link
Author

ll811 commented May 6, 2020

@44vince44 @stax76

  1. You should backup your conf files (input.conf , mpv.conf and mpvnet.conf) in an archive, delete them, and try to see if the problem occurs with the default configs...
  2. you could also try this modification in mpv.net :
    delete line hwdec=yes
    put instead:
    vo=gpu,
    hwdec=no
    copy exactly as is, the comma " , " after "gpu" is intended, you must keep it.

Please try and tell me what happens.

I figured out what it was. It is the mpvnet.config

start-size = video

Using "Window set to Video Resolution" setting is what causes it. Again, this is only on the extended display. I tested this having deleted both config files and starting fresh with nothing but start-size = video and the problem still occurred. Also I tried the vo=gpu and hwdec=no thing and it didn't change the results. Should I leave it like this?

HOWEVER, the problem only seems to occur if the files you're jumping between have a resolution of 1080p or above. I just tested it with 480, 720 and it did not occur. 1080p however it does. Should note that the tv I'm using is 1080p and never had this issue prior to this latest release of MPV. Again, goes away when I remove start-size = video

@ll811 ll811 closed this as completed May 6, 2020
@ll811 ll811 reopened this May 6, 2020
@ghost
Copy link

ghost commented May 6, 2020

OK so you found out that:

when start-size = video
AND using 2nd display in EXTENDED mode
AND video size = 1080p same as 2nd display size

THEN navigate from a file to next file takes you away from fullscreen and removes borders.

@stax76 is it possible that mpvnet is reading screen dimensions the sum of the two displays?

@ll811 can you please try one last thing: in mpvnet.conf, under start-size=video, put this line:
start-threshold = 2000

@ll811
Copy link
Author

ll811 commented May 6, 2020

@ll811 can you please try one last thing: in mpvnet.conf, under start-size=video, put this line:
start-threshold = 2000

Tried it, didn't change anything.

@ghost
Copy link

ghost commented May 7, 2020

Ok, thanks for testing. I guess Stax should take a look at that. In the mean time, obviously you can remove "start-size = video" from mpvnet.conf and set "autofit=65%" in mpv.conf. This works fine.

@ll811
Copy link
Author

ll811 commented May 7, 2020

Also, I don't know if this information is relevant, but my main monitor is 1440p, and the 2nd extended screen is 1080p.

@ghost
Copy link

ghost commented May 8, 2020

@ll811 did you test latest betas from the beta dropbox ? there has been a change in the handling of messages, maybe it's fixed.
Also note that if you're using old config files or customized from some time ago, you should open the console and see at startup if there are errors, so you can remove the commands causing errors. I had a problem that seemed unrelated and it was fixed by cleaning up the conf files. If you didn't customize them, just delete them and let the new mpv.net create proper ones.

@ll811
Copy link
Author

ll811 commented May 8, 2020

@44vince44 seems unlikely that it has anything to do with the config files since I tried deleting them earlier and then doing nothing but adding "start-size = video" in mpvnet.config and had the same issue.

5.4.5.0 changed something with regards to how mpv handles video size / resolution (ironically enough after an issue I had reported on with black bars on certain media) maybe that has something to do with this new error?

This issue was introduced with 5.4.5.0, version prior to that things worked as normal. Just to make absolute sure I went back and tested them, I tested 5.4.4.0 and the 3 releases that came after, 5.4.4.0 works as it should and the others are broken.

I appreciate how helpful you are. Also, I did not try the beta.

@stax76 stax76 removed the info needed label May 8, 2020
@stax76
Copy link
Collaborator

stax76 commented May 9, 2020

@ll811

Both 44vince44 and me are not able to reproduce it. There are only 2 functions that change window size and window state. There's a function that cycles fullscreen and it's triggered when the mpv property fullscreen changes which shouldn't change in this case and there is another function that handles all the rest, this function is however not entered in fullscreen mode, this function checks in the beginning if the window is minimized or maximized and if so the function is exited.

Do you run any user scripts?

In the first post you write that fullscreen is exited but in the steps to reproduce you are not writing that you have entered fullscreen.

@ll811
Copy link
Author

ll811 commented May 9, 2020

@stax76 I have tried with the portable versions of the past 4 releases with the config files removed each time before a test. It is broken on all of them but 5.4.4.0. But I noticed just now that the issue goes away if I lower the resolution on my tv to 720p.

Truly bizarre. Also no user scripts.

@ll811
Copy link
Author

ll811 commented May 9, 2020

@stax76 okay I just found a "fix" to this issue. If I scale the window down before dragging mpvnet over to my extended screen, switching between files in the playlist works as it should. It is when I drag the full window over to the display that it breaks when switching between files.

@stax76
Copy link
Collaborator

stax76 commented May 9, 2020

What does full window mean? Was it maximized or was it full screen or was it normal + filling the complete working area?

@ll811
Copy link
Author

ll811 commented May 9, 2020

@stax76 full window (frame of mpv and video) into full screen. With "start-size = video" the frame of mpv is dependent on resolution of the file as you know, and this issue only occurs on 1080p files on my tv. If I scale the 1080p frame down manually BEFORE I go full screen on the tv, swapping between files won't break the window.

@stax76
Copy link
Collaborator

stax76 commented May 9, 2020

Please make screenshots.

@stax76 stax76 removed the bug label May 9, 2020
@stax76 stax76 closed this as completed May 9, 2020
@ll811
Copy link
Author

ll811 commented May 9, 2020

@stax76 I did the best I could with the screenshots.

1
2
3
4
5
6

Something I've yet to mention is that when mpvnet exits full screen, to get the border back I have to double click the player 2 times and it will snap back into full screen and give the border back. Alternatively click B two times.

@stax76
Copy link
Collaborator

stax76 commented May 9, 2020

I did my best trying to reproduce this, unfortunately I cannot.

@stax76 stax76 added bug and removed info needed labels May 9, 2020
@stax76 stax76 added the wontfix label May 9, 2020
@stax76
Copy link
Collaborator

stax76 commented May 9, 2020

Maybe use screen = 1 to start directly on TV, that's my config.

@ll811
Copy link
Author

ll811 commented May 9, 2020

I did my best trying to reproduce this, unfortunately I cannot.

That's unfortunate. Thanks for trying, though. You have absolutely no clue as to what it may be given that it occurred between 5.4.4.0 and 5.4.5.0? You did change something with how mpvnet interprets video size / resolution between those two, right? I guess it's not possible to fix something when you can't reproduce the error yourself.

@ll811
Copy link
Author

ll811 commented May 9, 2020

mpvnet is acting strange on me in general it seems, now I'm getting inconsistencies in start-size = video as well, a 1080p one will be downscaled to 720p, then restarting the player/file and it'll be its full 1080p self again.

Maybe I should just remove it and do a clean install. Are any config settings saved outside of "AppData\Roaming\mpv.net" ?

Frozen on uninstall.
Untitled

@ghost
Copy link

ghost commented May 9, 2020

@ ll811 This is strange. I will test all those things a bit later:

  • uninstall
  • issue on extended desktop and try to reproduce it

@ghost
Copy link

ghost commented May 9, 2020

uninstall : tested twice, worked flawlessly !

@ll811
Copy link
Author

ll811 commented May 9, 2020

uninstall : tested twice, worked flawlessly !

I ended up deleting the files manually, as well as cleaning up the appdata folder, and restarting the computer before a fresh install. Still have the same issue on the extended display after having changed nothing but the "Start-size = video" setting.

@ghost
Copy link

ghost commented May 9, 2020

@ll811 @stax76 I confirm the issue of the second display in "Extend".
My display1 = 1920x1080, my display2 = 1280x720
In order to reproduce it:

  1. Put Start-size = video in mpvnet.conf
  2. connect the second display, configure desktop to EXTEND mode
  3. open mpv.net on the display1, load a bunch of files that must have exact resolution as display2
  4. drag mpv.net to display2, DO NOT RESIZE, play
  5. put in full screen ( = double-click in the middle of mpv.net)
  6. jump to next file

=> when it jumps to next file, mpv.net quits full screen mode, and has no borders !!!

It seems that when draging mpvnet from display1 to display2, there is some information missing, no? Because in step 4, if you RESIZE the window just before going to full screen, the problem doesn't happen.

@ll811 This could be something difficult to track and to fix. I really suggest you remove start-size=video,
Removing start-size=video, and setting autofit=65% is, in my opinion, far better for regular the operation of mpv.net.
And one day Stax will "accidentally" fix it ...

@ll811
Copy link
Author

ll811 commented May 9, 2020

@44vince44 Wow, thank you for going through the trouble! Glad someone was at least able to reproduce the issue. Thank you for the suggestion, I'll use that for now!

Is it possible to bind window size to a key? Say I open a 480p file, using autofit=65 is going to upscale this a great deal, say I wanna bind "z" to scale the window to the size of the original resolution, is that possible?

@ghost
Copy link

ghost commented May 10, 2020

@ll811 there is no such binding, there is a command window-scale but it scales to the size of the current window.

You are trying to achieve 1 pixel of the display = 1 pixel of the video. Exact pixel match.
Is it for forensic purpose? (lol) or just eye comfort?
You can get optimal results by choosing a proper resizing algorithm.
Drop these lines in your mpv.conf:
scale = ewa_lanczossharp
cscale = ewa_lanczossharp
dscale = ewa_lanczossharp
If your hardware can handle it (a three year old hardware can do it easily, but for 4K content you need more recent), you'll forget anything bout exact piixel.

And don't forget, Stax will stumble on it one day.

@ll811
Copy link
Author

ll811 commented May 10, 2020

@44vince44 It's more that I sometimes want to view a video at its native resolution. I've got like a 7 year old cpu and the gtx 960, think it'll handle that setup well?

@ghost
Copy link

ghost commented May 10, 2020

@ll811 gtx 960 should handle it... (you can check the gpu activity in windows task manager while playing)

@ll811
Copy link
Author

ll811 commented May 10, 2020

@44vince44 @stax76
black border
Feels like I'm just being a nuisance now, but 65% autofit on 1080p creates this black line on both sides of the player that isn't there at native resolution.

@ghost
Copy link

ghost commented May 10, 2020

@ll811 what is the resolution of the video file exactly?

@ll811
Copy link
Author

ll811 commented May 10, 2020

@44vince44 1920x1080 using 65% autofit.

@ghost
Copy link

ghost commented May 10, 2020

???? send me a mediainfo please to check AR etc....

of the player that isn't there at native resolution.

what does that mean ?

@ll811
Copy link
Author

ll811 commented May 10, 2020

@44vince44 It's there 'on all 1080p files, it's not just this one.
mpvblack

what does that mean ?

Native resolution / Native scale. 1080p at 65 autofit is downscaled slightly from 1080p, the window at it's native size does not have the black line on the right side.
mpvnoblackline

@ghost
Copy link

ghost commented May 10, 2020

so now show me the side bars with this same file (screenshot)

@ll811
Copy link
Author

ll811 commented May 10, 2020

@44vince44 it's already visible in the two screenshots I posted above. Bottom one has no black line on the right side, top one does.
autofit

@ghost
Copy link

ghost commented May 10, 2020

OMG you mean black tiny lines of ONE PIXEL width ? LOL, never noticed them.

@ll811
Copy link
Author

ll811 commented May 10, 2020

@44vince44

OMG you mean black tiny lines of ONE PIXEL width ? LOL, never noticed them.

lmao, yes.

@ghost
Copy link

ghost commented May 10, 2020

Ok those will be treated in another thread. A little bit later I'll post it (but before, I need to check several things)

@ghost
Copy link

ghost commented May 10, 2020

@ll811
This is a border issue, my display is 1080p, i took a full 1080p video and set autofit=65% (i hope you haven't forgotten to put the %".
I get a normal result! Of course I'mdoing this on the primary display.
Untitled-1

@ghost
Copy link

ghost commented May 10, 2020

So it is normal !!!!!

@ll811
Copy link
Author

ll811 commented May 10, 2020

@44vince44 You're looking at the wrong side, the black pixel line appears on the right side, not the left. I still see it when hiding the border.

I hope you haven't forgotten to put the %

Does that matter? I had just put 65 in the settings, I changed to 65% and I haven't noticed anything different.

@ghost
Copy link

ghost commented May 10, 2020

OK i confirm it's there, only in the case of 1920x1080 video.
On my first test it was a 1920x800 video (anamorphic cinema).
It doesn't happen with original mpv. I'll open a new thread

@ll811
Copy link
Author

ll811 commented May 10, 2020

@44vince44 thank you

@ghost
Copy link

ghost commented May 10, 2020

you're welcome. let's hope that stax will take a look at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants