Mplayer无法播放网络流

Mplayer无法播放网络流

我正在尝试使用 mplayer 播放 youtube 流。在运行时mplayer -cache 2048 https://www.youtube.com/watch?v=USUA_1WVM8I,我得到以下输出,并且视频根本无法播放。

MPlayer SVN-r37379 (C) 2000-2015 MPlayer Team
210 audio & 441 video codecs

Playing https://www.youtube.com/watch?v=USUA_1WVM8I.
libavformat version 56.25.101 (internal)
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
Cache fill:  7.81% (163840 bytes)   [tls @ 0x7f75d89eaa00]The TLS connection was non-properly terminated.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
Cache fill:  9.48% (198786 bytes)   
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.
[tls @ 0x7f75d89eaa00]The specified session has been invalidated for some reason.

[tls @ 0x7f75d89eaa00]
The specified session has been invalidated for some reason.

Exiting... (End of file)

任何其他 YouTube 视频也会发生同样的情况。

从输出来看,TLS 库似乎存在一些问题,但我用 VLC 尝试了相同的视频,它们播放得很好。如何使用 mplayer 解决这个问题?

答案1

mplayer 不支持 HTTPS 协议。因此,您应该将 mplayer 与 youtube-dl 结合使用,将视频下载到帧缓冲区中然后播放。

像这样:

curl --ciphers RC4-SHA "$(youtube-dl -g http://www.youtube.com/watch?v=XEVlyP4_11M)" | mplayer -

相关内容