Page 1 of 1

Folders in a Playlist

Posted: 03 Sep 2012 00:38
by DanTheUser
Hi VLC gang,

This question has bugged me for a while. A playlist can include folders that include media files. Folders within a playlist are treated as individual tracks in the list until they are chosen, and they expand and all their entries are now treated as individual track. Is there a way to auto-expand all folders that have been placed in the playlist so that all files in a large set of folders can truly be played randomly? If a playlist includes folders, and random is used, the first choice will expand that first folder, which means the random function disproportionately plays files from within that folder because its contents now each hold equal probability of being chosen as the unopened folders. This simple shortcoming has led me to use other media players for my music library when I'd rather just use VLC for everything. Some advice would be greatly appreciated.

Thanks,

DanTheUser

Re: Folders in a Playlist

Posted: 03 Sep 2012 03:06
by Arite
VLC by default performs an "expand" with directories added. From the command-line help:

Code: Select all

File input Directory: --recursive={none,collapse,expand} Subdirectory behavior Select whether subdirectories must be expanded. none: subdirectories do not appear in the playlist. collapse: subdirectories appear but are expanded on first play. expand: all subdirectories are expanded.
The settings for this can be found in the Preferences. Go to:
Tools >> Preferences >> (Select "All" for "Show settings) >> Input / Codecs >> Access modules >> File

And you can change the directory behaviour etc.

If you are referring to playlist files being opened, I made a *.m3u that just pointed to a directory with subdirectories etc. It treated it as a normal list of files (from all directories), so seems to work OK.

Can you give an example of when it doesn't?

Arite.

Re: Folders in a Playlist

Posted: 03 Sep 2012 04:13
by DanTheUser
Arite,

Thanks so much for your response. I tried your method of creating an *.m3u from the root directory folder, and although that autoexpands all the folders, the random track selection still seems to follow the same pattern as if all of the folders were not expanded, and this method also makes vlc very unstable - it crashes often, most likely because the root folder I am using contains so much media - about 400GB of music.

As an example of the original problem. Take six folders, each with an album full of tracks. Drag those six folders into the vlc playlist and click random and play. You will notice that the first track chosen will have it's folder expanded and the other five folders remain closed. Because the open folder has so many more entries in the list, the next track will most likely be one within the same folder. If another folder does get chosen, the odds of a third are even less. With a few trials of this you will definitely notice it. It becomes very obvious with large numbers of folders.

Thanks a lot for the advice. Please let me know if I misunderstood your suggestion.

DanTheUser

Re: Folders in a Playlist

Posted: 03 Sep 2012 12:39
by solazy
Hi Dan,
A very interesting post indeed, you explained well the issue and it's reproducible.

A workaround could be this, for example with 6 different music folders :
* Add them to a new playlist.
* In the playlist, expand them manually, one by one.
* Save the playlist to a file (Media >> Save Playlist to file) : for example "my 6 music folders.xspf"

Now each time you'll double click the .xspf file, Vlc will be launched with a playlist containing all 6 expanded folders (this is because you saved the playlist at a moment when all 6 folders were expanded in it)

Of course, if those folders are not static (i.e if you add periodically new audio files) this won't be enough to solve your issue, but it may help you in case you just want to listen "really" randomly what's already stored in your computer.

Hope it helps :D

Re: Folders in a Playlist

Posted: 05 Sep 2012 03:38
by Arite
Thanks so much for your response. I tried your method of creating an *.m3u from the root directory folder, and although that autoexpands all the folders, the random track selection still seems to follow the same pattern as if all of the folders were not expanded, and this method also makes vlc very unstable - it crashes often, most likely because the root folder I am using contains so much media - about 400GB of music.
Ah OK. One way would be to make a playlist that lists all of the files (not them as directories). Then VLC would treats each item separately from the start.

Have you tried using the Media Library? You'll have the same issues with folders, however you could try adding (as a one time thing) a giant playlist with everything in it (each entry corresponding to a file, not a folder), then when you re-open VLC is everything should still be there. Everything will be contained in a single folder (the same name as the playlist), but everything should be there. The meta-data won't be loaded until a track is played however, it's remembered are closing and reoping VLC though. Then you could use the search, select tracks, right click and "Add to playlist" if you want a custom order/set of files.

I tested this with 12000 items, ~115GB in size so shouldn't cause a crash (haven't tried with 400GB though). I used foobar2000 to create the *.m3u playlist file BTW (just make a giant playlist in that then export it).

As solazy said you could also do something similar in VLC by exporting a fully expanded playlist to a playlist file etc.
As an example of the original problem. Take six folders, each with an album full of tracks. Drag those six folders into the vlc playlist and click random and play. You will notice that the first track chosen will have it's folder expanded and the other five folders remain closed. Because the open folder has so many more entries in the list, the next track will most likely be one within the same folder. If another folder does get chosen, the odds of a third are even less. With a few trials of this you will definitely notice it. It becomes very obvious with large numbers of folders.
Yeh I see what you mean now.

You could make this feature request - e.g. to "Automatically pre-parse/expand (prior to playback) folders when added to VLC's Playlist/Media Library". Otherwise/in the meantime you could try using the Media Library/creating playlists with each entry as a file instead of a folder.

Cheers, Arite.

Re: Folders in a Playlist

Posted: 09 Sep 2012 05:28
by DanTheUser
Thanks for the advice Arite. How would I go about adding "each entry to a files, not a folder", without navigating to each folder and selecting all the files within them? This seems like it will take forever.

Re: Folders in a Playlist

Posted: 11 Sep 2012 00:18
by Arite
Well you could use something other than VLC to make it. I used foobar2000. Just drag and drop you entire music folder into it, and a giant playlist will be made. Then save the playlist as an *.m3u file and open it in VLC etc.

Arite.

Re: Folders in a Playlist

Posted: 15 Jan 2014 20:55
by Motoman4540
Wow! How about just setting up the next release of VLC to automatically play each song in a folder, and not require users to mess around with customized playlists... Is that such a complicated feature to add? I love VLC but this is a basic feature that should not require a workaround, IMHO!

Re: Folders in a Playlist

Posted: 18 Feb 2014 20:48
by texastuner_raceward
well hello fellow VCL'er

i have a problem ive been using .m3u playlist to play movies from my secondary drive
#EXTM3U
#EXTINF:0,AJE Video
directory:///D:/My%20Videos/AJE%20Video

i set it up this way so when i add a new video to the folder it will be in the playlist without having to update the .m3u file with the new file and up until 4 days ago it was working just as expected, but now it just opens the playlist and wont play or show files in folder.

im running windows xp 32bit home edition sp3

my thoughts are a windows service that may have disabled...

thank you in advance for any intel

Re: Folders in a Playlist

Posted: 08 Oct 2014 13:53
by Kusko25
Another workaround is to navigate to the folder containing your files in explorer (assuming you use windows) and search for * in the search window. That lists all files within that folder which you can then add to your playlist.

Re: Folders in a Playlist

Posted: 01 Jun 2021 18:05
by roysarver9
Just can not seem to get files to play like they used to.. I
like the way you can dump in whole files now. But individual files within will not play consecutively..

Re: Folders in a Playlist

Posted: 28 Jun 2021 05:52
by arcadezyra
i was gonna say just search with file explorer in the parent folder of said folders. "kind:music" or "kind:audio" no quotes. select all and drop them in the playlist. ez pz