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

Changing vid scale causes long freezes when minimizing #183

Closed
redsigma opened this issue Nov 6, 2024 · 13 comments
Closed

Changing vid scale causes long freezes when minimizing #183

redsigma opened this issue Nov 6, 2024 · 13 comments
Labels
not bug: update mpv Updating mpv resolves this issue

Comments

@redsigma
Copy link

redsigma commented Nov 6, 2024

I noticed that if i use vidscale=no and sometimes i constantly minmize and restore, the window freezes for like 1-5 seconds and sometimes it recovers.

I noticed that if i hardcode the display_h variable from osc_init() function, then the issue disappears.

I am not really sure what is going on. But for some context I was trying to add a feature to auto pause the video on minimize and auto unpause the video when restored

@Samillion
Copy link
Owner

I am not really sure what is going on. But for some context I was trying to add a feature to auto pause the video on minimize and auto unpause the video when restored

How were you implementing it? By editing modernz.lua? That could be the reason.

There is a simpler way to achieve what you want, by using auto profiles in mpv.conf.

For example, try this:

[Minimized] 
    profile-desc=Pause when minimized
    profile-cond=window_minimized and vid and not p["current-tracks/video/albumart"]
    profile-restore=copy-equal 
    pause

@redsigma
Copy link
Author

redsigma commented Nov 6, 2024

I am not really sure what is going on. But for some context I was trying to add a feature to auto pause the video on minimize and auto unpause the video when restored

How were you implementing it? By editing modernz.lua? That could be the reason.

There is a simpler way to achieve what you want, by using auto profiles in mpv.conf.

For example, try this:

[Minimized] 
    profile-desc=Pause when minimized
    profile-cond=window_minimized and vid and not p["current-tracks/video/albumart"]
    profile-restore=copy-equal 
    pause

Yes I did, but I'll check that out. This is the code that i added btw.

image

I belive that issue happens with a fresh .lua file too but let me double check.

@Samillion
Copy link
Owner

Samillion commented Nov 6, 2024

This will handle it on osc level, which should be fine for the most part, but it definitely won't be faster than letting mpv handle it.

Try the auto profile I posted instead, and let me know please. I'm very curious about it.

@redsigma
Copy link
Author

redsigma commented Nov 6, 2024

Just pasted that in the mpv.conf and also reverted all changes in the .lua file

It does pause the video on minimize, but the issue still happens after I restore the window. But this time it always recovers after 1-2 seconds, instead of perma freezing.

Below is the video I was testing.

sample-4.mp4

@Samillion
Copy link
Owner

Noted. Thank you very much. Could you please post a log to help me track the issue?

Try to reproduce the behavior so it shows in the log, please.

mpv sample-4.mp4 --v --log-file=output.txt

@Samillion
Copy link
Owner

One last question, does it happen with mpv's stock osc or just ModernZ?

@redsigma
Copy link
Author

redsigma commented Nov 6, 2024

I think i forgot an important part. Im using this instead of raw mpv

https://github.com/tsl0922/ImPlay

I removed modernZ and tried the stock OSC from that + that profile in the mpv.conf . And it works without issues.

@Samillion
Copy link
Owner

It uses libmpv as far as I know, I think you should be able to produce a log file if you include log-file=output.txt in your mpv.conf

Or maybe it has a native log generating feature.

@redsigma
Copy link
Author

redsigma commented Nov 6, 2024

Ok good news. I tried with latest mpv and fresh install of this plugin + those lines in the mpv.conf

And the issue doesn't happen. So I believe ImPlay uses an outdated mpv .

@redsigma
Copy link
Author

redsigma commented Nov 6, 2024

I guess, this is a false positive in this case. Any chances you might know a OSC for audio files ? I am looking for something to replicate VLC media player's playlist .

That's like the only reason im not using raw mpv :D

@Samillion
Copy link
Owner

Samillion commented Nov 6, 2024

Ok good news. I tried with latest mpv and fresh install of this plugin + those lines in the mpv.conf

And the issue doesn't happen. So I believe ImPlay uses an outdated mpv .

Ah, this seems to be a common occurrence. Was it using mpv 0.37 or less?

Any chances you might know a OSC for audio files ? I am looking for something to replicate VLC media player's playlist .

We recently added an image viewer mode to ModernZ osc. I might add an audio oriented one in the future, but I can't promise anything or a time frame, unfortunately.

ModernZ is basically re-writing the modern origin, so we're still fixing and adding many things.

You should try mpv's User Scripts wiki. If you're looking for something miniminal (UI wise), mfpbar might be the answer.

@Samillion Samillion added the not bug: update mpv Updating mpv resolves this issue label Nov 6, 2024
@Samillion
Copy link
Owner

Final note, you should ask on ImPlay if it's possible to update the mpv binary manually. I'm not sure how they're using, but most likely you can just place a newer binary in a directory or a newer libmpv

@Samillion
Copy link
Owner

Also, possibly related: tsl0922/ImPlay#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not bug: update mpv Updating mpv resolves this issue
Projects
None yet
Development

No branches or pull requests

2 participants