Youtube playlist

VLC Playlist Parsers

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

23
Score 85.8%
Description:

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.
Last changelog:

7 years ago

- display clean video title and thumbnail
- Add support for playlist with 100+ videos
- fix change in youtube playslists

mcq333

3 years ago

I'm pretty sure Jdonwloader just download the audio-file, I download just the audio in a few seconds, but the video take minutes(I downloaded two times, first the audio and after checking It is Ok, tried with the video). Anyway, modifying the direct acces on the desktop works fine(with 240 works awesome) so I'm using it for now, but maybe You can find a way in the future(I pray for it) and realese... "Youtube Music(Just music)"

If someone read this and is not sure of how to made the Direct Acces Method:
1.Create another direct acces to VLC and change the name to "VLC YT" or something.
2. Right click on your new direct acces and click on preperties.
3. Go to the direct acces section, and find de Destiny text box.
4. The destiny should be these: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
You habe to add: --preferred-resolution=240
And now it should look like these: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --preferred-resolution=240

Report

mcq333

3 years ago

I'm pretty sure Jdonwloader just download the audio-file, I download just the audio in a few seconds, but the video take minutes(I downloaded two times, first the audio and after checking It is Ok, tried with the video). Anyway, modifying the direct acces on the desktop works fine(with 240 works awesome) so I'm using it for now, but maybe You can find a way in the future(I pray for it) and realese... "Youtube Music(Just music)"

If someone read this and is not sure of how to made the Direct Acces Method:
1.Create another direct acces to VLC and change the name to "VLC YT" or something.
2. Right click on your new direct acces and click on preperties.
3. Go to the direct acces section, and find de Destiny text box.
4. The destiny should be these: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
You habe to add: --preferred-resolution=240
And now it should look like these: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --preferred-resolution=240

Report

mcq333

3 years ago

I'm pretty sure Jdonwloader just download the audio-file, I download just the audio in a few seconds, but the video take minutes(I downloaded two times, first the audio and after checking It is Ok, tried with the video). Anyway, modifying the direct acces on the desktop works fine(with 240 works awesome) so I'm using it for now, but maybe You can find a way in the future(I pray for it) and realese... "Youtube Music(Just music)"

If someone read this and is not sure of how to made the Direct Acces Method:
1.Create another direct acces to VLC and change the name to "VLC YT" or something.
2. Right click on your new direct acces and click on preperties.
3. Go to the direct acces section, and find de Destiny text box.
4. The destiny should be these: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
You habe to add: --preferred-resolution=240
And now it should look like these: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --preferred-resolution=240

Report

mcq333

3 years ago

I'm pretty sure Jdonwloader just download the audio-file, I download just the audio in a few seconds, but the video take minutes(I downloaded two times, first the audio and after checking It is Ok, tried with the video). Anyway, modifying the direct acces on the desktop works fine(with 240 works awesome) so I'm using it for now, but maybe You can find a way in the future(I pray for it) and realese... "Youtube Music(Just music)"

If someone read this and is not sure of how to made the Direct Acces Method:
1.Create another direct acces to VLC and change the name to "VLC YT" or something.
2. Right click on your new direct acces and click on preperties.
3. Go to the direct acces section, and find de Destiny text box.
4. The destiny should be these: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
You habe to add: --preferred-resolution=240
And now it should look like these: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --preferred-resolution=240

Report

C

exebetche

3 years ago

On Youtube, music and video are on the same data stream, so there is no way to download only the music to spare your bandwidth. I would be possible to get a lower resolution but this script just take care of the playlist part (gettin the items of the playlist), not getting the data stream.
You need to change something in the script named "youtube.lua" which is included in Vlc, but I'm not sure what.

Report

matx21

3 years ago

The parsing function in the script is not working with large(200+ videos) playlists.
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

3 years ago

As the topic already says. Now the plugin won't work anymore :/

Report

C

exebetche

3 years ago

I tried a fix, could you confirm it works now?

Report

dustball

3 years ago

Damn, you are quick! Yes it works :)

And here I am, with a half finished bash script to parse and enqueue playlists.. :D Thanks a lot.

Report

jorvus

3 years ago

Works for me with vlc 2.0 8 twoflower
THX!

Report

C

exebetche

3 years ago

XD cool, thanks

Report

vladravenholm

3 years ago

I guess youtube changed somehow? Because yesterday i was able to play my playlist, this morning though not so much. I opened messages in vlc and there's no stack trace or anything of the like, im sure lua is a pleasure to work in >.>

This is the error i get: "lua error: 1 6kLnKPWcS40" for every youtube playlist i input.

Report

MarioErmando

3 years ago

Same here, here's the error that shows up in the messages window with debug:

Quote:function parse(): ...(x86)\VideoLAN\VLC\lua\playlist\playlist_youtube.lua:85: attempt to index field 'author' (a nil value)

Report

MarioErmando

3 years ago

AHA, I found a temporary fix for it!

- 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

3 years ago

Thanks! Your fix Works!

ubuntu 12.04 VLC 2.0.8 Twoflower

Report

vladravenholm

3 years ago

Oh i tested it on my laptop and pc, windows 7 & xubuntu.. if that matters. Fresh installs too.

Report

xistance69

3 years ago

Same here been messing with it for 45 mins trying to get it to work i thought it was just my computer

Report

chisato

4 years ago

I have a playlist with 500+ songs and it does not get parsed correctly. Any ideas?

Report

C

exebetche

4 years ago

Could you give me the url of your playlist please? I've never seen a playlist with that much item in it so I can't do any tests.

Report

chisato

4 years ago

https://www.youtube.com/watch?v=2m-O7hPay_w&list=PLyKXXiqMsT1Uzo5POrGDi6j73Us0D0CJI

Report

chisato

4 years ago

Only parses the first 200 songs. Possible to parse all of them? <3

Report

chisato

4 years ago

Only parses the first 200 songs. Possible to parse all of them? <3

Report

99lool

4 years ago

when i have shuffle on it just shuffles endlessly and dosnt play video, this a addon problem or vlc thing???

Report

C

exebetche

4 years ago

I explain the problem; when you load a playlist this is what append:
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

4 years ago

Do you think you could post your solution, or post how to do this even if it's a temporary fix? I have a script that generates new links every day, so this would actually work great for me and it could be a while before VLC actually fixes it on their end.

Thanks!

Report

7 years ago

- display clean video title and thumbnail
- Add support for playlist with 100+ videos
- fix change in youtube playslists

12345678910
147
product-maker ahmedpop910 Mar 16 2019 9 excellent
+
product-maker kameyo Jan 28 2019 9 excellent
+
product-maker undeadmockingbird Aug 18 2018 9 excellent
+
product-maker tml3nr Nov 05 2017 9 excellent
product-maker aliali2017 Sep 05 2017 9 excellent
product-maker gotekus Aug 11 2017 9 excellent
Excellent
product-maker latiosFR Jul 25 2017 9 excellent
product-maker LittleLizzy May 28 2017 9 excellent
product-maker ELKZ Apr 29 2017 9 excellent
product-maker DarkPhoenix1337 Apr 10 2017 9 excellent
product-maker Stretch Dec 27 2016 9 excellent
product-maker dwmed Dec 05 2016 9 excellent
product-maker BB20101997 Sep 24 2016 9 excellent
product-maker Ragiowan Nov 09 2015 9 excellent
product-maker mcq333 Sep 17 2015 9 excellent
product-maker 99lool May 31 2015 9 excellent
product-maker 9207771739 May 01 2015 9 excellent
product-maker DJXAKEP Apr 25 2015 9 excellent
product-maker ziki Apr 21 2015 9 excellent
product-maker dirtyharry85 Apr 09 2015 9 excellent
product-maker EscapeFromReality Mar 03 2015 9 excellent
product-maker tomaszek197871 Oct 29 2014 9 excellent
product-maker gogo57540 Sep 08 2014 9 excellent
product-maker Doyouknow Jul 31 2014 9 excellent
product-maker rezmen1777 Apr 24 2014 9 excellent
product-maker ktb007 Apr 21 2014 9 excellent
product-maker Attila13 Apr 16 2014 3 bad
product-maker pereov33 Jan 17 2014 9 excellent
product-maker csuno Nov 27 2013 9 excellent
product-maker DFPOWER46 Nov 18 2013 9 excellent
product-maker Snapafun Aug 29 2013 9 excellent
product-maker DevilinPixy Aug 24 2013 9 excellent
product-maker BurakPatat Aug 03 2013 9 excellent
product-maker GuixLe Jul 25 2013 9 excellent
product-maker legluondunet Jul 07 2013 9 excellent
product-maker cipricus May 17 2013 9 excellent
product-maker Argyle May 13 2013 9 excellent
product-maker ufoasd Apr 10 2013 9 excellent
product-maker ringen00 Apr 04 2013 9 excellent
product-maker zequi Feb 12 2013 9 excellent
product-maker HATRED Jan 09 2013 9 excellent
product-maker equiman Nov 30 2012 9 excellent
product-maker btocher Nov 27 2012 9 excellent
product-maker hernansilva Nov 26 2012 9 excellent
product-maker erosenninrho Nov 26 2012 9 excellent
product-maker sirhcits Nov 25 2012 9 excellent
product-maker meow9th Nov 19 2012 9 excellent
product-maker FracExebetche Apr 23 2012 9 excellent
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
updated Sep 05 2017
added Apr 04 2012
downloads 24h
56
page views 24h 399
System Tags addon