Mp3 streaming - how to guide

From Commwiki
Jump to: navigation, search

Contents

Step 1 - Download and install Winamp and Edcast software

If using a Mac please consult HERE for further client configuration details.

Canstream uses the excellent open source streaming server application Icecast to provide MP3 and Ogg Vorbis streaming capacity to our users.

You may stream to Icecast from either Windows, Unix or Macintosh, and here are some available packages:

  • Windows 9x, 2000, XP, Vista: Edcast

For more information about available compatible software please see the third party section of the official Icecast website.

There is a very clear diagram of the network topology of Icecast streaming here

The following are instructions for streaming using a Windows-based PC and Edcast.

Edcast is an application that can encode your audio into various formats (MP3, Ogg Vorbis, AAC, and so on) and sends it to our server cluster for further distribution.

Download Edcast and start the installation procedure. If you want to be streaming MP3 (most of our users do) then you must also select and install the Lame Encoder (it is not selected by default). Click "Next".

Error creating thumbnail: Unable to save thumbnail to destination

Make a note of the folder you will be downloading to. It will be needed at a later stage if you wish to stream MP3. If you are using the Edcast stand-alone the default path might be:

C:\Program Files\Edcast

Error creating thumbnail: Unable to save thumbnail to destination

For legal reasons, Oddcast and the Lame MP3 encoder cannot be distributed together. When you click "Yes" a webpage will open where the Lame encoder (called lame_enc.dll) is available.

Error creating thumbnail: Unable to save thumbnail to destination

Alternatively, you can download the Lame MP3 codec from here.

Once you have downloaded this, copy it into the Edcast folder, which was noted in an earlier step.

Error creating thumbnail: Unable to save thumbnail to destination

Step 2 - Configuring Edcast

Launch Edcast.

In Edcast you will need to create a new encoder instance. This is done by selecting 'Add Encoder', and right click the new encoder and select configure. This will open up the 'configuration' page. Here you will be able to input all the necessary information to allow your computer to connect to our streaming server cluster. The user specific details such as 'Mount Point' and 'Password' will be sent out to you via email (You need to be an Organisation member of the CMA and have completed the Registration Form). An example set-up would read as follows:

  • Bitrate: 32 (Step 3 covers bitrates in more detail)
  • Quality: N/A (only used for Ogg Vorbis)
  • Samplerate: 22050
  • Channels: 1
  • Encoder Type: MP3 Lame
  • Server Type: Icecast2
  • Server IP: Supplied via email
  • Server Port: Supplied via email
  • Encoder Password: Supplied via email
  • Mount Point: Supplied via email
  • Reconnect: 10s (optional)

If you wish to use the increasingly popular and open-source codec Ogg Vorbis then this is where you would select it.

Error creating thumbnail: Unable to save thumbnail to destination

Under the "YP Setting", you will need to input your station's information: this information will be displayed in your listeners' media players.

Error creating thumbnail: Unable to save thumbnail to destination

Step 3 - Choosing encoder settings

As shown in step 2, we recommend that you choose to use a sample rate of 22050Hz, and a stream bitrate of 32kbps at the most for listeners on 56k modems - and use Mono to effectively halve the bandwidth - as these settings sound acceptable for most Internet Radio purposes.

With MP3 streaming not all encoder settings are valid. For example, if you tried using a setting of 24kbps/44100/Mono then those settings would not be valid as MPEG-1 Layer-3 (MP3) only supports certain bitrate/sample rate settings.

Similarly 22000 is not a valid MP3 sample rate but 22050, 32000 and 44100 are. On the other hand, Ogg Vorbis can support different kinds of bitrate/sample rate combinations.

For MPEG-1 Layer-3 (MP3) (sampling frequencies of 32, 44.1 and 48 kHz)
Bitrate = 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320

For MPEG-2 and MPEG-2.5 (sampling frequencies of 8, 11.025, 12, 16, 22.05 and 24 kHz)
Bitrate = 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160

It is recommended that you trial various settings to ensure you are happy with the output, but please remember that although your audio will sound better with higher bit-rates your are risking excluding lower-bandwidth users such as dial-up modem users.

Step 4 - Select your audio source or Input source

Error creating thumbnail: Unable to save thumbnail to destination
Select input source
Error creating thumbnail: Unable to save thumbnail to destination
No input source

Edcast provides support for a number of audio input types: what appears in the list may vary depending on what devices you have available in your streaming PC. If you have multiple sound devices you may also select which one to use.

If you don't select an input source then there will be a red cross over the microphone symbol. A common set-up would be to take an audio feed from a mixer into the computers sound card 'Line In' port, all you need to do is select this input accordingly.


Error creating thumbnail: Unable to save thumbnail to destination
Connect to server

Now your settings have been configured and your audio source selected, you are now ready to connect. This is done by right-clicking the new encoder you have set-up and selecting connect. If you do have audio going through your set-up you will be able to see activity in the Edcast peak meter.

When you connect successfully you will see below 'Transfer rate' your streaming bitrate and your mountpoint's name i.e Transfer rate 32 kbps (/mountpoint.mp3) If you see this information then you are webcasting.

Error creating thumbnail: Unable to save thumbnail to destination

Step 5 - Create a link for your listeners

Now you are webcasting you will need to create a link on your website to enable people to connect and listen. There are many ways to make this link, but the simplest is to use a standard hyperlink. Point your "Listen Live" link to the following URL:

http://live.canstream.co.uk:8000/yourmountpoint.mp3.m3u

Another method is to create a metafile, this is a bit more complicated and we would generally recommend the method described previously. In Notepad, create a file containing your direct streaming URL (as above).

Now save the file using the "Save as type 'All Files (*.*)'" option. This is important. You can name this metafile file whatever you want but the filename must end in ".m3u".

This metafile file should then be transferred to the webserver where your web pages are. Within the web pages, a link should be created which points to the metafile (filename.m3u in this case) on the server like this:

<A
HREF="http://your_domain_name/file/location/filename.m3u">
Click here to listen to our live stream</A>

This will be sufficient to create the webcast link. To read more about linking to MP3 streams please follow this link here.

Alternatively, or in addition to the above method, you can advise your listeners to copy the direct link url into the chosen media player like this:

If you have any difficulties connecting to our stream using the supplied link, please copy and paste the following url into your favourite media player:

http://serveraddress:port/your_mountpoint.mp3