Is random really random?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
tsreyb
New Cone
New Cone
Posts: 1
Joined: 08 Jul 2022 03:08

Is random really random?

Postby tsreyb » 08 Jul 2022 03:33

I've used both the random button from the gui as well as the command line -Z switch. Neither seems to generate a playlist that seems remotely random. Is it true? I'm just curious if there's any known issues.

Examples ...

I have 4,200+ video files evenly distributed in 200+ directories.

(1) I cd into the root folder of all these video files and enter "vlc -Z ." Result: THREE of the first five video selections were the SAME FILE!!!

(2) I repeated the previous test. I got one video repeated within the first eight selections (much better, but still unlikely)

(3) I launch "vlc ." from the same directory. In the gui, I click on the 'random' icon in the onscreen display. I confirm the icon is selected. I then click on 'next media in the playlist' button repeatedly and keep track of repeats. Within the first 20 selections two of the videos were repeated. From a pool size of 4,200+ videos, the odds of this occurring from a pseudo random number generator are rather low. Similarly, three of the selected videos came from the same directory. From a pool of 200+ directories, selecting from the same directory three times within the first 20 selections does not appear to be consistent with a pseudo random number generator.

(4) I repeated the previous test. This time four videos from the same directory were selected within the first 22 selections. Again, the number of directories is 200+. If I roll a 200 sided die 22 times, the chances of having the same number appear four times is pretty slim.

I understand that random number generators can validly select the same number within close proximity. But over time the likelihood of this occurring becomes quite low. With 4200+ videos evenly distributed among 200+ directories, I am observing repetitions that occur time and time again.

Lotesdelere
Cone Master
Cone Master
Posts: 9967
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Is random really random?

Postby Lotesdelere » 08 Jul 2022 10:11

Pure randomness doesn't exist on computers:
https://en.wikipedia.org/wiki/Pseudorandomness

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Is random really random?

Postby Rémi Denis-Courmont » 08 Jul 2022 14:18

VLC cannot modify the playlist tree structure, only randomise the order of sibling nodes. So make sure the playlist is flat.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

c627627
Blank Cone
Blank Cone
Posts: 32
Joined: 12 May 2011 07:38

Re: Is random really random?

Postby c627627 » 15 Jul 2022 16:41

When you say "playlist is flat" - how do we make the playlist flat!? What do we actually do?

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Is random really random?

Postby Rémi Denis-Courmont » 16 Jul 2022 09:44

I mean only top-level items, no hierarchy in the playlist structure.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

c627627
Blank Cone
Blank Cone
Posts: 32
Joined: 12 May 2011 07:38

Re: Is random really random?

Postby c627627 » 18 Jul 2022 06:25

I understand that to mean that we cannot add a folder with subfolders to the Playlist.
So we have to manually click on every subfolder in the Playlist to open the folders inside the Playlist, and only then will those files play randomly?

Is there a .bat file or a function that could automatically do that? It sounds like if there was, the Random Play would be possible.


Theoretically when you look at other old inactive players like Winamp - they never added a folder to a Playlist.
They only add the contents of each folder to the Playlist. *Files, not folders.*

What would it take to make VLC do that as well, making Random Play possible for a folder with subfolders?


I mean you have a PC. And on that PC, there is a music folder. *And inside it are music folders for each album.*
And VLC cannot Random Play these folders because instead of adding songs from each of these subolders - it adds the actual folders (!)

If other players can add files, surely we can have the option, just the option, of adding files from subfolders into VLC - not add folders, just add their contents, just the files...

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Is random really random?

Postby Rémi Denis-Courmont » 18 Jul 2022 19:55

VLC 4.0 reverted back to an always flat playlist already. This is not a black and white problem though. Some people did like the hierarchical layout and don't care about randomisation.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

c627627
Blank Cone
Blank Cone
Posts: 32
Joined: 12 May 2011 07:38

Re: Is random really random?

Postby c627627 » 20 Jul 2022 06:52

Why one or the other?
Why not simply have a button and you CHOOSE which you want and it solves the problem for people who do like true SHUFFLE play without bothering people who do not like it.

Why no choice?

Otherwise we have to wait until v4 is out, when will that be?

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Is random really random?

Postby Rémi Denis-Courmont » 20 Jul 2022 20:06

1) Because it is too much work to have both.
2) When it is ready.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

hesnotthemessiah
New Cone
New Cone
Posts: 2
Joined: 30 Sep 2022 15:44

Re: Is random really random?

Postby hesnotthemessiah » 30 Sep 2022 16:09

Why one or the other?
Why not simply have a button and you CHOOSE which you want and it solves the problem for people who do like true SHUFFLE play without bothering people who do not like it.

Why no choice?

Otherwise we have to wait until v4 is out, when will that be?
Looking for this as well. Can't really understand how this is not possible when not having it can really put limitations on how VLC media player can be used or can make using it much more long winded. "Include Subfolders" option would be great and it seems strange to me that this was not kept as an option. With the "Include Subfolders" option, you could just select a folder, then choose the option "Include Subfolders", and then have all that folders subfolders searched for files (of your chosen formats).

The current drag and drop option can definitely help speed up loading from multiple subfolders though.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Is random really random?

Postby Rémi Denis-Courmont » 30 Sep 2022 16:40

As far as I understand graph theory, it is in fact logically not possible, so I rather don't understand how you can't understand it.

But maybe I just don't understand graphs. Patches are welcome as always.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

hesnotthemessiah
New Cone
New Cone
Posts: 2
Joined: 30 Sep 2022 15:44

Re: Is random really random?

Postby hesnotthemessiah » 30 Sep 2022 23:14

As far as I understand graph theory, it is in fact logically not possible, so I rather don't understand how you can't understand it.

But maybe I just don't understand graphs. Patches are welcome as always.
Hi Rémi Denis-Courmont. I had never heard of graph theory before, so had a read up on it. I think I can see now, that there could be conflicts with interconnecting folder paths causing endless loops for some users. Is that what you are referring to here?

haydent
New Cone
New Cone
Posts: 8
Joined: 07 Jun 2018 07:33

Re: Is random really random?

Postby haydent » 26 May 2023 23:38

does random play everything once before something is played twice ?


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 13 guests