|
Tutorials.
Creating Internet Radio with Unreal Media software - simple
step-by-step instructions.
1. What you must have in place:
a. Some means of capturing live audio such as FM Tuner card,
line-in connection etc.
b. Broadband Internet connection - you will upload streams to
listeners, so the better your upload bandwidth is, the more
concurrent listeners you will be able to support.
2. Setting up the server side:
a. Install Unreal Live Server on the computer with live audio
source. Run config program to create live source. Choose buffered delivery mode
and DSL profile; you can tweak it later according to your quality requirements.
b. Install Unreal Media Server on the computer that has
broadband Internet connection. It can be the same computer where your Live
Server is installed, another computer in the LAN, or remote computer
hosted on some ISP. Create live broadcast using config program. If Media
and Live servers are both installed on the same LAN or same computer, use
static live broadcast. Otherwise use dynamic live broadcast.
You do not need Windows 2003 Server OS (required by Microsoft Media Services) -
XP Home/Pro are good enough for Live and Media servers.
3. Creating a web page with Windows Media Player embedded:
Suppose the alias of your live broadcast is "radio" and your Media
Server IP is 12.13.14.15. Then specify "mms://12.13.14.15:5119/radio" for
Windows Media Player. Download the sample page
that does exactly that. Note that 5119 is the Media Server port which must be
open in firewalls; this port can be changed.
That's it. Happy listening! Now - what if you decide to run Internet TV
services? The setup procedure is the same, but bandwidth requirements are about
ten times more than radio.
Practical advices for setting up IP streaming services.
1. Overview of the problem.
"I want to stream. I am new to it. How do I go about it?"
"I have a DSL with static IP. Now I can set up a streaming service out of my
home computer and serve the world!"
"I was referred to the company who charges $5000 for month. How do I know I am
not paying too much? How do I know my customers are satisfied?"
"After I bought the services, I discovered that my corporate firewalls block
everything except HTTP port 80. But the demo was presented at their office and
everything worked great... Looking for a new job now..."
Rapid development of IP networks and last mile technologies has created the
possibility of setting up streaming services for virtually anybody with
Internet access.Home DSL users, small businesses, technology and media
companies, entertainment and telecommunications companies – they all want
establishing streaming services to be as easy as setting up web server for
their web sites."Why should it be more difficult?" they ask. "We want it right
here and right now".
Unfortunately, the technology in its current state does not provide simple way
of setting up streaming services. The main reason for that is – streaming is a
distributed technology involving many computers, networks and large amounts of
bandwidth.
On today’s market one can find hundreds of offers & free products for
streaming solutions, beginning with free ones providing good quality and free
ones providing bad quality and ending with offers costing tens thousands of
dollars monthly, providing good quality and the same providing real bad
quality. They all use different players, servers, protocols, formats, software
encoders, hardware encoders, web interfaces.
How does one make decision in this wild technology world? The only thing that
really helps is education – one needs to learn the technical side of the
subject. In this article we will try to emphasize the major practical aspects
of the streaming technology from the service provider perspective.
2. Understanding the BANDWIDTH requirements.
The most important component involved in streaming and the least understood by
majority of non-tech people who wants to stream, is the BANDWIDTH
. When you buy a simple webcam, you will find a CD with great looking
Video-over-IP applications and you will read: "Anybody can see your webcam
anywhere in the world. Just be connected to Internet."
This is a typical example of misleading marketing information, so common in
today’s consumer technology.
Large amounts of bandwidth are required to stream audio/video.
What does that mean?
Consider a stream flowing over a network. Network transmission ability is its bandwidth.
Stream’s data rate is its bitrate. Only when bandwidth >= bitrate,
the stream can be delivered to end point in timely manner.
What happens if the bandwidth is less than the bitrate?
File viewers experience buffering; live viewers experience broken audio/video
and latency.
Bandwidth and bitrate are usually measured in kbps (kilobits per second), which
means how many bytes (each byte is 8 bit) of data stream through network per
second. LAN bandwidth is typically controlled by routers. Modern routers are
capable to transmit data at 100 mbps (100 Megabit= 100,000 kbps) and 1 gbps
(Gigabit = 1,000,000 kbps) data rates.
Most common Internet connections provide the following data rates: Modem (56
kbps), ADSL (256 – 2000 kbps download speed; 128 – 1000 kbps upload speed) and
T1 (1500 kbps).
Since uncompressed raw stream of audio/video samples/images can only be streamed
by LANs, audio/video is being compressed before streaming, so that the bitrate
can fit into network bandwidth. This process is called encoding.
Encoding takes place for both media files and live media streams. It is done by codecs.
While encoding, the quality of audio/video degrades since audio/video encoding
throws some image information in order to provide better compression. Good
modern codecs provide 1/20 – 1/100 compression rates without high degradation
of /images/sound.
Codecs quality differs for one-pass real-time live encoding and multiple passes
files encoding. Most of the codecs are more file oriented and less live
oriented. Codecs can be of two types: VBR (variable bitrate) and CBR
(constant bitrate).
The best today’s video codecs are WMV, On2 and Real Video codecs; numerous H.264
(MPEG4 Part 10) proprietary implementations and also widely available MPEG4
implementations from Microsoft and DivX.
The best today’s audio codecs are WMA, AAC, Dolby AC3, free Ogg and good old
MP3.
From theory to practice – what is the bitrate of good quality audio/video
files and live streams?
Video bitrate depends on: Image size, number of images per second
(framerate), amount of movement on the scene and luminosity of the scene.
The following table shows average bitrates of good quality live streams and
files. All codecs mentioned above produce more or less the following values
with 10-20% deviations.
| Stream media type |
Single stream bitrate (kbps) |
How many concurrent streams can your 100 mbps LAN deliver |
How many concurrent streams can your 56 kbps Modem
deliver |
How many concurrent streams can your 128 - 1000 kbps
upload ADSL deliver |
How many concurrent streams can your 1500 kbps T1 deliver |
| 320x240 20 fps video file or live stream |
200 to
500 |
500 to
200
|
0 |
0-5 to
0-2 |
7 to
3 |
| 640x480 20 fps video file or live stream |
640 to
1500 |
150 to
60 |
0 |
0-1 to
0 |
2 to
1 |
| Two channel audio file or live stream |
16 to
64 |
6000 to
1500 |
2 to
0 |
8-60 to
2-15 |
100 to
25 |
What can one learn from this table?
Practical consequences:
1. You can hardly serve video over ADSL connection; may be you
can show your webcam to your friend. Not more.
Audio server can probably be hosted on ADSL connection; but be careful – your
upload speed drops when you download something. Not really recommended
scenario.
2. Even T1 corporate connection can hardly serve a dozen of concurrent video
streams to the world. What a bad surprise for many companies!
3. You need LAN-type Internet connection to establish real multiple concurrent
users streaming services (which costs a lot of money).
Don’t cry dear reader. This situation is bad but it’s getting better every day,
since bandwidth gets cheaper. So may be in the next millennium your website
will be able to afford streaming of video clips like MSN and CNN do. In the
following chapters we will show what can still be done without huge expenses –
and there are beautiful things that can be done!
3. Unicast vs. Multicast.
Streams can be sent from server to client (viewer) by Unicast or Multicast.
In Unicast mode there is a dedicated stream for each viewer traversing through
the router. In Multicast mode the same single stream is sent to all the
viewers.
All modern routers support Multicast and can be configured to allow or prohibit
it. In order for Multicast stream to arrive to a viewer, all routers between
server and this viewer must allow multicast.
Multicast is prohibited by vast majority of public Internet routers. If that
wouldn’t be the terrible truth, establishing streaming services would be highly
available for anybody. May be time will come…
Practical consequences:
Multicast can save you bandwidth dramatically.
Plan for Multicast delivery only when streaming over the LAN.
4. LAN vs. public Internet.
Understanding the latency of live streams.
The major difference between streaming over LAN vs. Internet is amount of
routers through which the stream has to traverse. This number is normally 1-2
on LAN but can be a dozen or more of highly busy routers on Internet.
Therefore, the probability of short-time network congestions is much higher
over the Internet. As a result, the instant bitrate at which viewer receives
the stream remains stable on LAN but fluctuates around its average value over
the Internet.
Figure 1: Actual viewer bitrate over 15 seconds time period,
when streaming 200 kbps live unicast stream over the LAN vs. Internet.
|