mpv
mpv copied to clipboard
Mpv ignores keepaspect argument when resizing with AltSnap (Fork of AltDrag)
Important Information
Provide following Information:
- mpv version 0.34.0-396-g2c46ae8ea3
- Windows Version: Windows 11
- Source of the mpv binary: Shinichiro's builds
Reproduction steps
Resize using Altsnap Hotkey action or scroll action.
Expected behavior
Resizing the window should respect the keepaspect
argument
Actual behavior
Mpv ignores keepaspect argument allowing for blackbars
Extra description
Potplayer has a similar option and respects the aspect ratio when resizing with AltSnap. This issue has been mentioned in issue #6588.
Welp, my personal counterpoint is that I use AltSnap to resize my mpv windows with this exact purpose in mind, as in to freely resize the player window disregarding any aspect ratio settings inherited from the player or the media.
https://user-images.githubusercontent.com/11768175/183511835-7049c69e-228d-4961-bd53-4c24f8d1b329.mp4
Well yeah, but you can just add --no-keepaspect and --no-keepaspect-window to the config file to disable the aspect ratio restriction.
But if you want to preserve the aspect ratio while using altsnap, there is no option that works for that. Maybe just an option like the ones referenced above can be added for restricting the aspect ratio in the altsnap use case?
@qmega @pavelxdd Do you guys think this is possible? Tagging you guys based on the conversation in issue #6588, as I think you guys might be knowledgeable about this.
Thanks
@thebombzen What does the spacebar-heating
label mean?
It means "every change breaks someone's workflow" since it appears people use this behavior intentionally (see garoto's comment above).
But if you want to preserve the aspect ratio while using altsnap, there is no option that works for that. Maybe just an option like the ones referenced above can be added for restricting the aspect ratio in the altsnap use case?
@thebombzen Ah, I see, Thanks for the explanation, but I'm asking for the addition of an extra conf option. So only people who want it can use it. If it is an opt-in conf option, it wont cause spacebar heating?
Can it be marked as a feature request in that case?
thebombzen What does the
spacebar-heating
label mean?
It originates from a xkcd comic: https://xkcd.com/1172/
Haha ok, thanks for the link.
@thebombzen Are you one of the devs ? If so, hope this can be added. Thanks
The behavior in mpv is that the aspect is enforced only when the user manually reizes the window. Specifically, at the WM_SIZING message handler - where the application is allowed to override the size according to MS docs.
In other cases, like a 3rd party application sets the size, or Windows itself while snapping the window (e.g. with WIN+LEFT etc), mpv does not override the set size, and so the aspect might not match the video.
This is a good behavior from mpv, because otherwise two applications would "fight" over the size, and one of them is guaranteed to lose if they want different sizes. I don't think we should change it in mpv.
If you want mpv to override the size which AltSnap sets, then AltSnap needs to emulate manual user resize, specifically so that mpv sees the WM_SIZING message - where it can override the size.
@avih I see that you've closed the issue. So I'm guessing that I don't need to paste my log now. (Based on the IRC chat)
Just wanted to mention that the behavior I'm requesting works perfectly fine in potplayer if you enable the
Adjust AR to Window Size
option.
So it should be possible from mpv as well?
So it should be possible from mpv as well?
It's not possible currently, and in my opinion it should not be possible.
Ok