Posts for: #Linux

Play random files with Ruby

I’ve written a class to play random files, you can define the player path and allowed file extentions. It will search recursively for all readable files, starting from execution from the folder passed as argument or, if miss, from current folder. Tested on a linux box with mplayer.

Usage:
$ ./shuffle # play recursively all files from current folder $ ./shuffle /path/to/files # play recursively all files from specified folder

That’s the source code.
#!/usr/bin/ruby

[]

MPlayer console tip

MPlayer tip screenshot I’ve discovered an interesting tip for MPlayer to play all folder’s media files. enter:
mplayer *

It automatically enqueue your files. If you use fast forward (up key) mplayer treats your playlist like one file, so you can navigate between your files. Unfortunately it works only with forward seek.

[]