Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In vlc I can use vlc -LZ <file 1> <file 2> <file 3> for example to play various files on repeat and shuffled. Is it possible to specify a whole directory and play all the music within the folder and it's subfolders?

Say I am hosting a party and have a folder with "Party Music", how would I play all the music from that folder in a loop and repeating the whole playlist?

share|improve this question

4 Answers 4

up vote 5 down vote accepted

According to this blog post the --playlist-tree will play everything in the folder passed into it. For example:

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --playlist-autostart --loop --playlist-tree c:\playlist\

Also note that the example is for a Windows system, you may need to modify the syntax slightly if you are using a Unix based system.

share|improve this answer
    
Are there shortened options for --playlist-tree and --playlist-autostart ? And is --loop the same as -L (Repeat) ? –  Fogest Jul 24 '13 at 20:43
    
I tried what you suggest and with your command, on Windows, vlc tries to open file "C:\playlist\" and cannot, as it's not a file. It's the same on Linux btw. –  Levans Jul 24 '13 at 20:54
    
It looks like "-L" is short for "--loop" and "--playlist-autostart" and "--playlist-tree" don't have shorter commands. You can see a full list of command line options with "--help". Thats where I found the answer. –  tbenz9 Jul 24 '13 at 20:56

As I couldn't have tbenz9 solution working, I wrote a little batch script doing the trick :

cd C:\your\directory\with\music
for /r %a in (*) do "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -LZ --one-instance --playlist-enqueue "%a"

The --one-instance option tells vlc to keep only one window, and I think --playlist-enqueue is quite explicit.

On Linux, it can be simply achieved with :

find /my/music/directory/ -type f -exec vlc -LZ '{}' +
share|improve this answer

I often need to work my way thru a lot of videos, in a particular sequence. When I stop watching one, I want my player to remember where I was, and resume from that point.

VLC cannot do either of these, not without extra work. Instead, I use "Media Player Classic - Home Cinema" http://mpc-hc.org/ for this very reason. I even created my own tiny script to launch MPC-HC and resume the most recently-played file automatically.

The VLC development team is opposed to automatically playing the next file, even as an option. They insist that you must select the files manually, and then add them to a playlist, or open the folder (which would start from the first file, which isn't what I want), or add them individually. Their dogma is NOT user-friendly!

share|improve this answer

For linux (I have no windows machines handy). All of this is from the man pages and/or --help output. I also TESTED these to work.

find /Music/Directory/ -type f -exec vlc --one-instance --playlist-enqueue --playlist-autostart --fullscreen -Z '{}' +

The "-L" shouldn't be needed because help for "-Z" says "Play files randomly forever"

Or, if you'd prefer to use mplayer (vlc video scaling is currently borked on one of my machines)

find /Music/Directory/ -type f -exec mplayer -enqueue -shuffle -fs -loop 0 '{}' +
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.