dyphire/mpv-config

在MPV GUI 界面中通过直接粘贴 pikpak 的 URL 来串流播放视频是不可行的。但是使用命令行却可以正常串流。

Closed this issue · 5 comments

版本:03-10
我在 mpv.conf中为 mpv 和 yt-dlp.exe 都设置了本地http代理。

http-proxy=http://127.0.0.1:3256
ytdl-raw-options-append=proxy=http://127.0.0.1:3256

在MPV GUI 界面中通过直接粘贴 pikpak 串流连接来播放视频会直接黑屏。
使用mpv 'https://dl-a10b-0862.mypikpak.com/download/?fid=xxxxxxxxx'则正常播放。

我需要为某个脚本额外配置本地代理吗?还是说是由bug导致的问题?

不具备复现条件,如果确定命令行下可播放,可能是某个脚本影响的,只能建议自己慢慢排查下是哪个的问题

不具备复现条件,如果确定命令行下可播放,可能是某个脚本影响的,只能建议自己慢慢排查下是哪个的问题

[ytdl_hook]
[ytdl_hook] ERROR: [generic] Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: Forbidden>)
[ytdl_hook] youtube-dl failed: unexpected error occurred
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] playlist hook
[cplayer] Running hook: ordered_chapters_playlist/on_load
[cplayer] Running hook: sub_fonts_dir_auto/on_load
[cplayer] Running hook: auto_profiles/on_load
[cplayer] Running hook: segment_linking/on_load
[ffmpeg] Opening https://dl-a10b-1192.mypikpak.com/download/?fid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[ffmpeg] https: HTTP error 403 Forbidden
Failed to open https://dl-a10b-1192.mypikpak.com/download/?fid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

403 错误,通常情况下是能够复制打开的,只是pikpak不行。
我用 load_plus.lua 脚本来加载 pikpak 的连接,这个问题也就间接解决了。

看上去又是 ytdl 的问题

我又看了眼这个问题,实际上应该是你的代理设置有问题,正确的设置应为:

ytdl-raw-options-append=proxy=http://127.0.0.1:3256
stream-lavf-o-append=http_proxy=http://127.0.0.1:3256

命令行之所以可以播放应该是终端直接走了代理软件

我其实不推荐这种写死代理的方式,由代理软件(clash 等)使用 tun 模式接管网络流量是更合适的方式,也是我的用法;亦或者你可以选择使用脚本自动设置代理:set_proxy.lua

编辑:在提交 d0940f7 中完善了相关说明

我没有为终端特别设置代理。
尝试了下

ytdl-raw-options-append=proxy=http://127.0.0.1:3256
stream-lavf-o-append=http_proxy=http://127.0.0.1:3256

也是403。

之前也有试过 clash 全局代理加 tun 模式的同时注释掉 mpv 所有代理相关设置,如果直接粘贴链接的话,也是无法播放。

不过我平时是不使用 tun 模式的,因为我同时运行了两个不同的 clash gui ,
其中一个仅监听端口、不开启系统代理、专供 qBittorrent 的 rss 订阅使用。

现在没有其他人反馈同样的问题,也不知道是否是我自己的网络环境具备特殊性,排查不方便。