Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上下文菜单中的截屏功能的实用性改进 #196

Closed
Youxikong opened this issue Oct 17, 2022 · 11 comments
Closed

上下文菜单中的截屏功能的实用性改进 #196

Youxikong opened this issue Oct 17, 2022 · 11 comments
Labels
JS/LUA mpv脚本

Comments

@Youxikong
Copy link

我不想笑但实在忍不住,菜单会被截入画面。截屏有关设置我只修改了保存的格式,其他没动。
image

@hooke007
Copy link
Owner

hooke007 commented Oct 17, 2022

这个问题怎么说呢。。
这确实符合 screenshot window 的预期,但是当前的release版本我没给出(绑定)按键提示(下个版本会修改,参见lite分支的提交)

我不喜欢 screenshot video 的截图结果,你也可以选择重绑定到对应命令。

s screenshot # 截屏(有字幕、有OSD) 输出原始分辨率
S screenshot video # 截屏(无字幕、无OSD) 输出原始分辨率
Ctrl+s screenshot window # 截屏(有字幕、有OSD) 输出实际分辨率

@Youxikong
Copy link
Author

我自己绑个按键吧。这个不适合放在右键菜单。

@hooke007
Copy link
Owner

很多功能都不适合用菜单触发(例如均衡器),依然选择放在那里的原因是菜单的一个功能是按钮提示

@hooke007 hooke007 added the JS/LUA mpv脚本 label Oct 17, 2022
hooke007 added a commit that referenced this issue Oct 18, 2022
简化 input_plus
补充 uosc 遗漏的上游提交
改进 #196
@hooke007
Copy link
Owner

尝试了一圈没有找到完美的解决方案,当前的提交只是堪用的水平。

@dyphire
Copy link
Contributor

dyphire commented Oct 18, 2022

比起直接修改 uosc.lua 脚本,我更推荐使用第三方脚本来实现延时命令。比如此脚本:delay-command.lua
针对这一问题的使用案例:

s                screenshot subtitles                                            #menu: 视频 > 截屏 > 同源尺寸-有字幕-无OSD-单帧
S                screenshot video                                                #menu: 视频 > 截屏 > 同源尺寸-无字幕-无OSD-单帧
CTRL+s           script-message delay-command 0.3 screenshot window              #menu: 视频 > 截屏 > 实际尺寸-有字幕-有OSD-单帧
ALT+s            subtitles+each-frame                                            #menu: 视频 > 截屏 > 同源尺寸-有字幕-无OSD-逐帧
ALT+S            screenshot video+each-frame                                     #menu: 视频 > 截屏 > 同源尺寸-无字幕-无OSD-逐帧
CTRL+S           script-message delay-command 0.3 screenshot window+each-frame   #menu: 视频 > 截屏 > 实际尺寸-有字幕-有OSD-逐帧

@hooke007
Copy link
Owner

hooke007 commented Oct 18, 2022

尝试了一圈

你说的这个也属于我说的废弃方案。一开始我是在input_plus里加新命令然后uosc去绑定。
但是这个条目属于我的默认菜单内容,捆绑一个(非强相关的)外部脚本的命令不理想,相当于强制要安装另外的脚本。(虽然之前我已经做过了这样的反面案例)
另外延迟零点几秒截屏这种需求实在过于奇葩,也是为了uosc才专门搞了这样的命令,放在uosc脚本内成了最终的方案。

edit:
我当前提交的设想是通过uosc的内部函数临时隐藏ui,结果就是我想多了显然没有提供这样的功能,于是注释掉了大部分内容;mpv也没提供临时停用libass的功能。

@dyphire
Copy link
Contributor

dyphire commented Oct 18, 2022

这种考虑可以理解。如果没有其他延迟命令需求的话单独为截屏这一个案例引入一个新的脚本确实不太合适

hooke007 added a commit that referenced this issue Oct 18, 2022
补充 uosc 遗漏的上游提交
改进 #196
hooke007 added a commit that referenced this issue Oct 19, 2022
补充 uosc 遗漏的上游提交
改进 #196
@hooke007 hooke007 reopened this Oct 19, 2022
@hooke007 hooke007 changed the title 右键菜单的截屏键存在实用性问题。。 上下文菜单中的截屏功能的实用性改进 Oct 19, 2022
@hooke007
Copy link
Owner

hooke007 commented Oct 19, 2022

我把事情想简单了,*_persistency 的存在又破坏了我另一个新的想法(原本打算看看控件栏截屏的可行性)。
我选择只绕过菜单/暂停指示/背景帘幕这三个元素

@hooke007
Copy link
Owner

我基本满意当前的状态。
@Youxikong 请测试

@Youxikong
Copy link
Author

简单试了下,截图已经不包含菜单了。

@hooke007
Copy link
Owner

一个可行的完美途径参考 tomasklaen/uosc@c2b10b6
先不管了,目前的处理够用了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JS/LUA mpv脚本
Projects
None yet
Development

No branches or pull requests

3 participants