Wednesday, March 14, 2007

[Linux] Playing music from the command line

If you prefer command line software over graphical software because it's faster and only requires a keyboard, you might like this. Using the mplayer command, you can play almost anything from the command line. It works for many popular file types such as MP3, OGG, WAV and most internet streams.

However, keep in mind that depending on what file format you want to play you may need to install additional codecs. Please consult the manual of your distribution for more information about this.

First, check if mplayer is installed on your system. On Debian and derivatives (such as Ubuntu), type:
dpkg -l mplayer
If dpkg doesn't return any result, you'll need to install the mplayer package first. On many distributions, this can be done by typing in sudo apt-get install mplayer.
Now, to play a file with mplayer, type:
mplayer /path/to/file
To abort playback, press CTRL+C. There's also graphical version of mplayer that can play videos. To open it, enter mplayer without arguments.

Website: http://www.mplayerhq.hu/

Labels: , , , , ,

0 Comments:

Post a Comment

<< Home