[SOLVED] “VLC is unable to open the MRL” error in 2 Steps

Learn how to fix VLC is unable to open the MRL error. VLC or VideoLan Client is one of the most popular multimedia software on Linux, Windows, macOS, Android, and many other operating systems. It’s easy to see why since VLC offers a simple UI with a powerful backend that allows you to play local videos and audios, record screen, play ISO files etc.

Let’s understand why this error occurs and how you can fix it.

Cause of the “VLC is unable to open the MRL” Error

One of the most powerful features of VLC is the ability to play video and audio from over 20 different online sources including Youtube, Soundcloud, Vimeo, Dailystream, Twitch. You can do this by going to Media > Network Stream and then putting the media link in the window. However often times it is the case that you will get hit with this error while trying to play any video from an online source.

VLC is unable to open the MRL

This indicates that the configuration file of that particular source (Youtube in this case) is outdated and needs to be replaced with a newer config.

How To Fix “VLC is unable to open the MRL” Error?

To fix this error we have to replace the source config with the proper config.

Step 1: Find the location of the source config

Since I am using a youtube link as an example, I am searching for “youtube.luac”. If the video you are trying to play is from twitch, you can search for “twitch.luac” similarly.

sudo find / -type f -name "youtube.luac"
Locating Config Vlc
 VLC is unable to open the MRL

Now we know that youtube.luac is located in /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/

Step 2: Find the correct config

VLC Github

You can find the latest configs for each source (Youtube, Twitch etc) on the VLC Github page. To download the config, click on the file, select “raw” on the top right-hand corner and then download that link using wget like shown below.

Downloading Youtube.lua File From Vlc Github
cd ~ 
wget https://raw.githubusercontent.com/videolan/vlc/master/share/lua/playlist/youtube.lua

Step 3: Replace the old config with new config

sudo rm /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.luac 
sudo cp youtube.lua /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/

Note: Replace /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.luac with your config location.

Step 4: Play the media

Updating the configuration file of the source will likely fix this problem. This method works for all sources, not just youtube. For example, if you want to fix a Twitch source, download twitch.lua from VLC’s Github page and then replace the original twitch.luac file with the newly-downloaded file. Make sure to have sudo privileges as the config files are mostly saved in /etc/.

Conclusion

We have covered how to fix the “Unable to open MRL error” in VLC. This usually happens when sites like Youtube and Twitch update their network/video protocols and the fix requires updating your config files to meet those protocols. Thank you!