# FFMPEG and bit-rate for MP3s from audio CDs.

**URL:** <https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587>\
**Category:** Factual Questions\
**Created:** [April 30, 2017, 6:16pm UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587 "2017-04-30T18:16:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwardcoast](https://avatars.discourse-cdn.com/v4/letter/e/cab0a1/32.png) [@edwardcoast](https://boards.straightdope.com/u/edwardcoast)\
**Post date:** [April 30, 2017, 6:16pm UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/1 "2017-04-30T18:16:08Z")

</div>

You have an audio CD you purchased. You want to use it on an MP3 player. So you use FFMPEG to convert it to an MP3 audio file.

I’ve seen many examples of this, but I’m wondering if there is a limit to the bit-rate from a CD audio file? One example showed converting it to 192K. Others using 320K. Isn’t there a practical limit from the audio CD, that going further is just going to waste space and processing time of the MP3 player?

---

<div class="post-metadata">

**Author:** ![SamuelA](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@SamuelA](https://boards.straightdope.com/u/SamuelA)\
**Post date:** [April 30, 2017, 6:26pm UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/2 "2017-04-30T18:26:04Z")

</div>

Yes. FLAC bitrate (a lossless audio compression format) is ~906 kbps. So there is no point in a bitrate that is higher than 906, because you are introducing (very slight, inaudible) compression artifacts for no benefit.

In most cases, devices that are “MP3 players” will play FLAC or some other lossless format. Given how cheap SD cards are, there’s basically no reason to compress to MP3 anymore. Use a lossless format.

---

<div class="post-metadata">

**Author:** ![markn\_1](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markn\_1](https://boards.straightdope.com/u/markn_1)\
**Post date:** [April 30, 2017, 10:06pm UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/3 "2017-04-30T22:06:29Z")

</div>

\*\* SamuelA\*\*'s reasoning isn’t really valid, because FLAC and MP3 use completely different compression algorithms. The fact that FLAC is lossless at 906 kbps doesn’t tell you anything about the quality of MP3 at the same bitrate. I could design a compression algorithm that sounds like crap at 906 kbps.

There isn’t really an objective answer to this question. If you actually compare the digital output of an MP3 decoder to the original 44.1 kHz sampled data from the audio CD, it won’t be the bit-for-bit identical at any bitrate. (I’m pretty sure of this but not 100% positive.) Nevertheless, most people can’t tell the difference between 320 kbps MP3 and the original, so there’s probably no point in encoding MP3 at a higher bitrate. My old ears are not good enough to tell the difference between 128 kbps MP3 and the original in most cases, so for me personally, 128 kbps is good enough. If you’re encoding music only for your own personal consumption, you should use whatever bitrate sounds acceptable to you.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [April 30, 2017, 11:59pm UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/4 "2017-04-30T23:59:46Z")

</div>

MP3 encoders like LAME (used by ffmpeg) let you specify a preset quality for the encoding instead of worrying about selecting a fixed bitrate. The highest-quality setting will output an average of ~250 kbit/s so there is not much point in exceeding that.

As has been said, you may be happy with a slightly lower-quality setting. However, MP3 was not really designed to sound good at extreme compression, so below ~160 kbps you should consider using a different codec like Vorbis.

Either way, just remember, never try to re-encode an already MP3-encoded file since the compression is lossy!

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [May 1, 2017, 12:40am UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/5 "2017-05-01T00:40:38Z")

</div>

CD audio is 2 channels of 16 bit samples at a rate of 44.1kHz. That means 1411200 bits per second. As audio has significant redundancy is is common to be able to losslessly compress this to half this rate without too much difficulty. But you cannot create a lossless compressor that has a fixed rate (except for the trivial case where it does not actually compress.) If your CD contained pure white noise it would not be compressable, and a lossless compressor would actually make the final bitstream slightly bigger (due to the fixed overheads in the compression stream).

The CD audio format sits very close to the edge of human audio perception. Indeed you really need to use techniques like shaped dither to get the format to the resolution of the ear in the mid bands. However the CD also contains as much information in the top octave as the entire rest of the channel, a frequency band where humans have very poor resolution. So trivially we can see where a lot of useless resolution lives. Lossy audio compressors make use of knowledge of how the ear works and where the ear simply has little to no ability to resolve information to work out where information can be safely thrown away without noticeable effect. However if you know what to listen to you can tell. (Typical artefacts are lack of ambience in the moments after the sound stops, and percussive sounds that sound “splashy”. ) For most people these artefacts are trivial in the extreme. So quite aggressive compression can be used without issue.

OTOH, disk is cheap. I rip everything lossless, mostly so I never have to rip it again. Converting from one lossy format to another often does not work well. It is always best to start with the original when creating a new stream.

---

<div class="post-metadata">

**Author:** ![edwardcoast](https://avatars.discourse-cdn.com/v4/letter/e/cab0a1/32.png) [@edwardcoast](https://boards.straightdope.com/u/edwardcoast)\
**Post date:** [May 1, 2017, 12:55am UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/6 "2017-05-01T00:55:12Z")

</div>

> [@Francis\_Vaughan](#):
>
> CD audio is 2 channels of 16 bit samples at a rate of 44.1kHz. That means 1411200 bits per second. As audio has significant redundancy is is common to be able to losslessly compress this to half this rate without too much difficulty. But you cannot create a lossless compressor that has a fixed rate (except for the trivial case where it does not actually compress.) If your CD contained pure white noise it would not be compressable, and a lossless compressor would actually make the final bitstream slightly bigger (due to the fixed overheads in the compression stream).
> 
> The CD audio format sits very close to the edge of human audio perception. Indeed you really need to use techniques like shaped dither to get the format to the resolution of the ear in the mid bands. However the CD also contains as much information in the top octave as the entire rest of the channel, a frequency band where humans have very poor resolution. So trivially we can see where a lot of useless resolution lives. Lossy audio compressors make use of knowledge of how the ear works and where the ear simply has little to no ability to resolve information to work out where information can be safely thrown away without noticeable effect. However if you know what to listen to you can tell. (Typical artefacts are lack of ambience in the moments after the sound stops, and percussive sounds that sound “splashy”. ) For most people these artefacts are trivial in the extreme. So quite aggressive compression can be used without issue.
> 
> OTOH, disk is cheap. I rip everything lossless, mostly so I never have to rip it again. Converting from one lossy format to another often does not work well. It is always best to start with the original when creating a new stream.

I found this abstract [here](https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio).

> [@](#):
>
> On a Red Book audio CD, data is addressed using the MSF scheme, with timecodes expressed in minutes, seconds and another type of frames (mm:ss:ff), where one frame corresponds to 1/75th of a second of audio: 588 pairs of left and right samples. This timecode frame is distinct from the 33-byte channel-data frame described above, and is used for time display and positioning the reading laser. When editing and extracting CD audio, this timecode frame is the smallest addressable time interval for an audio CD; thus, track boundaries only occur on these frame boundaries. Each of these structures contains 98 channel-data frames, totaling 98 × 24 = 2,352 bytes of music. The CD is played at a speed of 75 frames (or sectors) per second, thus 44,100 samples or 176,400 bytes per second.

So do I take the above to mean, an audio CD can’t do any better than 176.4K per second? Meaning, anything above a bit-rate of 176.4K for an MP3 does nothing to preserve the original audio sound from the CD? So a bit-rate of 192K or 320K doesn’t do anything except take up space and make the CPU work harder?

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [May 1, 2017, 1:06am UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/7 "2017-05-01T01:06:52Z")

</div>

> [@edwardcoast](#):
>
> I found this abstract [here](https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio).  
> So do I take the above to mean, an audio CD can’t do any better than 176.4K per second? Meaning, anything above a bit-rate of 176.4K for an MP3 does nothing to preserve the original audio sound from the CD? So a bit-rate of 192K or 320K doesn’t do anything except take up space and make the CPU work harder?

That’s approximately 1411 kb/s. My “factual” answer is above 250 kb/s VBR is wasteful according to the psychoacoustics described above, and below 160 k you should not be using MP3 but rather a different format.

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [May 1, 2017, 1:18am UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/8 "2017-05-01T01:18:52Z")

</div>

> [@edwardcoast](#):
>
> So do I take the above to mean, an audio CD can’t do any better than 176.4K per second?

You are confusing bytes and bits. CD is 176.4k **bytes** per second. Compression rates are expressed in **bits** per second. 176.4K \* 8 = 1411200 = 1.4M bits per second.

---

<div class="post-metadata">

**Author:** ![edwardcoast](https://avatars.discourse-cdn.com/v4/letter/e/cab0a1/32.png) [@edwardcoast](https://boards.straightdope.com/u/edwardcoast)\
**Post date:** [May 1, 2017, 3:47am UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/9 "2017-05-01T03:47:24Z")

</div>

> [@Francis\_Vaughan](#):
>
> You are confusing bytes and bits. CD is 176.4k **bytes** per second. Compression rates are expressed in **bits** per second. 176.4K \* 8 = 1411200 = 1.4M bits per second.

Which compression rates are you referring to? Those used by MP3s?

Maybe I’m not comparing the same thing then?

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [May 1, 2017, 4:12am UTC](https://boards.straightdope.com/t/ffmpeg-and-bit-rate-for-mp3s-from-audio-cds/785587/10 "2017-05-01T04:12:33Z")

</div>

> [@edwardcoast](#):
>
> Which compression rates are you referring to? Those used by MP3s?

Yes,([MP3 - Wikipedia](https://en.wikipedia.org/wiki/MP3#Bit_rate)) (but actually all compressor’s rates)
