Editing a FLAC file enlarges the file despite cropping?

Hi there,

Long ago I have been told that if I want to edit a music file, and even if it’s just merely cropping it, and I want to do it without reducing the audio quality - I should use a lossless file. Well I do just that - I open a FLAC music file on Audacity, crop it then save it, and surprisingly I see that the new file is twice the size (instead of the same size or even lower considering I trimmed parts of it).

Would very much appreciate an explanation as it seems I lack some knowledge regarding this. Thanks!

Not sure about this, but check if you are converting a mono file into a stereo file.

Hi, how can I check whether the original file is mono or stereo and how can I check what I export it as?

Is that what you are doing - “just merely cropping it”?

If so, then you can temporarily turn off “dither” in Preferences:
“Edit menu > Preferences > Quality > High-quality Conversion: Dither = None”

Normally “high quality” dither should be set to “shaped” as that can provide slightly better sound quality when you apply any effects to the sound.

Re. FLAC file size:
Sounds that have dither applied take up a bit more space than files without.

Other FLAC settings that affect file size:

  • Level: [0 to 8] higher may give slightly smaller files, at the expense of taking a little longer to export.
  • Bit depth: [16 or 24] 24 bit FLAC files may be substantially bigger than 16-bit.

Actual results may vary depending on the audio. Some sounds compress (losslessly) more easily than others.

Hi steve, thanks for the suggestion to turn dither off! The exported file now seems to save at about the same size as the original :smiley:
As for the export settings: the Level is by default set to 5 and the Bit depth is by default set to 16; should I change those, keep them as they are, or does it even vary and depend on the specific file?

the Level is by default set to 5

Like Steve said, a higher value just takes longer to compress as it “works harder” to make a (slightly?) smaller file.

and the Bit depth is by default set to 16

Typically you’ll want to use the same bit-depth as the original. If the original is 24-bits, going to 16-bits will make it proportionally smaller.

As DVDdoug said, the bit depth should be set the same as the original file. You don’t normally need to worry about that because nearly everyone uses 16-bit for FLAC. 24-bit FLAC are pretty rare.

The default level of 5 is a good choice. In most cases the level does not make much difference, but even when the difference is noticeable 5 is a good compromise being nearly as quick as 0 and the file size being nearly as small as 8.

Short answer: Use the defaults unless you have a reason not to. :wink:

Thank you kindly, everyone! :slight_smile:

Hi steve, quick followup question please: Does the same apply to volume changes? Meaning, if my only editing action of the FLAC file is increasing/decreasing the volume of the sound, can I also turn dither off for that, or is that considered more vital editing than trimming which does require dither on?


Amplifying changes sample values, so for best quality, dither should be enabled.

The difference in sound quality whether dither is enabled or not is very small, so if smaller file size is more important to you than a very slight reduction in sound quality, you could try disabling dither and see how much space that saves you.

Hello friends, followup on an old question: If I need to crop an mp3 file, would saving it as FLAC prevent the loss of quality, just as much as saving a FLAC file would, or is there no way to edit and save an mp3 file without loss of quality, regardless of the new format?

Hmm, I’m not sure what you’re asking.

Hi steve, I’m asking if cropping an mp3 audio file then saving it as FLAC would prevent the loss of quality of the audio, or - since the file is originally an mp3 - it makes no difference whether I save it as FLAC or as mp3 and it would lose quality, and there’s nothing I can do to prevent it? (whereas if I crop a FLAC file and save it as FLAC, no quality is lost)

The significant loss of sound quality occurs when encoding audio to a “lossy” format (such as MP3 / AAC / Ogg /…). The loss is cumulative - additional damage is caused each time the audio is encoded.

There is also some quality loss when exporting to a “lossless” format that has less than 32-bits per sample. For 8-bits per sample, this will probably be very noticeable as a high noise floor. For 16 bit or higher, the loss is tiny - virtually insignificant.

  • When exporting as 32-bit float format WAV, the exported audio is absolutely identical to the audio in Audacity - no losses at all (assuming that the sample rate is not being changed).
  • 24-bit WAV is very nearly perfect, provided that the sample rate is not changed and the audio is below 0 dB.
  • 16-bit is nearly perfect, but a tiny bit of noise may be noticeable during silences if the volume is turned up very loud.

Thank you steve, so you’re saying it doesn’t matter whether I export the edited mp3 file as mp3 or FLAC - since either way damage is caused?

I’m saying:

  • for zero additional damage, export as 32-bit float WAV
  • for almost zero damage, use any lossless format (including WAV or FLAC) with at least 16-bits per sample
  • MP3 export, or any other “lossy” format, will cause significant damage each time the audio is encoded. The amount of damage is greater when the “kbps” is lower, but even at the highest setting (320 kbps MP3) the damage is much greater than 16-bit WAV / FLAC.

Thank you, as always