2

The title says it all. What sample rates are possible for an MP3 file?

It is my understanding that there are only a few bits for specifying the sample rate. I know that 44.1 kHz and 48 kHz are supported. And I think also some smaller sample rates. Anything between 44.1 kHz or over 48 kHz?

I know also that it's possible to have different parts in the same MP3 file to play with different sample rates, but how common is that in real life?

3
  • Have you done any research on this? If so, why didn't it answer your questions?
    – n00dles
    Aug 12, 2016 at 13:46
  • More info about what you hope to accomplish with this information might help clarify the answers.
    – user9881
    Aug 12, 2016 at 15:22
  • I'm thinking about sample rate conversion requirements for mixing together two or more MP3 tracks and playing it out from a single DAC. If there are only a few possible sample rates for MP3, it could be done by writing just a few sample rate converters for those specific sample rates. This question is part of both researching the requirements and documenting the effort for the benefit of others.
    – PkP
    Aug 12, 2016 at 17:18

2 Answers 2

3

If this wikipedia page is to be believed, what you call mp3 and is actually a MPEG-1 audio layer 3 encoded audio file only supports three sample rates :

  • 32 kHz
  • 44.1 kHz
  • 48 kHz

EDIT

As @PkP has mentioned, besides MPEG-1 audio layer 3, there are more recent versions of the encoding, which allow other sample rates :

MPEG2 later (1995) added 24 kHz, 22050 Hz and 16 kHz. There seems to also exist something called MPEG2.5 that also adds 8 kHz, 11025 Hz and 12 kHz, bringing the total list to nine possible sample rates.

Actually, the LAME encoder supports the following sample rates as argument of the resample option (expressed in kHz) :

  • 8
  • 11.025
  • 12
  • 16
  • 22.05
  • 24
  • 32
  • 44.1
  • 48

As the sample rate is written in the header of the file, I cannot see how you could have different sample rates in a single mp3 file.

EDIT

As @PkP has mentioned, the sample rate is not written in the file header but for each mp3 block. Therefore is should be possible to have different sample rates in a mp3 bitstream.

3
  • 1
    Sample rate is not written in the header of the file (mp3 does not have file header), it's written separately for each mp3 block. You can concatenate (cat) different MP3 files together into a single file and the joined file will play correctly. I think it's because Mp3 was originally designed for satellite radio streaming and for that to work, the receiver must be able to pick up the broadcast at any time and not just in the beginning of the file.
    – PkP
    Aug 12, 2016 at 17:08
  • +1 for the initial info and the link that leads to the standards. I've learned that MPEG1 Layer 3 defined those 3 sample rates: 32 kHz, 44.1 kHz and 48 kHz, but MPEG2 later (1995) added 24 kHz, 22050 Hz and 16 kHz. There seems to also exist something called MPEG2.5 that also adds 8 kHz, 11025 Hz and 12 kHz, bringing the total list to nine possible sample rates.
    – PkP
    Aug 12, 2016 at 17:36
  • I accepted your answer as the most helpful one, thanks for your effort. If you agree with the augmented list of sample rates, perhaps you could edit your answer to include the additional sample rates.
    – PkP
    Aug 12, 2016 at 18:25
0

I'm hesitant to put this as an answer, here but the short answer is that an mp3 can have "all" of the sampling rates. https://en.wikipedia.org/wiki/Sampling_(signal_processing)#Sampling_rate

Some (many?) audio players won't support anything besides those standard (44.1k, 48k) sampling rates anyway though. It's extremely uncommon to have anything except for standard sampling rates except in applications like telephony or other very specific applications.

I've never heard of an instance of different parts in the same MP3 file playing with different sample rates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.