First, we will download one of the playlist files and examine it. We go to Shoutcast.com and we'll search for my favorite background coding radio station "groove salad". Once we have the results, we right-click on the "Tune In!" button and select "Save Link As..". We'll save the link as "test.pls".
[playlist] numberofentries=3 File1=http://64.236.34.4:80/stream/1018 Title1=(#1 - 2546/7844) Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM] Length1=-1 File2=http://207.200.96.228:8076 Title2=(#2 - 9/10) Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM] Length2=-1 File3=http://64.202.98.51:8032 Title3=(#3 - 15/15) Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM] Length3=-1 Version=2As you can see we have a number of entries in the file which should all be pretty self explanatory. The lines that we are interested in are the ones starting with "File#=". These lines have the URLs to the actual radio streams. As you can see, the only URL that I can use at work is the first one because it uses port 80 (the standard http port) which my workplace's firewall will let me connect to. The way we tell is uses port 80 is the port designation ":80" following the URL or IP address in this case.
Alright, now we want to use this URL to listen to some music. We'll first play this stream from the command line so that we are intimately familiar with all of the details before we start using the GUIs. We are going to use our old friend wget and pipe it's output into mpg123.
wget http://64.236.34.4:80/stream/1018 -q -O - | mpg123 -q -We use CTRL-c to stop playing.
With "-q" we told wget to be quiet (not print downloading statistics) and with "-O -" we told it to output to stdout (- is substitued for stdin and stdout with most commands). Next we used "|" to pipe the output to mpg123 and we told mpg123 to be quiet with "-q" and to play stdin with a "-".
![[logo]](logo.png)