Greasy Fork is available in English.

使用 MPV 播放

通過 mpv-handler 播放網頁上的視頻和歌曲

< 腳本使用 MPV 播放的回應

評論:正評 - 腳本一切正常

§
發表於:2021-09-10

config.toml文件里修改了以下内容:
### Player ###
player = "D:\\Soft\\MPV"

### Video Downloader ###
[mpv]
bin = "D:\\Soft\\MPV"

执行报错,提示“Error: Failed to run downloader "mpv": 拒绝访问。 (os error 5)”,把mpv.ext权限都点上了,还是不行- -

§
發表於:2021-09-10

这俩配置原来是文件的路径……都改成mpv.exe就OK了。

另外,下载器是什么? 用youtube-dl解析视频地址,mpv解码播放的话,下载器应该是mpv吗?

§
發表於:2021-09-10

这俩配置原来是文件的路径……都改成mpv.exe就OK了。

另外,下载器是什么? 用youtube-dl解析视频地址,mpv解码播放的话,下载器应该是mpv吗?

akiirui作者
§
發表於:2021-09-12

下载器是用于解析视频链接并且下载到本地的程序,例如 youtube-dl / you-get / streamlink 之类的。

但是由于 mpv 内置了 youtube-dl 的 hook 可以方便的使用并且能够设置视频品质,所以也算作一个下载器。

(使用 youtube-dl 作为下载器时,只能通过管道传输视频数据,但是通过管道传输时不支持 --ytdl-format= 参数选择视频品质)

§
發表於:2021-10-14

These two configurations were originally the path of the file... Change it to mpv.exe and it will be OK.

Also, what is a downloader? If you use youtube-dl to parse the video address and mpv decode and play, should the downloader be mpv?

It's not work in my case. I need to specify player = "C:\\mpv\\mpv.exe" for it needs to work.
And I think it's might getting much slower to popup the mpv in my case compare to my last experiment. I am not sure what is the problem is. Maybe youtube-dl getting slower or something else. Please support yt-dlp soon cause youtube-dl will die anytime soon

akiirui作者
§
發表於:2021-10-14
編輯:2021-10-14

@Kenni

It's not work in my case. I need to specify player = "C:\mpv\mpv.exe" for it needs to work.

The userscript only supports downloader mpv this time. So, the option player doesn't use anyway.

You should change [mpv] - bin to your mpv binary path.

Please support yt-dlp soon cause youtube-dl will die anytime soon

I cannot speicfy yt-dlp for mpv, until the upstream deprecates youtube-dl and migrates to yt-dlp.

But because the downloader mpv uses ytdl-hook to run youtube-dl. So, you can edit mpv.conf and set ytdl_path to replace youtube-dl to yt-dlp.

https://mpv.io/manual/master/#options-ytdl-path

(It should work, the options of youtube-dl and yt-dlp are almost compatible)

akiirui作者
§
發表於:2021-10-17

@Kenni And in latest mpv commit, they are use yt-dlp by default.

https://github.com/mpv-player/mpv/commit/cc4ada655aae06218b900bb434e3521566394cde

§
發表於:2021-10-18

Thank you for your reply. Is this normal to wait like 3-5 seconds before the mpv screen popup? I remember it much faster before

akiirui作者
§
發表於:2021-10-18

Thank you for your reply. Is this normal to wait like 3-5 seconds before the mpv screen popup? I remember it much faster before

That It depends on youtube-dl/yt-dlp decode the URL speed.

And see: https://github.com/mpv-player/mpv/issues/9208#issuecomment-918419262, yt-dlp is slower than youtube-dl under normal circumstances.

§
發表於:2021-11-10

Thank you for your reply. Is this normal to wait like 3-5 seconds before the mpv screen popup? I remember it much faster before

That It depends on youtube-dl/yt-dlp decode the URL speed.

And see: https://github.com/mpv-player/mpv/issues/9208#issuecomment-918419262, yt-dlp is slower than youtube-dl under normal circumstances.

哈哈 专业还是你专业啊。巧了,这两天我也在尝试换yd-dlp试试,你这么一说,我就不瞎折腾了,好像确实会慢一些。话说回来,最好还是能用you-get作为下载器,昨天开始,b站的一些视频,我的youtube-dl又开始解析不了了,软件版本啥的也是最新的了,我看昨天也没更新,但是you-get还是能下载。

akiirui作者
§
發表於:2021-11-11
編輯:2021-11-11

哈哈 专业还是你专业啊。巧了,这两天我也在尝试换yd-dlp试试,你这么一说,我就不瞎折腾了,好像确实会慢一些。话说回来,最好还是能用you-get作为下载器,昨天开始,b站的一些视频,我的youtube-dl又开始解析不了了,软件版本啥的也是最新的了,我看昨天也没更新,但是you-get还是能下载。

不过 mpv 上游也选择默认 yt-dlp 了,虽然慢一点,但是总比不能用的好。

發表回覆

登入以回復