
Youtube playlist
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Import a youtube video / playlist into VLC.
INSTALLATION:
- click on the download button below
- when the file appears click on the menu file > save as... of your browser
- put the file in the vlc /lua/playlist folder, by default:
* Windows (all users): %ProgramFiles%VideoLANVLCluaplaylist
* Windows (current user): %APPDATA%vlcluaplaylist
* Linux (all users): /usr/lib/vlc/lua/playlist/
* Linux (current user): ~/.local/share/vlc/lua/playlist/
* Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/playlist/
(create directories if they don't exist)
/! Some browser (Chrome...) may change the file extension for ".txt" instead of ".lua", so make sure you choose "All extensions" in the dialog box when you save the file on your computer.
USAGE:
- Copy the URL of the youtube video or playlist (must contain "list=PL...")
- Start VLC, press Ctrl+N, paste the url then click on "Play" (or Alt+P then Enter), the video /playlist should start
Troubleshooting:
/! Follow this steps if and only if you have already install the script and it doesn't work..
/! for the actual script see the "download" button (playlist_youtube.lua) below.
If the videos list appears in the Vlc "playlist" view but the videos won't start, follow this steps:
1) delete the file "youtube.luac" in [Vlc directory]/lua/playlist directory (ex: c:Program FilesVideoLANVLCluaplaylistyoutube.luac)
2) get the latest version of thr "youtube" script from here:
https://raw.githubusercontent.com/videolan/vlc/master/share/lua/playlist/youtube.lua
3) place the file in the directory [Vlc directory]/lua/playlist (where "youtube.luac" was)
/!/!/! Please do not paste your raw error log here, use a pastebin service like pastebin.com.
5 years ago
- display clean video title and thumbnail
- Add support for playlist with 100+ videos
- fix change in youtube playslists
5 years ago
- display clean video title and thumbnail
- Add support for playlist with 100+ videos
- fix change in youtube playslists
matx21
5 years ago
I've changed the "if" statement at line 112 to this: http://pastebin.com/fgw8urRT and it seems to be parsing playlists of any size now.
I've never coded in Lua before so it my be not optimally written.
Report
dustball
5 years ago
Report
exebetche
5 years ago
Report
dustball
5 years ago
And here I am, with a half finished bash script to parse and enqueue playlists.. :D Thanks a lot.
Report
jorvus
5 years ago
THX!
Report
exebetche
5 years ago
Report
vladravenholm
5 years ago
This is the error i get: "lua error: 1 6kLnKPWcS40" for every youtube playlist i input.
Report
MarioErmando
5 years ago
Quote:function parse(): ...(x86)\VideoLAN\VLC\lua\playlist\playlist_youtube.lua:85: attempt to index field 'author' (a nil value)
Report
MarioErmando
5 years ago
- Navigate to the playlist folder (see the "INSTALLATION" section on the top
- Open the youtube playlist lua file in a text editor
- Search for "item.artist" (CTRL+F)
- Put "--~ " before "item.artist"
It should look like this:
--~ item.artist = video.author.CDATA
- Save the file
- Restart VLC
- And it should work!
Report
ufoasd
5 years ago
ubuntu 12.04 VLC 2.0.8 Twoflower
Report
vladravenholm
5 years ago
Report
xistance69
5 years ago
Report
chisato
5 years ago
Report
exebetche
5 years ago
Report
chisato
5 years ago
Report
chisato
5 years ago
Report
chisato
5 years ago
Report
99lool
5 years ago
Report
exebetche
5 years ago
1) this extension (playlist_youtube.lua) retrieve the list of videos from the url and set the playlist in vlc
2) when a video is loaded, the url is recognized as a youtube url, and the youtube video extension (youtube.lua) retrieve the actual video url from the video web page url
3) plays video...
I guess what's happening:
When Vlc shuffle, it takes a random url from the list and try to play directly, skeepind the 2) step.
So one solution could be to merge the 2 extensions, so it provide directly the actual video url, basically merge steps 1) and 2) into a single step. But that's probably not a good idea because the youtube's video url are temporary. So
the url could expires by the time you reach the end of the playlist and videos would not play anymore.
The other solution is to report this as a bug to the vlc tea, asking they make shuffle function goes as the same steps as a video played normally.
Report
dottelevision1
5 years ago
Thanks!
Report
exebetche
5 years ago
Report
dottelevision1
5 years ago
I tried copying into the folder with youtube.lua and playlist_youtube.lua still there, and also tried replacing them with this script and still get the same result. Taking it back out brings me back to the endless shuffling.
Report
exebetche
5 years ago
In fact I see no way to fix this in the script because the network functions are disabled in the vlc/lua playlist module. So you can just read the content of the url you provide, but you can't get the real video url from an other page. That's why you get the same video each time. Sorry to I gave you false hope.
I suggest you fill a bug report to the Vlc team about this.
Report
exebetche
5 years ago
You should replace playlist_youtube.lua with the new one (merged_playlist_youtube.lua).
As I said, I just tested it quickly but it works ok for me. You said Vlc doesn't shuffle anymore? What do you mean, it stops playing after the first video? Does it play the video in order?
Also make sure you use Vlc 2.2.
Report
dottelevision1
5 years ago
However, regardless of which video I click Play on, the video that loads is always the same video (the first video in the playlist).
When I Right-Click on any video in the list and select Information, the Location URL is always the first video.
I'm on VLC 2.2 with the merged_playlist_youtube.lua and youtube.lua in the lua/playlist folder. Let me know if I can help debug this any further.
Report