Page 1 of 1

How does random work ?

Posted: 06 Aug 2012 02:09
by Modinstaller
Hello,

I've been using the random/shuffle option of VLC a lot lately (with music) and I've came to wonder how it really works :
1-does it play a random element of the playlist
2-does it play a random element of the playlist that hasnt been played already
3- (if it does : ) does it stop when all the elements of the playlist have been played, or does it reset the already played elements and start a new cycle (with the same random order or recalculating a random order ?)

Some related questions :

4-sometimes I start a new playlist with random activated and it stops without playing everything there is in the playlist : why ?
5-if I manually switch to an element in the playlist, does that reset the random order (presumably it does not replay an element that has been already played, I -guess- that my second question's answer is yes) ? or does it work differently and how ? if not, how can I reset the random order so it will play every element in the playlist with a new random order ?
6-how can I see the random order that is calculated (if it does pre calculate the order -it could calculate at the end of every element which one is the following-) or if you can't tell at least how can I see the list of the elements already played (preferably in the order it was played) to see (in case it does play a random element that hasnt been played already) which elements are remaining ?

If you don't understand the structure of one of my questions please ask me to reformulate it so you truly understand what I am talking about.
Thanks for your answers :)

Re: How does random work ?

Posted: 11 Aug 2012 21:32
by edwardw
Hello,

I've been using the random/shuffle option of VLC a lot lately (with music) and I've came to wonder how it really works :
1-does it play a random element of the playlist
2-does it play a random element of the playlist that hasnt been played already
What it does is that when you activate shuffle mode, it rescrambles the playlist and plays the file you selected, so I guess the second one.

3- (if it does : ) does it stop when all the elements of the playlist have been played, or does it reset the already played elements and start a new cycle (with the same random order or recalculating a random order ?)
Yes, but if you set "loop" as well it will re-calculate a new random order and play it.
4-sometimes I start a new playlist with random activated and it stops without playing everything there is in the playlist : why ?
You should activate loop as well in this case.
5-if I manually switch to an element in the playlist, does that reset the random order?
No.
6-how can I see the random order that is calculated?
I don't think this is exposed anywhere.

Re: How does random work ?

Posted: 12 Aug 2012 03:32
by Modinstaller
So if I got it right, if I activate shuffle and switch to an element in the playlist quite randomly, without the loop activated, this element could be one of the first in the recalculated playlist, or it could be the last, or one of the lasts, and the playlist will end prematurely. Is that right ? That may be the reason why sometimes the playlist ends without playing every element, or even without playing 1/10th of the actual playlist.
Thanks for your answer, I was beginning to loose the hope to see someone here o_o

Re: How does random work ?

Posted: 12 Aug 2012 03:51
by edwardw
The easy way to shuffle is to simply double click the shuffle button (turning it on and off); that will force VLC to regenerate the entire random list.