HOSTING RADIO on INTERNET or LAN!!!

Posted by MUKESH KUMAR on 19 Aug 2011


first u need windows media encoder for this Creating an Internet Radio Station. This article describes a simple and comparatively inexpensive way to build an Internet radio station that streams live audio over the Internet. Internet radio generally is an audio stream that sounds like an over-the-air radio station. It is difficult to put a label on exactly what Internet radio is because, unlike traditional over-the-air radio, you can create an Internet radio experience in a number of ways, including:
  • Live stream. You start with the over-the-air model of a radio station, but instead of plugging the program audio signal into a transmitter that sends the signal over the airwaves, you plug it into an encoder and server that send the signal over the Internet. In the following figures, the solid line arrows indicate the path of the live signal or stream; the broken line arrows indicate file transfers.The live stream type of Internet radio
  • Figure 1. Live stream type of Internet radioThe end-user experience is like listening to a traditional over-the-air radio station.
  • Automated program signal. Many over-the-air radio stations use automation to create program content. Production personnel and announcers produce individual audio segments (such as music, announcer voice-overs, and commercials), and then create a playlist that an automation system uses to play the segments. These automated systems can also be used for Internet radio. The output of the automated system is a program audio signal.The automated program signal type of Internet radio
  • Figure 2. Automated-program-signal type of Internet radio
  • Simulcast. Many over-the-air radio stations both stream and broadcast their signals, in a process called simulcasting.The simulcast type of Internet radio
  • Figure 3. Simulcast type of Internet radioAlthough a simulcast stream is technically not an Internet radio station because it is intended primarily for over-the-air delivery, the end-user experience is the same.
  • Broadcast server-side playlist. This is another form of automation. The difference is that with automated radio, a live stream is encoded from the program signal produced by an automation system. With a broadcast server-side playlist, there is no live audio signal; individual program segments are encoded into Windows Media Audio (WMA) files and the playlist is run on a server running Microsoft® Windows Media® Services, so the server is the automation system.The broadcast server-side playlist type of Internet radio
  • Figure 4. Broadcast-server-side playlist type of Internet radio
  • On-demand playlist. This is a third form of automation in which the automation system creating the Internet radio experience is Microsoft Windows Media Player. Individual audio segments are produced, and then encoded to Windows Media Audio (WMA) files. The playlist is created in a Windows Media metafile with an .asx extension; the Player downloads the file and plays the items in the playlist.The on-demand playlist type of Internet radio
  • Figure 5. On-demand playlist type of Internet radioOne advantage of an on-demand playlist is that the content can be streamed from any server.
This article and its accompanying video describe how to create an Internet radio station using an automated program signal. The article divides setting up an Internet radio station into the following topics:
  • Producing the program content
  • Encoding the live stream
  • Configuring the firewall
  • Converting the IP address
  • Hosting the live stream
  • Playing the live stream
  • For More Information


  • Producing the Program Content
The first and most important part of a radio station is its content, which is a live program signal that contains all the individual elements, such as announcer, music, and commercials, played in sequence. In traditional live radio, a disc jockey handles the transitions or segues between elements in real time. For example, the DJ makes announcements, segues to music from a CD, and then segues from music to a commercial. In our Internet radio system, production personnel and announcers create individual program elements, but then a Microsoft Windows-based automation program handles the segues. There are a number of radio-automation systems ranging in price from a little over $1,000 to well over $50,000. In this setup, I will use a radio-automation system from Broadcast Software International, called Simian. Two other similar systems are RMSLive and Audio Vault. For complete details about how to create content for an automation system, see the Help documentation for the product. Basically, the workflow of the automated station is as follows:
  1. Segments or elements are produced. An audio-production studio or station is used to record, digitize, edit, and render the individual audio segments. The studio setup can be as simple as a microphone, computer with a digital audio workstation program, and various devices, such as CD players. Audio from the microphone and devices is digitized on the computer, and edited using the digital audio workstation. The producer then renders each audio segment to an audio file. For example, in one editing session, a producer might create five announcer segments that introduce music segments and identify the station; four commercials; and six music segments from CDs. Information about each segment is included as metadata in the audio files. After the segment files are created, the producer saves the files to the automation computer on the local area network (LAN).
  2. Playlists are created. A playlist file is created using the format of the automation program. The playlist contains the segment files as well as timing information. In many cases, one segment begins playing at the end of the previous segment, however, a segment can also begin at an explicit clock time. For example, a news segment can be scheduled to start at exactly 2:00 pm. Playlist files can often be created on a computer other than the computer actually running the automation program. For example, you could create playlists on an office computer, and the automation computer could access the playlist file over the LAN.
  3. The automation program runs the playlist. The individual audio segments are played in order per instructions contained in the playlist, and the automation system outputs a program audio signal. The signal is sent to the computer’s sound card output, and the signal can then be patched or routed to any audio input. If the signal is destined for over-the-air broadcast, it is patched into a radio transmitter. In our scenario, the signal is patched into the computer running Microsoft Windows Media Encoder, which, in our case, is the same computer.

Encoding the Live Stream

The program signal is encoded into a stream using Windows Media Encoder. To set up the encoder, I open the program and do the following:
  1. On the Windows Media Encoder taskbar, click New Session.
  2. In the New Session dialog box, click Broadcast a live event.
  3. In the New Session Wizard, enter the following information:
    • Device Options. Select the Audio check box only, and click the appropriate sound card.
    • Broadcast Method. Click Pull from the encoder (the server or player initiates the connection.)
    • Broadcast Connection. Enter an HTTP port number. I will use the port 8081. I could also click Find Free Port, and the encoder would generate a random free-port number. Remember this port number because it will be used later to configure the firewall and server.
    • Encoding Options. Select one or more bit rates. I will encode two bit rates: 70 Kbps and 24 Kbps. When a client connects to the stream, the server will automatically send the stream that is most appropriate for the current bandwidth. Keep in mind that the bandwidth on the networks between the encoding computer and Internet server must be high enough to handle both streams. However, the stream from the server to the client will contain only one of the bit rate streams.
    • Archive File. Because my station will broadcasting continuously, it would not be appropriate to create an archive file of the stream.
    • Display Information. Enter information that will be displayed on the Windows Media Player interface, such as title and copyright.
  4. Click Finish to close the wizard.
  5. On the Tools menu, click Broadcast Security.
  6. In the Allow area, click Add, and then type the following information:
    • The IP address of the Internet Windows Media server. You can obtain the address from the streaming service provider. The address is also displayed on the encoder interface after the server connects to the stream in the Connections tab of the Monitor panel.
    • The IP mask value of 255.255.255.255. With this value, only the server can connect to the encoder stream.
    If you do not restrict access to your encoded stream with Broadcast Security, other computers can connect directly to the encoder. This not only reduces available bandwidth on the networks leading to the encoder, it adds to the load on the encoding computer, which can impair the quality of the stream. If you want to monitor the encoder stream on another computer, add the IP address of the monitor computer to the Allow list.
  7. Start Windows Media Encoder. Check the Monitor panel to make sure the encoder is running.
  8. Open the mixer for the sound card by double-clicking the speaker icon on the taskbar. On the Master Volume mixer, make sure the Line In control is muted. If Line In is not muted, a feedback loop will be created in the next step, which could damage your speakers, as well as your ears.
  9. On the sound card, connect the line output to the line input. The program signal from the automation system is patched into Windows Media Encoder.
  10. On the mixer, on the Options menu, click Properties.
  11. On Properties, select Recording.
  12. On the Recording Control mixer, select Line In, and adjust the control to optimize audio levels by reading the VU meter in the Audio panel of the encoder.
The encoder is now generating a live stream, but the data will not go anywhere until a client (player) or server connects to the encoder.

Configuring the Firewall

The computers on my LAN are connected through a router device that includes a firewall and other functions that enable me to connect my LAN safely to the Internet. In my setup, I use a Microsoft Broadband Networking Wireless Base Station, but there are a number of similar router products from companies such as Linksys and Netgear. The router is connected to the modem supplied by my DSL service provider. Figure 6 shows how the network components connect. For more information about Microsoft home-networking products, see the Microsoft Product Information Center page.How the router, modem, and firewall connect
Figure 6. Connections between all the components of the stationAlthough the firewall is configured by default to prevent Internet computers from connecting to computers on my LAN, in my case, I need to allow Internet computers to connect to the encoder port to receive my live stream. I have already configured the encoder to allow just the server to connect. To enable the server to connect through the firewall, I open the port using the Persistent Port Forwarding feature of the router.
To enable Persistent Port Forwarding on the firewall
  1. Open the Broadband Network Utility of the Microsoft router.
  2. Open the Base Station Management Tool to view and modify the LAN configuration.
  3. Click Security, and then click Port Forwarding.
  4. In the Persistent Port Forwarding window, enter the following information on a new line:
    • Private IP address and port. Type the current IP address of the encoding computer and the port (8081).I use DHCP to dynamically assign IP addresses, so this address might change. However, the Microsoft router keeps track of the changes, and automatically updates this setting.
    • Description. Type a description for the port-forwarding settings, such as ContosoLiveStream.
    • Inbound port. Type the same value you entered for the private port.
    • Type. Type TCP for the type of transport protocol, which is the protocol used by the encoder.
    • Enable the settings.
  5. Close the management tool.

Converting the IP Address

I could go directly to my streaming service provider and configure the server to connect to the IP address assigned to my modem and port 8081. However, my DSL provider dynamically assigns IP addresses to my modem, meaning that it can change at any time. If I configure the server with the dynamic address, the server will not be able to connect to the encoder when the DSL service changes my modem address. To make sure that does not happen, I could apply for a static address. However, I choose to go the less-expensive route, and use a dynamic DNS provider that automatically updates the link.
To use a dynamic DNS provider
  1. I open an account with a dynamic DNS provider, such as No-IP.com or dyndns.org.
  2. I log in to my new account, and choose to add a host.
  3. In the add-a-host form, I enter the following information:
    • Host name. The name I want to give my host, in other words, my modem. For example, I type ContosoRadio.
    • IP address. The current IP address of my modem, for example, 101.101.101.101.
  4. To connect to my host, I use the address supplied by the dynamic DNS provider. My address using No-IP.com is ContosoRadio.No-IP.com.
  5. When a client connects, No-IP.com redirects the client to the current address of my modem. When my modem address changes, it is updated in the No-IP.com database, so clients can continue to connect to my host at ContosoRadio.No-IP.com.

Hosting the Live Stream

I actually use two Internet service providers (ISPs): the first provides the DSL service that connects my LAN to the Internet; the second provides the streaming media service. I could buy a server and host my own live stream, but I would need a lot of advanced networking capability and knowledge to configure and maintain the service. I would also need a fast Internet backbone connection to handle hundreds or thousands of simultaneous connections. The streaming service provider handles all the details and advanced networking issues for me, so I can concentrate on creating the content. To check out service providers that support Windows Media, search for hosting services on the Windows Media Service Provider page. After obtaining my URL from the dynamic DNS provider, I can configure the servers at the streaming service provider to source from my encoding computer by doing the following:
  1. Locate the service provider’s Web site, and log in to my account.
  2. Go to the content configuration Web page to view details of my broadcast and on-demand accounts.
  3. I choose to view or modify the broadcast account, and on the details page enter the following information:
    • Publishing point name. The name that end users will access to connect to my radio stream. My streaming service provider, Playstream.com, assigns a name for me, ContosoLive. Notice that Playstream.com actually calls the publishing point a mount point, but it is the same thing.
    • Publishing-point source address. The URL to which the server connects to receive my stream, in other words, the address and port of my encoding computer, for example http://ContosoRadio.No-IP.com:8081.
    Note You are not typically configuring the servers directly, but entering information into a form that runs a server-side program that makes the modifications.

Playing the Live Stream

After making all the necessary configurations, you can connect to the stream with a client on the Internet by doing the following:
  1. Open Windows Media Player on a client computer.
  2. On the File menu, click Open URL, and then type the URL of the stream from the streaming service provider, for example, mms://win.playstream.com/ContosoLive. You can also test your Windows Media metafile, which your service may provide, for example, http://easylink.playstream.com/winlive/ContosoLive.wvx.
It is a good idea to regularly monitor your live stream with a typical Internet client so that you know what the end-user experience is like. If you fail to connect, retrace your steps and make sure everything is configured correctly. You can monitor the stream at different points in the chain to pinpoint where the trouble might be. For example, you can connect the Internet client directly to the encoder by connecting directly to the modem, http://101.101.101.101:8081, and then after the dynamic DNS provider, http://ContosoRadio.No-IP.com:8081. If the stream is often interrupted by buffering, make sure you have plenty of bandwidth upstream to your DSL provider and downstream to your client computer. If you continue to experience poor streaming reception, contact your streaming service provider. If your client connects to the high-bit-rate stream, you can test your low-bit-rate stream by temporarily changing the Player settings:
  1. In Windows Media Player, on the Tools menu, click Options.
  2. Click the Performance tab, and then click Choose connection speed.
  3. Choose a speed that is just above your low-bit-rate stream. For example, if your low-bit-rate stream is 24 Kbps, choose Modem (28.8 Kbps).
  4. Open the URL of the stream from the service provider. The server delivers the low-bit-rate stream.

For More Information

{ 0 comments... read them below or add one }

Post a Comment