Youtube playlist
VLC Playlist Parsers
Score 80%
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%\VideoLAN\VLC\lua\playlist\
* Windows (current user): %APPDATA%\vlc\lua\playlist\
* 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 Files\VideoLAN\VLC\lua\playlist\youtube.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:

5 years ago

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

kanape

3 years ago

vlc 2.1.1 used link http://www.youtube.com/playlist?list=PL191437C14EC0BDCB

Not work

Try add this lua, but nothing

Report

cipricus

3 years ago

When I add a playlist link like this (http://www.youtube.com/watch?v=KXlXgpHQw04&list=PLA1ADC39779EDCD03) by ctrl-n it starts playing but in the playlist there's just the first song - and that is the only one played

VLC 2.0.8 Ubuntu-based ElementaryOS, tested with the addons.videolan and with the latest version of the plugin

Report

xmen1111

3 years ago

Loads some files, but shows errors on most others here:
http://www.youtube.com/playlist?list=PLTTnJPdhbbLAzDMOkuAlMK3Xxp7JLCYDP

Report

exebetche

3 years ago

TRhis playlist works fine for me... Which error do you get?

Report

Kashimus

3 years ago

With vlc 2.0.8 youtube playlist playing wont work(playlist_youtube.lua) tried all the trouble shooting,
the single video playing works (youtube.luac)

Report

Kashimus

3 years ago

Okay its working for me too,

Report

DevilinPixy

3 years ago

When trying to play a single YouTube video from a playlist in VLC it will default to load the full YouTube playlist. Basically whenever the video I try to add comes from a playlist it will always play the full playlist instead of the single video.

I made an edit to the playlist_youtube.lua to fix this. The regex used is trying to match "list=" within the url. So it will match a playlist even when the actual url links to a single video within a playlist.

Example:
http://www.youtube.com/watch?v=<video ID>&list=<playlist ID> (single video)
http://www.youtube.com/playlist?list=<playlist ID> (full playlist)

Now by changing the regex which is used twice in the LUA code (function probe() and function parse() at the top) from "list=" to "?list=" this solved the problem for me.

Now I can play a single video that comes from a playlist with the first example and play a full list with the second example since the regex does not match for the first example and will not load the full playlist.

Might be useful if the code can be updated to prevent full playlists from being loaded when referring to a single video within a playlist.

Report

DevilinPixy

3 years ago

Forgot to say: Good job on this addon though, truly love it :)

Report

MarcusLO

3 years ago

Update it please for the newest version. I enter any kind of playlist and even remove the s from https so I don't get the error. After that VLC just skips through every song without even playing a second of them or load anything.

Report

exebetche

3 years ago

The problem don't come with this extension, it just retrieve the playlist, not the video. Maybe you have a version of Vlc that not include the script to get the video. You can get it from here:
https://raw.github.com/videolan/vlc/master/share/lua/playlist/youtube.lua
Just install it like you did for this one.

Report

vlcaddonsrule

4 years ago

Works great! Is there any way to modify the Addon to only include the 20 (or any number) most recent videos that have been added? Or only the videos that have been added in the last day? I'm trying to create a shortcut for news played through VLC, and don't want to include old news.

Thank You!

Report

exebetche

4 years ago

Hi

You could do something like this but I didn't test it:


for i, video in ipairs(playlist_parsed) do
if os.time ()-video.time_created < 24*3600 then
local item = {}
item.path = "http://www.youtube.com/watch?v="..video.encrypted_id.CDATA
item.title = video.title.CDATA
item.artist = video.author.CDATA
item.arturl = video.thumbnail.CDATA
table.insert (p, item)
end

end

Report

exebetche

4 years ago

Or rather:
if os.time ()-video.time_created.CDATA < 24*3600 then ...

Report

vlcaddonsrule

4 years ago

This is awesome - thank you so much!

Report

exebetche

4 years ago

Cool

Report

vlcaddonsrule

4 years ago

Hi, I've run into a small bug when attempting to add multiple YouTube playlists to VLC - maybe you can figure this out.

All of the playlist URL's load properly, but only one playlist gets expanded to play. It seems as if VLC only shows the individual YouTube videos if you actively play the playlist. This makes the Random Play feature see a whole playlist as only one file, therefore reducing the likelihood of playing it.

Is there a way for this plugin to load the individual videos of a playlist into VLC, instead of loading the Playlist URL as a folder?


An example is below, with two YouTube playlists:

Run "C:\Program Files\VideoLAN\VLC\vlc.exe" "http://www.youtube.com/watch?v=p03D6RtkK_8&feature=c4-overview&list=UU8p1vwvWtl6T73JiExfWs1g" "http://www.youtube.com/watch?v=3tYf07Jri3A&feature=c4-overview&list=UUBi2mrWuNuyYy4gbM6fU18Q"

Report

exebetche

4 years ago

Nope, the principle of vlc playlist extension is to search the related data to an item only when this item start playing and there is no way I know of to "pre-parse" the full playlist. If it run on a server maybe you can use the "http" or "telnet" interface extensions to start each of them manually first. But anyway I you want the playlist to loop you will face an other problem: the link to the video provided will expire so you also need a trick to refresh the link the 2nd a video is played (but it is not hard to do).

Report

legluondunet

4 years ago

Does not work for me on Ubuntu 13.04 and VLC 2.0.6 Twoflower.

Report

exebetche

4 years ago

Could you be more specific? Or better give me the debug log: (use ctrl + M and set verbosity level to 2 before you launch the playlist).
Please and thank you.

Report

bergschreck

3 years ago

Also does not work for me on Debian Wheezy and VLC 2.0.3. This is the debug log:

main debug: adding item `http://www.youtube.com/watch?v=fhGF1PWJc0I' ( http://www.youtube.com/watch?v=fhGF1PWJc0I )
qt4 debug: Adding a new MRL to recent ones: http://www.youtube.com/watch?v=fhGF1PWJc0I
main debug: rebuilding array of current - root Wiedergabeliste
main debug: rebuild done - 1 items, index -1
main debug: processing request item: http://www.youtube.com/watch?v=fhGF1PWJc0I, node: null, skip: 0
main debug: resyncing on http://www.youtube.com/watch?v=fhGF1PWJc0I
main debug: http://www.youtube.com/watch?v=fhGF1PWJc0I is at 0
main debug: starting playback of the new playlist item
main debug: resyncing on http://www.youtube.com/watch?v=fhGF1PWJc0I
main debug: http://www.youtube.com/watch?v=fhGF1PWJc0I is at 0
main debug: creating new input thread
main debug: meta ok for (null), need to fetch art
main debug: Creating an input for 'http://www.youtube.com/watch?v=fhGF1PWJc0I'
main debug: using timeshift granularity of 50 MiB, in path '/tmp'
main debug: `http://www.youtube.com/watch?v=fhGF1PWJc0I' gives access `http' demux `' path `www.youtube.com/watch?v=fhGF1PWJc0I'
main debug: creating demux: access='http' demux='' location='www.youtube.com/watch?v=fhGF1PWJc0I' file='(null)'
main debug: looking for access_demux module: 0 candidates
main debug: no access_demux module matched "http"
main debug: TIMER module_need() : 0.196 ms - Total 0.196 ms / 1 intvls (Avg 0.196 ms)
main debug: creating access 'http' location='www.youtube.com/watch?v=fhGF1PWJc0I', path='(null)'
main debug: looking for access module: 2 candidates
main debug: looking for meta fetcher module: 1 candidate
lua debug: Trying Lua scripts in /home/jochen/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac
main debug: using meta fetcher module "lua"
main debug: TIMER module_need() : 0.692 ms - Total 0.692 ms / 1 intvls (Avg 0.692 ms)
main debug: removing module "lua"
main debug: searching art for http://www.youtube.com/watch?v=fhGF1PWJc0I
main debug: looking for art finder module: 2 candidates
lua debug: Trying Lua scripts in /home/jochen/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
main debug: no art finder module matching "any" could be loaded
main debug: TIMER module_need() : 1.225 ms - Total 1.225 ms / 1 intvls (Avg 1.225 ms)
main debug: art not found for http://www.youtube.com/watch?v=fhGF1PWJc0I
qt4 debug: IM: Setting an input
access_http debug: asking libproxy about url 'http://www.youtube.com/watch?v=fhGF1PWJc0I'
access_http debug: libproxy suggest to use 'direct://'
access_http debug: http: server='www.youtube.com' port=80 file='/watch?v=fhGF1PWJc0I'
main debug: net: connecting to www.youtube.com port 80
main debug: connection succeeded (socket = 12)
access_http debug: protocol 'HTTP' answer code 200
access_http debug: Server: gwiseguy/2.0
access_http debug: Content-Type: text/html; charset=utf-8
access_http debug: Accepting Cookie: YSC=D0imy65U9u8; path=/; domain=.youtube.com; httponly
access_http debug: Accepting Cookie: VISITOR_INFO1_LIVE=6E8Cte8FSaM; path=/; domain=.youtube.com; expires=Fri, 25-Apr-2014 18:11:46 GMT
access_http debug: Accepting Cookie: PREF=f1=50000000; path=/; domain=.youtube.com; expires=Fri, 25-Apr-2014 18:11:46 GMT
access_http debug: Connection: close
main debug: using access module "access_http"
main debug: TIMER module_need() : 325.607 ms - Total 325.607 ms / 1 intvls (Avg 325.607 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 0 ms
main debug: pre-buffering done 608 bytes in 0s - 32986 KiB/s
main debug: looking for stream_filter module: 7 candidates
main debug: no stream_filter module matching "any" could be loaded
main debug: TIMER module_need() : 5.390 ms - Total 5.390 ms / 1 intvls (Avg 5.390 ms)
main debug: looking for stream_filter module: 1 candidate
main debug: using stream_filter module "stream_filter_record"
main debug: TIMER module_need() : 0.066 ms - Total 0.066 ms / 1 intvls (Avg 0.066 ms)
main debug: creating demux: access='http' demux='' location='www.youtube.com/watch?v=fhGF1PWJc0I' file='(null)'
main debug: looking for demux module: 54 candidates
ts debug: TS module discarded (lost sync)
mod debug: MOD validation failed (ext=)
avformat debug: trying url: http://www.youtube.com/watch?v=fhGF1PWJc0I
avformat debug: couldn't guess format
lua debug: Trying Lua scripts in /home/jochen/.local/share/vlc/lua/playlist
lua debug: Trying Lua playlist script /home/jochen/.local/share/vlc/lua/playlist/playlist_youtube.lua
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/playlist
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/anevia_streams.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/anevia_xml.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/appletrailers.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/bbc_co_uk.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/break.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/canalplus.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/cue.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/dailymotion.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/extreme.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/france2.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/googlevideo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/jamendo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/joox.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/katsomo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/koreus.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/lelombrik.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/metacafe.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/metachannels.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/mpora.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/pinkbike.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/pluzz.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/rockbox_fm_presets.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/soundcloud.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/vimeo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/youtube.luac
lua debug: Lua playlist script /usr/lib/vlc/lua/playlist/youtube.luac's probe() function was successful
main debug: using demux module "lua"
main debug: TIMER module_need() : 118.695 ms - Total 118.695 ms / 1 intvls (Avg 118.695 ms)
main debug: looking for meta reader module: 2 candidates
lua debug: Trying Lua scripts in /home/jochen/.local/share/vlc/lua/meta/reader
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
main debug: no meta reader module matching "any" could be loaded
main debug: TIMER module_need() : 0.346 ms - Total 0.346 ms / 1 intvls (Avg 0.346 ms)
main debug: `http://www.youtube.com/watch?v=fhGF1PWJc0I' successfully opened
lua error: Couldn't extract youtube video URL, please check for updates to this script
main debug: finished input
main debug: waitpipe: object killed
main debug: dying input
main debug: removing module "lua"
main debug: removing module "stream_filter_record"
main debug: removing module "access_http"
main debug: dead input
main debug: changing item without a request (current 0/1)
main debug: nothing to play
qt4 debug: IM: Deleting the input

Report

exebetche

3 years ago

Your version of the script getting the video from youtube is outdated. You can update Vlc (the script is included) or update the script only, the new version is here:
https://raw.github.com/videolan/vlc/master/share/lua/playlist/youtube.lua

Report

bergschreck

3 years ago

Thank you. The new script works. Can you update the download link in the first post?

I cannot update vlc because it comes from the Debian Wheezy package repository.

Report

exebetche

3 years ago

The link I give you is not my script, it's from the VideoLAN team. This extension just manage playlists not the videos, so you have to get both youtube_playlist.lua AND youtube.lua uptodate to read a playlist. Anyway I add the link in case someone else have this problem.

Report

ravnik

4 years ago

hi, i'm trying to put a youtube-playlist into vlc.

everything is fine until i click play.

it only switches the pics and nothing else is happening.

Report

exebetche

4 years ago

It still works fine for me. Check you have a recent version of Vlc, if not get the last release from https://www.videolan.org. If that still don't work post the URL you paste in Vlc here.

Report

5 years ago

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

product-maker LittleLizzy May 28 2017

product-maker ELKZ Apr 29 2017

product-maker Stretch Dec 27 2016

product-maker dwmed Dec 05 2016

product-maker BB20101997 Sep 24 2016

product-maker Ragiowan Nov 09 2015

product-maker mcq333 Sep 17 2015

product-maker 99lool May 31 2015

product-maker 9207771739 May 01 2015

product-maker DJXAKEP Apr 25 2015

product-maker ziki Apr 21 2015

product-maker dirtyharry85 Apr 09 2015

product-maker gogo57540 Sep 08 2014

product-maker Doyouknow Jul 31 2014

product-maker rezmen1777 Apr 24 2014

product-maker ktb007 Apr 21 2014

product-maker Attila13 Apr 16 2014

product-maker pereov33 Jan 17 2014

product-maker csuno Nov 27 2013

product-maker DFPOWER46 Nov 18 2013

product-maker Snapafun Aug 29 2013

product-maker DevilinPixy Aug 24 2013

product-maker BurakPatat Aug 03 2013

product-maker GuixLe Jul 25 2013

product-maker legluondunet Jul 07 2013

product-maker cipricus May 17 2013

product-maker Argyle May 13 2013

product-maker ufoasd Apr 10 2013

product-maker ringen00 Apr 04 2013

product-maker zequi Feb 12 2013

product-maker HATRED Jan 09 2013

product-maker equiman Nov 30 2012

product-maker btocher Nov 27 2012

product-maker hernansilva Nov 26 2012

product-maker erosenninrho Nov 26 2012

product-maker sirhcits Nov 25 2012

product-maker meow9th Nov 19 2012

product-maker FracExebetche Apr 23 2012

product-maker 6 6

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
updated Jul 06 2017
added Apr 04 2012
downloads today
12
page views today 14