Description: Shuffles all items on the playlist similar to MPC-HCs randomize playlist function.
How To Install: - download "shuffle.lua" (download button on the right) - put it in the VLC extensions folder (create it, if it doesn't exist): for Windows: %APPDATA%\vlc\lua\extensions for Linux: ~/.local/share/vlc/lua/extensions/ for Mac OS X: /Applications/VLC.app/Contents/MacOS/share/lua/extensions/ - restart VLC
To use, simply click on View → Shuffle Playlist (or VLC → Extensions → Shuffle Playlist in some versions of VLC) If you're not quite happy with the result, simply shuffle again!Last changelog:
I've used this extension for a while and it's really helpful, thanks. I use it in Manjaro Linux, but in the last few months it's stopped working for some reason. The extension is in the right folder and it appears as installed in the list of extensions in the VLC Addons Manager. But it doesn't appear in the Active Extensions tab in the Plugins and Extensions window. Not sure if this is a change in VLC, Linux, or something else, but wanted to let you know.
I followed the instructions and the option does not show in the "View" options. I created the file in "C:\Users\------\AppData\vlc\lua\extensions". Was that correct?
In line "swap = math.random(#randomList)", it should be "random(i, #randomList)" if you want it to be a truly uniform distribution. Otherwise the last elements have much more chance to be moved to front.
If you want the playlist to auto start after pressing shuffle you can add these lines at the bottom before the function ends:
while vlc.input.is_playing() do
end
vlc.playlist.play()
This is what everyone has been asking for, for years. It does a real shuffle. A fantastic improvement to VLC and makes it useful as a music player. Before this extension VLC was marginal at best for music. The problem is that when you search Google or VLC extensions for "shuffle" or "shuffle playlist" this little gem doesn't appear.
Thanks for your extension !
I hoped your it would save me (and I'm sure it will !)... but atm, I don't see your button in the interface.
Btw, I restarted VLC. I also checked that the extension is shown as "active" in the menu.
Using version 2.1 (Terry Prachett, 2015-04)
Also, could you bind some keyboard shortcut to the function ? e.g ctrl-shift-R, which IIRC, is the winamp shortcut for this function. MPC or any other would probably be a good choice too, anything to avoid having to click.
Finally found it !
it's well hidden, in view -> shuffle playlist
Update or syntax for bindong a shortcut for a plug-in action would still be welcome.
I tried to edit the LUA file, but it would be easier if I knew LUA :). Atm, I only managed to break it.
Sorry, but I'm only making extensions that I want to use. The main reason being, it's a major pain in the ass to write them.
VLC extensions are completely underdeveloped, definitely underdocumented and in some ways even outright broken.
Ratings & Comments
22 Comments
Is there an option available for the full version of the VLC Remote app (Android)?
Still works fantastic in 2023. I went the extra mile to look for this when nothing showed up on google and I am surely happy.
This extension is amazing! Works great! Thank you!
I've used this extension for a while and it's really helpful, thanks. I use it in Manjaro Linux, but in the last few months it's stopped working for some reason. The extension is in the right folder and it appears as installed in the list of extensions in the VLC Addons Manager. But it doesn't appear in the Active Extensions tab in the Plugins and Extensions window. Not sure if this is a change in VLC, Linux, or something else, but wanted to let you know.
I followed the instructions and the option does not show in the "View" options. I created the file in "C:\Users\------\AppData\vlc\lua\extensions". Was that correct?
It seems like the option has been moved in some versions of VLC. Maybe try "VLC → Extensions → Shuffle Playlist".
If so, it mostly sucks for the one you made the effort of programing this option.
If its you, than I'm really sorry to hear.
It works when installed in the folder mentioned by "bolosun"
directory is C:\Users\------\AppData\Roaming\vlc\lua\extensions
Thanks. I'll try that.
It works. Thanks.
In line "swap = math.random(#randomList)", it should be "random(i, #randomList)" if you want it to be a truly uniform distribution. Otherwise the last elements have much more chance to be moved to front.
I didn't know that. Thanks for the tip!
If you want the playlist to auto start after pressing shuffle you can add these lines at the bottom before the function ends: while vlc.input.is_playing() do end vlc.playlist.play()
With line breaks after the "do" and "end".
on vlc 2.1.6 it stops an http stream (.mp3) when i click on "view -> shuffle playlist"
This is what everyone has been asking for, for years. It does a real shuffle. A fantastic improvement to VLC and makes it useful as a music player. Before this extension VLC was marginal at best for music. The problem is that when you search Google or VLC extensions for "shuffle" or "shuffle playlist" this little gem doesn't appear.
Thanks for your extension ! I hoped your it would save me (and I'm sure it will !)... but atm, I don't see your button in the interface. Btw, I restarted VLC. I also checked that the extension is shown as "active" in the menu. Using version 2.1 (Terry Prachett, 2015-04) Also, could you bind some keyboard shortcut to the function ? e.g ctrl-shift-R, which IIRC, is the winamp shortcut for this function. MPC or any other would probably be a good choice too, anything to avoid having to click.
Finally found it ! it's well hidden, in view -> shuffle playlist Update or syntax for bindong a shortcut for a plug-in action would still be welcome. I tried to edit the LUA file, but it would be easier if I knew LUA :). Atm, I only managed to break it.
I need a plugin that allows to play along with the movie musical playlist. Theoretically it is possible to make?
Sorry, but I'm only making extensions that I want to use. The main reason being, it's a major pain in the ass to write them. VLC extensions are completely underdeveloped, definitely underdocumented and in some ways even outright broken.