mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.09k stars 2.88k forks source link

How to turn off the UI size scaling (question) #8444

Closed ghost closed 3 years ago

ghost commented 3 years ago

Important Information

Provide following Information:

Reproduction steps

Expected behavior

I would like to know if it is possible to turn off the scaling of the graphical user interface when resizing a video. This question has been asked before here, but he didn't receive a very good answer..

Actual behavior

Rec 01-07-21-00-00-01-200

Rec 01-07-21-00-00-10-200

Log file

Sample files

avih commented 3 years ago

Maybe this https://mpv.io/manual/master/#on-screen-controller-vidscale but you should consider that there's a limit to how much can be done when there's such a narrow space to render it.

Traneptora commented 3 years ago

This issue here with --script-opts=osc-vidscale=no seems to be that it ignores the option if the video is small enough, and the threshold for "small enough" is in the wrong place. If you take a 1080p video and render it at 720p with this option, it will behave properly (i.e. the same size for each one). But rendering it at 480p is will not work, even though there is ample room to render it the same size as 720p.

ghost commented 3 years ago

Maybe this https://mpv.io/manual/master/#on-screen-controller-vidscale but you should consider that there's a limit to how much can be done when there's such a narrow space to render it.

If you are thinking of vidscale=no, it doesn't help. Still resizing the UI.

Kekerykek commented 3 years ago

I've been wondering if this was possible as well. None of the available options in the manual seems to help regarding this.

avih commented 3 years ago

As I mentioned earlier, there's a limit to how big the font can be in such a narrow area. Maybe if you posted a screenshot (mockup) of how it should look instead, then it would be easier to understand what you mean.

AjvarXX commented 3 years ago

There should be option to set (or built-in) minimum size/height of a bar (both upper and lower). Here I asked about the upper one #8294

avih commented 3 years ago

I'm closing this issue because I don't think it can be done with the current layouts. The issue is that the available width determines the font size. For instance, if you have only 50 pixels wide, then however you look at it you just cannot fit big fonts into it while keeping the same amount of data visible.

The only element which can change its size (width) is the seek area, and it already gets smaller in narrow space - up to a limit, because it still needs to contain the position when hovering it with the mouse. After that limit is reached, there's no other choice but make the font smaller. Maybe it could be made very slighty narrower still before starting to shrink the font, but it won't be meaningful in this case anyway.

If I misunderstood and someone can show an image (mockup) of how it should look, then we can reopen this issue.

Alternatively, you might open an issue to add a new layout which is specifically designed/organized so that it can fit in very narrow space while keeping the font big, e.g. maybe use three rows instead of two, and/or maybe remove some of the elements, etc. We can't promise someone will implement it, but PRs are welcome.

avih commented 3 years ago

Also, for vertical video, you can also switch to fullscreen, which will make the OSC span to the screen width (outside the video content boundaries) - which would be able to keep the font bigger.

Or, to the same effect, you can set keepaspect-window=no in your mpv.conf which will allow you to resize the window and make it wider by adding back bars as needed - so the OSC and its font can also be bigger - https://mpv.io/manual/master/#options-keepaspect-window

HubKing commented 1 year ago

So... there is no way to keep the UI size constant when the video size changes (granted that it would need a minimum window size limit) like most other video players?

MPV is smoother than VLC, whose UI flickers when resizing the video, and that looks blurry because it does not support Wayland, but the UI is just... how should I say, too unrealistic to be actually used. It's almost like just a proof-of-concept. Of course, you would say "Use other front-ends." but the problem is that none of them are good. SMPlayer looks blurry (QT 5.14, no Wayland) and the UI is clunky like early 2000's, and Celluloid is buggy. It is a shame that the UI sucks because its playback ability is great.

Baerbeisser commented 1 year ago

I'm trying to tackle this with conditional profiles. It should work somewhat, but i seem to be doing something wrong in my conditions.

[medium]
# displaying medium res in medium res # but makes low res big, why??
profile-desc=cond:(get('width', 0) > 900 and get('width', 0) < 1920) or (get('height', 0) > 780 and get('height', 0) < 1080)
autofit-larger=1920x1080
geometry=1920x1080

[small]
# don't make low-res videos big # but makes high res small, why??
profile-desc=cond:get('width', 0) < 720 or get('height', 0) < 480
autofit-larger=720x480
geometry=720x480
osd-font-size=100

Anyone an idea how to fix?