Jump to content

media players not playing files over smb, is ffmpeg compiled without networking support?


Dantes

Recommended Posts

:unsure:

 

I am unable to play files over SMB, but I can't seem to figure out what the problem is exactly. From what I can tell it *seems* ffmpeg is compiled without networking support, at least this is what smplayer was complaining about:

 

[ffmpeg] Protocol not found. Make sure ffmpeg/Libav is compiled with networking support.
Failed to open smb://192.168.1.1/transmission/myfile.mkv.
Exiting... (Errors when loading file)

 

But when I look at the ffmpeg switches it was compiled with:

 

 --enable-libsmbclient

 

and seems to be present.

 

Now I'm a complete linux n00b, does anyone have an idea ?

 

 

Edited by Dantes
Link to comment
Share on other sites

I think I found the problem :D

 

So I compared logs from a working x86-64 system with the R6C aarch64 and as you can see mpv is compiled without --enable-libsmbclient

 

$ grep Configuration aarch64_mpv.log			      |	$ grep Configuration x86-64_mpv.log
[cplayer]							[cplayer]
Configuration:							Configuration:
./waf								./waf
configure							configure
--prefix=/usr							--prefix=/usr
--libdir=/usr/lib/aarch64-linux-gnu			      |	--libdir=/usr/lib/x86_64-linux-gnu
--confdir=/etc/mpv						--confdir=/etc/mpv
--zshdir=/usr/share/zsh/vendor-completions			--zshdir=/usr/share/zsh/vendor-completions
--enable-cdda							--enable-cdda
--enable-dvdnav							--enable-dvdnav
--enable-libmpv-shared						--enable-libmpv-shared
							      >	--enable-libsmbclient
--enable-sdl2							--enable-sdl2
							      >	--enable-sndio
--disable-build-date						--disable-build-date
--enable-dvbin							--enable-dvbin
$ 								$ 

 

Just to be clear: celluloid depends on mpv which depends on ffmpeg

 

On x86-64 (Ubuntu 22.04 LTS)  where it works:

* ffmpeg (4.2.7) is compiled without --enable-libsmbclient

* mpv (0.32.0) with --enable-libsmbclient

 

On aarch64 (Armbian/Ubuntu 22.04 LTS)  where it does not:

* ffmpeg (4.4.2) is compiled with --enable-libsmbclient

* mpv (0.34.1) without --enable-libsmbclient

 

I hereby humbly request someone with more skills to verify my findings and hopefully we can all enjoy playing files over smb:// in the future :love:

Edited by Dantes
Link to comment
Share on other sites

Actually, first you should build it yourself from sources, using the desired command line arguments, which you seem to have sussed out.  At a minimum this would confirm the solution to the problem is what you suspect it is.


The next step (and this is without looking into it any further, and speaking generally, etc.) is understanding that most of userspace programs (including mpv) would be coming (unmodified) from upstream Debian.  If that's true (in this case, with mpv) you should contact the Debian maintainer for aarch64 build of mpv and ask them why that option is not enabled.  Or perhaps, inquire first on the relevant mailing list.

 

In any case, please do report back your findings.  Good luck!

Link to comment
Share on other sites

@TRS-80

 

Tried to compile it, but apparently my skills suck in this department. I'm ending up with errors every time. So this is best suited for someone who actually knows what he's doing.

 

What I did:

 

git clone https://github.com/mpv-player/mpv

sudo apt install \
    libsmbclient-dev \
    meson \
    cmake \
    pkg-config \
    libshaderc-dev \
    autogen \
    libunwind-dev \
    libplacebo-dev \
    autoconf \
    automake \
    libtool \
    libfreetype-dev \
    libfribidi-dev \
    libharfbuzz-dev \
    libfontconfig-dev

cd mpv

./rebuild -j4

 

Edited by Dantes
Link to comment
Share on other sites

Yay! I have it working

 

But I'm not an expert in compiling so ymmv ;)

Feel free to comment or point out any mistakes

 

# when libshaderc-dev is installed the build succeeds, but has a run-time failure

sudo apt remove \
  libshaderc-dev

 

# install compiling tools

sudo apt install \
  autogen automake cmake libtool meson pkg-config

 

# install development libraries

sudo apt install \
  libalsaplayer-dev libaom-dev libarchive-dev libass-dev libavcodec-dev libavfilter-dev \
  libcaca-dev libd3dadapter9-mesa-dev libegl1-mesa-dev libfdk-aac-dev libfontconfig-dev \
  libfreetype-dev libfribidi-dev libharfbuzz-dev libjack-dev libjpeg-dev libmp3lame-dev \
  libmujs-dev libopenal-dev libopus-dev libpipewire-0.3-dev libplacebo-dev libsdl2-dev \
  libsixel-dev libsoxr-dev libunwind-dev libva-dev libvdpau-dev libvkd3d-dev libvorbis-dev \
  libvpx-dev libx264-dev libx265-dev libxpresent-dev libxxhash-dev libzimg-dev

 

# clone mpv build script repository

git clone https://github.com/mpv-player/mpv-build

 

# configure ffmpeg options by creating a file called mpv-build/ffmpeg_options with content:

image.png.0b296eb2b63d4fb99cdfdef53ad6bf06.png--enable-static
--disable-shared
--enable-gpl
--enable-libaom
--enable-libfdk-aac
--enable-libfribidi
--enable-libmp3lame
--enable-libopus
--enable-libsmbclient
--enable-libsoxr
--enable-libvorbis
--enable-libvpx
--enable-libx264
--enable-libx265
--enable-nonfree
--enable-version3

 

# configure mpv options by creating a file called mpv-build/mpv_options with content:

-Dlibmpv=true

 

# start building

cd mpv-build
./rebuild -j$(nproc)


# strip executable

cp -p mpv/build/mpv /tmp/mpv
strip --strip-unneeded /tmp/mpv
touch -r mpv/build/mpv /tmp/mpv

 

# test mpv

/tmp/mpv smb://myserver/myshare/myfile.mkv

 

Yay!

 

Edited by Dantes
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines