Icecast
m (→Where do your listeners connect to your broadcast stream?) |
m (test repo is for testing) |
||
| Line 16: | Line 16: | ||
When all goes right the system will -if necessary- also update the baselayout pisi package that is by default already installed in your Pardus system. (If your system lacks a version of baselayout that is recent enough it will prompt you to install it when you try to run Icecast). The updated baselayout pisi package takes care of adding a group and user for the Icecast service that is to be implemented in your Pardus system. | When all goes right the system will -if necessary- also update the baselayout pisi package that is by default already installed in your Pardus system. (If your system lacks a version of baselayout that is recent enough it will prompt you to install it when you try to run Icecast). The updated baselayout pisi package takes care of adding a group and user for the Icecast service that is to be implemented in your Pardus system. | ||
| − | + | When the package gets in stable repo, you can download the needed pisi packages by Package Manager. | |
| + | |||
| + | *'''For testing purpose,''' you can use these ones till they get in stable: | ||
http://paketler.pardus.org.tr/pardus-2008-test/icecast-2.3.2-1-1.pisi | http://paketler.pardus.org.tr/pardus-2008-test/icecast-2.3.2-1-1.pisi | ||
Revision as of 14:56, 25 March 2009
Contents |
About Icecast, what is it?
An Icecast (http://www.icecast.org) server is capable of streaming content as Vorbis over standard HTTP, Theora over HTTP, MP3 over the protocol used by SHOUTcast, AAC, and NSV over the SHOUTcast protocol. Thus, installing an icecast server enables one to broadcast audio and/or video streams on the internet.
The Icecast server actually distributes your streaming content on the worldwideweb. It does not create the streaming content (or soucre audio or video) itself. For the latter purpose Icecast uses external programs, so-called "source clients", to originate the streams, e.g. the Icecast project includes a source client program known as IceS. Another example of a source client is IDJC (see below).
The source runs typically in the place where the audio is generated (e. g. a studio) and the Icecast server in a place where a lot of bandwidth is available (e. g., a colocation). However as a Pardus Linux user one can easily setup an Icecast server at home, just like other servers such as the Apache webserver. In case a lot of upload bandwidth is available at home (e.g. glass-fiber internet connection) multiple listeners can listen to your broadcasted stream by visiting your home based Icecast server using standard media players. Alternatively, when upload bandwidth capacity is limited, one can choose to distribute the icecast stream (still hosted on your private PC) to a broader audience via p2p solutions, in which a listener sends the signal forward to other listeners and maximum number of simultaneous listeners is theoretically unlimited. The disadvantage is that listeners then have to download and install a p2p software package to be able to listen to your stream.
The maximum capacity of your private Icecast server in terms of simultaneuos listeners depends on the upload bandwith of your internetc onnection and the quality of your broadcasted stream (bitrate), a higher quality of your stream consumes more of your availeble bandwidth. There are calculation examples on the web if you Google for this. Roughly the upload bandwidth needs to be at least number of listeners (N) * stream bitrate (Kbps), there is protocol overhead on top of that (say 10% to be safe). For example, an aaverage ADSL internet connection (with limited upload capacity as compared to download capacity) will enable a maximum of only 10 to 15 simultaneous listeners when you broadcast audio with normal quality (say 64 Kbps) if the ADSL upload bandwidth is about 1 MB/s. Remember that the upload capacity on the server side (this is your side) is the downlaod/downstream capacity on the listeners side. The more listeners that extract your audio stream from your server, the less upload bandwith from your side of view remains!
Icecast has similar functionality to the proprietary media server program SHOUTcast, by Nullsoft.
Installing the Icecast streaming server in Pardus Linux
The installation of an Icecast streaming server in your Pardus Linux system is made very easy since it has been packaged as a PISI package upon request by a Pardus user (yes that was me). All it takes is installing the icecast pisi package from the Package Manager graphical user interface or if you prefer from the command-line just like installing any other pisi package.
When all goes right the system will -if necessary- also update the baselayout pisi package that is by default already installed in your Pardus system. (If your system lacks a version of baselayout that is recent enough it will prompt you to install it when you try to run Icecast). The updated baselayout pisi package takes care of adding a group and user for the Icecast service that is to be implemented in your Pardus system.
When the package gets in stable repo, you can download the needed pisi packages by Package Manager.
- For testing purpose, you can use these ones till they get in stable:
http://paketler.pardus.org.tr/pardus-2008-test/icecast-2.3.2-1-1.pisi
http://paketler.pardus.org.tr/pardus-2008-test/baselayout-3.1-96-59.pisi
Using Icecast, how to start streaming?
Although icecast can be started from the command-line in the Konsole (e.g. with service icecast start/stop) it is easier and reccommended to start and stop your freshly installed Icecast streaming server by means of TASMA, the graphical user interface for configuring your Pardus system.
Upon installation icecast can be used as a service that can be turned on and off. An entry for Icecast will have appeared in Tasma > Service Manager. Here you can start or stop the service and configure whether this service should be started upon booting your Pardus system or not.
However you are not really on air yet once you have started the service.
You will have to provide the Icecast server with content, i.e. a stream to be broadcasted by the service. Once your source-client starts to send data to the Icecast server, it will start broadcasting, and now you are on air! You can check this by opening your webbrowser and entering the following URL in the address-bar: http://localhost:8000 (alternatively instead of localhost, 127.0.0.1 can often be used).
Where do your listeners connect to your broadcast stream?
Depending on what format you are broadcasting, the exact URL for listeners to connect to your stream may vary. Of course listeners will have to enter the external IP-address of your internet connection to start downloading your broadcast stream from your Icecast server. If you are unsure just visit http://whatismyip.com to see what your external IP actually is.
When you broadcast in MP3 format the default address (when you broadcast a single stream at once and do not set a specific mount point, see below) will be:
http://external-IP-adress-of-your-internet-connection:8000
When you prefer broadcasting in OGG format and/or you want to provide multiple broadcast streams from a single Icecast server, you have to specify a so-called mount point.
An Icecast mount point is a connector between an icecast source stream and Icecast listeners. So a mount point entry in the Icecast configuration file will contain settings regarding the streaming source (authentication, stream dump file), about the listeners (number of listeners, authentication type for listeners) and mount point specific settings like the name of the mount point, the name of the mount point where the new listeners will be redirected to if the current mount point has reached the maximum number of listeners. For some of these enhanced features you might have to edit the file located in /etc/icecast.xml.
When using e.g. MUSE or IDJC as source-client you probably do not have to edit the icecast.xml file at all. In these clients multiple broadcast streams can be entered in the preferences window (the image below shows this window for IDJC), and the mount point can also be named. For OGG streams tha mount point has to end with .ogg, e.g. stream.ogg and then the listening URL would be http://external-IP-adress-of-your-internet-connection:8000/stream.ogg.
Server preferences window in IDJC
When you want to offer streams at different bitrates you may e.g. specify stream64.ogg and stream128.ogg as mounting points, the properties of each mounting points can be set up in the preferences window of the source-client. Likewise you can also offer different streams at once like dance.ogg, jazz.ogg, classic.ogg, whatever you like.
Server preferences window in MUSE
Once you have started streaming with Icecast you can also find the excat listening URLs from the index page at http://localhost:8000
An example online is: http://82.201.100.10:8000/ Here you can click the Click to listen links to start listening to the streams. Since in this example the broadcast stream comes in MP3 fornat, the listening links end up with the playlist extension .m3u and are opened in e.g. Amaraok. Note that the name of the mount points do not need an extension here, when the broadcasts were in OGG format all mount point names would have ended with the extension .ogg.
See the next section for more on source clients.
However first an important note op portforwarding.
Portforwarding to guide listeners to the right (internal) place
Nowadays it is not unusual for people to be connected to the internet from behind an IP router and have e.g. a PC and one or more laptops connected to the internet via the router. Each device in the internal network (whether a PC, printer, laptop or netbook) is assigned an internal IP address. Now listeners that want to connect to your stream from the internet, (i.e. from outside) connect to your external IP-address but must be guided by the router to the proper device (the one where the Icecast server is actually running and serving your stream) and thus to the correct internal IP-address! The guiding process between external IP and internal IP adresses traffic is also caleld portforwarding and must be configured in the router preferences.
It is very much recommended when you are in such a setting to make these internal IP addresses static instead of variable. How to do so can be found elsewhere in this wiki.
When you assign fixed internal IP-addresses to your network devices, you only have to do portforwarding configuration for your router once, when you do not, you have to adjust these settings everytime you boot up, because the internal IP address by default can be variable.
Since the default port being used by Icecast is port 8000, all that is neede is to set the proper forwarding settings )inside IP and outside IP) for port 8000 in the router preferences.
Where the prefereneces of the router can be found differs from manufacturer and type of router device. Some of these can be found just by entering an internal IP address in your webbrowser, e.g. http://10.0.0.138 (Thomson Speedtouch 580).
For specific help on how to enable portforwarding for you specific router you may want to visit: http://portforward.com/ which offers free help for numerous types of router devices.
Icecast source-clients available in the Pardus repositories
Currently the Icecast source-clients Darkice, Muse and IDJC (recommended) are available as pisi packages in the Pardus repositories. Other source-clients like Ices may be installed from source if you like.
IDJC, Internet DJ Console (http://web.bethere.co.uk/idjc/), is a graphical shoutcast and icecast client that runs under GTK+ and the JACK audio connection kit. In short, it's an Internet radio application for making a live radio show.
Main features: two main media players with a crossfader, microphone signal processing, IRC track announcements with X-Chat, automatic stream shut-off timer, MP3 or Ogg streaming at various bit rates, record your live show for playback afterwards, optional Skype integration.
IDJC can easily be installed using the IDJC pisi package available in the repositories. From within the preferences window of IDJC you can specify your locally installed icecast server as address to send your radio-stream to for broadcasting. Visit the IDJC homepage for detailed operation instructions.
External links for more information
http://worldforum.pardus-linux.nl
--Michiel 11:25, 25 March 2009 (EET)
