1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 12:17:12 +00:00
mpv/player/lua
Guido Cella 3986f34e2a stats.lua: calculate sizes like --osd-*-size options
Currently --script-opt=stats-font_size=n is much bigger than
--osd-font-size=n, which can confuse users, so calculate sizes the same
way.

The \fs value to replicate --osd-font-size is
${osd-font-size} * 288 / 720 with --osd-scale-by-window, and
\fs${osd-font-size} * 288 / ${osd-height}
with --osd-scale-by-window=no. This is because
sub/osd_libass.c:update_playres() sets
track->PlayResY = ass->res_y ? ass->res_y : MP_ASS_FONT_PLAYRESY,
where MP_ASS_FONT_PLAYRESY is 288.

This also works with persistent_overlay=yes.

{\fscx100}{\fscy100} would also replicate --osd-font-size with show-text
and with osd-verlay + --osd-scale-by-window, but not with osd-overlay +
--osd-scale-by-window=no.

The default sizes are multiplied by 720/288 = 2.5 to keep them the same
as before.
2024-10-29 20:35:35 +01:00
..
assdraw.lua osc: improve look of seekranges 2019-09-02 01:11:04 +03:00
auto_profiles.lua auto_profiles.lua: fix some lint warnings 2024-05-12 20:06:39 +02:00
console.lua console.lua: update selected item under the cursor on mouse wheel action 2024-10-29 16:23:21 +01:00
defaults.lua defaults.lua: handle canceled key bindings 2024-06-06 23:38:39 +03:00
fzy.lua scripting: add mp.input.select() 2024-05-07 22:34:22 +02:00
input.lua input.lua,defaults.js: don't hardcode mp.input arguments 2024-10-04 21:13:29 +03:00
meson.build meson: use relative file paths for file2string 2024-09-21 23:39:10 +02:00
options.lua options.lua: fix some lint warnings 2024-05-12 20:06:39 +02:00
osc.lua osc.lua: hide immediately without animation for select.lua 2024-10-28 23:28:50 +01:00
select.lua select.lua: don't use add_forced_key_binding 2024-09-19 13:57:39 +00:00
stats.lua stats.lua: calculate sizes like --osd-*-size options 2024-10-29 20:35:35 +01:00
ytdl_hook.lua ytdl_hook.lua: track playlist metadata 2024-10-26 19:59:26 +02:00