0

我正在开发 RSS 阅读器,并使用 mpv 播放 gif。

$ mpv https://www.reddit.com/r/aww/comments/mgvksg/a_contagious_smile/                                                                                                                                                                                                         
 (+) Video --vid=1 (*) (h264 384x480 30.000fps)
VO: [gpu] 384x480 yuv420p
V: 00:00:04 / 00:00:04 (99%) Cache: 0.0s

Exiting... (End of file)

mpv 使用 youtube-dl 下载文件/流。但是当链接是图片时,mpv 无法打开它。

$ mpv https://www.reddit.com/r/aww/comments/mgtwq7/my_friends_new_puppy/                                                                                                                                                                                                       
Failed to recognize file format.

Exiting... (Errors when loading file)

所以我想,如果 youtube-dl 指向的文件是图像(jpg/png),那么它将使用 imv,它可以显示来自标准输入的文件。有解决方法吗?就像是

youtube-dl --magic --if-image=imv --if-video=mpv https://reddit.com/r/maybe_a_video_or_a_image
4

0 回答 0