GithubHelp home page GithubHelp logo

hooke007 / mpv_lazy Goto Github PK

View Code? Open in Web Editor NEW
3.7K 29.0 147.0 100.99 MB

🔄 mpv player 播放器折腾记录 windows conf ; 中文注释配置 快速帮助入门 ; mpv-lazy 懒人包 win10 x64 config

Home Page: https://hooke007.github.io/index2#mpv-lazy

License: Other

Python 0.26% Lua 0.49% GLSL 99.21% Batchfile 0.02% Tcl 0.01% JavaScript 0.01%
mpv vapoursynth mpv-config mpv-player mpv-script

mpv_lazy's Issues

The state of multi-language support

TL;DR
Only uosc's UI. No PR would be received.
Any English posts could be commited here. https://github.com/hooke007/MPV_lazy/discussions/categories/z_eng_discuss

As the description of mpv's wiki page, It's just a localization project. Any language related requests will not be considered. I might only answer the simple question about the usage problems. Because I have created plenty of corresponding documentation (Of course it is written in chinese only. Try Google translating :-) )

Only the dummy-UI script (fonts are necessary) would support using your own language.

To quickily switch to English, you can download the uosc_lang.conf into your script-opts dir.
Edit this file if you want to use another language.

If you were using mpv-lazy (starter package of mpv), you have to edit the input_uosc.conf.

Update History

(For various reasons, the names of some options may be changed.)
🚀 The latest stable version

  • 23/04/21 git initial
  • 23/05/13 git fix&add released 2023V4
  • 23/10/22 git add released 2023EX
  • 23/11/05 git add released 2024V0

可以用ravu-zoom-r2-chroma.hook替代cscale(chroma upscale)功能吗

glsl-shaders = "~~/shaders/ravu-zoom-r3.hook"
glsl-shaders-append = "~~/shaders/SSimDownscaler.glsl"
glsl-shaders-append = "~~/shaders/adaptive-sharpen.glsl"
glsl-shaders-append = "~~/shaders/ravu-zoom-r2-chroma.hook"

着色器配置我是这么写的,加上ravu-zoom-r2-chroma.hook这行就可以了吗..
我看有ravu-zoom-r2-chroma/ravu-zoom-r2-rgb/ravu-zoom-r2-yuv 三个不同的变体,不知道rgb/yuv文件是干嘛的..查了半天资料我已经麻了..

当前版本osc_plus.lua无法正常显示,mpv控制台提示第2476行有错误

测试的mpv版本为 shinchiro/mpv-winbuild-cmake mpv-x86_64-v3-20231022-git-6e428c2.7z

我在更新你的当前版本osc_plus.lua时发现无法正常显示,mpv控制台提示第2476行有错误

原2476行代码为 return return (minus..mp.get_property_osd(property .. "/full"))

改为 return (minus..mp.get_property_osd("playtime-remaining/full")) 错误消失,可以正常使用该osc

其实我不懂lua脚本,不过根据之前版本对照,这样更改后不报错了,osc_plus可以正常显示了,所以报告一下

刚才试了下 return (minus..mp.get_property_osd("property .. /full")) 也正常,不懂代码,你应该是双引号或者什么地方打错代码了?

全屏播放时画面闪烁

image
发现开启全屏后显示帧率会暴涨到几百帧,然后画面频繁闪烁,如视频中所示

VID_20221228_163730.mp4

尝试用a卡驱动后台录制视频时会恢复到60帧并且显示正常,故用手机拍摄

显卡:rx6700xt
操作系统:windows11
软件版本:20221112

问一些关于mpcvr的问题(大佬的mpcvr汉化项目没有issues,就在这边问了,大佬见谅)

大佬,我这边有两台笔记本设备,显卡方面一台使用英伟达的2070MQ,一台使用截图里面的英特尔核显,在我这边在使用mpcvr的时候,在控制面板,视频渲染器都开启0-255,视频源也是0-255的前提下,mpcvr的颜色范围会被限制在16-235,我无论怎么更改设置都达不到大佬你的mpcvr汉化项目里面的0-255,画面对比madvr和mpv更是明显发灰,请问该如何解决呢?
屏幕截图(1)

播放进度, 前进后退不准确

以左右键默认设置5秒为例
快进5秒, 实际可能是6秒, 可能是十几秒, 最夸张的是在播放瑞克和莫蒂, 快进5秒, 实际上快进了50秒. 导致根本无法精确控制时间, 这是咋回事
具体表现就是快进5秒, 播放进度显示5秒, 然后在100ms的时间内一跳, 后面莫名其妙追加了许多秒.

用过了纯净模式, 依然如此

版本mpv-lazy-20210502, mpv-lazy-20210224

как

what delete it is it??

BT.601 to BT.709 [HD]

Hello, i want to know how to have this shader with mpv.net or your tool? i really love your work. All in one tool easy :) no need to dig around or do code but the feature is missing from MPC is BT.601 to BT.709 [HD] shader. can you somehow add this shader too?

系统默认播放器

有没有比较优雅的方式实现视频文件双击后直接打开mpv,例如恒星播放器之类的直接设置默认播放器,而不是所谓的打开方式。mpv文件关联仅仅适用于打开方式,每重装一次系统就需要重复操作打开方式,很不方便

MPV设置音量时的显示

你好!
我使用MPV时,感觉设置音量时出现的提示与滑杆显示过大,影响观感。
实际使用时仅查看OSC进度条上的音量提示就足够了。

我尝试关闭OSC(使用Thumbnailer_OSC)显示后调节音量,依然会出现提示与滑杆。

请问有对应的设置可以关闭这项显示吗?或在哪个脚本里对其修改?

使用环境Win10 64位,使用脚本:
playlistmanager.lua
Thumbnailer.lua
Thumbnailer_OSC.lua
Thumbnailer_Worker.lua

window aspect >> 2 时的OSC界面问题

image

如图,在没有进入最大化或全屏界面时,导航栏不会缩放,我在mpv.conf里找不到相关设置,是本来就是这样设计,还是我设置问题?望回复。

mpv 的glsl shader执行流程

https://github.com/hooke007/MPV_lazy/blob/master/shaders/FSRCNNX_x2_16-0-4-1_anime_enhance.glsl
您好,请教两个问题:

  1. 在这个glsl里面,存在多个hook,他们是按照顺序执行的吗?
  2. hook函数前面的这些注释是什么意思?多个//!BIND,以及//!HOOK(看mpv的文档说明,没看明白) 比如:
  3. //!HOOK LUMA//!WHEN OUTPUT.w LUMA.w / 1.300 > OUTPUT.h LUMA.h / 1.300 > *//!DESC (FSRCNNX_x2_16-0-4-1_a_e) mapping 1_1//!BIND FEATURE1//!BIND FEATURE2//!BIND FEATURE3//!BIND FEATURE4//!SAVE MODEL21//!COMPONENTS 4

多谢~

AiUpscale shader not loaded? Log files show it loading, but when watching a video [ i 2] shows no loaded shaders, nor the !DESC given in the glsl file

mpv on Windows 11.

For example, I had an animated movie I wanted to watch so I loaded AiUpscale_HQ_4x_LineArt.glsl to test.

The logfile clearly shows it loaded succesfully.

But playing the movie nothing seems to be loaded / running / doing anything! The !DESC tag isn't shown either.

It's a 1080p movie on a 4k screen so plenty to upload I'd say? Am I missing something? Is there another test I can do?

在非常用分辨率视频下雪碧图渲染出错

image
效果如图
视频分辨率为1334*1920
复现:与正常视频打开一样
image
样本由于原视频较敏感难以提供,我这里只要是分辨率不太常用都会触发(可能是ipad生成的视频的原因)

音画不同步

不清除是哪里出了问题,使用mpv_lazy220403版本就会音画不同步,画面不固定倍速播放,音频正常。
使用原版MPV或者纯净模式就正常,我猜应该是脚本出了问题,可是不会排查,还麻烦你修复一下。

Player does not remember the last played/opened video/file

Basically the title. I open up a video file, play it and also the next few in row (the automatic playlist it makes works nicely) then close the player. Next time opening it I expect it to remember at least the last file that was played, so I don't have to go one by one searching which episode I was yesterday. For some reason it always gets stuck at the last episode of some series and once I finish the next series, it gets stuck on that one, on the last episode.

鼠标左击暂停同时不和full screen冲突

我将play/pause调至鼠标左击,但双击full screen的时候会调用两次play/pause。能否在full screen的时候不调用呢?

我google了一下找不到类似的脚本,请问大神能否patch一个脚本?

万分感谢!

项目性质变更

虽然这个仓库依然保持更新,但是部分脚本和大部分着色器我很久不使用了,我自己用的设置也和懒人包呈现的有差异。
考虑到这个项目的目的,直接套用我的本地更改删改大量文件显然不合适。

可能的下一步的工作:

  • 发布基于旧仓库结构的最后一版懒人包 mpv-lazy-obs【旧版快速说明】
  • 使用 lite分支 存放 mpv-lazy 的“出厂设置”
    • 发布基于该分支的新版整合包(内容极度精简,如需深入了解,请阅读主分支的对应文件)
  • !!!本仓库的主分支不再作为个人设置而是历史存档(这将产生脚本功能重合或冲突)!!!
    • 迁移杂物间的文件进原主设置区
    • 修正维基的对应内容
    • 修改部分主观性的设置,使主设置和脚本设置相互独立(这将产生脚本与核心设置冲突
  • 转换为模板库
    • 启用 obs分支 作为原个人设置的额外备份(在克隆模板库时选择所有branch,可以以旧仓库结构作为你的起始提交)

转型基本完成,主分支的后续变动为演示而不是实际使用服务。

  • 拆分 旧的input.conf 为多个文件以展示不同类型的快捷键绑定(这可能将产生键位冲突
  • 删除大多数注释符,以便于代码高亮利于阅读,并进一步清理部分偏好性预设(由于可能与默认值相同,这将产生大量多余的重复设置
    旧的mpv.conf 旧的脚本选项(都已过时,存在错误)
  • 主页补充关于主要分支说明的内容
  • 启用 img分支
  • 启用 core分支

Add support for English

Is there any plans to add English for comment configurations? I think it could attract more people to this great mpv config!

关于音频重采样的问题

对于一些不常见的音频想进行重采样,重采样至48000Hz,是使用“format=srate:48000”这个吗?但我使用多种语法进行添加都没有反应。包括单独设到vs文件夹,先获取后再重采样都没有反应

查看图片问题

查看图片,我发现是 轮播本目录下的图片,且轮播完就结束了。
我不知道能不能设置,
希望可以指定我一下。就是跟图片查看软件一样,点击就查看不要播放。

main.lua(uosc) 少了一行代码导致不可用

f0a8af5 之后uosc无法显示,报错如下:

uosc: script-opts/uosc.conf:91 unknown key 'autoload_types', ignoring
uosc: script-opts/uosc.conf:140 unknown key 'font_height_to_letter_width_ratio', ignoring
uosc:
uosc: stack traceback:
uosc:     D:/Movies/mpv-lazy/portable_config/scripts/uosc/main.lua:182: in function <D:/Movies/mpv-lazy/portable_config/scripts/uosc/main.lua:179>
uosc:     D:/Movies/mpv-lazy/portable_config/scripts/uosc/main.lua:187: in main chunk
uosc:     [C]: at 0x7ff69277f150
uosc:     [C]: at 0x7ff69277b1a0
uosc: Lua error: D:/Movies/mpv-lazy/portable_config/scripts/uosc/lib/std.lua:42: attempt to index local 'str' (a nil value)

对比原版uosc的 uosc.lua 后,发现少了一行代码:

https://github.com/tomasklaen/uosc/blob/1dfbbd70917bd465647af3103b762f16fa2fdc01/scripts/uosc.lua#L77

补上之后uosc就正常工作了。

快进播放蓝光原盘的MovieObject.bdmv文件时会花屏

播放蓝光原盘的MovieObject.bdmv文件时,正常速度播放和倍速播放画面都正常,但是快进播放时(即按住方向右键进行快进播放, RIGHT seek 5),会出现花屏。试了十几个蓝光原盘,只有2部不会出现花屏,其他快进播放都会出现花屏。如下图:

MovieObject bdmv_000633 680
MovieObject bdmv_000717 283
MovieObject bdmv_001635 909
MovieObject bdmv_002234 540
MovieObject bdmv_005401 649
MovieObject bdmv_011329 110
MovieObject bdmv_011633 547

配置如下:
### https://github.com/hooke007/MPV_lazy/blob/main/portable_config/mpv.conf


 input-conf = "~~/input_uosc.conf"
 include = "~~/profiles.conf"
 include = "~~/script-opts.conf"
 use-filedir-conf = yes
#log-file = "~~desktop/mpv-lazy.log"

 ########
 # 基础 #
 ########

 vo = gpu-next
 gpu-context = d3d11
#d3d11-exclusive-fs = yes
#d3d11-flip = no

 hwdec = auto
 hwdec-codecs = all

#d3d11-adapter = "NVIDIA GeForce RTX 2070 Super"


 ########
 # 功能 #
 ########

 idle = yes
#input-ipc-server = mpvpipe
 input-builtin-bindings = no
#pause = yes

 hr-seek-framedrop = no
 save-position-on-quit = yes
 watch-later-options = start,vid,aid,sid

 keep-open = yes
#ontop = yes
#border = no
 autofit-smaller = 40%x40%
 keepaspect-window = no
 hidpi-window-scale = no

 demuxer-max-bytes = 1024MiB
 icc-cache-dir = "~~/_cache/icc"
 gpu-shader-cache-dir = "~~/_cache/shader"
 watch-later-directory = "~~/_cache/watch_later"


 #######
 # OSD #
 #######

 osd-on-seek = msg
#osd-blur = 1
 osd-bar-w = 100
 osd-bar-h = 1
 osd-bar-align-y = -1
 osd-color = "#FF00FF"
 osd-border-color = "#000000"
 osd-border-size = 1
 osd-font-size = 20
 osd-fractions = yes
 osd-playing-msg = "${filename}"
 osd-duration = 2000
 osd-playing-msg-duration = 3000


 ########
 # 音频 #
 ########

 ao = wasapi
#audio-device = "wasapi/{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
#audio-exclusive = yes

 volume = 100
 volume-max = 100
 audio-channels = stereo
 ad-lavc-downmix = yes
 alang = chs,sc,zh,chi,zho
 audio-file-auto = fuzzy
# 多通道音轨调节各通道音,防止背景音或人声过小(双通道设备) https://github.com/mpv-player/mpv/issues/6563
#  af=lavfi=[dynaudnorm=g=5:f=250:r=0.9:p=0.5]

 ########
 # 视频 #
 ########

#icc-profile-auto = yes

#target-prim = display-p3

 video-sync = display-resample
 video-sync-max-video-change = 5
 interpolation = yes
 tscale = oversample

 cscale = catmull_rom
 scale = ewa_hanning
 dscale = ewa_hanning
#sigmoid-upscaling = yes
#correct-downscaling = yes

#dither-depth = 10
#dither = error-diffusion
#deband = yes

#tone-mapping = bt.2390
 tone-mapping-mode = hybrid
 gamut-mapping-mode = clip


 ####################
 # 脚本 滤镜 着色器 #
 ####################

 osc = no
#ytdl-raw-options-append = cookies-from-browser=edge

#load-scripts = no

#  glsl-shaders-append = "~~/shaders/AMD_FSR_EASU_rgb.glsl"


 ########
 # 字幕 #
 ########

 sub-auto = all
#  sub-file-paths = sub;subtitles
 slang = chs,sc,zh,chi,zho
#blend-subtitles = video

 sub-font = "华文楷体"
sub-font-size = 40
#sub-scale-with-window = no
 sub-color = "#FC8000"
 sub-back-color = "#00000000"
 sub-shadow-offset = 0
 sub-use-margins = yes

sub-ass-override = strip
#sub-ass-scale-with-window = yes
 sub-ass-force-margins = yes
#sub-ass-force-style = Fontname=LXGW WenKai Mono

#stretch-image-subs-to-screen = yes
#image-subs-video-resolution = yes

sub-border-size = 1
sub-border-color = "#000000"  # 字体边框颜色
sub-margin-x = 0              # <0-300> 水平边距,默认25
sub-margin-y = 18             # <0-600> 垂直边距,默认22

 ########
 # 截图 #
 ########

 screenshot-format = png

 screenshot-jpeg-quality = 100
#screenshot-jpeg-source-chroma = no
 screenshot-webp-lossless = yes
 screenshot-webp-compression = 0
 screenshot-jxl-distance = 0

#screenshot-tag-colorspace = yes
 screenshot-high-bit-depth = no
 screenshot-template = "~~desktop/%f_%wH%wM%wS.%wT"

MPV: superxbr-chroma: from the log: Registering hook pass: unknown user shader

Is that warning / error to be expected? Or is something going wrong?

From my mpv.conf:
glsl-shaders="~~home/shaders/superxbr/superxbr-chroma.hook"

Same problems for superxbr-native.hook.

No other shaders are loaded. Thanks!

Which brings me to my bonus question... Is super-xbr--rgb--1.2-sharpness.hook used with 1 of the other 2 shaders (superxbr-native and super-xbr--rgb), or only with super-xbr--rgb?

[Bug] 由GPU 100%占用所引发的系统死机

环境

硬件:GTX 1060 Notebook + i5-8400
系统:Win10 21H1 2022.06更新
软件:mpv-lazy-20220515
设置:加一份崩溃前的日志,已打包为portable_config.zip,修改参考配置描述。

配置

MPV主要修改为如下

  • mpv.conf 33行,修改了GPU名称
  • mpv.conf 52行,修改了pause为打开就播放视频
  • mpv.conf 80行,修改了demuxer-max-bytes为300MiB
  • mpv.conf 224行,修改为默认开启了mvtools-2x.vpy

描述

MPV由于历史遗留问题放在机械硬盘,而播放视频在固态,打开视频为 1080P H265 mp4。

  1. 打开视频不做任何变动,回车进入全屏,在播放一定时间(3-50min)后,某一刻开始GPU的占用率会在任务管理器突然从20%飙升至100%。
  2. 此时如果手速够快,强制结束mpv任务,一切恢复正常。反之稍微挺几秒,系统会全面死机,但不会触发蓝屏只能手动强制关机。
  3. 触发时间虽然不确定,但最终触发频率都为100%,我本机已死机4次。

补充

我并不能确定该崩溃由MPV本身所引发,还是脚本不兼容导致。

作者有如其他需要可以在回复中指出,类似所看视频,整体mpv的打包等,我会尽量提供。

Thumbnailer_OSC结合7月的libass-git更新会显著增加windows下cpu占用

上个月libass git更新后改了font fallback的逻辑,会遍历整个font family。正常情况下渲染字幕这种一次性的流程并不会有太大影响,但是这个脚本渲染osd文字也走这个流程,而且每时每刻都在刷新

于是问题就来了,这个脚本的osc的定义里有这俩emoji

tn_osc = {
cursor = {},
position = {},
scale = {},
osc_scale = {},
spacer = {},
osd = {},
background = {text = '︎✇',},
font_scale = {},
display_progress = {},
progress = {},
mini = {text = '',},
thumbnail = {

在非unicode的locale下(比如windows),通过luajit的转换,在lua_c api层面会添加0xfe0e这个emoji转义字符,这是个不可见字符,正常字体也不会有这种glyph,于是libass遍历完了所有字体还是找不到,cpu占用就这么上去了,我粗略测试下来把鼠标悬停在进度条预览缩略图时能吃满cpu半个核

实际上,这俩作用也就是在缩略图还没生成的时候借用libass生成一个简单的背景图然后贴个emoji上去,详见

-- Background
ass_new(ass, tn_osc.thumbnail.left, tn_osc.background.top, 7, tn_style.background)
ass_rect(ass, -tn_osc.spacer.x, -tn_osc.spacer.top, tn_osc.thumbnail.w + tn_osc.spacer.x, tn_osc.background.h + tn_osc.spacer.bottom)
local spinner_color, spinner_alpha = tn_palette.white, tn_palette.alpha_white
if not path then
ass_new(ass, tn_osc.thumbnail.left, tn_osc.thumbnail.top, 7, tn_style.subbackground)
ass_rect(ass, 0, 0, tn_osc.thumbnail.w, tn_osc.thumbnail.h)
spinner_color, spinner_alpha = tn_palette.black, tn_palette.alpha_black
end
ass_new(ass, tn_osc.position.x, tn_osc.thumbnail.top + tn_osc.thumbnail.h * 0.5, 5, tn_style.spinner .. (tn_style_format.spinner2):format(spinner_color, spinner_alpha, tn_osc.background.rotation * seek_percent * 1080), tn_osc.background.text)
-- Mini Progress Spinner
if tn_osc.display_progress.current ~= nil and not tn_osc.display_progress.current and tn_osc_stats.percent < 1 then
ass_new(ass, tn_osc.mini.x, tn_osc.mini.y, 5, tn_style.progress_mini .. (tn_style_format.progress_mini2):format(tn_osc_stats.percent * -360 + 90), tn_osc.mini.text)
end

把这些相关代码删了也不会造成太大影响

加载外部音轨快进快退时画面停滞几秒

我下载油管视频都是不合并视频音频,让mpv自动加载同名的外部音轨。大部分的高清视频都没有问题,但某些类型的视频快进快退时,会画面停滞几秒,等到音画同步了才继续播放。

比如这个,下载它的m4a音频和1080Pmp4,播放,调整进度到一半,然后按住"Left"键快退个6、7次,就会先出现几秒无声的正常画面,然后画面卡住,出现几秒的正常声音,直至二者同步了,画面和声音才同时正常。

https://www.youtube.com/watch?v=eu0HeFG_xqI

用的是 mpvnet-CM 默认配置。
我电脑播放4K电影这样快进快退没有问题,应该不是性能瓶颈。
有时快进也会出现这样的问题。
似乎问题只出现在这种MP4配M4A的视频。播放4K的webm配M4A,快进快退都没有这种问题。

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.