tsl0922 / mpv-menu-plugin Goto Github PK
View Code? Open in Web Editor NEWcontext menu, file dialog, clipboard support for mpv
License: GNU General Public License v2.0
context menu, file dialog, clipboard support for mpv
License: GNU General Public License v2.0
What is the preferred approach for custom dynamic menus, should they use a standalone user script or be added to dyn_menu.lua ?
They would make menu updates more frequent. ex: I would be interested in a shaders-on checked menu item.
The menu does not appear if changing vo via console or profiles. The same for gpu-api. Might not work work other cases as well.
Workaround is staring mpv with required options/profile.
Version: mpv v0.37.0-271-gf5c4f0b0
Windows 10 is very stuck and not smooth during playback
Windows 10 21h2
mpv 0.38
For compatibility with other script's keybindings.
At present, when assigning different key bindings to the same menu item, the menu will display two menu items. The correct approach should be to merge the different key bindings and display them like mpv.net.
Additional implementation of #10 is required to optimize the display.
用的是mpv内置菜单实现,在使用evafast的时候发现的,他会短时间内连续改变速度,如果菜单的#@state=
中用到了speed
属性就会造成菜单频繁更新,有概率导致菜单假死。
手动用evafast复现概率较低,写了个脚本模拟evafast的行为,每隔0.05秒修改一次速度,高强度修改500次基本稳定复现
local speed = 1
local i = 0
timer = mp.add_periodic_timer(0.05, function()
speed = speed == 1 and 2 or 1
mp.commandv('osd-msg', 'set', 'speed', speed)
i = i + 1
if i == 500 then timer:kill() end
end)
能复现的最小配置portable_config.zip,
不播放任何文件,在idle界面等待测试脚本跑完,然后右键打开菜单,尝试点击Fullscreen,
有时候一次都点不了,有时候前面的一两次有效,后面全失效,点Exit都无法退出。
用快捷键是没啥问题的,用Enter切换全屏,菜单的checked的状态还是会更新,也就是菜单还是正常刷新,但是点击事件挂了。
edit:
补测了插件菜单实现,也复现了。
Is it possible to gray out the track list for audio, video, subtitles when no tracks are loaded like for chapters ?
Currently for audio and video, the entry is not grayed even if empty.
For subtitles the option for switching off subtitles is provided even if there are no subtitles loaded.
how to disable #menu:
and just use #!
in context menu uosc?
R script-message-to uosc menu-blurred
and how to disable #!
and just use #menu:
in context menu mpv-menu-plugin?
MBTN_RIGHT script-message-to menu show
Proposed feature: it should be possible for the user to specify the filter to apply to the profile-list.
The #@profiles list contains default mpv profiles.
Some filtering is done:
if not (profile.name == 'default' or profile.name:find('gui') or profile.name == 'encoding' or profile.name == 'libmpv')
...
gpu-hq is an alias for high-quality in mpv v0.37.
sw-fast doesn't seem to have any use on windows.
dyn_menu.conf:
filter_profiles=default,encoding,libmpv,sw-fast,builtin-pseudo-gui,pseudo-gui,gpu-hq,sw-fast
EDIT: I don't know if a script-opts is required, maybe just add some filters ?
如果可以的话,那要怎么做?
Optimize menu display on high-definition screens, currently showing too small on 4k screens.
natural-harmonia-gropius/recent-menu#20 (comment)
Third-party scripts don't know when the menu is shown or hidden.
Also #19 (comment)
Alt solution:
https://github.com/natural-harmonia-gropius/recent-menu?tab=readme-ov-file#mpv-menu-plugin
The command part in input.conf of dynamic menu looks unused, what about call it when menu shown.
Follow up from previous comments: f396ed1#commitcomment-137501902
OS Version? I'm on win10
Win10, Latest. default App mode: Light.
The extension are displayed when Explorer > View > x File Name Extensions.
Unrelated, with the open files dialog, I've been getting warnings in the terminal window on right click on a file (caused by Google Drive apparently).
E0000 00:00:1705853244.858008 12128 ctxmenu.cc:212] UNKNOWN: From legacy status [type.googleapis.com/drive.ds.Status='UNKNOWN_STATUS']
=== Source Location Trace: ===
apps/drive/fs/ipc/shell_ipc_client.cc:588
EDIT: with build 31 no menu is showing for me, builds up to 26 are working OK.
I have not setup any script-opts/menu.conf.
There are no errors in the log-file:
[ 0.010][d][menu] Loading cplugin script c:/mpc/mpv/portable_config/scripts/menu.dll...
I've tried --input-conf with a minimal input.conf and --no-config --scripts=portable_config/scripts/menu.dll with no success.
how to change the streamed video and audio quality (ytdl-format) in mpv-menu-plugin?
I've added MBTN_RIGHT script-message-to menu show
to input.conf, but nothing happens when I open a video and right click on the viewport (doesn't pause/play)
These files are in place and unmodified as per instructions:
%appdata%\mpv\scripts\dyn_menu.lua
%appdata%\mpv\scripts\menu.dll
%appdata%\mpv\scripts\dialog.lua
mpv-menu-plugin Release 2.3.0
mpv v0.37.0-229-gc6ccabe5 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
built on Jan 28 2024 00:11:42
Many thanks
Alt+2 set window-scale 2.0 #menu: Scale_2x
Changing window-scale (ex: 2.0) hangs when done thru menu, works fine thru keybinding.
& is not shown in menu (shortcut or entry)
Alt+& show-text hello #menu: mpv-plugin
Ctrl+a show-text hello #menu: P&S > bar
EDIT: for the second case it's possible to escape &
Ctrl+a show-text hello #menu: P&&S > bar
but this approach doesn't work in the first case with the mpv shortcut, because mpv doesn't recognise Alt+&&.
I get a crash after loading if the wrong syntax is used with a dynamic menu entry (no errors logged).
_ ignore #menu: Subs > #@tracks/sub
# correct would be _ ignore #menu: Subs > tracks #@tracks/sub
j cycle sub #menu: Subs > / next
v cycle sub-visibility #menu: Subs > / show
is it possible to create a menu item that will include the setting, but without a key?
Thanks to your contribution, it maybe the best mpv sricpt on Windows.
I found a problem of screenshot/playlist saving logic in dialog.lua
. If there is no video track or playlist, it will also send message and prompt a file dialog but do nothing but a osd message. So I suggest to add video track and playlist check before.
For example, add:
if not mp.get_property_number('vid') then
mp.osd_message('No video track')
return
end
between line 193 and 194, and add:
if mp.get_property_number('playlist-count', 0) == 0 then
mp.osd_message('Playlist is empty')
return
end
between line 201 and 202.
In the latest builds, the following commented out command is now shown in menu. The command will not be executed because it's a comment for mpv:
# Shift+a show-text hello #menu: ..helloA
[input] Command 'Shift+a' not found.
[input] Command was defined at menu.
Menu should ignore lines that are commented out for mpv. Users need to be able to comment out lines in input.conf to adjust their config, menu should not interfere.
A second request would be to support a syntax (maybe ## ?) for same line comments not to be displayed in the menu:
Shift+b show-text hello #menu: ..helloB ## this is a user comment that should not be printed to menu.
the command ..hello should be printed out in the menu but not the comment.
Same line comment are useful because it is immediately clear what line they apply to and they allow for a more compact input.conf file.
I've implemented a #@window-scale dynamic menu using the new message interface.
I have the following issue: I get a warning message on each window-scale change if input conf doesn't contain my keyword:
[dyn_menu] update: ignored message with invalid keyword: window-scale
recentmenu.lua seems to have the same issue.
Is there a way to check keywords present in input.conf from my script ?
In previous verion, like case 2 of #6 , if I add this line to input.conf:
_ script-binding uosc/open-file #! 加载 (&F) > 文件浏览器
_ script-binding uosc/load-subtitles #! 字幕轨 (&S)
When menu open, I can trigger command or expand submenu by pressing the key "F" or "S".
This feature (or bug) has been removed in the latest version, could you readd it?
Optimize the use of repetitive operations.
The following is an example of the effects of related functions in the uosc menu:
Some text size customization options would be nice to have.
Different settings could be used for fullscreen (plenty of room to display a contextual menu) and in windowed mode (ex: on a 360p video).
The menu should not have any custom options other than custom menu items, it is not a UI.
Originally posted by @dyphire in #1 (comment)
I'm using a monitor and I've set up my windows hidpi setting (a bit small) for productivity apps. But the requirements are different if I'm wiewing a movie 2m away from the screen (I need bigger text) and I don't want to have to adjust my hidpi settings just for one app.
This feature request (if feasible) is for a text-size increase parameter applied at startup if mpv is started fullscreen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.