How do I play files in random order using the mplayer command line player under Linux / Unix operating systems?
You can play most files such as MPEG/VOB, AVI, ASF/WMA/WMV, RM, QT/MOV/MP4, Ogg/OGM, MKV, VIVO, FLI, NuppelVideo, yuv4mpeg, FILM and RoQ files in random order using the following command syntax:
mplayer -shuffle -playlist YOUR-PLAY-LIST-HERE
How Do I Generate a Playlist?
mplayer can play files according to a playlist file type such as ASX, Winamp, SMIL, or one-file-per-line format. You can use the find command to generate a playlist for mplayer:
$ cd /path/to/music/dir
$ find -type f -iname \*.mp3 > playlist.txt
mplayer Shuffle Mode Command
Type the following command:
$ mplayer -shuffle -playlist playlist.txt