Using VLC from the command line
As usual, VLC does it all. Use
cvlc to run VLC on the command line.
VLC can also be invoked with a
ncurses interface, as follows:
$ nvlc http://provisioning.streamtheworld.com/pls/CKFRAM.pls
$ 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://184.108.40.206:8120
See below to read how to use
cmus also opens .m3u and .pls streams
cmus also knows to open
.pls streams. This means less digging or "background work" to extract the stream URL from those files.
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
URL=$(grep -m 1 --null http "$1" |sed s/^.*http/http/ |tr -d '\r')
mplayer -prefer-ipv4 "$URL"
To navigate between directories of
.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.
Here is a nice write-up describing
pyradio can also be installed and found as follows:
$ pip3 install pyradio
$ sudo find / -iname pyradio
Then there is also
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.
More details about yet another CLI music player,
mp3blaster can be found here
$ sudo apt install mp3blaster