I assume you entered the URL correctly (no https but http, and only the v=... part, like http://www.youtube.com/watch?v=-wxawmjnRWY)?
Open the Extras menu and click on Messages. Now click play again and see what message's there.
My guess is it's
lua error: Couldn't extract youtube video URL, please check for updates to this script
VLC parses YouTube's HTML source code to look for the video, but sometimes, YouTube changes its way it outputs the HTML, so VLC is unable to find the video URL.
Possible workarounds
- Go to https://www.youtube.com/html5 and enable html5 there to play the video in your browser without flash
- Install
minitube and try to play the video there
- Wait for an update of VLC (or update the lua script yourself - not so easy, see Updating the VLC YouTube parser)
- Install the package
youtube-dl and download the video to your harddisk. It's a command line utility though
Updating the VLC YouTube parser
Update just the Lua script for YouTube parsing to the latest version from VLC:
Open the Terminal application and enter these commands:
Make sure curl is installed, we need this to download the new file
sudo apt-get install curl
Get rid of the old, non-working scripts
sudo rm /usr/lib/vlc/lua/playlist/youtube.*
Download the current ones (use the whole command line, yes, it's quite long):
sudo curl "http://git.videolan.org/?p=vlc.git;a=blob_plain;f=share/lua/playlist/youtube.lua;hb=HEAD" -o /usr/lib/vlc/lua/playlist/youtube.lua
See if it works.
~/.local/share/vlc/lua/youtube.luaand also~/.local/share/vlc/lua/playlist/youtube.luait seems the installation is slightly different. https://www.videolan.org/developers/vlc/share/lua/README.txt – Japheth Ongeri - inkalimeva Mar 01 '18 at 08:27/usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.lua(just ayoutube.luacbefore there). 2. Didn't work with error ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0 (with somes adaptive demux: Encountered discontinuity before). They are moving all to GitLab here.cd /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/; sudo rm youtube.luac; sudo curl "http://git.videolan.org/?p=vlc.git;a=blob_plain;f=share/lua/playlist/youtube.lua;hb=HEAD" -o youtube.luasolves the issue. – Immanuel Weihnachten Jun 10 '20 at 14:35/usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.luawas the output location . But it did work for me. – Julien Lamarche Sep 19 '22 at 18:31