Although there are a lot of GUI media players out there, it is also possible to listen to your favorite music from the command line. The mpg123 tool allows you to play a song, a playlist or even a stream and has all major features of a GUI media player: control keys, equalizer, replay gain, gapless playback.
Some well known supported audio interfaces are ALSA (Advanced Linux Sound Architecture), JACK (Jack Audio Connection Kit), OSS (Open Sound System), PulseAudio (sound server for POSIX and Win32), Win32 (Windows WaveOut).
The decoder part of mpg123 may be used as a library in other applications.
Use the “-v” option to increase verbosity level and display detailed info. Also use quotes for files with spaces in their names.
Play audio file from local storage:
mpg123 -v "Music/Ugly Kid Joe - Cats in the Cradle.mp3"
Play stream, just like local files; provided stream is “borrowed” from SoundCloud, thus might not be available anymore:
mpg123 -v http://media.soundcloud.com/stream/PHn5m1zDrhV2?stream_token=chpdF
Play a remote or local playlist using the “[email protected]” parameter, to read filenames from playlist:
mpg123 -v [email protected] http://www.netrock101.com/live365.m3u