Streaming Video: An Overview
Compression by the numbers: Bandwidth math
Let’s finish this discussion by clearly stating why you are reading this: You need to be sure your video plays smoothly and predictably… at all times. A user with a broadband connection should not have to wait for more than a second or two for your video to start playing. Dial up users deserve the same consideration. This means you have to know the math behind what you are doing.
We know that file sizes are measured in “K” or “KB”. This is a short form for kilobyte. A kilobyte is 1,024 bytes but is rounded down to 1,000. Since a byte is 8 bits , a kilobyte is about 8,000 bits.
Transmission is measured in “K” but, in this case the “K” is short for Kbps or kilobits per second… not
kilobytes but kilobits. Even though your broadband modem may be rated at 400 kbps or more this does not mean a
400k file will download in one second. Let use your weird uncle who lives in Northern Ontario and can only use a
56 K modem for web access.
His modem is rated to move 56 kilobits of information per second. That is 56,000 bits. Sounds like a lot. Not
really. Divide by 8 (the number of bytes in a bit) to get the true number . The result is 7kb per second which
is a far more realistic expectation.
Now let’s look at broadband delivery. Cable Modems and DSL (Digital Subscriber Lines used by the Sympatico service here in Canada) are rated at about 4 Mbps Again don’t confuse this with the other number measured in MBps. Mbps delivers 1,000,000 bits per second. The other number, Mega Bytes per second, describes the transfer rate between two hard drives. Obviously the cable modem is a bit slower but don’t fall in love with the million because, like its dial up cousin the number is not correct. The actual transfer rate for a cable modem is around 500 kb per second.(4,000,000/8).
So let’s start doing some math to figure out how to stream a video. We’ll use your weird uncle’s 56K service as the benchmark to determine how much time is required to stream a 100 kb video into a 56K modem.
1. Convert the storage ( kilobytes) to shipment (kilobits) by multiplying by a factor of 8 because there are 8 bits to a byte.
100KB x 8 = 800 Kb(kilobits).2. Divide this number by the recommended bandwidth. A common measure is 34Kbps for this modem.
800Kb / 34 Kbps = 24 (23.52) seconds.
So it will take 24 seconds to stream a 100KB video. If the video is 1 Mb then your weird uncle is going to be twiddling his thumbs for about 4 minutes. Did I mention this is the ideal?
Now what if the data stream was inconsistent? The first frame is 17KB, then 25KB then down to 8 KB and so on. If you do the math the first four seconds of the stream will pose no problems. The next one will require 6 seconds to stream. Trying to push 6 seconds of data through a 4-second pipe will either choke the stream or clog the Player… and all of the nastiness that entails.
A couple of pages back I gave you a chart to help you wrap your mind around the settings for video based on delivery and motion. If you don’t have the time to do the fine tuning use this one instead:
Image 18. Try these settings
Bottom line?
When optimizing for dial up service, keep the rate to no more than 100 Kbps and the physical dimensions of the video to no more than 160 by 120. When optimizing for broadband, 300 Kbps is ideal but you should go no higher than 400 Kbps. The physical dimensions should not exceed 320 by 240 and the ideal is 240 by 180. Remember, those bandwidth numbers are the total for both the audio and the video portions of the stream.
The Flash Video Encoder is a bit disingenuous in the regard. Its default is 400 Kbps. What the numbers in the Encoder don’t tell you is that number- 400 Kbps- is for the video portion only. Add another 96 Kbps for the audio’s stereo portion and you are running the video out at a rate of almost 500 Kbps.
Image 19: Don't trust the Encoder default values.
You are looking at that and probably thinking, “500 Kbps! Hey, isn’t that the transfer rate for a cable modem? What’s the deal?” The deal is this: That is the size of the entire pipe. It doesn’t take into account other background activities like… maybe the browser, an online game, and your email program and Instant Messenger running in the background. Though you may claim this is never the case with you you have to ask, "Is it the case with my user? All of those applications and files are using the pipe as well which, in many respects, brings us right back to where we started.
There is a lot more to putting Flash Video on the web and the process always starts with you keeping an “eye on the pipe”


This work is licensed under a Creative Commons License.
