Delivering Live Content


Delivering Live Content

Make sure that your system requirements are met, that the configuration settings reflect your choices, and that you know how to use RealEncoder or RealPublisher. For information on using these programs, see the RealAudio and RealVideo Content Creation Guide. You will need:

The computer running RealEncoder or RealPublisher and the computer running RealServer can be on different platforms.

To deliver live content:

  1. Attach your audio or video source to the audio or video capture card.
  2. Configure the server.cfg file. For information on how to configure this file, see Configuring and Maintaining RealServer.
  3. Be sure the following configuration settings are included in the RealServer configuration file:
  4. Configure RealEncoder or RealPublisher for live broadcasting and click Start to begin encoding.


Archiving Live Broadcasts

You can choose to save (or "archive") a live broadcast for playback later. The RealServer can be configured to automatically archive live broadcasts or you can use the rafile or rmfile utility program to archive broadcasts from any RealServer over a network. You can choose to create just one file, a new file based on elapsed time such as every 30 minutes, or a new file based on size such as every 5 MB. Rafile archives audio-only broadcasts; rmfile archives video-only or audio-and-video broadcasts.

If the RealServer or rafile or rmfile archives a live broadcast with the same destination path and file name as an existing file, RealServer renames the existing file by appending a unique number to the end. For example, if RealServer encountered a file named "concert.rm" in the archive directory, it would rename the file as "concert.rm.86400". The number that RealServer chooses is related to a timestamp; larger numbers indicate newer files. In this way, one directory can be used to store the latest version of a broadcast and the previous versions as well. Reusing the same output file name can simplify Web page maintenance, because the links for a recurring event remain the same.

Rmfile can be driven either by command line options or by a configuration file. The command line options will always overrule the configuration file.

To configure RealServer to archive automatically:

If you specify the LiveFileTarget and LiveFilePassword settings in the server's configuration file, RealServer automatically archives any live media stream that arrives at the Server. These media streams are created as RealMedia (.rm) files. Be sure you have enough available disk space to store the files generated from a live broadcast. The archive files are stored in the directory specified by the LiveFileTarget setting, or in the working directory that was used to start RealServer if a target directory is not specified.

To configure RealServer to save manually:

The rafile and rmfile programs can run on a different computer than RealServer or RealEncoder/RealPublisher because they accept a network address for the media source. Archive files written by rafile or rmfile are stored in the directory specified, or in the working directory used to start the rafile or rmfile program if no directory is specified.

For a list of options for the rmfile program, at a command line, type:

rmfile /?

Detailed information on the rafile and rmfile programs and their settings is available in the RealAudio and RealVideo Content Creation Guide.

Example 1:

A television station broadcasts over the Internet and wants to archive the entire broadcast day in multiple files each 60 minutes long to the /usr/Archive directory. The broadcast is named Live.rm and is available in RealVideo 28.8 format only. The relevant configuration settings are:

LiveFilePassword rmBroadcast1
LiveFileTarget /usr/Archive
LiveFileTime 1h

While the RealEncoder or RealPublisher is still connected, RealServer automatically archives the live broadcast to a series of files named Live0.rm, Live1.rm, Live2.rm, and so on, in the /usr/Archive directory. Each file contains one hour of audio data encoded in the RealVideo 28.8 format. If it is restarted, and it encounters files with the same names, it will append a number based on a timestamp to the pre-existing file.

Example 2:

A concert promoter broadcasts a live concert over the Internet and wants to archive the entire concert on a separate computer. The archive computer runs the rmfile utility program from a command line.

The configuration file setting on the RealServer computer is:

LiveFilePassword rmBroadcastZ

The command on the archive computer is:

rmfile -b -p rmBroadcastZ pnm://my.server.com:7070/live.rm c:\real\server\content\archive

The rmfile utility program connects to the server using the URL pnm://my.server.com/live.ra. The resulting files can be copied to a RealServer for later rebroadcast of the concert.


Simulating a Live Broadcast

At times, you might want to play a recorded media file as if it were being broadcast live. Perhaps you want to test your system before a live event or delay broadcast of a concert. The rvslta (Simulated Live Transfer Agent) utility lets you play a recorded media file as if it were live. Users connecting to the site will get the event "in progress." It can be used as a test, to delay broadcast of a live event or to multicast pre-recorded content.

To use rvslta, you need to specify the password listed under the EncoderPassword configuration setting (in the RealServer configuration file) and the names of the input and output files.

Syntax

rvslta -i <inputfile.rm> -o <outputfile.rm> -s <server> [-p <port>] [-w <password>] 
[-L <iterations>] 

where:

<inputfile> is the path and file name to the input file.
<outputfile> is the path and file name to the output file.
<server> is the server name.
<port> is the server port (port defaults to 7070).
<password> specifies the password rvslta uses to connect to the server. It matches the password specified by the EncoderPassword setting in the configuration settings file.
<iterations> is an integer that specifies how many times to loop the content.

Example

rvslta -i c:\archive.rm -o livenow.rm -s www.my.server.com -p 7070 -w rmRecord1


Enhancing Live Broadcasts with Video Image Maps and Synchronized Web Pages

You can deliver a Synchronized Multimedia presentation or apply an image map to a video stream with a live broadcast. The events are delivered relative to the time a client begins playing the live broadcast, instead of relative to an absolute position in the broadcast.

The URL events must be defined before the broadcast, but you can change the content of the Web page the URL references during the broadcast.

To create a Synchronized Multimedia presentation for a live broadcast:

  1. Create the input file that defines each event and the time that the event is sent. Remember that the times you specify are relative to when the client begins playing the live broadcast.
  2. Run the rmmerge tool to create an .rm file.
  3. Repeat steps 1 and 2 for any image maps.
  4. Name the .rm file with the same filename you specify in the Resource box in RealPublisher for the broadcast.
  5. Move the .rm file to the path specified in the Resource box in RealPublisher.

For example, if you set up RealPublisher as follows, the file must be named concert.rm and it must be located in the /live directory relative to the server's base path.

© 1997 RealNetworks, Inc.