VLC / SMB - Watching videos via network-computer

Anyone? Thanks in advance for everyone’s time and help!

If the same happens with mpv, could it be related to ffmpeg not being compiled with libsmbclient? See here for similar: MPV can’t play files over samba share. As muvvenby mentions, are you able to mount your network share and then play from the mounted directory?

When selecting MPV, and trying to play the movie, nothing happens. No file is loaded I’m assuming due to an error. So, that’s the issue…when I mount my network share, and play from it (with VLC), I get that error. When I copy the movie locally to my Desktop for example, and then try playing it, it plays fine with NO issues (with VLC and MPV).

So even though the directory is mounted (fstab, systemd?) and is browsable, the files will still not play? How are you playing the files - dragging and dropping onto mpv, or command line?

If using the command line directly to the network share (e.g. mpv smb://path-to-network-file), do you see the following in your terminal (or anything?):

[ffmpeg] Protocol not found. Make sure ffmpeg/Libav is compiled with networking support

And using the command line to your mount (e.g. mpv /mounted-directory/file) is there no output at all, with it also failing to play silently?

So to be honest, I’m not sure how things are being mounted. I am doing it through the GUI (Gnome Files) and I am able to see my server and mount and navigate files remotely through it. Not using the command line for mounting / unmounting at this point. I am attempting to play the files just by double clicking on them through the Gnome Files utility.

In terms of MPV, this is the output I am seeing:

mpv -v '/run/user/1000/gvfs/smb-share:server=asifs-mac-mini.local,share=asifs%20hd/Asif/Bolt.avi'                                                              2 ✘ 
[cplayer] Command line options: '-v' '/run/user/1000/gvfs/smb-share:server=asifs-mac-mini.local,share=asifs%20hd/Asif/Bolt.avi'
[cplayer] mpv 0.33.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       56.51.100
[cplayer]    libavcodec      58.91.100
[cplayer]    libavformat     58.45.100
[cplayer]    libswscale      5.7.100
[cplayer]    libavfilter     7.85.100
[cplayer]    libswresample   3.7.100
[cplayer] FFmpeg version: n4.3.1
[cplayer] 
[cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --disable-build-date
[cplayer] List of enabled features: 52arch alsa asm caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffnvcodec gbm gbm.h gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo librt linux-fstatfs linux-input-event-codes lua memfd_create optimize plain-gl posix posix-or-mingw pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vt.h vulkan wayland wayland-protocols x11 xv zlib
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Applying profile 'default'...
[cplayer] Setting option 'v' = '' (flags = 8)
[cplayer] Waiting for scripts...
[osd/libass] Shaper: FriBidi 1.0.10 (SIMPLE) HarfBuzz-ng 2.7.4 (COMPLEX)
[osd/libass] Setting up fonts...
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Done loading scripts.
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo_dvdnav] Opening /run/user/1000/gvfs/smb-share:server=asifs-mac-mini.local,share=asifs%20hd/Asif/Bolt.avi
[cplayer] Set property: shared-script-properties -> 1
[osd/libass] Shaper: FriBidi 1.0.10 (SIMPLE) HarfBuzz-ng 2.7.4 (COMPLEX)
[osd/libass] Setting up fonts...
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[cplayer] Set property: shared-script-properties -> 1
[bdmv/bluray] Opening /run/user/1000/gvfs/smb-share:server=asifs-mac-mini.local,share=asifs%20hd/Asif/Bolt.avi
[file] Opening /run/user/1000/gvfs/smb-share:server=asifs-mac-mini.local,share=asifs%20hd/Asif/Bolt.avi
[demux] Trying demuxers for level=normal.
[lavf] No format found, try lowering probescore or forcing the format.
[demux] Trying demuxers for level=unsafe.
[lavf] No format found, try lowering probescore or forcing the format.
[cplayer] Opening failed or was aborted: /run/user/1000/gvfs/smb-share:server=asifs-mac-mini.local,share=asifs%20hd/Asif/Bolt.avi
[cplayer] Running hook: ytdl_hook/on_load_fail
[ytdl_hook] full hook 
[cplayer] finished playback, unrecognized file format (reason 4)
[cplayer] Failed to recognize file format.
[cplayer] 
[cplayer] Exiting... (Errors when loading file)
[cplayer] Set property: shared-script-properties -> 1

Please let me know if I can provide any additional information to assist in the troubleshooting process. Thanks!

So for some reason, it looks like mpv is not detecting the file format properly. The line that reads:
[demux] Trying demuxers for level=normal.

is then followed by:
[lavf] No format found
This should read something like:
[lavf] Found 'avi' ...

I don’t know why this might be happening. Did you install mpv and vlc using either pamac or pacman, or did you use another method? You could try forcing the format to see if the file at least then plays. I would also recommend using either systemd mount units (see Systemd mount any device and Systemd mount unit samples) or fstab (/etc/fstab) for permanent network share mounts.

Hey @summrum,

So, I think you are chasing down the wrong problem. This is NOT an issue with the media players, VLC / MPV as far as I understand. If I copy the exact same file (thru Gnome File Utility) and paste the movie locally in my downloads folder, it plays with no issues as you can see below (with either MPV or VLC):

Screenshot:

Output:

mpv -v Downloads/Bolt.avi                                                                                                                                       
[cplayer] Command line options: '-v' 'Downloads/Bolt.avi'
[cplayer] mpv 0.33.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       56.51.100
[cplayer]    libavcodec      58.91.100
[cplayer]    libavformat     58.45.100
[cplayer]    libswscale      5.7.100
[cplayer]    libavfilter     7.85.100
[cplayer]    libswresample   3.7.100
[cplayer] FFmpeg version: n4.3.1
[cplayer] 
[cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --disable-build-date
[cplayer] List of enabled features: 52arch alsa asm caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffnvcodec gbm gbm.h gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo librt linux-fstatfs linux-input-event-codes lua memfd_create optimize plain-gl posix posix-or-mingw pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vt.h vulkan wayland wayland-protocols x11 xv zlib
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Applying profile 'default'...
[cplayer] Setting option 'v' = '' (flags = 8)
[cplayer] Waiting for scripts...
[osd/libass] Shaper: FriBidi 1.0.10 (SIMPLE) HarfBuzz-ng 2.7.4 (COMPLEX)
[osd/libass] Setting up fonts...
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Done loading scripts.
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[cplayer] Set property: shared-script-properties -> 1
[osd/libass] Shaper: FriBidi 1.0.10 (SIMPLE) HarfBuzz-ng 2.7.4 (COMPLEX)
[osd/libass] Setting up fonts...
[ifo_dvdnav] Opening Downloads/Bolt.avi
[bdmv/bluray] Opening Downloads/Bolt.avi
[file] Opening Downloads/Bolt.avi
[demux] Trying demuxers for level=normal.
[lavf] Found 'avi' at score=100 size=2048.
[file] stream level seek from 131072 to 728025924
[file] stream level seek from 728156996 to 10252
[file] stream level seek from 141324 to 728025932
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[cplayer] Set property: shared-script-properties -> 1
[file] stream level seek from 734097408 to 10252
[lavf] avformat_find_stream_info() finished after 43020 bytes.
[demux] Detected file format: avi (libavformat)
[cplayer] Opening done: Downloads/Bolt.avi
[find_files] Loading external files in Downloads/
[cplayer] Running hook: ytdl_hook/on_preloaded
[lavf] select track 0
[lavf] select track 1
[cplayer]  (+) Video --vid=1 (mpeg4 640x352 23.976fps)
[cplayer]  (+) Audio --aid=1 (mp3 2ch 48000Hz)
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu/wayland] Registered for protocol wl_compositor
[vo/gpu/wayland] Registered for protocol wl_shm
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_data_device_manager
[vo/gpu/wayland] Registered for protocol xdg_wm_base
[vo/gpu/wayland] Registered for protocol wl_seat
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
[vo/gpu/wayland] Compositor doesn't support the wp_presentation protocol!
[vo/gpu/wayland] Compositor doesn't support the zxdg_decoration_manager_v1 protocol!
[vo/gpu/wayland] Compositor doesn't support the zwp_idle_inhibit_manager_v1 protocol!
[vo/gpu/opengl] EGL_VERSION=1.5
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/wayland] GL_VERSION='4.6 (Core Profile) Mesa 20.3.3'
[vo/gpu/wayland] Detected desktop OpenGL 4.6.
[vo/gpu/wayland] GL_VENDOR='Intel'
[vo/gpu/wayland] GL_RENDERER='Mesa Intel(R) HD Graphics 520 (SKL GT2)'
[vo/gpu/wayland] GL_SHADING_LANGUAGE_VERSION='4.60'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu/wayland] Registered output SHP 0x144a (0x4):
[vo/gpu/wayland] 	x: 0px, y: 0px
[vo/gpu/wayland] 	w: 3200px (290mm), h: 1800px (170mm)
[vo/gpu/wayland] 	scale: 2
[vo/gpu/wayland] 	Hz: 59.982000
[vo/gpu] Resize: 0x0
[vd] Container reported FPS: 23.976000
[vd] Codec list:
[vd]     mpeg4 - MPEG-4 part 2
[vd]     mpeg4_v4l2m2m (mpeg4) - V4L2 mem2mem MPEG4 decoder wrapper
[vd]     mpeg4_cuvid (mpeg4) - Nvidia CUVID MPEG4 decoder
[vd] Opening decoder mpeg4
[vd] No hardware decoding requested.
[vd] Using software decoding.
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[vd] Selected codec: mpeg4 (MPEG-4 part 2)
[vf] User filter list:
[vf]   (empty)
[ad] Codec list:
[ad]     mp3float (mp3) - MP3 (MPEG audio layer 3)
[ad]     mp3 - MP3 (MPEG audio layer 3)
[ad] Opening decoder mp3float
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: mp3float (MP3 (MPEG audio layer 3))
[af] User filter list:
[af]   (empty)
[cplayer] Starting playback...
[cplayer] Set property: shared-script-properties -> 1
[af] [in] 48000Hz stereo 2ch floatp
[af] [userspeed] 48000Hz stereo 2ch floatp
[af] [userspeed] (disabled)
[af] [convert] 48000Hz stereo 2ch floatp
[vd] Using software decoding.
[vd] Decoder format: 640x352 yuv420p auto/auto/auto/auto/auto CL=mpeg2/4/h264
[vf] [in] 640x352 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 640x352 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 640x352 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 640x352 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 640x352 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[ao] Trying audio driver 'pulse'
[ao/pulse] requested format: 48000 Hz, stereo channels, floatp
[ao/pulse] Library version: 14.2.0
[ao/pulse] Proto: 34
[ao/pulse] Server proto: 4294967295
[ao/pulse] Channel layouts:
[ao/pulse]  - #fl
[ao/pulse]  - #fr
[ao/pulse]  - #fc
[ao/pulse]  - #lfe
[ao/pulse]  - #bl
[ao/pulse]  - #br
[ao/pulse]  - #flc
[ao/pulse]  - #frc
[ao/pulse]  - #bc
[ao/pulse]  - #sl
[ao/pulse]  - #sr
[ao/pulse]  - #tc
[ao/pulse]  - #tfl
[ao/pulse]  - #tfc
[ao/pulse]  - #tfr
[ao/pulse]  - #tbl
[ao/pulse]  - #tbc
[ao/pulse]  - #tbr
[ao/pulse] result: stereo
[ao/pulse] device buffer: 4800 samples.
[ao/pulse] using soft-buffer of 9600 samples.
[cplayer] AO: [pulse] 48000Hz stereo 2ch float
[cplayer] AO: Description: PulseAudio audio output
[autoconvert] inserting resampler
[swresample] format change, reinitializing resampler
[swresample] 48000Hz stereo floatp -> 48000Hz stereo float
[af] [out] 48000Hz stereo 2ch float
[cplayer] VO: [gpu] 640x352 yuv420p
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 640x352 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/wayland] Reconfiguring!
[vo/gpu] Resize: 640x352
[vo/gpu] Window size: 640x352 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 640x352 (1:1)
[vo/gpu] Video display: (0, 0) 640x352 -> (0, 0) 640x352
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Texture for plane 0: 640x352
[vo/gpu] Texture for plane 1: 320x176
[vo/gpu] Texture for plane 2: 320x176
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 640x352
[vo/gpu] Window size: 640x352 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 640x352 (1:1)
[vo/gpu] Video display: (0, 0) 640x352 -> (0, 0) 640x352
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 10
[vo/gpu] DR enabled: yes
[vo/gpu/wayland] Given DND offer with mime type text/plain
[vo/gpu/wayland] Given DND offer with mime type text/plain;charset=utf-8
[vo/gpu/wayland] Surface entered output SHP 0x144a (0x4), scale = 2
[cplayer] first video frame after restart shown
[vo/gpu] Assuming 59.982000 FPS for display sync.
[cplayer] audio ready
[cplayer] starting audio playback
[ao/pulse] starting AO
[cplayer] playback restart complete @ -0.000000, audio=playing, video=playing
[statusline] AV: -00:00:00 / 01:36:19 (0%) A-V:  0.000
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:04 / 01:36:19 (0%) A-V:  0.000
[cplayer] EOF code: 5  
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] Exiting... (Quit)
[cplayer] Set property: shared-script-properties -> 1
[vo/gpu/wayland] Deregistering output SHP 0x144a (0x4)

I believe the actual issue to solve is around the SMB connection and why the video is unable to be played in a streaming fashion over my network. Again, to be clear I can play all my movies on my other machines (Windows Laptops, MacOS Laptops, Phones, etc.), and especially on the Windows and MacOS laptops, I am using VLC to play my movies with no issues.

So, SMB / Networking type issue is what is preventing the videos from playing correctly is what my gut says.Thoughts?

Thanks again for all of your time and help, it is greatly appreciated!

Yes I agree that the problem is likely with the smb share, hence my recommendation to mount using systemd mount units or fstab. You could mount using the terminal, which will not persist after reboot as well:
sudo mount -t cifs -o user=user-id-for-access //remote-share-location /local-mount-point (user= needed if no public sharing, password will be prompted - can omit if not needed)

I have no idea why the file format being incorrectly determined would happen with mounting using your file manager though. If you force the file type, you can then check whether interpretation of the file type is the route cause of the issue issue with the mount as you have it, or whether there is something more to it. This would maybe help track down why it doesn’t work the way you have it set up currently. Best of luck!

Makes sense, I’ll try mounting it manually like you suggested. Also, how do I “force” the file-type? Is there a special command for that as well?

I think the option for forcing the format is --demuxer-lavf-format=, so e.g. entering mpv --demuxer-lavf-format=avi might get the video playing with your current setup.

If the manual mount works, then you know that the problem is with the file manager mount; if forcing the format works with your current setup, then it specifically is a problem with that being read from your current smb shares. I would again recommend sticking with the systemd or fstab option for mounting the shares in the longer term - less likely to run into performance issues or bugs in my experience. Hope you get it working :slight_smile: .

I also have the same problem with VLC and Manjaro and I have not been able to solve it since I am new to Linux. But, I recently installed Garuda and interestingly the VLC has no problems. So what does Garuda have that Manjaro doesn’t?

PS I’m sorry for my English, my mother tongue is Spanish.

That’s a question for the Garuda forums.

My answer? A lot of unnecessary things installed by default that normally should be optional.

Tip: Always check optional dependencies when installing new packages.

So here’s something interesting as a mini-update:

So, after the last comment from @hugola, I decided before I do any type of mounting, what if I created 2 live Manjaro USB’s one with Manjaro Gnome and one with Manjaro KDE, and try to play the video over my SMB share:

Manjaro-Gnome using Gnome Videos App:
Imgur

Same behavior as my original post, but with a different error that is catered to the Gnome Videos application.

Manjaro-KDE using VLC Media Player:

It works in KDE with NO issues!

@Yochanan - I don’t know if it’s possible to somehow get the Manjaro KDE Team to talk to the Manjaro Gnome Team, but this definitely works on a live USB (aka OOTB) on KDE and not Gnome. Not sure if this is a deeper issue that should be investigated, but I wanted to bring it up so everyone has all the pertinent details and information.

I will try the other suggestions of mounting and forcing the .AVI file-type, but I just wanted to see what the results were with Gnome vs. KDE with no custom configurations and a ‘vanilla’ Live USB experience.

Hey @summrum,

Trying to do this, and I get the following output:

sudo mount -t cifs -o user=aahmad smb://asifs-mac-mini.local/asifs%20hd /mnt/                                                                               
Mounting cifs URL not implemented yet. Attempt to mount smb://asifs-mac-mini.local/asifs%20hd

When I then CD into this /mnt directory, I do not see the mount there. Not sure if I am executing this correctly?

Any help would be greatly appreciated!

I think it failed because you put smb: in the path. Try with that removed.

Getting closer…

Output:

sudo mount -t cifs -o user=aahmad //asifs-mac-mini.local/asifs%20hd /mnt/                                                                          
Password for aahmad@//asifs-mac-mini.local/asifs%20hd: 
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

In your log, can you see what the invalid argument was? journalctl -b | grep CIFS should show entries with “CIFS” from your current boot, for example. It may possibly be the lack of version specified (vers=), but your log should show what the issue is.

Looking at it again, I don’t think %20 is valid. If you have a space in a directory or file name you have to use \

Like this: my\ file\ with\ spaces\ in\ the\ name

So try:
sudo mount -t cifs -o user=aahmad //asifs-mac-mini.local/asifs\ hd /mnt/

1 Like

@NGr - this worked perfectly! So, I am now able to mount my media drive and BOTH VLC and MPV are now able to play videos correctly. So, I guess does this mean whatever mechanism Gnome Files Utility does mounting, does NOT work correctly OOTB?

At this point, what’s the proper way to auto mount my server? I did some reading on modifying the fstab config here:

But I am unable to get things working for some reason. Any help you could provide would be greatly appreciated!

Looking at the Arch wiki, in the fstab, spaces in names should be replaced with \040

See Samba - ArchWiki