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

Inconsistent fullscreen OSC playlist scaling #4083

Closed
Coacher opened this Issue Jan 28, 2017 · 19 comments

Comments

Projects
None yet
4 participants
@Coacher
Contributor

Coacher commented Jan 28, 2017

Hello.

mpv version and platform

I have mpv-git @ 9c90c90 on Gentoo amd64.

Reproduction steps

  1. Open several video files in fullscreen and make OSD playlist displayed e.g. by clicking pl next.
  2. Open several audio files with attached album cover art in fullscreen and make OSD playlist displayed e.g. by clicking pl next.
  3. Open several audio-only files with '--force-window=yes' option in fullscreen and make OSD playlist displayed e.g. by clicking pl next.

Expected behavior

OSD playlist has the same scaling between all three windows since video area has the same size (whole screen).

Actual behavior

OSD playlist has incorrect scaling with video files and makes playlist gigantic.
OSD playlists for audio files with and without coverart also have different scaling, but I don't see a reason for them to be.
Notice how OSC itself has incorrect scaling with audio-only files and forced window.

Log file

Not sure if any logs required here. I'll gladly provide them if you need it.
Here are some screenshots though:

Please fix.

@wm4

This comment has been minimized.

Contributor

wm4 commented Jan 28, 2017

That's the OSC, not OSD.

Please fix.

Depends on whether we decide whether this is a bug.

@Coacher Coacher changed the title from Inconsistent fullscreen OSD playlist scaling to Inconsistent fullscreen OSC playlist scaling Jan 28, 2017

@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Jan 31, 2017

There's a separate option for force-window=yes which is scaleforcewindow which defaults to 2. This was before my changes.

I'll need any osc.conf options you setup and any osd options, since I can't reproduce with --no-config.

@Coacher

This comment has been minimized.

Contributor

Coacher commented Jan 31, 2017

This is reproducible with --no-config as well. Here's my config anyway:
osc.conf:

seekbarstyle=knob

mpv.conf:

ytdl-format=best[height<=?720]
hwdec=vaapi
ao=pulse
@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Jan 31, 2017

The only issue is the first screenshot. The other two should be inconsistent because of scaleforcedwindow=2 default.
What's the resolution on the video of the first one?

audio with album art:
https://i.fsbn.eu/bAHb.png
--audio-display=no --force-window:
https://i.fsbn.eu/82PU.png
--audio-display=no --force-window --script-opts=osc-scaleforcedwindow=1:
https://i.fsbn.eu/APXZ.png

@Coacher

This comment has been minimized.

Contributor

Coacher commented Feb 1, 2017

If I manually set osc-scaleforcedwindow=1, I can reproduce your behaviour and there are no inconsistencies in case of audio files with and without cover art.

In the case of videos there are multiple videos with resolutions 1280x720 or 480x360. No other resolutions in that playlist. The first video has resolution 1280x720. Videos were downloaded with youtube-dl -f best.

@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Feb 1, 2017

Can't reproduce then. Unless it's some race condition, I can't tell by the code why the letters would be that big.
Can you reproduce it consistently?

@Coacher

This comment has been minimized.

Contributor

Coacher commented Feb 1, 2017

Can you reproduce it consistently?

Yes, reproducible 100% of the time. I use mpv built against luajit-2.0.4 if it matters.

@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Feb 1, 2017

OK, I think I got it now, what's the default sans-serif font in your system? If I use DejaVu Sans with at most seven files with large enough filenames it does wrap and start to look like your screenshot.

Ways to fix this would be to start downscaling with fewer lines, disallow wrapping, or changing osd-font-size. The first one seems more appropriate to me.

@Coacher

This comment has been minimized.

Contributor

Coacher commented Feb 1, 2017

OK, I think I got it now, what's the default sans-serif font in your system?

DejaVu Sans for sans, DejaVu Serif for serif.

Update: Same behaviour occurs with Liberation, Source Pro and FreeFont font families.

@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Feb 1, 2017

Disabling wrapping would make osc list look like what wm4 implemented a few days ago, but not sure if this would make it useless to distinguish items:
image

Downscaling with fewer lines would temporarily fix this until you find large enough filenames again that it'd wrap to 3 lines for each item and then same problem.

@Coacher

This comment has been minimized.

Contributor

Coacher commented Feb 1, 2017

Long filenames are only a part of the problem.
Here's what happens with mpv-git @ 2493d91 with --no-config after I shortened those video filenames: http://i.imgur.com/ziDXB4e.jpg
Compare to audio with cover art scaling: http://i.imgur.com/kaSaBHS.jpg
As you can see playlist scaling differs. OSC controls have the same scaling.

@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Feb 1, 2017

Looks fine. What's the problem there?
The scaling changes depending on the number of lines. As is, it'll use osd-font-size until 7 items, then 80% of osd-font-size until 11 items, then no lower than 66% of osd-font-size. Number of max lines shown depends on osd-font-size as well.

@Coacher

This comment has been minimized.

Contributor

Coacher commented Feb 1, 2017

Ah, so the actual used font-size depends on the number of items in playlist?
Is there a way to tell mpv 'always use this font-size if you can fit playlist within the whole video area, scale only if playlist too big for the whole video area'?

@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Feb 1, 2017

No, there's no way of knowing how much space the text occupies exactly. We wing it by assuming it won't wrap and X lines fit the screen.

Is there a way to tell mpv 'always use this font-size if you can fit playlist within the whole video area, scale only if playlist too big for the whole video area'?

That's what's done already. I told you the exact logic in the previous post.

@Coacher

This comment has been minimized.

Contributor

Coacher commented Feb 1, 2017

Ok, thank you for the explanation. I understand now what happens.
If you could improve behaviour with long lines, that would be great!
Having the same scaling with forced window would be nice, but it's ok if it stays at 2. It's easy to override.

@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Feb 1, 2017

There's no 100% fix for this. You either delay the problem or make another one by not wrapping. What do you think is more reasonable other than telling people to just use a smaller osd-font-size?

@Coacher

This comment has been minimized.

Contributor

Coacher commented Feb 1, 2017

IMHO neither 'delay the problem', nor 'make another one by not wrapping' are clean solutions.
If mpv would just warn a user about what's happening with a hint towards 'osd-font-size', I wouldn't create this issue in the first place. Otherwise it looks just like smth is broken in OSC.

Update: Between those two variants I'd say the first one, because not wrapping is bad.

@Argon-

This comment has been minimized.

Member

Argon- commented Feb 1, 2017

There's no 100% fix for this. You either delay the problem or make another one by not wrapping. What do you think is more reasonable other than telling people to just use a smaller osd-font-size?

Personally, I don't really like having a too small osd-font-size for the actual OSD "elements" (osd-status-msg) and therefore used to prefix stuff like osc-playlist, osc-chapterlist and osc-tracklist with a custom ASS sequence for smaller font size. However, this doesn't work anymore since these properties have own ASS styling.
Not sure how to circumvent this while retaining their formatting. Maybe two osd-font-sizes?

wiiaboo added a commit to wiiaboo/mpv that referenced this issue Feb 3, 2017

osc: refactor osc message scaling
Will still hide playlist items with long enough filenames and osd-font-size
but not as soon.

osc messages should now preserve their scaling with fullscreen toggling and
cycling through audio-only files and files with video.

Closes mpv-player#4081, mpv-player#4083, mpv-player#4102

wiiaboo added a commit to wiiaboo/mpv that referenced this issue Feb 3, 2017

osc: refactor osc message scaling
Will still hide playlist items with long enough filenames and osd-font-size
but not as soon.

osc messages should now preserve their scaling with fullscreen toggling and
cycling through audio-only files and files with video.

Closes mpv-player#4081, mpv-player#4083, mpv-player#4102

wiiaboo added a commit to wiiaboo/mpv that referenced this issue Feb 5, 2017

osc: refactor osc message scaling
Will still hide playlist items with long enough filenames and osd-font-size
but not as soon.

osc messages should now preserve their scaling with fullscreen toggling and
cycling through audio-only files and files with video.

Closes mpv-player#4081, mpv-player#4083, mpv-player#4102

wiiaboo added a commit to wiiaboo/mpv that referenced this issue Mar 24, 2017

osc: refactor osc message scaling
Will still hide playlist items with long enough filenames and osd-font-size
but not as soon.

osc messages should now preserve their scaling with fullscreen toggling and
cycling through audio-only files and files with video.

Closes mpv-player#4081, mpv-player#4083, mpv-player#4102

wiiaboo added a commit to wiiaboo/mpv that referenced this issue Mar 24, 2017

osc: refactor osc message scaling
Will still hide playlist items with long enough filenames and osd-font-size
but not as soon.

osc messages should now preserve their scaling with fullscreen toggling and
cycling through audio-only files and files with video.

Closes mpv-player#4081, mpv-player#4083, mpv-player#4102
@wiiaboo

This comment has been minimized.

Member

wiiaboo commented Mar 26, 2017

Fixed in bcb2db0.

@wiiaboo wiiaboo closed this Mar 26, 2017

atomnuker added a commit to atomnuker/mpv that referenced this issue Jun 4, 2017

osc: refactor osc message scaling
Will still hide playlist items with long enough filenames and osd-font-size
but not as soon.

osc messages should now preserve their scaling with fullscreen toggling and
cycling through audio-only files and files with video.

Closes mpv-player#4081, mpv-player#4083, mpv-player#4102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment