One of the VLC tips is to play YouTube and other online videos with VLC. This could help you watch online videos with subtitles.
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.
Take youtube-dl for example. Youβll notice that you cannot download YouTube videos with it all of a sudden and the simplest solution is to have the latest version of youtube-dl installed.
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:
locate youtube.luacWhen 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.luacSo 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.luacYou 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\
Thatβs it.
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.