[FIX] VideoLAN (VLC) cannot play remote files

The problem you are facing is as follows. You are most likely running some kind of a Linux distribution, and you want to play files stored on a remote computer. Most often, this will be a Windows machine, so you need some Samba sharing. The thing is, on its own, the sharing works, but VLC just can’t play remote files.

You get an error that reads: Your input can’t be opened: VLC is unable to open the MRL ‘specific protocol and file location’. Check the log for details. In my case, this was with Samba, hence the protocol is smb:// and then the full path to the desired media object. Now, I have seen the issue a few times before, but recently, I spotted it in GeckoLinux, a distro based on openSUSE, and then again in the latter, and a few other KDE/Plasma systems. So I decided to write a little tutorial that shows how to fix this problem. Follow me.

Cannot open remote stream

More around the problem

Now, often with this kind of issues is, the problem can be tricky and masked. Do you have the right codecs? Do you have any software conflicts? If you read my openSUSE pimpingguide, you will notice that using multiple repos can lead to trouble.

At this point, you may decide to actually try to install few missing dependencies, as you might be under the impression that your system is just missing the needed codecs to open the files. But you should consult the log first. Ideally, this will give you more details into what you are facing. We talked about this before in my article on VLC secrets and logging.

Speaking of codecs, there are several options you might want to check. In the SUSE family, for instance, codecs are packaged separately (vlc-codecs). Regardless of the distro, specifically for Samba, you might want to try the vlc-plugin-samba if available.

But now, let’s focus on the logs. Check Tools > Messages, increase the verbosity level to debug, and then try to open a file from a Samba share. Search for errors in the output. You will most likely see something like:


smb error: open failed for ‘[email protected]/Data/File.mp4’ (Permission denied)

This means we just can’t access the file for some reason – from inside VLC. Please verify that you can actually do that using your distro file manager. If you can, then we know this is an issue with how VLC authenticates against the server that holds the files. We will now fix the access to Samba shares. The same methodology applies to other protocols.

Solution

What we need to do is tell VLC to play SMB content – and potentially provide it with credentials needed to access these Samba shares. The problem here is many fold. Recently, after a number of security vulnerabilities discovered in the SMB protocol, there has been a fairly kneejerk reaction and subsequent tightening of security in this domain, which leads distros to prompt for username and password for Samba shares even if you allow anonymous guest access.

Furthermore, VLC may not fully be integrated into your distro of choice, and there might not be enough cross-app sharing of credentials. Which means that if you have allowed, say, Dolphin to access a Samba shares, this information will not be stored in a global database that the media player can also use. We will need to configure that separately.

To do this, open VLC > Preferences > Show settings (All) > Input / Codecs > Access Modules > SMB. Here, you will be able to provide your SMB username, password and maybe domain. This only works for one server at a time.

SMB module configuration

Once you have provided the necessary details, save the settings, and close the Preferences video. Now, try playing the remote content. You will most likely succeed. At this point, you should be able to stream your video from Windows machines. Again, this may not affect all distributions – or desktop environments, so do take this into account when you setup your systems.

Remote stream playing now

Conclusion

There you go, another quick and nimble VLC tutorial. This little player has it all, including the complexity, beauty and flexibility of the Linux world. You know issues will come up, but then you will also be able to resolve them, somehow, somewhere, black magic.

If you cannot play remote media files using VLC in Linux, you need to check several things. One, always consult the media player logs first, so you can narrow down your troubleshooting. Based on the information, see if you’ve not come up against a permission issue. This can happen in various distributions and desktop environments, especially with Samba. If this does not help, see about any missing codecs and make sure you’re not facing package conflicts or some such. But it this case, it will probably be the question of Samba credentials, and the player allows you to fix this easily using its preferences, but there will be some limitations to that. Anyhow, not perfect, but given what we can do, I hope you find this guide useful. And we represent.

Cheers.

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

You may also like...

Spelling error report

The following text will be sent to our editors: