422658476 / MPV-EASY-Player

MPV-EASY Player - An easy to use, modern video player based on mpv (一个基于MPV,易于使用,现代化的视频播放器)
http://www.rjno1.com/mpv-easy-player/
GNU General Public License v3.0
1.03k stars 56 forks source link

OSD bar like in iOS #82

Closed enusr2k closed 7 months ago

enusr2k commented 7 months ago

Hi! Is it possible to add OSD bar like in iOS, with blur? Something like that: iina_14

422658476 commented 7 months ago

I guess you may be talking about osc, or the osd bar with a few pixels thickness at the bottom. I'm not sure which one you are talking about, because the extremely thin osd bar usually cannot detect whether Gaussian blur is used. For osc, imitation Gaussian blur is only implemented under mpv-easy gui, and it only needs to be turned on in the settings interface.

As for the mpv native gui, the code to change these styles is at the top of osc.lua, such as:

 bigButtons = "{\\blur0\\bord0\\1c&HFFFFFF\\3c&HFFFFFF\\fs50\\fnmpv-osd-symbols}",

mpv uses subtitle rendering to display these controls. You can try changing the blur parameters, but the actual effect should not be the Gaussian blur you want, just blur.

For osd bar:

Theoretically, this is not possible, because the osd bar is also provided by mpv, which also uses subtitles to create these graphics. mpv does not provide settings that can be changed, and it is not recommended to change them. These styles will also change the color and background of the text at the same time. Color will also change the style of playlists and video information. Improper settings may cause text to be blurred. Adjustments require many considerations.

Since I'm not an expert in this area, you can also consult mpv's code contributors, which are all implemented by mpv.

Finally, true Gaussian blur is very resource intensive. When you test whether Gaussian blur can be enabled, please always observe the CPU and GPU usage.

enusr2k commented 7 months ago

@422658476 Okay, I got it. Thank you so much.