-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
daf52f9
commit 3986f34
Showing
3 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
`stats-font_size`, `stats-border_size`, `stats-shadow_x_offset`, `stats-shadow_y_offset` and `stats-plot_bg_border_width` script-opt values result in 2.5 times smaller sizes in order to have the same sizes as the values of equivalent OSD options like `--osd-font-size`. If you customized these sizes, multiply them by 2.5 to get the previous sizes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters