Font size of OSD, subtitles, ... should depend on window width instead of window height
Opened this issue · 4 comments
Expected behavior of the wanted feature
It would be helpful if the things shown on OSD (e.g. playlist via F8), subtitles, etc... would better fit on the window on all aspect ratios (portrait or landscape).
When watching a "portrait" video (like youtube shorts), the font is huge, causing so many line breaks that you can't see more than 1 or 2 playlist items, subtitles fill almost the whole video, ...
It seems like the window height determines some font size factor (in addition to the --osd-font-size
argument). Before the "portrait" videos were a thing, the width always was within a reasonable range depending of the height, but this has changed.
I've tested quite a few different --osd-font-size
values, but in a mixed playlist, I always get either a way too tiny font on "landscape" videos or a way too huge font on "portrait" videos. When the font size is determined by width instead of height, it still varies, but fits much better.
You can test this by downloading any youtube videos in mixed formats, e.g. using youtube-dl and playing them in one playlist.
Alternative behavior of the wanted feature
No response
Log File
No response
Sample Files
No response
Have you tried to just disable the scaling with --osd-scale-by-window=no --sub-scale-by-window=no
?
Just tried it. It will give me a fixed font size, but (depending on --osd-font-size
) this is still either too large for "portrait" videos or not using the available width in "landscape" videos.
Although the fixed...
arguments are an improvement for my use case, I still would like to have a dynamically adapting font size. Just based on width instead of height. Although I'm seemingly the first to report this, I think this will affect more and more users in the future.
Although I don't know the source code, I assume this is a small change.
Changing scaling is messy as we already change or compensate for the scaling performed by libass (the subtitle/text rendering library), and we have 3 different scripts implementing configurable scaling. For now you can try a conditional profile like
[portrait]
profile-cond=width < height
profile-restore=copy
osd-scale=.5
OK, that profile setting helped, but there is still one thing missing ... When I scale the video using alt-0
... alt-2
the osd and subtitles don't scale with the window as they did without the fixed...
For now, I found a font size that works for me in the majority of cases.
But I assume sooner or later, these workarounds will get more complicated than changing the scaling.
I assume no one saw these "portrait" videos coming when the project started, so basing things on height was totally reasonable. But I'm afraid they are here to stay. And BTW, I also don't like them that much. :-)