Shuffle songs with mplayer (sub-dirs too.)

mplayer -shuffle $HOME/music/* $HOME/music/*/* $HOME/music/*/*/* etc.
So... I saw this: http://www.commandlinefu.com/commands/view/5385/play-all-the-music-in-a-folder-on-shuffle And I thought it would be cool to make it so that it will play songs in subdirectorys too. from: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2011-March/067853.html
Sample Output
Player 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team

Playing /home/greg/Dropbox/Music/Song.mp3.
Audio only file format detected.
Clip info:
 Title: SONG NAME
 Artist: Sara Bareilles
 Album: Little Voice
 Year: 2007
 Comment:
 Track: 11
 Genre: Alternative
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   0.0 (00.0) of 424.0 (07:04.0) ??,?% ^[[J^MA:   0.1 (00.0) of 424.0 (07:04.0) ??,?% ^[[J^MA:   0.1 (00.0) of 424.0 (07:04.0) ??,?% ^[[J^MA:   0.1 (00.1)$
Exiting... (Quit)






0
2011-11-09 01:45:51

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: