This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Reviews

CLI audio players for Linux

By Razvan T. Coloja on January 29, 2008 (9:00:00 AM)

Share    Print    Comments   

What would life be without music? Given the proper codecs, in Linux you can play almost any digital audio format. Linux has many graphical applications that can do the job, such as Amarok, Rhythmbox, Audacious, and XMMS, all of which provide an intuitive user interface, playlist sorting, and various other options. But what if you want low resource usage so you can play tunes on aging hardware? Here are some alternative players for the Linux command line.

At the top of the list comes mp3blaster. Out of all the CLI audio players I worked with, mp3blaster was the most comprehensive and feature-full. It has an ncurses interface, and once you familiarize yourself with the keys you'll find it fairly easy to renounce other audio players.

You can navigate the interface with the arrow, Enter, and Backspace keys. F1 alternates between file and playlist mode. If you want to add songs to the playlist, enter file mode, select some audio files using the spacebar, then press F1 again to add them to the current playlist. Press F3 if you want to automatically select all files. F2 inverts the selection.

With the f key you can toggle the file display mode. You can be shown the full path of the files, just the filenames with the filesize on the left, or the ID3 tag. This is useful when you have deep subdirectories in your music collection and want to quickly locate a song.

Speaking of locating songs, search is done with the / key, and it's case sensitive. mp3blaster searches only by filename, but it automatically jumps to the file you're looking for as you type its name. Press the s key to sort the files alphabetically (case sensitive or case insensitive), by day (newest first or oldest first), or by filesize.

You say you want to listen to an online radio station? Press F7 and type or paste the URL in the text field.

Mp3blaster allows you to create specialized playlists called groups. If you want to sort your music according to genre, for instance, select all the files and directories you want to group and press F5 to add the files to an unnamed group. Press F5 again to set a name for the group.

With F6 and F7 you can toggle Repeat or Shuffle mode. Press C to clear the current playlist or F4 to save the playlist as an .LST file somewhere on your hard drive for later use.

Volume control is done by using the t key, which accesses the mixer. You can pause and browse through a song using the 1-6 keys and change the volume with < and >.

The best of the rest

Cplay is a front end that allows one to play audio files from the command line using sox, xmp, madplay, and other such CLI audio decoders and converters. The interface is much simpler than mp3blaster's and offers limited options. You alternate between file and playlist mode using the Tab key, and calibrate the volume using the 1-9 keys. In file list mode, use the t key to tag files and the a key to add the selected songs to the current playlist, or U to untag them. You can use Ctrl-s to search for files, or s to make a recursive search. As you can see, the keys are mapped intuitively: d stands for delete, m for move, w for write playlist. Overall, Cplay is a clean alternative to mp3blaster.

Yet another interesting CLI audio player is Cmus (C* Music Player). It too features an ncurses front end, but you'll have to do a little typing to get things done. When you open the application, the playlist will be empty. To add a music folder you'll have to type :add /path/to/folder. To search for a song, press /, type the name of the band or song, and keep pressing the n key until you find what you're looking for. You control playback volume with + and -.

MOC (Music On Console) also sports an ncurses front end. It offers a two-panel view similar to Midnight Commander, and can play audio formats that are supported by FFmpeg and installed codecs. It has a mixer and supports color themes. The best part about MOC is that you can listen to music, and if you decide to close the terminal application, the server will keep running in the background. You can relaunch the front end if you wish to switch to another song or alter the volume. You use the Tab key to switch between playlist and file view modes, and < and > to change the volume. Press T to go to the theme selection menu and choose one of the available color modes, then use the a key to add files to the empty playlist.

There are many other CLI audio players for Linux. MPlayer, for example, can play audio files from the command line. Music Player Daemon has many front ends but can also be used from the command line. Other notable apps that don't need a GUI are mpg123 and mpg321, mjs, jinamp, benmp3, xcplay, mcplay, and ncxmms. Choose the one that serves you best, and play that music loud!

Razvan T. Coloja has published more than 150 Linux and IT-related articles in print and online magazines. He is an editor for a Romanian magazine and one of the maintainers and editors of www.mylro.org, a Romanian Linux/OSS portal and community.

Share    Print    Comments   

Comments

on CLI audio players for Linux

Note: Comments are owned by the poster. We are not responsible for their content.

CLI audio players for Linux

Posted by: Anonymous [ip: 203.171.68.253] on January 29, 2008 10:00 AM
Good, article, and I'm always happy to see software that assumes that you want to listen to your music as opposed to look at it. I don't mind apps looking pretty, but I could never figure out why skins and visualisations were so important to music software.

One thing the article misses is a summary of the differences between the different programs. For example, I use MOC, but I can't really see many differences between it and the mp3blaster you describe. AFAICS the features are largely the same --- give me a good reason to try something else out!

#

CLI audio players for Linux

Posted by: Anonymous [ip: 82.227.137.141] on January 29, 2008 10:18 AM
You forgot Pytone !

#

CLI audio players for Linux

Posted by: Anonymous [ip: 10.203.30.59] on January 29, 2008 10:32 AM
I love mp3blaster and have been using it from almost 5-6 years now.. I love you mp3blaster!!!

#

CLI audio players for Linux

Posted by: Anonymous [ip: 62.123.131.203] on January 29, 2008 11:18 AM
I would like such a command line tool with a feature missing: the possibility to save in a file the song played, in order to perform some simple statistics with grep, sort and so on...do You know something about this feature? thanks

#

CLI audio players for Linux

Posted by: Anonymous [ip: 62.195.137.94] on January 29, 2008 11:19 AM
Try out herrie (http://www.herrie.info). It is fairly feature rich, very fast and pretty easy to learn. Also uses ncurses.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 145.85.128.83] on January 29, 2008 11:20 AM
What about Herrie? http://herrie.info/

#

CLI audio players for Linux

Posted by: Anonymous [ip: 218.19.216.149] on January 29, 2008 01:07 PM
What about XMMS2? I think it's a very strong competitor to all the other cli music players.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 172.21.35.93] on January 29, 2008 03:20 PM
I sometimes even use:
gst-launch playbin uri=file://$PWD/song.xyz

#

CLI audio players for Linux

Posted by: Anonymous [ip: 87.202.84.25] on January 29, 2008 03:43 PM
sadly most of the fairly old ones are lacking important features. one of the most important ones being that they dont play FLAC.
now that moc development has stopped the only alternatives for me are cmus and probably mplayer.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 200.106.196.187] on January 29, 2008 03:51 PM
You forgot xmms2 but it's still in development and it's not CLI only, yet it fares verywell

#

CLI audio players for Linux

Posted by: Anonymous [ip: 193.166.94.185] on January 29, 2008 04:09 PM

I have ripped my music CDs into OGG files and MOC is the best program I have found for playing these music files. MOC has some kind of "read ahead" feature that ensures that there are no gaps in the audio output even when the CPU usage is 100%. MOC comes with an alternative "transparent-background" theme that makes it look a bit nicer, IMO, than the default Midnight Commander -like theme.


http://moc.daper.net/node/115

#

CLI audio players for Linux

Posted by: Anonymous [ip: 213.98.92.153] on January 29, 2008 04:55 PM
I don't think that a ncurses interface is CLI.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 79.113.86.152] on January 29, 2008 04:58 PM
Well, as long as you can start it without an X Server and it does something, it's CLI for sure :)

#

CLI audio players for Linux

Posted by: Anonymous [ip: 75.36.217.37] on January 29, 2008 05:03 PM
yatm (yet another time machine) is a lightweight CLI player that lets you change the playback rate (nice for speech-based audio (transcription, podcasts, audiobooks)).

#

CLI audio players for Linux

Posted by: Anonymous [ip: 85.211.134.170] on January 29, 2008 06:30 PM
You forgot lots of the ones listed at linuxlinks.com

#

CLI audio players for Linux

Posted by: Anonymous [ip: 171.66.3.158] on January 29, 2008 06:40 PM
Make it frontend agnostic: use MPD. CLI, ncurses, gtk, qt, web; mix and match frontends as you please. As a bonus you get ALSA or streaming audio backends allowing you to listen to your music at home from work. last.fm plugins work out of the box, of course, as well. MPD is simply the most principled approach to audio playback with respect to MVC development.

#

Re: CLI audio players for Linux

Posted by: Anonymous [ip: 69.17.124.172] on January 29, 2008 08:20 PM
Thanks. I was looking through the list to see if someone had mentioned mpd. It is my favorite player, bar none.

I am even getting it put on my Nokia n810.

ncmpc is great for nCurses. mpc is great for standard cli.

#

Re(1): CLI audio players for Linux

Posted by: Anonymous [ip: 190.50.207.211] on February 04, 2008 11:23 PM
Agreed. For me, mpd has everything I could ask for from a backend. And as for front ends, I love being spoiled with like 20 or 30 different apps. I can flip them around until I find one that gets everything right. For me that app is Sonata or Theremin.app, depending on what machine I am.

#

Re: CLI audio players for Linux

Posted by: Anonymous [ip: 195.241.240.72] on January 30, 2008 06:50 AM
Yes, Music Player Daemon is great. It also works good with a remote control when using a combination of mpd (of course), mpc and lirc. This way I do not have to be logged in, and still can change my music!
And it also supports flac.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 70.187.52.177] on January 30, 2008 02:55 AM
Real men use 'workbone'.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 24.84.205.13] on January 30, 2008 04:41 AM
I find orpheus is better than mp3blaster, which has a cluttered interface in my opinion.


http://konst.org.ua/en/orpheus

#

CLI audio players for Linux

Posted by: Anonymous [ip: 85.178.122.142] on January 30, 2008 12:28 PM
What about ncmpc? It's great also.

#

CLI audio players for Linux

Posted by: Mary Riley on January 30, 2008 03:33 PM
I normally just use the headless version of Audacious. Is there an advantage to using a program like mp3blaster?

#

CLI audio players for Linux

Posted by: Anonymous [ip: 212.77.105.136] on January 30, 2008 06:11 PM
ncxmms is in some situations quite good tool for those who use Xmms, for example if you dont want to use mouse and switch desktops or if you want to loop one song forever (just press L in ncxmms) or to control Xmms from remote machine.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 205.221.16.105] on January 30, 2008 07:16 PM
On top of being the first CLI audio player I found (other than mplayer, which isn't quite rich enough for this sort of thing) MOC's seperation between the nCurses UI and the audio player portion of the program made it an easy sell for me.

Beyond that, it is *very* easy to use with other programs; check out the manpage. You can just call the program with certain switches to change songs, get track info and so forth. This makes it really simple to write scripts for irssi or pretty much any program you might want to use. You don't even need DCOP!

MOC is pretty hard to beat, but I'm going to have to check these others out to satisfy my own curiosity.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 38.98.10.244] on January 31, 2008 02:28 AM
I have 171177 Tracks of every audio format you can think of CMUS was the only answer that I had. Nothing else whipped though the crazy list of songs. CMUS, sshfs and a wireless connection is all of my music everywhere I go! I have two ASUS eeepc's and a microphone! That is all I use for DJing now! I just have to finish importing all of my vinyl! Thanks for article just reminds me how lucky I am!

#

CLI audio players for Linux

Posted by: Anonymous [ip: 219.93.152.12] on January 31, 2008 02:37 PM
MPlayer is the only media player that I need, either in X, terminal or pure text console. It plays most of media formats, and even can display movies in text consloe (via ascii art AA/libcaca) or directy to VESA/SVGA. It also includes a VERY good keyboard navigation and support playlist too.

#

CLI audio players for Linux

Posted by: terc├╝me on February 01, 2008 07:37 AM
nice article..

#

CLI audio players for Linux

Posted by: Anonymous [ip: 200.83.9.182] on February 03, 2008 06:59 PM
Orpheus. It surely beats mp3blaster.

#

CLI audio players for Linux

Posted by: Anonymous [ip: 68.104.130.47] on February 03, 2008 08:27 PM
As somebody already mentioned Pytone is a very nice CLI audio player as well. It has one of the best ncurses interfaces I've seen in a long time. http://www.luga.de/pytone/

#

CLI audio players for Linux

Posted by: Anonymous [ip: 41.242.117.115] on March 10, 2008 02:18 PM
ncmpc + mpd = heaven

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya