Saturday, February 07, 2009

Playing mp3 from command line using MPlayer

I have been looking for a command line tool to play my music on the remotely connected machine (yeah it's my mythtv box and I usually just ssh to it and have my speakers connected to it).

This is how you can do it if you are looking to play all the mp3 files in that directory:

> mplayer dir *.mp3

Simple as that!

Also, you could use the "-loop 0" to repeat the song/playlist forever :)

> mplayer -loop 0 filename.mp3

Of course you may want to wait for my new project MuTruss to do more exhaustive search and then create your own playlists. But till it comes live, you have to just use plain old wild cards :)

Have fun!