Screw your contrast

December 07, 2003

Mplayer Playlist

Here’s a really quick way to add all the mp3’s in your home directory into a playlist that mplayer likes.

find /home/<your-username-here> -name "*.mp3" -print > playlist.txt

And then it’s a simple matter of…

mplayer -playlist playlist.txt

Simple, huh?

If you want to get a little fancier you can add -quiet, or -really-quiet to suppress player messages. Really handy if you’re using mplayer in a cron script.

If you, further, want to randomize your playlist, just add -shuffle to the commanline and you’ll randomly play back every mp3 file in your home directory.

Maybe I should start a mplayer tips list.