Section Navigation

Inside the MP3 Codec
Breaking It Down
Lossy Compression
Masking Effects
Freedom of Implementation
Who Defines Imperceptible?
The Huffman Coding
MP3 Decoding
Anatomy of an MP3 File
ID3 Space
Frames Per Second

MP3 Converter Home

Inside the MP3 Codec - Page 13
featured with permission from MP3: The Definitive Guide by Scot Hacker

Frames per Second

Just as the movie industry has a standard that specifies the number of frames per second in a film in order to guarantee a constant rate of playback on any projector, the MP3 spec employs a similar standard. Regardless of the bitrate of the file, a frame in an MPEG-1 file lasts for 26ms (26/1000 of a second). This works out to around 38fps. If the bitrate is higher, the frame size is simply larger, and vice versa. In addition, the number of samples stored in an MP3 frame is constant, at 1,152 samples per frame.

The total size in bytes for any given frame can be calculated with the following formula: FrameSize = 144 * BitRate / (SampleRate + Padding).

Where the bitrate is measured in bits per second (remember to add the relevant number of zeros to convert from kbps to bps), SampleRate refers to the samplerate of the original input data, and padding refers to extra data added to the frame to fill it up completely in the event that the encoding process leaves unfilled space in the frame. For example, if you're encoding a file at 128 kbps, the original samplerate was 44.1kHz, and no padding bit has been set, the total size of each frame will be 417.96 bytes: 144 * 128000 / (44100 + 0) = 417.96 bytes .

Keeping in mind that each frame contains the header information described above, it would be easy to think that header data accounts for a lot of redundant information being stored and read back. However, keep in mind that each frame header is only 32 bits long. At 38fps, that means you get around 1,223 bits per second of header data, total. Since a file encoded at 128 kbps contains 128,000 bits every second; the total amount of header data is miniscule in comparison to the amount of audio data in the frame itself.


Next:  Citations

MP3 converter full versions | MP3 converter shareware | MP3 converter freeware | Mac MP3 converters
Free MP3 Players |  | MP3 Remix Software
MP3 Converter Home


© 2000-2011 Copy and Copyright MP3 Converter | About Us