[General Topics] Menneisyys:
1.4.2.1.2 Connecting to your Icecast2 server

In this section, I elaborate on how streaming clients and mobile multimedia players can connect to your Icecast2 server.

1.4.2.1.2.1 Streaming clients

As has already been mentioned, for a streaming client to connect to Icecast2, it must know the streaming source password (set in the icecast / authentication / source-password), the address: port (127.0.0.1:8000 if it’s running on the same desktop PC) and, finally, the arbitrary mounting point.

For example, in the above-shown VLC batch file,

start vlc.exe --sout-shout-name="Iskelmä Radio" --sout-shout-description="Iskelmä Radio (Finnish)" http://217.30.180.250:8050/ :sout=#transcode{acodec=mp3,ab=32,channels=2}:duplicate{dst=std{access=shout,mux=ogg,dst=source:mennpwd@127.0.0.1:8000/iskelma}}

the bold text, source:mennpwd@127.0.0.1:8000/iskelma, contains all this information.

Here, “source” is the username by default for streaming clients like VLC or the Oddsock.org apps. “mennpwd” is the password I use; “127.0.0.1:8000” is the IP address and port number of the Icecast2 server. In this example, it’s running on the local PC; hence the localhost address. Finally, “iskelma”, as we’ve already seen, is the mount point name.

1.4.2.1.2.2 (Mobile) receiver clients

As has already been mentioned in section “1.4.2.1.1 Mount points”, you can either directly enter the URL (of the form http://your desktop computer IP : port (8000 by default)/mount point) into the player or, alternatively, can create a .PLS and/or (preferably extended, so that it also contains the station name) .M3U file with the URL and a description. Note that these playlist files can have several URLs with separate descriptions. (Also note that I only use PLS files as examples in this tutorial because Nokia Internet Radio doesn’t support M3U files.)

An example PLS file having seven entries:

[playlist]

numberofentries=7

File1=http://111.222.333.444:1234/

Title1=Radio Peili

Length1=-1

File2=http://111.222.333.444:8000/iskelma

Title2=Radio Iskelma

Length2=-1

File3=http://111.222.333.444:1236/

Title3=Arkisto

Length3=-1

File4=http://111.222.333.444:8000/radioVaasa

Title4=Radio Vaasa

Length4=-1

File5=http://111.222.333.444:8000/rspo

Title5=RSPO

Length5=-1

File6=http://111.222.333.444:8000/klf

Title6=KLF

Length6=-1

File7=http://111.222.333.444:8000/rhesa

Title7=Radio Helsinki

Length7=-1

Version=2

Note that it has two non-8000, that is, two non-Icecast2 ports: 1234 and 1236 in the first and third records. I’ll elaborate on this a bit later, in the VLC section. All the other URL’s point to the same Icecast2 server with, of course, different mount points.

Colleting your favorite stations into one PLS file is pretty much useful because, then, it’ll become far easier for you to switch between the radio stations after opening the playlist file. For example, the above PLS file is rendered by Nokia Internet Radio the following way:

By TCPMP, this way:

and, by CorePlayer, this way:

Note that the two latter apps automatically start playing the first station in the playlist (Nokia Internet Radio doesn’t); if it’s a problem, you will want to separate your stations in separate PLS (or M3U) files. Also note that you can transfer these streams to your built-in "favorite" playlists in all these radio clients. Then, you won't need to click / import PLS files more than once.