What are popular audio players for the command line?
- How to play a single sound file?
- Are there command line players that also index the music library like Banshee, Exaile, etc.?
Install vorbis-tools (
sudo apt-get install vorbis-tools) to get
$ ogg123 -v example.ogg Audio Device: Advanced Linux Sound Architecture (ALSA) output Author: Bill Currie <firstname.lastname@example.org>/Kevin Cody, Jr. <email@example.com> Comments: Outputs to the Advanced Linux Sound Architecture version 0.9/1.x Playing: example.ogg Ogg Vorbis stream: 1 channel, 44100 Hz Vorbis format: Version 0 Bitrate hints: upper=0 nominal=160000 lower=0 window=0 Encoded by: Xiph.Org libVorbis I 20101101 (Schaufenugget) Encoded by: SONY IC RECORDER MP3 1.1.0 Album: ptiha Date: 2012 Artist: Michael Laitman Time: 00:42.17 [218:51.85] of 219:34.02 (142.0 kbps) Output Buffer 88.9%
ogg123 reads Ogg Vorbis audio files and decodes them to the devices specified on the command line. By default, ogg123 writes to the standard sound device, but output can be sent to any number of devices. Files can be read from the file system, or URLs can be streamed via HTTP. If a directory is given, all of the files in it or its subdirectories will be played.
mpd (daemon) + ncmpcpp (client/interface):
MPD is able to scan a directory and create a music library from its ID3 tags. Ncmpcpp has a library view which lets you add songs/albums/artists to the current playlist, search for tags and edit them in place.
mpg123 is a fast, free and console MPEG audio player software program for UNIX and Linux operating systems. mpg123 was ported to the Windows platform using Cygwin and MinGW. It supports MPEG-1 and -2, layers 1, 2 and 3. Its most common use is to play MP3 files. It also comes as a Winamp plugin.
VLC has a command line interface. MPlayer has also a command line interface, but I am not sure if it can play audio as well.
namp - ncurses audio media player - is a minimalistic console-based audio player for Linux (and macOS). In addition to Winamp keybindings operation it also supports mouse control. The audio formats supported is determined by the underlying system, but generally mp3, wav, flac, etc should work fine.
How to play a single sound file:
Full disclosure: I'm the author of namp. I used cmus, moc and mpd before finally settling on writing my own (very simple) audio player. It's currently not available via
apt so you need to copy & paste some commands from the link above to build it from sources.
mplayer. It's very basic player, but sometimes I find it very useful (for example, I can specify it manually the audio driver I want it to use).
To play a file:
As far as I know it cannot manage playlists.
Just write one line in terminal;) and listen to radio streams
for OGG/OPUS streams
wget -qO- http://ai-radio.org/128.opus | opusdec - - | aplay -qfdat
be sure you have installed opus packages
for listen OGG/Vorbis radio stream just write
You need to have installed vorbis packages
it's in the universe repositories, supports playlists and streaming from web-sources. When startet with -C you can also skip tracks in playlist etc. edit: not sure about ogg support.
A command-line shell for programs like mpg123 and ogg123, music123 plays a variety of sound files using a mpg123/ogg123-like interface. With all the Recommends installed, music123 plays wav, mp3 and ogg files. By simply changing the config file, music123 can play any sound file you have a player for.
(If you install a recent version of vorbis-tools, music123 will handle Ogg Flac and Ogg Speex files too.)
For single file, check
paplay (for Pulseaudio only).
Plugins Input: Ogg Vorbis, MP3, FLAC, Musepack, WavPack, WAV, AAC, MP4, and everything supported by ffmpeg (WMA, APE, MKA, TTA, SHN, ...) and libmodplug Output: PulseAudio, ALSA, OSS, RoarAudio, libao, aRts, Sun, and WaveOut (Windows)
I've used mp3blaster in the past. It supports Playlists, Groups, Repeat, Search. Not many special features.
Following on from the excellent shell pipeline answer given by @artem here's an mp3 version that I've just worked out:
URL=http://direct.fipradio.fr/live/fip-midfi.mp3 wget -qO- $URL | lame --quiet --decode --mp3input - - | pacat
(if you're not using pulseaudio, just swap the
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?