A new component in Win 2k–Windows Media Services–lets you
stream multimedia file formats on your network. Like any other component, you
can select it during installation, or do it later through Add/Remove programs
from the Control Panel.
Let’s see how to set up a streaming server.
Streaming can be done either as Unicast or Multicast. The
difference lies in how the streaming data is sent to clients. In Unicast
streaming, data is sent through a point-to-point connection between the client
and the server. Each client receives a separate, distinct stream from the
streaming server. So, the stream is demand-based, that is, it’s sent out only
if requested by a client. On the other hand, in multicast streaming, a single
stream of data is transmitted over the network, and all clients connect to this
single stream. The benefit of this is that it saves network bandwidth.
Types of data that can be streamed
Windows Media Services can stream all popular data formats.
However, some formats like AVI and WAV need to be encoded into another format
called ASF (Advanced Streaming Format) before they can be streamed. Consider ASF
as a "ready-to-be-streamed" format. You can either convert files to
ASF format using an encoding software like Microsoft Netshow, or encode them on
the fly with Windows Media Services and stream them. MP3 files don’t need to
be encoded before streaming.
Streaming and receiving the streams
Windows Media Services starts up like all other Win 2k
services. You can configure and manage the service through the Windows Media
option in Administrative Tools. To configure streaming, three parameters have to
be taken into account: source, protocol, and the publishing method. The first
tells you the type of data to be streamed, the second one is the choice of
protocol that’ll carry this stream, and the third involves how you’ll
present the data to a user. This could be as an HTM file, e-mail, or any other
publishing method. These three configuration parameters will vary, depending on
whether you choose unicast or multicast streaming.
All these settings are finally saved as ASX files. These
files connect clients to the correct IP address for receiving streamed content.
Links can be made to these files from a Web page, or it can directly be sent to
clients through e-mail. Alternatively, if the client has the exact reference URL
to the data (MP3, ASF etc) being streamed, he can directly connect to the stream
through his Media player. This is talked about in detail later.
Unicast streaming
In unicast streaming, you have two options–on-demand
publishing or broadcast publishing. While the former allows a user to actively
control playback content, the latter is a passive data stream for the user. It’s
like a radio, where you can tune into it, but can’t control it. However, being
unicast, a separate stream will flow to each use who demands it. Let’s start
with on-demand streaming.
For on-demand streaming, the source can be an ASF, WMA or MP3
file. You can place the ASF files in a default home directory (usually ASFRoot)
or any other local folder. The source can also be specified as a network folder,
or a shared folder on any other machine. There’s a configuration wizard for
this, which takes you through a series of steps for publishing your content.
Once you’ve specified the data source, you have to choose the protocol to
carry it. The choice is between MMS (Microsoft Media Server), UDP (User Datagram
Protocol) or TCP. HTTP can also be used for streaming, but could involve
resolving some port conflicts. After this, give the source a reference URL,
specify the mode of publishing, and you’re ready to go.
At the client end, files can be accessed using Windows Media
player. Here, you have to specify the path for the streaming file in a specific
format. So click the File menu, and select Open. In the path box, specify the
path of the ASF to be accessed, for example, mms://Server_ name/file_name.asf,
where Server_ name is the name of the server (or the IP address) running your
media services and the file_name is the name of the file to be accessed. The
Media player will connect to the server and on-demand streaming will start.
Choosing MMS as the protocol is advisable because it automatically rolls over to
other protocols (MMS-UDP or MMS-TCP) if required.
In broadcast publishing, the procedure is similar except for
source specifications. Here, the data source can be a Windows Media encoder
(local or remote); a remote broadcast station or a remote publishing point. The
first option involves using the Netshow encoder, which we’ve talked about
earlier. Here, you’ll need to use the MSBD protocol, and specify the name of
the machine running the encoder with the connecting port (which is usually 7007
by default). This is the case where encoding and transmission is done on the
fly. The encoder does the encoding and sends the data to the output port from
where the Win 2k server accesses it for further publishing.
Interestingly, the broadcast station–your server–can also
serve as a transmission station, by using a remote broadcast station (which
already uses MSBD or HTTP), or a remote publishing point (using MMS) as the
source. Here again, you need to specify the protocol and the publishing option
as in case of on-demand unicast publishing.
At the client end, access is through the MSBD protocol. The
syntax is msbd://Server_ name/station_name where station_name is the name you’ve
specified for the particular broadcast stream.
Multicast streaming
In this, a single stream is constantly broadcast over the
network and anyone can tune into it. Configuring a multicast stream is quite
similar to unicast. A wizard guides you through the steps of specifying the
source, which can be an ASF file, a remote publishing point, or a Windows Media
encoder. The method of setting the paths of the source is also the same as in
unicast streaming.
After this, you need to give the station name (the reference
to your stream), program name (which stores and organizes the content to be
broadcast) and stream names (the actual content), and you’re ready to publish.
You can program the multicast station to play once or loop forever. This is
again a passive stream to which users connect with the syntax mms://Server_name
/station_ name.
Ashish Sharma