不能播放samba中的视频,貌似和ffmpeg有关

mpv,vlc等视频播放器不能播放samba中的视频,可以播放网络上的视频,
播放samba中的视频时报错如下
[ffmpeg] Protocol not found. Make sure ffmpeg/Libav is compiled with networking support.
以前是可以的,后来不知怎么就成这样了。

mpv最近改用ffmpeg来支持smb,但是仓库里默认的ffmpeg没有支持这个功能。你可以试一下ffmpeg看下configuration,里面没有-enable-libsmbclient。aur里面还有一个ffmpeg-full,可以看一下。
另见:
https://lists.opensuse.org/opensuse-factory/2020-03/msg00145.html

试解决成功。大致方法:若已安装mpv则先卸载,顺带卸载其余零星依赖组件,如gst-plugins-bad。之后在AUR库中找ffmpeg-git,用pamac命令行构建,在中途编辑配置文件中加入一行:
--enable-libsmbclient \
后开始编译安装,其版本为4.4。注意,rav1e可能需要同时编译安装,所需版本为0.4.0以上,从AUR库中找。两者同时构建可安装成功。
此时输入ffmpeg命令验证可见:

ffmpeg version N-100660-g71ce5c32f0 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsmbclient --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 63.101 / 56. 63.101
  libavcodec     58.117.101 / 58.117.101
  libavformat    58. 65.101 / 58. 65.101
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 96.100 /  7. 96.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

注意其中--enable-libsmbclient已生效。此时再重装mpv,解决。

1 Like

谢谢!方法有效!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.