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

IINA配置svp4后,iina-plus报错 #231

Open
shihong5858 opened this issue Sep 25, 2024 · 8 comments
Open

IINA配置svp4后,iina-plus报错 #231

shihong5858 opened this issue Sep 25, 2024 · 8 comments

Comments

@shihong5858
Copy link

尝试了各种重装,发现是和SVP4的冲突。
简单来说,SVP4需要替换dylib文件

ln -s /opt/homebrew/lib/libmpv.2.dylib /Applications/IINA.app/Contents/Frameworks/libmpv.2.dylib

然而替换完后,SVP4是可用的(看本地视频),但iina就所有在线视频都不能打开了。
image

尝试了关闭个人的mpv配置,关闭弹幕,换视频输出格式都无效。猜测是Danmaku插件更新到1.12之后发生的,因为之前都是好用的,可以兼容的。

IINA+.log

@xjbeta
Copy link
Owner

xjbeta commented Sep 25, 2024

有IINA 的log 吗 设置内日志等级开到verbose 重启IINA 随便开个视频
然后把日志文件夹的都发来
插件0.1.12 为了兼容新版的mpv 额外会检查一次mpv 的版本 来用新的命令行打开视频

@shihong5858
Copy link
Author

iina.log
mpv.log

@shihong5858
Copy link
Author

不确定刚才那个是否捕捉到了,把iina和plus都关了重新打开又开了一个log文件夹

mpv.log
iina.log

@xjbeta
Copy link
Owner

xjbeta commented Sep 25, 2024

Finder Command + Shift + G
打开目录 ~/Library/Application Support/com.colliderli.iina/plugins/com.xjbeta.danmaku.iinaplugin
找个文本编辑器打开 main.js
80行 往后有一段

        if (parseFloat(iina.core.getVersion().mpv.replace(/^.*v0\./, '')) >= 38) {
            // v0.38.0
            mpv.command('loadfile', [opts.urls[opts.currentLine], 'replace', '0', opts.mpvScript]);
        } else {
            mpv.command('loadfile', [opts.urls[opts.currentLine], 'replace', opts.mpvScript]);
        };

尝试替换成
mpv.command('loadfile', [opts.urls[opts.currentLine], 'replace', '0', opts.mpvScript]);
或者
mpv.command('loadfile', [opts.urls[opts.currentLine], 'replace', opts.mpvScript]);

保存文件修改后 重启IINA 看看哪个能正常使用

@shihong5858
Copy link
Author

这个是好用的:

mpv.command('loadfile', [opts.urls[opts.currentLine], 'replace', '0', opts.mpvScript]);

感谢大佬~!

@shihong5858
Copy link
Author

大佬这个问题未来会在插件里修复么?

@xjbeta
Copy link
Owner

xjbeta commented Sep 30, 2024

不太清楚替换之后 版号的输出是什么样的
试试在 前面加入以下几行
mpv.command('loadfile', [opts.urls[opts.currentLine], 'replace', '0', opts.mpvScript]);

        let mpvVer = iina.core.getVersion().mpv;
        print(mpvVer);
        let ver = parseFloat(mpvVer.replace(/^.*v0\./, ''));
        print(ver);

保存退出之后 重启IINA 随便开一个带弹幕的视频 然后把log 发来

@shihong5858
Copy link
Author

输出好像是:
15:33:39.371 [player0 - Danmaku][d] [aanv0guuz] mpv 0.39.0
15:33:39.371 [player0 - Danmaku][d] [aanv0guuz] NaN

iina.log
mpv.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants