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!

2 comments:

Unknown said...

Hello,

I wanted to unistall cygwin from my Windows XP PC. I came across your post for that. But I don't understand how what you suggested would work because rmdir and regedit are part of the CYGWIN system which I want to remove. Even if rmdir succeeds (because the application is loaded into the memory and the disk file is not needed) it seems regedit would fail because it cannot be loaded into the memory.
What are the directories /s and /q. As far as I know (I ran ls -l /), those directories were not created during the installation of CYGWIN on my PC.

Can you please explain.

thanks,

S. Rao Ponamgi

Ashish Garg said...

I think you commented on the wrong post. Anyways, regedit is part of the Windows installation so you should be able to run it.

Also, /s and /q are not directories but the handles or options for rmdir. If you run "rmdir /?" from command window, you will see the following description for those parameters/options:

Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S

Also, RD is still available as Windows command, so you should be able to run it.