Coder Social home page Coder Social logo

mpv-menu-plugin's People

Contributors

butterw avatar dyphire avatar tsl0922 avatar verygoodlee avatar youxikong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mpv-menu-plugin's Issues

Custom dynamic menus ?

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 stops working when vo changed

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

solved. . .

Windows 10 is very stuck and not smooth during playback
Windows 10 21h2
mpv 0.38

Merge and display different key bindings for the same menu item

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次基本稳定复现

test.lua
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:
补测了插件菜单实现,也复现了。

大佬请改下码率显示长度

大佬请改下码率显示长度,蓝光原盘有一些音频码率上千,3位数长度会导致显示不正常
if track['demux-bitrate'] then h(string.format('%.4g kbps', track['demux-bitrate'] / 1000)) end
2
3

gray out empty track list (audio, video, subtitles) like chapters

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 #!

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

script-opts to filter profile-list

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 ?

dialog.lua

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

No menu displayed ?

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.

quality-menu youtube

how to change the streamed video and audio quality (ytdl-format) in mpv-menu-plugin?

Not working.

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

更改菜单声明语法

一这一行为例

z script-binding recentmenu/open #menu: Recently Played #@recent

@recent 和 inputevent 的解析产生了冲突,导致快捷键失效

image

我希望更改为 #menu-provider: recent 这种样子来避免冲突同时明确语义

show &

& 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+&&.

Crash when wrong dynamic menu syntax is used

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

[dialog.lua] Add video track and playlist check before send `dialog/save` message to menu.dll

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.

issues with Comments

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.

[dyn_menu] update: ignored message with invalid keyword:

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 ?

solved. . .

Ctrl+R shortcut key does not work

image

Windows 10 21h2
mpv 0.38

Features: Add keybind when menu open

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?

Text size adjustment (fullscreen startup)

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.