# Imperfection in randomness in VLC shuffle playlist - why?

Whenever I play a playlist of music using VLC (possibly other software too), I notice that some songs never get played while others get played repeatedly (even for a playlist of just 8 songs).

I know from my days as a computer science undergrad student that practical randomness is often good enough so we don't bother with true randomness for many applications. But I'd like to understand this better.

• why is real randomness not worth the effort?
• does pseudo-randomness not follow a uniform distribution?
• are software developers perfectly aware of behavior like I see in VLC and just see a tiny market segment as caring about it?

EDIT: actually, my VLC issue might be because of a broken link! But I'm sure I've seen this behavior with other music players like Apple Music. So apologies to the good folks who develop VLC.

• Probably nobody uses it nowadays, but this was also the case with Winamp.
– Juho
Dec 4 '19 at 20:17
• One of the default settings is not shuffle-friendly: youtube.com/watch?v=4_R1NQbnZeQ Jul 23 '21 at 1:09

## 2 Answers

This is just speculation, but perhaps what VLC is attempting is to simulate... perfect randomness. That is, each song is picked uniformly at random, independently of previous songs. According to the coupon collector problem, if you have $$n$$ songs in your list and want to hear all of them, you will have to wait for roughly $$n\ln n$$ songs to be played. By that time, the average song will have been heard $$\ln n$$ times.

The problem seems to be not in VLC, but rather in the random experiment that VLC is trying to simulate. VLC is not trying to shuffle your playlist and play it through. Rather, it seems to just pick a new random song each time, regardless of the past.

I have a library of over two thousand songs and I've always noticed VLC's flawed shuffling system. It will play the same song every few songs, or it will prioritize songs from randomly picked folders. Recreating this phenomenon as I write this proves exactly that: With shuffle already selected I press open folder and select my music folder and a song from 'album a' plays. I skip the song and a song from 'album b' plays, followed by another song from 'album a', then another seemingly random song. On the fifth song: who would've guessed, another song from 'album a'.

Keep in mind that I have over two thousand songs and nearly four hundred albums. In hindsight, this phenomenon seemed to start noticeably occurring when I began organizing my music into subfolders ie. '\Music\Artist\Album\song.flac'. this may have something to do with this issue and I hope that it gets solved and fixed. Clearly this has been an issue for a while considering OP's dating of December 2019.

If anyone else has this issue and comes across this thread, I'd appreciate if you'd give your example plus some sort of demonstration of how your songs are layed out because this is a really interesting topic for me. :)