But things may not always be simple because at times you’ll encounter this error when trying to open YouTube video with VLC:
Your input can’t be opened:
VLC is unable to open the MRL ‘https://youtubeurl.com’. Check the log for details.
The thing here is that Google doesn’t want you to use any third party application for watching YouTube because then they cannot collect data properly.
So, they keep changing stuff from their side to make it harder for third party devs to work with YouTube.
Same goes for VLC. If you install the latest VLC in Ubuntu or whichever operating system you are using, you probably won’t see this error.
Fixing “VLC is unable to open the MRL” error
At least let me show you the steps to fix this problem for YouTube.
Go to this page and use Ctrl+S to save the file from the official GitHub repository of the VLC media player:
Now, what you need to do is to replace the youtube.luac (mind the ‘c’ in luac) in lib/vlc/lua/playlist directory with this downloaded file.
Steps for Linux
If you are using Linux, open the terminal and use the locate command to find the exact location of youtube.luac file:
When you get the path of the file, you just replace that file with your downloaded file. I trust you to handle this simple task.
For me, it showed the path of the file here:
abhishek@itsfoss:~$ locate youtube.lua /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.luac
So all I did was to move the downloaded file to this location and replace the content of the file:
sudo cp ~/Downloads/youtube.lua /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.luac
You should be able to play the YouTube videos in VLC now.
Steps for Windows
If you are using Windows, you should follow these steps:
- Rename the downloaded youtube.lua file to youtube.luac
- Now copy this file and paste it to C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\
If you have trouble with Dailymotion or other video streaming websites, you can download their respective lua files from the VLC repository here and replace the existing one in your VLC install.
I hope this quick tip fixed the problem with VLC being unable to play YouTube videos for you.