O'Reilly logo

Digital Audio Essentials by Bruce Fries, Marty Fries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

File Sizes

Many variables determine the size of a digital audio file. For uncompressed audio, these include the sampling rate, resolution, and number of channels. For compressed audio, the primary variable is the bit-rate. The space used by any metadata (see Chapters 4, 9, and 12) also affects the file size.

The following formulas will help you calculate file sizes for either type of audio. This is important if you want to figure out how many digital audio files will fit on your hard disk or portable player, or how long it will take at a specific Internet connection speed to download a song.

To calculate the file size for uncompressed audio, multiply the sampling rate by the resolution, the number of channels, and the time (i.e., how long it takes to play the complete file) in seconds. Divide the result by 8 for the size in bytes. This example shows how to calculate the size of a one-minute clip of CD audio:

	44,100 x 16 x 2 x 60 / 8 = 10,584,000
	sampling rate x resolution x time / 8 = size in bytes

To calculate the file size for compressed audio (at a constant bit-rate), multiply the bit-rate by the time in seconds. Again, divide the result by 8 for the size in bytes. This example shows how to calculate the size of a one-minute MP3 file encoded at a constant bit-rate of 128 kbps:

	128,000 x 60 / 8 = 960,000
	bit-rate x time in seconds / 8 (bits/byte) = file size in bytes

Controlling file sizes

You can do several things to control the size of uncompressed and compressed digital audio files. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required