Skip to main content

Topic: Is Audacity "Lossless"? (Read 7320 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • canolradd
  • [*]
Is Audacity "Lossless"?
I need to edit many audio files of various formats: wav, ac3, mp2, etc. I need to cut, to append, to insert, etc. But I'm worried about whether Audacity really preserve audio quality or whether it introduces artifacts. In order to test it, I tried this: import an wav file, make no change to the imported track, and export that track to another wav file (same sample rate, etc.). The result wav file is not identical to the original! What's going on? What am I doing wrong?

Forgive me if this is a silly question, but I'm trying to learn...

  • saratoga
  • [*][*][*][*][*]
Is Audacity "Lossless"?
Reply #1
I need to edit many audio files of various formats: wav, ac3, mp2, etc. I need to cut, to append, to insert, etc. But I'm worried about whether Audacity really preserve audio quality or whether it introduces artifacts.


This will not be lossless for lossy formats.

The result wav file is not identical to the original! What's going on? What am I doing wrong?


There are a lot of different ways you can write a wav header.  You need to compare the actual PCM data, not the file holding it.  Use a tool like foobar2000 to compare the actual audio samples.

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is Audacity "Lossless"?
Reply #2
Quote
What's going on?


Audacity re-dithers its output by default.

  • mjb2006
  • [*][*][*][*][*]
Is Audacity "Lossless"?
Reply #3
Audacity re-dithers its output by default.

canolradd, the default settings are for when you're either starting with a different format, applying effects, or combining multiple clips. For the simple case of loading a file, making cut-and-paste edits or adjusting samples manually, then resaving with minimal changes, you want to turn dithering off.

Last I checked, this is how you do it:
Preferences > Quality ... change the High-quality Conversion dither to 'None'

  • canolradd
  • [*]
Is Audacity "Lossless"?
Reply #4
Thanks a lot to all of you. Following your advises, I managed to get an identical wav file, except for the header. As much as I need for now.

Is Audacity "Lossless"?
Reply #5
Quote
For the simple case of loading a file, making cut-and-paste edits or adjusting samples manually, then resaving with minimal changes, you want to turn dithering off.


I only use Audacity for when I run into those annoying hidden tracks that follow several minutes of silence. I load the source FLAC into Audacity and then use Sound Finder to create labels where the actual songs are (leaving out the silence). Those labels are exported to FLAC. I take it I should turn dithering off for this? Or does it even matter in this case?
  • Last Edit: 14 July, 2012, 07:00:27 PM by EagleScout1998

  • mjb2006
  • [*][*][*][*][*]
Is Audacity "Lossless"?
Reply #6
I would turn off dithering for doing a simple track split, yes.

  • dhromed
  • [*][*][*][*][*]
Is Audacity "Lossless"?
Reply #7
I only use Audacity for when I run into those annoying hidden tracks that follow several minutes of silence.


If you're using foobar2000 then you'll love the Skip silence dsp.
Since for some reason I can't find the component anywhere, I assume it's part of the standard installation?

Is Audacity "Lossless"?
Reply #8
If you're using foobar2000 then you'll love the Skip silence dsp.


I know about the Skip Silence DSP. dBpoweramp's ripper also has a similar DSP. However, they don't suit my wants. I prefer having separate tracks. Audacity's Sound Finder function is, so far, the easiest way of doing this. It analyzes the file and creates labels where the sound is. I then export those labels to FLAC. This post raised a red flag because, up until I discovered this post, I didn't know about dithering. I had to do some Googling to figure out what this was and I still don't completely understand. From what I can tell, Audacity intentionally adds noise when downsampling audio. Since this, according to lvqcl, is enabled by default, I was concerned whether this was introducing any undesired (albeit inaudible) artifacts in the newly created tracks.

There is still much about Audacity that is above my pay grade.<br>

  • DonP
  • [*][*][*][*][*]
  • Members (Donating)
Is Audacity "Lossless"?
Reply #9
. I take it I should turn dithering off for this? Or does it even matter in this case?


Another thing to check, I thought Audacity initially defaults to 32 bit floating point numbers while editing.  No need for that if you are just cut and pasting.

Is Audacity "Lossless"?
Reply #10
I feel like an ass hijacking the OP's thread, but since this is related to Audacity....

As an experiment, I imported a FLAC file into Audacity. Without making any edits whatsoever, I exported this file to FLAC. I then used Foobar to compare these two tracks. This was the result:

Code: [Select]
Differences found in 1 out of 1 track pairs.

Comparing:
"C:\Users\Anthony Bertorelli\Desktop\FLAC #01.flac"
"C:\Users\Anthony Bertorelli\Desktop\FLAC #02.flac"
Differences found: 42082194 sample(s), starting at 0.0000680 second(s), peak: 0.0003052 at 120.1485714 second(s), 1ch


This would have given me cause for alarm a couple of days ago. Knowing what I know about dithering (which still isn't much), I set it to "None" and repeated the experiment.

Code: [Select]
All tracks decoded fine, no differences found.

Comparing:
"C:\Users\Anthony Bertorelli\Desktop\FLAC #01.flac"
"C:\Users\Anthony Bertorelli\Desktop\FLAC #03.flac"
No differences in decoded data found.


For this experiment, I didn't change the Default Sample Format; I left it at 32 bit float. I believe CD audio is 16 bit. Would I be correct in assuming that Audacity "upsamples" (if that's even a word) the imported FLAC file to 32 bit and then "downsamples" it to 16 bit (or 24 bit) upon export? Hence the added dither?

  • dumdidum
  • [*][*]
Is Audacity "Lossless"?
Reply #11
there is a confirmed bug in audacity related to the issue discussed ITT.

From the 2.0.1 release notes:
Quote
Dither noise is incorrectly applied by default if exporting to most formats where the bit depth is the same as (or higher than) the project. For example, this occurs if exporting to 16-bit WAV, 16-bit FLAC or MP3 from a 16-bit project. OGG is unaffected. Workarounds: Set "High Quality" dither to "None" in the Quality Preferences.

  • Porcus
  • [*][*][*][*][*]
Is Audacity "Lossless"?
Reply #12
EagleScout1998: Tried to hack together a cuesheet for that particular track, and set index marks, and embed it to the track? Might be an acceptable compromise?