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

webp动图创建失败,请问为什么乱码了。。 #17

Closed
CBEpt opened this issue Jan 24, 2023 · 7 comments
Closed

webp动图创建失败,请问为什么乱码了。。 #17

CBEpt opened this issue Jan 24, 2023 · 7 comments

Comments

@CBEpt
Copy link

CBEpt commented Jan 24, 2023

image

@dyphire
Copy link
Owner

dyphire commented Jan 25, 2023

是在网络视频上操作的?该脚本只支持本地视频。非网络视频的话把mpv日志文件放上来才能找到问题。

至于控制台乱码,这是mpv的局限性,它的控制台lua脚本不支持输出非unicode字符。

@dyphire
Copy link
Owner

dyphire commented Jan 25, 2023

仔细看了眼报错信息,提示未找到ffmpeg。请确保你有正确配置ffmpeg环境变量或路径

@CBEpt
Copy link
Author

CBEpt commented Jan 25, 2023

1 ffmpeg确实在path, cmd直接输入ffmpeg会返回结果
2 是本地的视频。
日志的话,抱歉不知道具体该粘贴哪一部分,就都放上来了。。级别应该是info. 麻烦大佬查看一下了
mpv.log

@dyphire
Copy link
Owner

dyphire commented Jan 25, 2023

1 ffmpeg确实在path, cmd直接输入ffmpeg会返回结果 2 是本地的视频。 日志的话,抱歉不知道具体该粘贴哪一部分,就都放上来了。。级别应该是info. 麻烦大佬查看一下了 mpv.log

奇怪了,看日志我也没看出有什么问题。是所有视频都不能创建webp动图吗?

cmd = string.format("%s -y -hide_banner -loglevel error -ss %s %s -t %s -i '%s' -lavfi %s -lossless %s -q:v %s -compression_level %s -loop %s '%s'", options.ffmpeg_path, position, copyts, duration, pathname, trim_filters, options.lossless, options.quality, options.compression_level, options.loop, webpname)
args = { 'powershell', '-NoProfile', '-Command', cmd }

-loglevel error改为-loglevel debug后重新测试上传日志文件

@CBEpt
Copy link
Author

CBEpt commented Jan 25, 2023

mpv.log
改为debug,又测试了一下,发现可以截取webp了,log如上。
针对这个bug突然好了的原因,我觉得就不得不说一下我下午的一系列骚操作:因为想加一个之前在mpv.net_cm用过的mvtool倍帧滤镜,不会整,一开始直接挪进来是失效的,我觉得可能是缺脚本里定义的vs/python便携包,就用笨办法把mpv.net_cm的所有包啊什么的,都复制到了mpv_config-2023.01.22文件夹里,没有任何文件替换,重启mpv, mvtools倍帧滤镜就生效了。)现在webp脚本也生效了。。不知道是缺什么库。
另外我发现这种animated webp和qq聊天的兼容性不是太好,发进去别人是看不到动作效果。。
请问怎么改成截取GIF/定义分辨率等参数。。
ptp/z4a图床倒是支持,bbcode挂到论坛里也能正常看到动画效果。
2023-01-25_19-02-25
不过现在还有一个小问题,每次打开一个新文件,就会出现一个这个东西,我也不知道是干嘛的,怎么关掉。。

@dyphire
Copy link
Owner

dyphire commented Jan 25, 2023

另外我发现这种animated webp和qq聊天的兼容性不是太好,发进去别人是看不到动作效果。。
请问怎么改成截取GIF/定义分辨率等参数。。

可以参考mpv-gif.lua脚本的代码修改下即可截取gif动图,但我个人不推荐,同片段gif的大小要远超webp格式

2023-01-25_19-02-25
不过现在还有一个小问题,每次打开一个新文件,就会出现一个这个东西,我也不知道是干嘛的,怎么关掉。。

这是history-bookmark.lua脚本的功能,它会记录每个文件夹最后播放的文件,当播放同目录下其他文件时会提示是否恢复上次播放记录(通过快捷键恢复/忽略)。如不需要可以在对应的history_bookmark.conf脚本配置文件中禁用enabled即可

@dyphire dyphire closed this as completed Jan 25, 2023
@CBEpt
Copy link
Author

CBEpt commented Jan 25, 2023

大佬,试了一晚上,您给我的gif lua截不出来gif。。看了一下,发现他的仓库全是待修的issue。。
webp压缩率是好,可是我分享出去,这个格式过于先进,兼容性太差了,手机上看不到。。。我手机上的app试了个便,都打不开这种animated webp. 我对清晰度没啥要求,就是希望内容能分享出去
所以基于分享和兼容性的方面,可以麻烦您集成一个gif脚本吗

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