Aug 12, 2008

Why Encoding Is Necessary - Bandwidth

You've spent countless hours and quite possibly a sizeable sum of money to produce a broadcast-quality podcast. Now you're being asked to take the polished result and convert it to a different format, which may compromise the quality of the original. Why?

The simple answer is because the raw audio and video files are too large to deliver practically via the Internet. There's no technical reason you can't deliver the original files — but it would take an incredibly long time for the files to download, and your monthly delivery bill would be sky high. To better understand the practical limitations involved, you must understand the concepts of bandwidth and throughput.

Bandwidth
Bandwidth, in the networking sense of the word, is a measurement of the amount of data that is being transmitted at any given point. Throughput is the aggregate amount of bandwidth that has been used over a given time period. Think about water coming out of a faucet: The water can come out slowly or quickly depending on how much you open the tap. A gallon jug fills slowly or quickly depending on how fast the water is coming out. The "bandwidth" of the faucet is the speed of the water coming out; the "throughput" is the total amount of water that comes out.

In podcasting, we come across bandwidth and throughput in a number of different areas. First, each of your potential audience members is connected to the Internet in some way, and that connection has an advertised bandwidth. If they're on DSL or cable modem, they may have a download bandwidth somewhere between 256 kilobits per second (kbps) to several megabits per second (mbps). Similarly, when you upload your podcast to a server or distribution service, you're using bandwidth, but you're uploading, not downloading. The upload or upstream speed of DSL and cable modems is usually far less than the download speed. Regardless of which direction the data is traveling, the bandwidth available determines the speed at which the transfer takes place.

Let's say you've recorded a 20-minute audio podcast. If you've recorded at CD quality, you recorded in stereo, sampling at 44.1kHz, using 16 bits per sample. We can determine how large this file is using some simple math:

44,100 samples/sec * 16 bits/sample * 2 channels = 1,411,200
bits/second
1,411,200 bits/sec / 8 bits/byte = 176,400 bytes/second
176,400 bytes/second / 1024 = 172.3 kilobytes per second (KBps)
172.3 KB/sec * 60 secs/min * 20 min = 206,718.75 KB
206,718.75 / 1024 = Approximately 202 megabytes (MB)


So the raw file is over 200 megabytes. (In fact, you can do this math much more quickly: One minute of stereo CD audio is approximately 10 MB, so 20 * 10 = ∼200 MB.) Let's assume one of your audience members is on a fairly standard DSL line, with a download speed of approximately 500 Kbps. You can calculate the download time with a bit of math. All you have to do is convert the file size from megabytes into kilobits, and then divide by the download speed:

200MB * 8 bits/byte = 1600 megabits
1,600 megabits * 1024 = 1,638,400 kilobits
1,638,400 kilobits / 500 kbps = 3,266 seconds
3,266 seconds / 60 seconds/minute = 54.6 minutes


So your podcast would take just under an hour to download. If the person is downloading in the background, this might not be too much of a problem, but chances are he's checking e-mail, surfing the Web, and doing other things on his computer that might further constrict the available bandwidth, which in turn makes the download take even longer. Additionally, he may not be getting the full bandwidth that he's paying for (see the "Why Does My Broadband Connection Seem Slow?" sidebar). Overall, this is not an optimal experience.

What we want to do is deliver a high-quality podcast that doesn't take hours to download. Encoding software enables us to do precisely this. For example, if we encode the file using an MP3 codec, we can achieve CD quality using only 128 kbps. In this case, our file would be:

128 kbits/sec * 60 seconds/minute * 20 minutes = 153,600 kilobits
153,600 kbits / 8 bits/byte = 19,200 kbytes
19,200 kbytes / 1024 = 18.75 MB


Our file size is less than ten percent of what it was before, and the download time is therefore reduced to about five minutes, which is much more like it. And because each of your listeners is downloading a smaller file, you use much less throughput.

No comments: