Multicasting is another way of reducing the number of streams in use. It requires a specially configured network.
Multicasting is a way of sending a single live stream to multiple clients, rather than sending a stream to every single client. Clients connect to the stream, rather than to the
In contrast, regular unicasting transmission sends a stream to each client that requests it:
To take advantage of multicasting, both RealServer and clients, as well as the routers between them, must be multicast-enabled. For this reason, multicasting is mostly used with intranets where routers can be configured for multicasts. However, multicast delivery can be done over the Internet where intermediary network devices have been multicast-enabled.
RealServer includes two methods of multicasting: back-channel multicast, and scalable multicast. You can use both methods at once.
Back-channel multicast maintains an accounting control channel between the client and RealServer. RealServer uses this channel to provide information about the presentation and to query the client for a user name and password, if authentication is in use. The client uses the control channel to send password information and commands such as "play" and "stop". With this information, RealServer can track how many clients are viewing a presentation. Monitoring tools such as the G2 Java Monitor in RealSystem Administrator show client activity.
Scalable multicast does not use this control channel, thus taking up far less bandwidth and administrative overhead. Monitoring tools such as G2 Java Monitor will not track client activity.
Back-channel multicast consists of two types of multicast: RTSP and PNA multicasts. In both RTSP and PNA multicast, authenticated material and client statistics can be sent because the exchange between the client and RealServer is bi-directional.
This method of multicasting uses the RTSP protocol to send control information over a TCP channel. RealServer maintains a control connection for each client. The data channel is multicast to all clients.
RTSP multicast provides these features:
|
|
Note |
|---|
| RTSP multicasting works only with RealSystem G2 clients. |
PNA multicast uses the PNA protocol over a TCP connection to exchange information between the client and RealServer.
PNA multicast is used when transmitting to pre-G2 clients. RealServer maintains a control connection for each client. The data channel is multicast to all clients.
PNA multicast provides these features:
Scalable multicasting allows you to transmit to an unlimited number of clients because the transmission from the RealServer is completely one-way; there is no connection from each client to RealServer at all. All data is multicast on the network once. Each client connected to this multicast receives all data packets.
It is thus suitable for situations that would otherwise consume much bandwidth.
Scalable multicasting uses a different URL format than either RTSP multicast or PNA multicast.
This method supports G2 clients only; clients version 5.0 and older will not receive any presentations, and will receive an error message instead.
The following table summarizes the benefits of each multicast method.
The following table shows the features of the three multicast methods, as they apply to clients.
| Back-Channel Multicast | Scalable Multicast |
||
|---|---|---|---|
| Feature | RTSP | PNA | |
| RealSystem G2 clients only | · | ||
| Older clients | · | ||
| RealSystem G2 clients or any RTP-enabled clients | · | ||
Material served via back-channel multicast appears in the access log just like unicast material. The access log shows which method was used to transmit the stream.
Scalable multicasts may be identified in the access log by their mount point in the GET statement.
To reach large audiences across a network that includes both Internet and intranet connections, you can use splitters to send data across the Internet to intranet sites, and then use multicast delivery to redistribute the data from splitters to clients. This can be a powerful method of distributing a live stream while still conserving bandwidth.
RealNetworks' implementation of multicasting is based on open industry standards. You may be interested in the following resources:
Before you set up either type of multicasting, you need to do two things:
Before setting up RealServer, verify the following items with your network administrator:
In addition to network settings, for clients to take full advantage of multicast transmissions, they must be configured to request multicast transmission of live material. Consult the client's user guide for information on configuring the client.
As noted earlier, both RealServer and clients, as well as the routers between them, must be multicast-enabled in order for you to distribute presentations using the multicast features. This section describes only what is required to enable RealServer for multicast broadcasting.
There are two factors to take into account when establishing the addresses and port numbers that RealServer will use for multicasting:
Although the information in this document will help you calculate the number of addresses and port numbers you'll need for scalable multicasting, you'll still need to consult with your network administrator regarding the actual addresses you'll use.
For each file that you are transmitting via multicast, you must calculate the number of addresses you'll need. In back-channel multicasting, the number of addresses is based on the number of bit rates in the file. In scalable multicasting, you'll also need to set aside port numbers; these are based on the number of streams per bit rate.
For simple RealVideo files, figuring the number of addresses and port numbers is relatively simple. SureStream files are more complex, as they can contain several bit rates, each with its own number of streams.
If another person is supplying the file to be multicast, that person will need to tell you how many bit rates are in the file. For scalable multicasts, you will also need to know how many streams per bit rate are present.
You can get these numbers yourself if you are encoding the file; look in the encoding software to learn the number of bit rates and streams. For example, in RealProducer Plus, you would click View > Statistics to see the number of bit rates and streams being encoded.
Once you know the number of bit rates and streams in the file, refer to "Calculating Addresses for Back-Channel Multicasts" or "Calculating Addresses and Ports for Scalable Multicasts".
If you have no way of knowing how many bit rates and streams are in the file, you'll have to guess. A safe number is six; the maximum number of bit rates that would be present in a single SureStream file is 14, yet files prepared for multicasts are likely to include only the higher encoding rates. A non-SureStream file would have at most one bit rate and two streams.
If you are preparing to transmit a file via back-channel multicast, you only need to know the number of bit rates in the file.
| Bit Rates | Addresses |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| ... | ... |
| n bit rates | n |
Figuring the number of addresses and port numbers for scalable multicasts depends on several factors.
An audio presentation consumes one stream; a video presentation uses two streams (one for audio and one for video). For highest quality, and to match the scalable multicast RDT specification, RealServer uses one address for each stream.
RealServer includes a feature that allows you to send the audio and video streams on a single address. Use this feature if you want to conserve the number of addresses you're using. Use the dual address method if you know that clients viewing the presentation may be using a low bandwidth connection and the clients are able to select a single stream, such as just the audio portion of your multicast.
Each address must use a certain range of port numbers. The numbers you choose can begin with any number, but the first port number must be an even number, and you must use a consecutive range. (RTP is used to send the data; the RTP standard requires this format.)
In the table below, n represents the number of bit rates in the file that you'll be multicasting.
Another way of calculating the number of ports needed is as follows:
False, the number of ports is 2 x addresses.
True, the number of ports is 2 x addresses x streams.
You can publicize your multicasts to anyone running a program that listens for the Session Announcement Protocol (SAP). These applications, such as SDR and ICAST Guide, display a list of all multicasts currently playing. RealServer creates the SAP file automatically. Programs that listen for SAP files will show the title, author, and copyright information encoded into the files you are multicasting.
Yes. This instructs RealServer to create and send SAP files.
Yes.
Follow the instructions below to set up back-channel multicasting. After you set it up, you will need to create the links that point to your multicasted events.
7070.
554.
Refer to "Calculating Addresses for Back-Channel Multicasts" to calculate the exact number of addresses you'll need.
Yes from the Delivery Only list. To remove this restriction and permit unicast for clients unable to connect via multicast, set it to No.
The value for Time to Live can range from 0 to 255. The larger the Time to Live, the greater the distance a data packet will travel.
The default value of 16 is enough to keep multicast packets within a typical internal network.
| TTL Value | Packet Range |
|---|---|
0 |
Local host |
1 |
Local network (subnet) |
32 |
Site |
64 |
Region |
128 |
Continent |
255 |
World |
True from the Resend list. This setting is optional. It adds some overhead to the traffic on your network; however, clients receive better quality multicasts.
To require that clients with IP addresses in the User List must connect in multicast mode, set Deliver Only to Yes. This setting means that clients that are not configured for multicast will not be able to receive the multicast, and will receive an error message instead. Use this feature when you want to restrict the multicast to a limited number of clients, or if you are multicasting a high-bandwidth presentation and do not want unicast to be an option.
Yes from the Delivery Only list.
0.0.0.0.
To indicate a single IP address, type 255.255.255.254 in the Netmask box. If you typed 0.0.0.0 in the To box, type the same thing in the Netmask box.
Repeat Step b through Step f for each set of clients that will be accessing your multicast.
|
|
Note |
|---|
| Access Control rules are enacted before User List rules. A client that is excluded by Access Control will not be able to connect to any multicasts, regardless of the rules you create here. (IP Access Control is described in "Limiting Access Via IP Address".) |
Links to both RTSP and PNA multicast are identical to links for live unicast transmissions. This is convenient, because a single link can serve both multicast-enabled clients and unicast-only clients.
Because multicasts are done with live streams, use the live mount point in the URL. See "Linking a Web Page to a SMIL File or Individual Clip" for instructions on creating links to individual files.
Most clients on a multicast-enabled network are configured to request material via multicast first.
There are four parts to setting up scalable multicasting.
Perform the following steps for each live source that you will be transmitting via scalable multicast.
In addition, you can configure some optional features:
After changing any scalable multicast settings, you must restart RealServer for the changes to take effect.
The steps in this section apply to all scalable multicast settings; you only need to perform them once.
scalable.
The steps in this section set up the live channel. You may want to set up additional features, described in "Optional Scalable Multicast Features". You'll need to know which addresses are available to you and how many to use; see "Calculating the Number of Required Addresses and Port Numbers"
Yes from the Enabled list.
To make all live broadcasts available via scalable multicast, type an asterisk (*) here.
False if you want to use a separate address for each stream; select True if you want to use one address for both streams.
port1-port2. The first port number must be an even number, and must be followed by a consecutive port number. Refer to "Calculating Addresses and Ports for Scalable Multicasts" to determine the number of ports to use.
address1-address2. To use a single address instead of a range, type the address in the form address1-address1. Refer to "Calculating Addresses and Ports for Scalable Multicasts" to determine the number of addresses to use.
Scalable multicasts use a different URL format than other material; when RealServer receives a request in this format, it sends the material differently and does not expect to establish or maintain a TCP connection.
All links to scalable multicast content use the same format. Note that they always begin with http://and always end with the .sdp extension:
http://realserver.company.com:HTTPPort/MountPoint/virtual_path/filename.xxx.sdp
| Component | Meaning |
|---|---|
http |
The protocol used for streaming. Always use http in Web pages. |
realserver.company.com |
Machine and domain name of RealServer |
HTTPPort |
Port number where RealServer listens for requests sent via HTTP. This value is usually 80 or 8080; see "Port Variables". |
MountPoint |
Scalable mount point, usually scalable. |
virtual_path |
The virtual path is any actual directory, relevant to the base path of the mount point. If the file is located in the base path itself, omit virtual_path. |
filename |
The file name itself. |
xxx |
The file type, such as ra, rm, or rt. |
sdp |
The final letters are required for scalable multicast. These are not part of the actual live file name; they only appear in the link. |
Using an example for RTSP and PNA multicast, a link would look like the following:
<a href="http://realserver.company.com:8080/scalable/vivaldi.ra.sdp">
Click here to listen to today's Vivaldi selection</a>
The settings in this section are optional, and can be set for any live channel.
When clients that are not multicast-enabled click the link to your scalable multicast presentation, they receive an error message. An error message also appears on a client screen when the multicast itself is interrupted at any point along the network. In both cases, the presentation halts.
The Shift to Unicast feature reconnects the client to a unicast version of the presentation. You can also use this feature to customize the message those clients receive, or even redirect them to a multicast presentation on another RealServer.
You need only supply a single URL for your multicast if you enable this feature, rather than supplying a second URL for the unicast version.
You can enable this feature for individual live sources.
Do not enable this feature if you are multicasting a high bit-rate presentation and switching to unicast would flood your network.
Yes.
In cases where clients would receive a generic error message informing them that the multicast was unavailable or available only to multicast-enabled clients, you can instruct RealServer to point the client to your own HTML page, which could contain a custom explanatory message, such as "This presentation is only available to RealPlayers that have been configured to use multicast."
http://www.mycompany.com/mcast.html.
If you have a second RealServer which is also transmitting your multicast, or if it is transmitting a backup multicast presentation, you can supply the origin RealServer with the address of the second RealServer, and clients who are unable to receive the multicast presentation from the origin RealServer will automatically be sent to the second RealServer.
Clients whose service is interrupted will be sent to the second RealServer, rather than receiving an error message and then halting the presentation.
rtsp://realserver.mycompany.com:8080/scalable/vivaldi.rm.sdp.
|
|
Note |
|---|
| The steps in this section are the same as in "Creating Custom Messages"; use either an alternate URL or a custom HTML page per scalable multicast. |
Clients such as RealPlayer have a feature that sends statistics to RealServer about the amount of data they received while playing a presentation.
As in unicast presentations, client statistics are sent to RealServer at the end of a presentation, and are stored in the access log. But scalable multicasts can serve to thousands of clients at the same time, and your RealServer may not be equipped to handle that quantity of simultaneous incoming client statistics.
RealServer includes features that help you manage two aspects of client statistics sent at the end of a scalable multicast:
When clients initially connect to RealServer for a scalable multicast presentation, RealServer can instruct them not to send any connection statistics at all. This RealServer feature overrides client settings.
Enable this feature if your system cannot handle the volume of packets of data that would be sent simultaneously, or if you are simply not interested in these statistics.
True if you want clients to send their connection statistics at the end of a multicast presentation. Select False if you do not want clients to send any connection statistics.
When clients initially connect to RealServer for a scalable multicast presentation, RealServer can instruct them to send connection statistics to a Web server, rather than to RealServer. Web servers may be better equipped to handle volumes of simultaneously arriving data, since they are often configured to perform load balancing.
To use this feature, you will need to have a Web server available to you, and you will need to create a cgi script to receive the client statistics and to write them to a log file.
|
|
Additional Information |
|---|
| The cgi script should create a log file using the same format as the RealServer access log file. See "Access Log Format". |
After the multicast event, you can look at the log file created by the cgi script and draw conclusions about the quantity and quality of service.
cgi-bin/client-stats/logstat.
You can publicize your multicasts to anyone running a program that listens for the Session Announcement Protocol (SAP). These applications, such as SDR and ICAST Guide, display a list of all multicasts currently playing. RealServer creates the SAP file automatically. Programs that listen for SAP files will show the title, author, and copyright information encoded into the files you are multicasting.
Yes. This instructs RealServer to create and send SAP files.
Yes.
Yes.