How to solve the VLC is unable to open the MRL issue

After the latest system updates, VLC has also been updated and has given us a nice surprise: it is no longer able to play our multimedia files on the NAS (Network Attached Storage, so a network disk that serves files over the home network) disk.

The problem occurs, in particular, with the Samba-type connection (SMB/CIFS) but also with the Apple Filing Protocol (AFP) and the Network File System (NFS). Ergo, after some checks the problem is related to VLC itself, the developers are already working on a fix, but in the meantime, it is somewhat boring and annoying.

So let’s see how to get around this age-old problem and how to keep watching our favorite videos from home NAS.

Credentials, permissions and alternatives. The VLC issue could be related to anything

The causes of the problem can be manifold. It depends on your system, on the versions you have in use, on your home network, on the policy of your router, in short. However, we have managed to reduce the issue to three macro problems.

Credentials

After a few attempts, rummaging through VLC’s preferences and experimenting with different latency values ​​on the network and many other things, we came across the values ​​related to the SMB sharing protocol on the network. Since it is exactly the one in use in our LAN, we tried to enter the access data directly in the fields on the VLC screens. Et voila! The games were done and our videos started working again.

VLC Linux | How to solve the VLC is unable to open the MRL issue
VLC Linux | How to solve the VLC is unable to open the MRL issue

Small side-note: if you then have to use VLC to connect to something else, these parameters will have to be canceled or modified. VLC, in this case, works with only one protocol at a time.

So, in VLC, open Tools > Preferences or use CTRL+P, and select Show Setting > ALL. Then Input / Codecs > Access Modules > SMB Input. Insert in the fields the appropriate credentials to connect to your Samba Network Shares. And that’s done.

If you don’t have a specific user, put only these:

Username: guest

Password: <leave-empty>

SMB domain: workgroup

The domain in Windows is usually ‘workgroup’ and the guest user doesn’t have a password.

Permissions

A further cause of the problem may lie in file access permissions. Unfortunately, we cannot give a chmod to change the permissions of a Samba volume which is basically a Windows volume. However, we can perform an automount when the volume is logged in so that the permissions are in order for VLC so that we can continue to see our shared videos.

VLC Linux | How to solve the VLC is unable to open the MRL issue
VLC Linux | How to solve the VLC is unable to open the MRL issue

In this case, an alternative solution is simply to mount the Samba share permanently using a mount in fstab.

First, let’s create the mount directory, in a terminal window:

$ sudo mkdir /media/sambashare

Then edit your /etc/fstab file and add this line:

//<servername-or-url>/<sharename>/media/sambashare cifs guest,uid=1000,iocharset=utf8 0 0

In the end, again in terminal:

$ sudo mount -a

This will re-mount all entries listed in /etc/fstab. More info at Mount-Windows-Shares-Permanently article.

Alternatives

Last but not least, consider to use an alternative to VLC. In our opinion, mpv is a really good alternative and it is fully working in that cases where VLC fails, like the one that we talked about in this article.

mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types. Also, mpv is under active development, focusing on code refactoring and cleanups as well as adding features.

$ sudo dnf install mpv #Fedora install

$ sudo zypper install mpv #openSUSE install

$ sudo apt install mpv #Debian/Ubuntu install

After you have installed mpv, just right-click over the shared video file and select Open With mpv. And that’s done.