dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: mp3 encoding quality and bitrates, how it works?

Re: mp3 encoding quality and bitrates, how it works?

From: Linus Nielsen Feltzing <>
Date: Sat, 17 Apr 2004 13:27:52 +0200

Cristian wrote:
> Can someone explain me how the whole thing works? What I controll
> with quality, and I also noticed that some quality values make mp3
> 2.0, where as other values yieald a mpg 1.0 mp3 file.

* Sample rate:
  Controls the amount of samples per secod, basically which frequencies
that can accurately be reproduced buring playback. Lower frequencies
produce smaller files, for two reasons: 1) The amount of data to be
compressed is smaller and 2) the data is easier to compress, since
higher frequencies are not present.

* Bit rate:
  Controls how many bits per second that is required for accurate live
transmission of the compressed audio. When you compress the data harder
(meaning worse sound quality), the bitrate gets lower.

* Stereo vs mono:
  A mono file doesn't necessarily have to be smaller than a stereo file.
It all depends on the encoder. The MAS does produce smaller files with mono.

* MAS Quality:

  The MAS uses VBR for compression, which means that the bitrate varies
from frame to frame, depending on how compressable the data was at that
point in time. This allows for a more even quality, and also smaller
files if the data is easily compressed. The MAS can generate frames with
bit rates ranging from 32kbit/s to 192kbit/s (MPEG1) or 8kbit/s to
160kbit/s (MPEG2).

The MAS quality setting is just a way of selecting an average bit rate
according to the following table (quality 0 is on the far left):

44100Hz stereo: 75, 80, 90, 100, 120, 140, 160, 170
22050Hz stereo: 39, 41, 45, 50, 60, 80, 110, 130
44100Hz mono: 65, 68, 73, 80, 90, 105, 125, 140
22050Hz mono: 35, 38, 40, 45, 50, 60, 75, 90

This table can be found on page 38 in the MAS3587 data sheet.

* MPEG versions:
  The different MPEG versions use different sample rates:
  44100, 48000, 32000: MPEG version 1
  22050, 24000, 16000: MPEG version 2
  11025, 12000, 8000: MPEG version 2.5 (not an official standard)

What does this mean for you? Well, if you lower the sample rate, you
make the file smaller at the expense of higher frequencies. If you raise
the bit rate, you get less compression artifacts.

Winamp is wrong if it tells you that the file isn't VBR. I can imagine a
few reasons why it does:

1) Your version of Winamp is from the stone age

2) You have recorded with the Archos firmware

3) You have used the File Split feature in Rockbox (either Time Split,
or pressing Play manually to start a new file

4) You have edited the files

5) There is a bug in Rockbox

You can easily recreate the VBR header in Rockbox by selecting "Update
VBR file" in the ON+Play menu.

We removed the 0 gain setting because it was essentially useless. Who
wants to record with no gain?

I don't know about the hiss, though.

> and refering to winamp, it never says vbr, although I set the option:
> calculate average bitrate in vbr files. Is this winamp's fault or
> some header is missing? Plus, I always read, header found at 4 or
> 5000 bites within the file. Shouldn't it be at the beginning? at 0
> bites?

The header it refers to is probably the Xing header, or the first audio
frame. The 5000 bytes before it is the ID3v2.4 tag.

Received on 2004-04-17

Page was last modified "Mon Nov 16 10:57:21 2020" The Rockbox Crew -- Privacy Policy