LightningStrike Studios
PO Box 24040
Cambridge, Ontario
N1R 8E6
1-519-621-1214
info@lightningstrikestudios.com

We Interrupt This Webcast ...

Go to most radio station's web sites and you'll find a link to listen to the station's broadcast over the Internet. Similar, but not quite as common, are video broadcasts. Sometimes the broadcast is "live." Often it's a segment that was recorded earlier. In both cases you receive it as it's broadcast -- or webcast -- from the source. This is called "streaming media."

Streaming media differs from what we're usually familiar with, music or video clips we can download, store on our local hard drive, and play later. (We'll talk about downloading music in a future article.) In streaming media there is no file created on our local system. We view or listen as it comes. When it's finished, it's gone. (There actually are ways of capturing and saving streams, just as you can record audio from the radio, but the technical and legal aspects of that are a whole other discussion.)

Let's take a simplified look at this streaming process from beginning to end. While there are a number of options, the de facto king of streaming media is Apple with its QuickTime format. Although Apple founded QuickTime on the Macintosh, they've now made it available for Unix and Windows platforms, both on the server and the client ends.

To start, we need a way of capturing whatever it is we're going to broadcast. If it's audio only, a simple microphone may be sufficient. For video, of course, we need a video camera, specifically a digital video camera. We could also deliver a stream of a recorded program from video or audio tape.

Then we need some way of getting the signal into our computer. Most computers have simple audio-in ports. For higher end work we may want a device like the USBPre from Sound Devices (www.sounddevices.com) For video we'd probably want to use FireWire 400 or 800 (the IEEE 1394 standard) on the high end, USB 1 or 2 on the low end.

Although we now have the video or audio signals on our computer, they're not yet ready for broadcast. Video signals especially are far too massive for practical streaming over the internet. So we process or encode them with an application called QuickTime Broadcaster, a free download from the Apple web site.

There are different formats available for encoding the media signal. Which one you choose will depend on your requirements. Some are more suited to data that will be saved and delivered on CDs or DVDs, other give better performance over slower links. For streaming over the Internet we'll likely choose MPEG-4 since it can be viewed by a variety of client applications on many platforms.

If we're delivering our stream to only a single computer, QuickTime Broadcaster is all we need. However, if we want to make it available to a large number of viewers we need to feed it to the next link in the chain, the QuickTime Streaming Server which "reflects" it out to the network.

From the Streaming Server we can go directly to the Internet and to locally networked computers. However, since each client drawing on the stream increases the network load, we may may need to relay it to additional Streaming Servers, extending our reach to a wider audience.

The QuickTime Streaming Server is included with Mac OS X version 10.3. It uses the same code base as the open source Darwin Streaming Server. You can download binary distributions of the Darwin utility for a number of platforms including Linux, Solaris, and Windows, or download the source code and compile it yourself. Darwin is available at http://developer.apple.com/darwin/projects/streaming/

On the client end we click on a link on a web site, which the Streaming Server helps us create, and then view or listen to the stream with the free QuickTime player, or just about any other MPEG-4 compliant device.

What are the network requirements like for streaming audio and video to the Internet? If you've ever tried to view a video stream, or even listen to an audio stream, over a dial-up modem you know the performance can be poor. How much bandwidth we'll need depends on the data rate of our stream.

The data rate is usually measured in kilobits or megabits per second. It's calculated from a number of variables. For video, how many frames per second do we want? How big is the image? What resolution do we want? What color quality do we want? What encoding scheme are we using? How many people will be downloading the stream at any time? Will they all be using the same type of connection, or will some be on slow links while others are on fast links? For audio, we need to consider our sample size. For voice, 8-bit sampling may be sufficient; for music we'll probably want 16-bits or more.

Full-motion video requires 24 to 30 frames per second. We typically deliver streaming video at 15 frames per second. This still appears reasonably smooth. Below 15 fps the video appears jerky.

A smaller window size requires less bandwidth than a larger window. Over a 56 kilobits per second modem connection a video at 160 by 120 pixels may appear all right; one at 640 by 480 would not.

A very basic calculation might look like this:

(width in pixels) x (height in pixels) x (color depth in bits) x (frames per second) / 1024 = kilobits per second

Thus, a video stream at 240 x 180, with 8-bit color, at 15 frames per second would yield 5,063 kilobits per second, well out of the range of a 56 kbps modem.

This is where MPEG-4 compression comes in. Ratios will vary widely depending on the raw video data and on the settings we use, but anywhere from 30:1 to 100:1 is typical. Once we compress our example stream we could end up with a reasonable feed of 50 kbps. Before we get too excited, we must keep in mind that we'd be lucky to achieve 40 kbps on a typical dial-up connection. Then we may add an audio track. And there's additional overhead. We can easily see why we'd want as much bandwidth as possible for our server.

While we can certainly do all of this ourselves -- all we need is a digital video camera, a Mac with the latest OS (or some lesser platform,) a couple of free downloads, and a fast network connection -- it may be easier to let someone do it for us. The Apple web site lists a number of companies providing production, encoding, and streaming services. Your current Internet Service Provider may already be equipped to stream your prepared content.

For more information about QuickTime, and to download the QuickTime Broadcaster and the QuickTime player, visit http://www.apple.com/quicktime