Using VLC from the command line
As usual, VLC does it all. Use cvlc
to run VLC on the command line.
cvlc http://80.237.154.83:8120
cvlc us.darkmatter.aac.48k.m3u
VLC can also be invoked with a ncurses
interface, as follows:
$ nvlc http://provisioning.streamtheworld.com/pls/CKFRAM.pls
or
$ vlc -I curses http://provisioning.streamtheworld.com/pls/CKFRAM.pls
Hit the H key for the much needed help.
Here is a screenshot of nvlc
with a music playlist:

mplayer in IPv4 networks
If your router only works with IPv4, you will need to add the option -prefer-ipv4
. More recent mplayer
versions require this.
mplayer -prefer-ipv4 http://80.237.154.83:8120
See below to read how to use mplayer
with .m3u
and .pls
streams.
cmus also opens .m3u and .pls streams
Unlike mplayer
, cmus
also knows to open .m3u
and .pls
streams. This means less digging or "background work" to extract the stream URL from those files.
Furthermore, cmus
looks nice and offers several views, a file browser and many configuration settings. cmus
is available from the standard Ubuntu repositories. To get up to speed with cmus
, first read the tutorial by typing the following command:
$ man cmus-tutorial

Open .m3u and .pls streams anyhow with mplayer
If you do not like cmus
, or it is unavailable, mplayer
can be made to do the same. For that purpose, I wrote the following mplay
script:
#!/usr/bin/env bash
URL=$(grep -m 1 --null http "$1" |sed s/^.*http/http/ |tr -d '\r')
mplayer -prefer-ipv4 "$URL"
To navigate between directories of .m3u
and .pls
files, one could use the CLI file browser ranger
, configured to call the above script for these file types. The struggle of setting this up pays itself back by being the fastest access method. This is what I personally use in a daily setting.

pyradio
Here is a nice write-up describing pyradio
Note that pyradio
can also be installed and found as follows:
$ pip3 install pyradio
$ sudo find / -iname pyradio
$ ~/.local/bin/pyradio
moc
Then there is also moc
.
MOC (music on console) is a full-screen ncurses
based console audio player.

Select a file from some directory using a menu similar to Midnight Commander, and MOC will start playing all files in this directory beginning from the chosen file. There is no need to create any playlists, even though MOC handles these as well.
mp3blaster
More details about yet another CLI music player, mp3blaster
can be found here
$ sudo apt install mp3blaster

mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing http://-----.net:80/live. Resolving ------.net for AF_INET... Connecting to server -----.net[---.---.---.---]: 80... Resolving -----.net for AF_INET... Connecting to server -----.net[---.---.---.---]: 80... Cache size set to 320 KBytes Cache fill: 8.74% (28631 bytes) libavformat version 54.20.4 (external) Mismatching header version 54.20.3```
– aderchox Aug 23 '20 at 09:20