Thursday, February 21, 2008

How to Stream Your Files Using the RealServer

Yeah, you could squish that three-minute audio file down into 300 to 500 KB, but you'd better warn that poor sap sitting at the end of a paltry modem connection to "click here, then go get a sandwich." Or you could deliver high-quality multimedia without an insane wait by streaming the file (which lets your users play the file as it downloads).
The introduction of streaming media to the Web has changed the fundamental rules of the game. Real was the first company to offer this technology in a coherent form (one more reason why we use its products). But to make it work, you need a RealServer, which is server software (not hardware) that handles the outgoing streams of packets. It's available in a number of categories (in ascending order of sophistication and cost): Basic, Intranet, Internet, and Commerce.
The Basic version, which is free, is a good way to test the waters and acclimate yourself to the software. However, that version only provides 60 streams, so you'll be turning people away from your site if more than 60 people log on at the same time.
The Intranet version is a nice, middle-of-the-road solution - in terms of capabilities - and is tailor-made for internal media distribution. I like the possibilities here: a CEO could use it like a principal would the intercom at high school, briefing employees about upcoming events - only the message would come right to everyone's desk instead of being broadcast in homeroom. It could really get that propaganda element going: very Citizen Kane/James Bond.
If you plan to stage a major broadcasting event, invest in either RealServer Internet or Commerce. At a whopping US$15,000 for 200 streams (for the Internet category), these solutions aren't really an option for the average non-corporate budget. But the pricier servers do offer more than just extra streams. Say you are running a big event, like a pay-per-listen for the Jane's Relapse tour. If you just use HTML to create a password, any "crazy kid" could pay once, then turn around and post his login info to twelve mailing lists. And you would lose a ton of money. But with the RealServer commerce Password Tool, if they don't pay, they don't play.

What kind of machine do I need to run RealServer?
RealServer 5.01 is available for six assorted flavors of UNIX, Windows NT, and Windows 95. RealServer requires 6 MB of RAM plus 40 KB RAM for each simultaneous stream (approximately 10 MB of available memory to support 100 concurrent connections). Although a dedicated machine is preferable, and a requirement if you're expecting lots of hits, RealServer can theoretically run off a little-used PC.
Installation of the software is relatively simple and the documentation is good. There are a few known bugs, but if you have a problem, just check out the FAQ and download the patch that corresponds to your error.

So, How Do I Stream Up My Site?
The RealServer takes your video/audio file, segments it, and sends the pieces to a buffer on your hard drive. The buffer then renders the packets together to play like a continuous file, resulting in a smooth, high-quality track with a painless download time.
RealPublisher can generate the files you need to make all this work, but you're much better off knowing what's going on in case something breaks. So, to stream a .ra file, start by creating a corresponding .ram file (which tells the RealPlayer to receive the file from the RealServer as a stream, rather than a download). The .ram file is a text document that contains a simple string, like this: