|
Real Media Streaming
pg. 20
RealAudio® and RealVideo®, developed by Real
Networks, Inc., are among the most popular methods of broadcasting audio and
video content across the Internet.
Collectively known as Real Media, RealAudio and RealVideo use a technology
called streaming. Rather than force you to download an entire media file to your
computer before you can play it, this technology allows your Virtual Private
Server to
play RealAudio and RealVideo clips over the Internet while they are being
downloaded to your computer.
Methods For Streaming Real Media Files
All Virtual Private Server products support http streaming of Real Media files. All
customers can optionally use the RealAudio Basic Server, which provides more
efficient media streaming than the http protocol and provides a Web-based
administrative interface to the streaming software. Both http streaming and
RealAudio Basic Server streaming are described in the following sections.
Streaming Real Media through HTTP
Your Virtual Private Server can stream RealAudio and RealVideo files through the http
protocol. While this method is not as robust as using the fully-featured
RealAudio Basic Server, it does provide a reasonable method for streaming
RealAudio and RealVideo content. Before you can stream media files through http,
however, you need to modify the file on your Virtual Private Server that defines file
types. This file is called mime.types and is located in your ~/www/conf
directory.
To enable Real Media file streaming, open a SSH session to your Virtual Private
Server
and type the following at the command prompt:
cd www/conf Enter
pico mime.types Enter
The above commands open your ~/www/conf/mime.types file within the pico online
editor. Using the editor, verify that the following lines appear somewhere in
this file. If the lines are not there, you will need to add them:
audio/x-pn-realaudio ra ram rm
audio/x-pn-realaudio-plugin rpm
Once you’ve verified that these lines are present, or have been added if
necessary, exit the editor. Your Virtual Private Server will now be able to stream
RealAudio and RealVideo files.
You can now upload Real Media files, which have either an .rm or .ra file
extension, through FTP. Be sure to upload Real Media files in binary mode, and
to place them somewhere within or below your Virtual Private Server's ~/www/htdocs
directory.
With your media file in place, the next step is to create a Meta file. A Meta
file is a file that points to another file. This file is the key to properly
streaming Real Media files. Real Media Meta files are simply text files with a
.ram extension that contain the location of your actual Real Media file. To play
a Real Media file on your computer, you point your Web browser to this Meta
file. The RealPlayer program then access the actual media file and plays it
while it streams.
Here’s an example. Suppose you have a RealAudio file called myrafile.ra, which
has been uploaded into the ~/www/htdocs directory of your Virtual Private Server.
Assuming the .ra and .ram file types are properly defined in your Virtual
Private Server's ~/www/conf/mime.types file as described above, you would need to type
the following from your command prompt to create the Real Media Meta file:
cd ~/www/htdocs Enter
pico myrafile.ram Enter
This opens a blank file called myrafile.ram in the pico editor. While in the
editor, type the following to point this Meta file to the actual Real Media file
(replace yourdomain.com with the domain name or IP address of your Virtual
Private Server):
http://www.yourdomain.com/sound/myrafile.ra
Press Enter a couple of times to ensure that there is a hard return at the end
of the file; then press Ctrl+X, Y, Enter to exit the editor and save the
changes.
If everything has been done correctly, and you have RealPlayer installed
properly on your computer, you should be able to listen to this RealAudio file
by pointing your Web browser to the following URL:
http://www.yourdomain.com/myrafile.ram
If you want to link to this file from a Web page, the following HTML source
could be inserted into the Web page:
<A HREF="http://www.yourdomain.com/myrafile.ram">
Click here to listen!</A>
Streaming Real Media with RealAudio Basic Server
On your Virtual Private Server you can stream RealAudio files using the RealAudio Basic
Server software from RealNetworks. The Basic Server software provides more
efficient media streaming than the http protocol, and provides a nice Web-based
administrative interface to the streaming software.
To install the Basic Server software, either Telnet to your Virtual Private
Server and
type:
vinstall realaudio
At the command prompt, or select it from the Available Packages menu of the
VAdmin Suite Software Manager. You'll be asked to provide a password to secure
the Basic Server administrative interface. The install procedure will create a
~/usr/local/pnserver directory.
You will need to start the server by typing the following commands from a Telnet
session:
cd ~/usr/local/pnserver/bin/ Enter
./pnserver ../server.cfg Enter
To stream RealAudio files using the Basic Server software, you should place them
in your ~/usr/local/pnserver/content directory. You can then access them through
a Web browser with a URL like this:
http://www.yourdomain.com:7070/ramgen/filename.ra
Be sure to replace yourdomain.com with your actual domain name and filename with
the actual name of your audio file. The :7070 is necessary to open the Real
Server port.
To administer your Basic Server software through the Web, point your browser to
http://yourdomain.com:7070. When asked to provide a username and password, leave
the username blank and use the password that you provided when you installed the
RealAudio package.
For more information about how to create .ra and
.rm files to use on your Web site, or about any of the RealNetworks products,
please visit the RealNetworks Web site.
|