TranslateProject/sources/tech/20191230 Fixing -VLC is Unable to Open the MRL- Error -Quick Tip.md
2019-12-31 08:53:59 +08:00

4.1 KiB
Raw Blame History

Fixing “VLC is Unable to Open the MRL” Error [Quick Tip]

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 youll encounter this error when trying to open YouTube video with VLC:

Your input cant be opened: VLC is unable to open the MRL https://youtubeurl.com. Check the log for details.

VLC error while playing YouTube videos

The thing here is that Google doesnt 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. Youll 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 wont see this error.

Fixing “VLC is unable to open the MRL” error

Let me show you the steps to fix this problem for YouTube at least.

Go to this page and use Ctrl+S to save the file from the official GitHub repository of VLC media player:

Download youtube.lua file

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.luac

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:

[email protected]:~$ 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\

Thats 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 unable to play YouTube videos for you.


via: https://itsfoss.com/vlc-is-unable-to-open-the-mrl/

作者:Abhishek Prakash 选题:lujun9972 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出