WAV files exported from Audacity are not bit-identical

This section is now closed.
Forum rules
Audacity 1.2.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
DjBR
Posts: 54
Joined: Sun Apr 05, 2009 3:43 pm
Operating System: Please select

Re: WAV files exported from Audacity are not bit-identical

Post by DjBR » Tue Apr 07, 2009 6:52 pm

With the "corrected" settings now...

Open FLAC -> Export as WAV:
(Problem remains)
--------------------------------
Differences found in 1 out of 1 track pairs.

Comparing:
"C:BACKUP IIJS - Dog With Crown And Earring wav"
"C:BACKUP IIJS - Dog With Crown And Earring.flac"
Length mismatch : 4:30.359977 vs 4:30.360000, 11922875 vs 11922876 samples

Problem remais with FLAC -> FLAC as well.
--------------------------------------------------------------


Opening WAV and exporting WAV is solved with this workaround... but what about with FLAC files now...

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: WAV files exported from Audacity are not bit-identical

Post by steve » Tue Apr 07, 2009 10:42 pm

DjBR wrote:Problem remais with FLAC -> FLAC as well.
No I'm not getting that, but I'm using Audacity 1.3.8 alpha. If I switch off dithering, I get bit perfect import/export of 16 bit WAV files and Flac files (16 bit and 24bit).
Perhaps the fault that you are seeing now with flac is due to another issue.

Which version of Audacity are you using?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

DjBR
Posts: 54
Joined: Sun Apr 05, 2009 3:43 pm
Operating System: Please select

Re: WAV files exported from Audacity are not bit-identical

Post by DjBR » Tue Apr 07, 2009 11:05 pm

The version is 1.3.7

OK, I just tried again WAV to WAV and the problem continues (so I assume it would have been continuing when I tried FLAC). The dither boxes are set to "None", like it was said to be set, but the issue is back...
There's something definitely touching the audio, and I don't know now... There is no option to "leave the file properties unchanged"... would be a great feature to grey out the entire Conversion box....

Update: Audacity is getting crazy, I just saved a FLAC to WAV and they are identical... minutes before, a WAV to WAV and it was not identical.... something is taking place on import/export...

FLAC to WAV
------------------------------------------------------------------------------------
All tracks decoded fine, no differences found.

Comparing:
"C:FLACYazoo-(1990)-Situation (Remix)2 - State Farm (Original 12'' Mix) FILE SAVED BY AUD.wav"
"C:FLACYazoo-(1990)-Situation (Remix)2 - State Farm (Original 12'' Mix) SOURCE FILE.flac"
No differences in decoded data found.
--------------------------------------------------------------------------------------

now same file..

WAV to WAV
------------------------------------------------------------------------------------
All tracks decoded fine, no differences found.

Comparing:
"C:FLACYazoo-(1990)-Situation (Remix)2 - State Farm (Original 12'' Mix) FILE SAVED BY AUD.wav"
"C:FLACYazoo-(1990)-Situation (Remix)2 - State Farm (Original 12'' Mix) SOURCE FILE.wav"
No differences in decoded data found.
--------------------------------------------------------------------------------------

**DIFFERENT FILE*** from same CD:

WAV to WAV
----------------------------------------------------------------------------------------
Differences found in 1 out of 1 track pairs.

Comparing:
"C:FLACYazoo-(1990)-Situation (Remix)1 - Situation (1982 US Remix By Francois Kevorkian) FILE SAVED BY AUD.wav"
"C:FLACYazoo-(1990)-Situation (Remix)1 - Situation (1982 US Remix By Francois Kevorkian) SOURCE.wav"
Length mismatch : 5:45.359977 vs 5:45.360000, 15230375 vs 15230376 samples
----------------------------------------------------------------------------------------

I would assume there must be a problem when IMPORTING files.....

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: WAV files exported from Audacity are not bit-identical

Post by steve » Wed Apr 08, 2009 1:25 am

DjBR wrote:The version is 1.3.7
Oh! Just wondering why you posted in the Audacity 1.2 part of the forum.
DjBR wrote:Comparing:
"C:FLACYazoo-(1990)-Situation (Remix)\01 - Situation (1982 US Remix By Francois Kevorkian) FILE SAVED BY AUD.wav"
"C:FLACYazoo-(1990)-Situation (Remix)\01 - Situation (1982 US Remix By Francois Kevorkian) SOURCE.wav"
Length mismatch : 5:45.359977 vs 5:45.360000, 15230375 vs 15230376 samples
This is a different issue and is known about.
It has been noticed that the length of exported files is sometimes out by 1 sample (I think it is the final sample that gets dropped, making the track around 0.000023 seconds shorter than it should be. In practical terms, it is pretty irrelevant, but as you say, it should not happen and fixing it is on the "to do" list.

Regarding the "dither" issue, another way round the problem could be to use 32bit files. I've not tested it, but I expect that even with the dither setting active, if you are using 32 bit files and have Audacity "Quality" settings to 32 bit, the issue will not appear.

While we agree that sample perfect import and export should happen, the fact that your tests are showing results such as "Differences found: 13733103 sample(s)" is suggesting a gloomier picture than is actually the case.
Yes, there's a lot of samples that have changed values, but they are not changed by much. The difference between the original sample value and the "dithered" sample value is extremely small (approximately a half of a hundredth of one percent or +-0.00003). Errors of this (small) magnitude will be completely swamped by distortions and inaccuracies in even very high quality sound systems.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

DjBR
Posts: 54
Joined: Sun Apr 05, 2009 3:43 pm
Operating System: Please select

Re: WAV files exported from Audacity are not bit-identical

Post by DjBR » Wed Apr 08, 2009 3:02 am

Code: Select all

Oh! Just wondering why you posted in the Audacity 1.2 part of the forum.
Like I said, this problem happens in Audacity 1.2.x or 1.3.x
It happens exactly in the same manner... with dithering set off, or not.

I started using 1.3.x because I thought 1.2.x is obviously broken or so out-dated, that it could not even export WAV losslessly.
That's why I started using 1.3.x

The gloomier case is exactly the one sample you talk about... foobar2000 bit comparator will list all samples which have been shifted forward or backward, compared to the original.

I hope this get fixed REAL soon, if it's not a major headache.
I really like Audacity, but for now, I think I will just leave it alone and try another application.

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: WAV files exported from Audacity are not bit-identical

Post by steve » Wed Apr 08, 2009 12:48 pm

DjBR wrote:The gloomier case is exactly the one sample you talk about... foobar2000 bit comparator will list all samples which have been shifted forward or backward, compared to the original.
Are you sure about that?

In my tests I find 2 scenarios:

1) If dither is enabled AND I'm importing 16 bit audio: The Imported audio has dither applied.
2) If dither is disabled, then in some rare cases the final sample is truncated on Export.

BTW, I've written a Nyquist plug-in for Audacity 1.3 that will print out sample values for the selected audio to a text file - I could post the plug-in if you would like to experiment with it.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

DjBR
Posts: 54
Joined: Sun Apr 05, 2009 3:43 pm
Operating System: Please select

Re: WAV files exported from Audacity are not bit-identical

Post by DjBR » Wed Apr 08, 2009 12:58 pm

Thank you, but I'll pass.
What I usually do requires that I have WAV files saved losslessly no matter what, and with Aud it's just not the case.
I may reconsider when this is fixed.
Thanks for the help.

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: WAV files exported from Audacity are not bit-identical

Post by steve » Wed Apr 08, 2009 2:45 pm

Probably worth testing it again when Audacity 1.4 comes out (due in September).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

DjBR
Posts: 54
Joined: Sun Apr 05, 2009 3:43 pm
Operating System: Please select

Re: WAV files exported from Audacity are not bit-identical

Post by DjBR » Wed Nov 11, 2009 6:26 pm

Months have gone... and I am back here to ask if there is any progress on this issue...
We have past September and no release of 1.4 yet.

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: WAV files exported from Audacity are not bit-identical

Post by steve » Wed Nov 11, 2009 7:47 pm

1.4 has been skipped - we're now looking to the release of Audacity 2.0 next month.

I think the truncating of the final sample may have been fixed some time ago. (perhaps you could test the current 1.3.9 version)

The "problem" of dither being applied when Exporting 16 bit files still exists if dither is selected in Preferences. Apparently this is a by-product of all mixing being done at 32 bit (which in most cases produces better results). In the case of the exception (working entirely in 16 bit), the workaround is as described earlier, to switch off dither which will produce the same result as working entirely in 16 bit.
The developers have noted this and have ideas for keeping the enhanced mixing for all other cases, but reverting to 16 bit operations in situations like this where 32 bit is less desirable. This will not be until after the release of 2.0.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked