The start-up messages also report any errors from a misconfigured rmserver.cfg file. Configuration details are available in the RealServer documentation (in
RealAdministrator/Docs) and in the RealNetworks release guide. That information can be most helpful: Thanks to the error report and the documentation, I learned that I needed to add this IP binding before the server could start:
<!-- IP BINDINGS --> <List Name="IPBindings"> <Var Address_01="0.0.0.0"/> </List>
I also needed to set the CPU count with this block:
<!-- S Y S T E M --> <Var ProcessorCount="1"/>
That setting required a command-line flag, as did a bypass for an error with my
/etc/hosts file. At last, I had my working command sequence to launch RealServer:
Bin/rmserver rmserver.cfg --sct --iehp &
Once your server is running, point your browser to the RealServer administration account via the loopback URL:
The admin port number is a random number assigned during installation. See your
rmserver.cfg file for the correct value for your admin port.
From here you simply point and click your way through the server's administrative tools. The GUI is well-designed (Figure 9), help files are a click away, and the experience is totally painless. Alas, we don't have the space here to fully explore RealAdministrator, but I must commend RealNetworks for the obvious effort put into this excellent tool.
Fortunately, you can safely accept most of RealAdministrator's default values and move on towards our goal of producing and transmitting a streaming RealAudio broadcast; however, you should look at and understand the information regarding the server's mount points. Under the Configure topics, click on General Setup, then click on Mount Points (Figure 10).
The base path indicated here is the path to your SMIL files, the point for requests from network clients for the audio stream. You can now verify the server's operation by opening RealPlayer and entering this URL in the File/Open Location dialog box:
This URL assumes the existence of
my_mix.smil at the mount point seen in Figure 10 and tests it via your local host loopback address (127.0.0.1). If the requested file is valid and is located at the configured mount point (
/usr/local/realserver/Content is the default path), RealPlayer will pop up and begin streaming the first audio source in the SMIL list.
Once you have verified the server's correct operation, you're ready for network broadcasting. Open rmserver.cfg and change all references to
localhost.localdomain (or 127.0.0.1) to your actual IP address. Do the same for your SMIL files, then restart your server with the new configuration. For my first network broadcasts, I changed the audio source settings in
my_mix.smil from this address:
to this one:
By the way, run
/sbin/ifconfig to determine your IP address:
ppp0 Link encap:Point-to-Point Protocol
inet addr:184.108.40.206 P-t-P:220.127.116.11 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:2100 errors:0 dropped:0 overruns:0 frame:0
TX packets:2142 errors:0 dropped:0 overruns:0 carrier:0
You will want the value for the
inet addr, not for
P-t-P. Also, note that I would now open my RealAdministrator with this URL:
Obviously, a static IP address is preferable: You enter the address once and leave it. Unfortunately , my address is dynamically assigned, so I need to change it in my server configuration and my SMIL files. I suppose a nice PERL script could take care of all that automatically, but I'll leave that problem for the more resourceful reader.
Regardless of how you update your IP address, you still need a way for people to connect with your server. Easily accomplished by adding this kind of tag to your Web page:
<a href=my_new.ram>My RealAudio Playlist</a>
The RAM (RealAudio Metafile) format is a simple text file containing the address of your SMIL file. Using my IP address du jour again, here's my own
RAM files should be located at the same site as the Web pages containing them. Now clients can connect to your server via Web links or by entering URLs into RealPlayer's File/Open Location dialog box. You can also configure your links to call and stream to a browser's RealPlayer plug-in, but I leave that procedure as another exercise for the diligent student. If you made it this far, then congratulations are in order: You have successfully installed, configured, and deployed RealServer for streaming your media to the Internet.
Icecast is a free open source streaming server licensed under the GPL. It is easy to install, configure, and use, making it possible for anyone with sufficient software and hardware resources to become an instant Internet broadcaster. Icecast 1 supports streaming MP3s and M3U playlists, and version 2 supports streaming Vorbis files. That news should come as a welcome relief to broadcasters concerned about the eventuality of having to pay Fraunhofer for streaming MP3s over the Internet. Vorbis players and plug-ins exist now, with many more on the way, but Icecast 2 is the first streaming Vorbis server. We'll look at both versions of Icecast, starting with version 1.
Streaming MP3 with Icecast 1
Download the latest version of Icecast 1 from the link above into your
$HOME directory and unpack it with
tar xzvf icecast-1.3.8.beta2. Move into your new Icecast directory and run
./configure --help to look at your compile-time configuration options. Finally, run
./configure with your selected options, then
make and (as root)
make install. You will also want to download and build the
shout utility available from the Icecast site. Unpack and build it following the directions for Icecast.
The Icecast installation will create a
/usr/local/icecast hierarchy for its default directory path. The conf and etc directories are of particular importance: They are the default locations for your server and streamer configuration files and your M3U playlists. As with RealServer, your configuration files will need such information as your IP address, server port number, connection limits, and so forth. Complete configuration instructions can be found in the
INSTALL files for shout and Icecast.
Let's prepare an M3U playlist for the shout streamer. M3U files are simple text files listing absolute paths to your MP3s. For instance, here's a section from my test playlist for this example:
The playlist is declared in the conf/icecast.conf file. When you have edited your playlist and configuration files, you can start the server by running 'icecast' in an open xterm. You'll see some messages like these:
Icecast Version 1.3.8.beta2 Initializing...
Icecast comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of Icecast under the terms of the
GNU General Public License.
For more information about these matters, see the file named COPYING.
Starting thread engine...
[01/Mar/2001:16:33:48] Icecast Version 1.3.8.beta2 Starting..
[01/Mar/2001:16:33:48] Starting Admin Console Thread...
-> [01/Mar/2001:16:33:48] Starting main connection handler...
-> [01/Mar/2001:16:33:48] Listening on host 127.0.0.1...
-> [01/Mar/2001:16:33:48] Listening on port 8000...
-> [01/Mar/2001:16:33:48] Listening on port 8001...
-> [01/Mar/2001:16:33:48] Using 'localhost.localdomain' as servername...
-> [01/Mar/2001:16:33:48] Server limits: 10 clients, 5 clients per source, 10 sources, 5 admins
-> [01/Mar/2001:16:33:48] WWW Admin interface accessible at http://localhost.localdomain:8000/admin
-> [01/Mar/2001:16:33:48] Starting Calender Thread...
-> -> [01/Mar/2001:16:33:48] Starting UDP handler thread...
-> [01/Mar/2001:16:33:48] [Bandwidth: 0.000000MB/s] [Sources: 0] [Clients: 0] [Admins: 1] [Uptime: 0 seconds]
-> [01/Mar/2001:16:33:48] Starting relay connector thread...
As with our RealServer example, we're testing Icecast on the loopback address before broadcasting to the network. Now we want to send an MP3 stream to the server:
[root@localhost shout-0.8.0]# ./shout localhost -P itsme
Shout version 0.8.0 - www.icecast.org
[7:38] Size: 7337522 Bitrate: 128000 (94070 bytes/dot)
The server acknowledges the connection:
-> [01/Mar/2001:16:38:35] Accepted encoder on mountpoint /default from localhost.localdomain. 1 sources connected