[General Topics] Menneisyys:
1.4.2 Icecast2-based streaming

The following alternatives all require the usage of an Icecast2 server. (Note that, as an exception, VideoLAN VLC doesn’t necessarily need it unless you stream to a Symbian handset from it. The same stands for WME as well - it's a server on its own.)

1.4.2.1 Icecast2

Icecast2 (Wiki page HERE) is an open source equivalent of Nullsoft’s SHOUTcast server, which does exactly the same. There, effectively, there isn’t much difference between SHOUTcast and Icecast2; geeks and other pros tend to prefer the latter; therefore, I also elaborate on it in here, instead of the closed-source, proprietary SHOUTcast.

You can get it HERE. The download links are on the top of the page; if you have Windows, you’ll want to download the icecast2_win32_v2.X.X_setup.exe file. After installation, start it. Go to Configuration / Edit Configuration and edit the file in the following way:

Change the three passwords from “hackme” to anything under icecast / authentication. For example, in THIS screenshot, I’ve changed all the three to mennpwd. You don’t need to use the same word for all the three passwords.

The number of concurrent streams under icecast / limits / sources. If you plan to transcode more than two streams with a multiple stream-capable source client at the same time, you must modify this parameter too. For example, in THIS screenshot, I’ve set it to 30 so that I can have 30 concurrent, different streams (we’ll see in which cases you’ll find this useful).

After editing, just close the Notepad window and answer Yes to saving it.

Now, when you click the Start Server button, it starts listening to incoming streams as can be seen in HERE. You won’t need to do anything else to Icecast2, other than starting / stopping the server if you need it or don’t need it any more.

Note that, by itself, Icecast2 doesn’t stream anything; it needs other clients (“source clients”), whose streams it just relays to the Net. That is, effectively, it uses the famous three-tiered Web application server model already known to many IT gurus, where the listening client equals to the Web browser, the middle tier (the application / Web server) is Icecast2 and the database back-end is, in this case, the transcoding source clients. It’s the stream of the latter that Icecast2, in the middle tier, “just” relays further to the client listener(s).

The streaming clients introduced in the next subsections are all geared towards using Icecast2 as the real streaming server. The only exceptions are:

VideoLAN VLC, which can also operate in a standalone mode (but, then, produce a stream not compatible with some media player clients, including Nokia Internet Radio);

Orb and, finally,

WME, which are also completely independent of Icecast2.

1.4.2.1.1 Mount points

You must be aware of the so-called ‘mount points’. Particularly when you stream more than one radio stations at the same time (in cases, you’ll want to prefer this solution to the others because it frees you from having to remote control the sound source), you will want to know what a mount point is.

When you configure an Icecast2 source client (VideoLAN VLC, Oddsock.org’s apps etc) to stream their contents to an Icecast2 server, you not only pass these clients the Internet address of the Icecast2 server they’ll need to connect to, but also an additional parameter that, later, uniquely identifies the stream: the mount point.

For example, let’s assume you stream two streams to your Icecast2 server from your VideoLAN VLC client. To quickly fire up the streams, you create a batch file with the following contents:

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}}

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

Here, look for the iskelma and radioVaasa parameters. It’s there that you tell Icecast2 where to “map” these streams to. If you use these two mount points, you can access (listen to) these streams from a SHOUTcast/Icecast-compliant mobile client (TCPMP, CorePlayer, GSPlayer, Nokia Internet Radio, LCG Jukebox etc.) by simply supplying the mount point after the address and IP of your server like in the following direct URL you can directly enter in any of these players:

http://111.222.333.444:8000/iskelma

and

http://111.222.333.444:8000/radioVaasa

(111.222.333.444 is my desktop computer's imaginary IP address. You'll, of course, will need to provide yours. Use What Is My IP if not sure.)

Of course, prefer defining a playlist .pls file instead of entering URL’s like these into a player to make your life even easier because of the direct file access in most of these apps. The contents should be as follows:

[playlist]

numberofentries=2

File1= http://111.222.333.444:8000/iskelma

Title1=Radio Iskelmä

Length1=-1

File2=http://111.222.333.444:8000/radioVaasa

Title2=Radio Vaasa

Length2=-1

Version=2

(Note that you can leave out the Title and Length attributes. However, if you do so, the current beta of Nokia Internet Radio will crash and will be needed to reinstalled for it to work again.)

You can use any mount point name and you don’t need to explicitly configure the Icecast2 server to know anything about them. That is, you don’t need to tell Icecast2 “hey, I want to use the mount point “mystation”; let me configure you” at all. This is certainly very good news: only the original clients (transcoding the original Internet radios and streaming the transcoded contents to Icecast2) and the mobile players need to be aware of (that is, use) the same mount points.

An Icecast2 screenshot of showing several mount points being in use at the same time, with VLC acting as a streaming client: