VLC won't work with network shares

I installed VLC and tried to open movie files via a samba netwfork share. Unfortunatly it seems to be impossible to play back files that are not on the internal harddrive. Permission problems maybe? What good is the flatpack approach if the apps have limited to downright broken functionality.

Can VLC do this outside of a Flatpak? SMB (the protocol) has some limitations on file read operations that might prevent VLC from playing files

Our VLC flatpak asks for network permissions (https://github.com/endlessm/vlc-flatpak/blob/master/org.videolan.VLC.json) so there’s no container based reason why this wouldn’t work.

Well none of the Media-Apps will open files from an smb share, neither video nor audio of any kind. Once copied on to the local drive they do play without problems.
@mhall119 outside of flatpack on Endless Os VLC does play from smb and nfs shares in Fedora, Debian-Proper and even WindowsXP to 10 . It did play and, i believe, still does play on Ubuntu , even after the changes. The Name “VLC” stands for Video LAN Client if i remember correctly.

Thanks for the extra testing @Thomas_Sattler, it’s possible that this has to do with GVFS and Flatpak/bubblewrap, we’ll look into it. One more question though, are you accessing the smb share through a URL like smb:// or do you have it mounted to a node on your filesystem?

@Thomas_Sattler is this what you’re seeing from VLC? https://github.com/flatpak/flatpak/issues/893

1 Like

By a quick glance, yes. From inside of VLC only local folders seem to be on offer and it seems impossible to add any external ones.
I do access those files though using Nautilus/Files, it does find network shares as inbuild functionality (it uses Gnomes gvfs i think). Once i am in the right Folder i right click on the media file and choose the “other” Aplication VLC or MPV ( I just did that on a Deepin instalaion with MPV as Player, worked as expected). By the way i have chosen VLC to be the default app for Video but Nautilus still only offers “Video” directly.
VLC just opens into an empty window, mpv does display an error message reason: opening failed.

Opening from Nautilus in VLC or mpv is only going to launch those applications with a file path as an argument. If they can’t see that file path from inside their flatpak/bubblewrap environment they’re not going to be able to do anything. It sounds like this is caused by a combination of using gvfs (which mounts in /run/ that flatpak overrides) and those applications not using the Gtk native file chooser, which allows accessing files from outsside of the flatpak/bubblewrap environnment.

Does not really seem to be a problem with .deb based versions. I just installed VLC (took a while, China is awake now) on Deepin and used VLC, mpv and gnome-mpy successfully with Nautilus/Files as well as deepins own fork of Nautilus playing back files from those same shares.

1 Like

It’s conceivable that this could be worked around (given that arranging for VLC to use a portal to open files is a way off) by by adding the following to finish-args in the flatpak build manifest:

        "--talk-name=org.gtk.vfs","--talk-name=org.gtk.vfs.*","--env=GIO_MODULE_DIR=/app/lib/gio/modules"

Good point. If that works a quick enough way to try it out could be using flatpak override over a current installation.

From a terminal, this should do it:

  $ flatpak override \
      --talk-name=org.gtk.vfs \
      --talk-name=org.gtk.vfs.* \
      --env=GIO_MODULE_DIR=/app/lib/gio/modules \
      org.videolan.VLC

I think it’s a Qt app so one might also need https://github.com/MartinBriza/QGnomePlatform to get a gvfs-aware file open dialog – I don’t know if that’s part of the runtime.

I think QGnomePlatform is in the KDE 5.9 runtime or greater, there’s a PR on flathub that needs a little bit of love that goes for a more native build that I think would be promising in future.