2

everything I see here on this topic is 5 years or more old. Running ubuntu 18.04 and youtube.lua does not exist when I run the parser to update it. I had downloaded 3 videos and then vlc stopped playing or downloading

hines@hines-Vostro-260:~$ sudo apt-get install curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
curl is already the newest version (7.58.0-2ubuntu3.8).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
hines@hines-Vostro-260:~$ sudo rm /usr/lib/vlc/lua/playlist/youtube
rm: cannot remove '/usr/lib/vlc/lua/playlist/youtube': No such file or directory
hines@hines-Vostro-260:~$ 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
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file /usr/lib/vlc/lua/playlist/youtube.lua: No 
Warning: such file or directory
100   153  100   153    0     0    320      0 --:--:-- --:--:-- --:--:--   320
curl: (23) Failed writing body (0 != 153)
Pilot6
  • 88,764
  • 91
  • 205
  • 313
  • Your command for downloading the lua is missing a `?` before the `p=vlc`. So, it should be `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` Also, make sure that the folder `/usr/lib/vlc/lua/playlist/` exists, as the app may only be installed for you, then its location might be something like `~/.local/share/vlc/lua/playlist/` – Terrance Jun 14 '20 at 18:52
  • the only file using a search for lua is x-lua.xml location of: snap/vlc/1620/.local/share/mime/test. – Hines Figher Jun 14 '20 at 20:49

1 Answers1

2

The paths have changed. This is what I did.

  1. Get the latest file from VLC's github, for example:

    wget https://raw.githubusercontent.com/videolan/vlc/master/share/lua/playlist/youtube.lua
    
  2. Then copy it to the location where those files now live:

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

    If unsure about the location in your distribution (it could be another architecture for example), you can do:

    $ dpkg -L vlc-plugin-base | grep youtube.lua
    /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.luac
    

Note that you might find a youtube.luac precompiled file (not .lua), but the .lua you are going to copy will take precedence. You can remove youtube.luac if you want.

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
Eduardo Trápani
  • 1,078
  • 1
  • 6
  • 10
  • hines@hines-Vostro-260:~$ dpkg -L vlc-plugin-base | grep youtube.lua dpkg-query: package 'vlc-plugin-base' is not installed Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. – Hines Figher Jun 14 '20 at 20:56
  • So, install it first. It will bring an old `youtube.lua` and then you follow the steps in the answer. – Eduardo Trápani Jun 14 '20 at 20:58
  • install vlc plugin-base ended with: libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting... – Hines Figher Jun 15 '20 at 00:01
  • fixed: https://askubuntu.com/questions/1094062/libdvd-pkg-apt-get-check-failed-you-may-have-broken-packages-aborting But still vlc played one second of you tube video and stopped. installed the file from github, looks like youtube.lua is now youtube.lua.1 ? – Hines Figher Jun 16 '20 at 10:44
  • The `.1` was probably added by `wget` because you downloaded it twice. So, it didn't play anything and now plays just one second? – Eduardo Trápani Jun 16 '20 at 12:52
  • correct it was very quick but I did see it, maybe i didn't see it before. Hold the phone, it just worked, maybe i had to reboot. – Hines Figher Jun 16 '20 at 13:41
  • So, did this answer work? If so, please accept it. – Eduardo Trápani Jun 16 '20 at 13:50
  • I waited to see if the issue reoccurred, which it did. Tried streaming another video from youtube, it started then stopped, no codec, playlist empty – Hines Figher Jun 16 '20 at 18:21
  • it is working now per the instructions from @eduardo. Looks like I have to do the same thing on my copy of Mint next. – Hines Figher Jun 20 '20 at 14:14