Because RealServer can also broadcast RealText live, RealText is an ideal solution for delivering live stock market information or breaking news, for example. Because it is a true streaming server, RealServer streams the data as it comes in, instead of downloading blocks of data to users' computers for later display. This chapter explains how to use the RealText broadcast application included with this manual.
![]() |
Additional Information |
---|
RealSystem G2 Production Guide provides an overview of broadcasting. For more on configuring a broadcast, see RealServer Administration Guide. Both are available at http://service.real.com/help/library/encoders.html. |
You can broadcast RealText to multiple viewers with an application included in the utils directory of this manual. The broadcast application runs on any Windows 32-bit operating system. Its C++ source code is publicly available, though, and you can compile it on a different operating system as noted in "Developing a Custom RealText Broadcast Application".
The RealText broadcast application connects to RealServer G2 and polls a specified directory for an updated RealText file. When it finds an updated file, it sends the file to RealServer, which broadcasts the file contents to the connected RealPlayers.
![]() |
Tip |
---|
Available at http://www.real.com/products/tools/, RealNetworks tools let you broadcast RealAudio and RealVideo as well. For information on broadcasting RealPix, download RealPix Authoring Guide from http://service.real.com/help/library/encoders.html. |
The RealText broadcast application comprises the exlvtxt2.exe executable file and a few DLLs. These files must reside together, but you can move them from the utils directory to any directory on the RealText broadcast machine. You can broadcast on the RealServer G2 machine or any Windows 32-bit machine with a network connection to RealServer G2. RealText broadcast requires minimal system resources, but RealNetworks recommends using a Pentium 133 MHz or faster processor with at least 32 Megabytes of memory.
Create a RealText clip for broadcast as a simple text file. Use the RealText mark-up tags described in "Text Tags" to format the display text. The file should not have <window>
and </window>
tags. You set window attributes such as type, width, and height when you start the broadcast application. RealServer sends these attributes to each RealPlayer when it connects to the broadcast.
Here are some pointers on using RealText mark-up when broadcasting a file:
<clear/>
tag to clear the existing text in the RealPlayer window. Do not use a <clear/>
tag in the middle of an input file, though. In a broadcast, a <clear/>
tag does not need to follow a <time begin.../>
tag.
<time.../>
tags to specify when text appears. Timing elements specify offsets from the start of the broadcast, not from the receipt of the RealText update that includes the elements. Using timing tags can therefore cause unexpected results.
Consult with the RealServer administrator to determine the URL for the RealText broadcast. If you are linking a Web page directly to the RealText broadcast, the URL may look like this:
<a href="http://realserver.company.com/ramgen/encoder/media/news.rt">...</a>
This URL includes two virtual directories. The ramgen virtual directory makes RealServer launch RealPlayer without a separate RAM file. The encoder virtual directory specifies a broadcast coming in on a certain port of RealServer rather than an actual file existing on a file system. The RealServer administrator sets up these virtual directories.
If you use a SMIL file, the Web page URL to the file may look like this:
<a href="http://realserver.company.com/ramgen/media/daily.smi">...</a>
Within the SMIL file, you'll have an RTSP link to the RealText broadcast:
<textstream src="rtsp://realserver.company.com/encoder/media/news.rt"/>
![]() |
Additional Information |
---|
For more on using SMIL and specifying URLs for media clips, see RealSystem G2 Production Guide, available at http://service.real.com/help/library/encoders.html. |
Using SMIL, you can embed a RealText broadcast in a multiclip presentation. You might create a RealVideo clip region and a RealText region that displays breaking news, for example. The SMIL file uses the broadcast URL for the text and a standard URL for the on-demand RealVideo clip. Each person who views the presentation sees the video from its normal beginning, but joins the RealText broadcast in progress.
To run the RealText broadcast application, start the Windows DOS prompt and move to the directory that holds the application. Then start the application as shown in this example:
c:\RealText\Broadcast> exlvtxt2.exe
The application prompts you for a number of parameter values that the following table describes. Enter all values without quotation marks.
Parameter | Value |
---|---|
host | The network address of the RealServer G2 machine that will stream the RealText clip. This can be a DNS name such as realserver.company.com or an IP address such as 204.71.154.5 . |
port | The port on the RealServer machine that receives the RealText data from the broadcast application. The RealServer administrator determines which port is used. |
username | A user name set by the RealServer administrator. The broadcast application must supply this user name to RealServer G2 to connect to it. |
password | The password for the user name. The application must supply this to connect to RealServer G2. The RealServer administrator sets the password. |
stream file name | The "file name" for the RealText live stream. This file name is used in the RealText hypertext link within the SMIL file or Web page. It does not have to be the same as the input file, but it should end with the .rt extension. |
input file | Name of the RealText file on the broadcast machine to monitor. If the file is not in the same directory as the RealText broadcast application, give the full path as in c:\RealText\Broadcast\source\news.rt. |
polling period | Frequency in seconds that the broadcast application checks for an update to the input file. The default is 1 second. |
window type | Window type as listed in type="window type" . The generic window type is the default. |
use defaults? | Whether to use the defaults for the chosen window type. Press Return to use all default values as described in "Window Tag Attributes". Enter n to have the application step through the window values. For example, the application asks for a pixel value for the window width. If you selected a generic window, you can use the default value of 320 or enter a different pixel width. There is no duration time for live RealText. |
Average bit rate | Estimated average bit rate for the live RealText stream in bits per second. The default is 1000 (1 Kbps). When the text stream is part of a multiclip presentation, RealPlayer uses this estimate to determine if it has enough bandwidth to play the presentation. |
Once started, the broadcast application checks the designated directory with the specified polling frequency for an updated version of the RealText input file. You can place a new file in the directory manually or use any automated method, such as a database query, to create the file. All file updates must use the same input file name specified during application start-up.
The RealText broadcast application resends prior data every three seconds when there is no new data. If you update the input file at 5 and 7 minutes into the broadcast, for example, a viewer joining the broadcast at the 6-minute mark receives the data originally sent at the 5-minute mark within three seconds. That viewer's RealPlayer then ignores all further resends and next displays the file update broadcast at the 7-minute mark.
To stop the RealText broadcast stream, update the RealText input file so that it has a dollar sign ($) as its first character. Text can follow the dollar sign, but it is ignored:
[file start]
$ignored text
[file end]
This file is not broadcast, but causes RealServer to terminate the broadcast stream. It also shuts down the broadcast application console window on the broadcast machine.
![]() |
Warning |
---|
Do not stop the RealText broadcast by pressing Ctrl+C from the broadcast application console. This terminates the window but will not properly shut down the RealText stream on RealServer. |
The RealSystem G2 SDK, which you can download from http://www.real.com/devzone, includes the C++ source code for the RealText broadcast application. Subject to the SDK license agreement, you can customize the broadcast application to do any of the following:
For closed-captioning, use a device such as TextGrabber from SunBelt Industries (http://www.sunbeltindustries.com). This device supplies text from a TV signal through an RS232 interface. Your customized RealText broadcast application can receive the text, format it with RealText mark-up, and send it to RealServer for broadcast.