I'm using Audacity 1.3.12 on XP.
I noticed that if I export audio to a file (any format), and then export the audio again to another file, the 2 files are different when I compare them. I thought they would be the same, but they're not. I tried it multiple times with all the different output formats (WAV, MP3, AIF, AC3, etc), and Audacity just does not save the file the same way twice. Is there some sort of random number generator used when saving a file???
+ Reply to Thread
Results 1 to 16 of 16
-
-
Different in that file contents are not the same. Using a file comparison tool and it shows the binary data is different.
If I save the audio to a file, and then immediately save it to another file without doing any changes, you would expect those 2 files to be the same, right? But they're not. -
Have you tried exporting them to a lossless format (like FLAC; I think the latest (beta) version of Audacity, combined with the ffmpeg plugin, allows for that), and compared the results from that? As far as I know, compressing to lossy formats doesn't always provide the same (identical) results, even when creating two versions of the same audio track, using the same compression settings for both.
You can always try the experiment with a different converter/encoder (other than Audacity, I mean) and see if the same thing happens.If cameras add ten pounds, why would people want to eat them? -
Yeah I just did a test. Loaded WAV file 1 into Audacity, and then exported it to WAV file 2. Then closed Audacity, and re-opened Audacity and loaded WAV file 1 again. Exported it to WAV file 3. You would think WAV file 2 and WAV file 3 would be the same, right? They are the exact same size, but according to my file comparison tool, they are very different (over 1000 differences). Weird.
-
I believe Audacity works internally in floating point. So even when importing an uncompressed WAV and exporting again as an uncompressed WAV there will be rounding errors. Sequential exports appear to generate successively more errors so I'm guessing it re-imports the integer data as it's exporting.
-
It's the mathematics going in, and coming out differently, which is why (I do not want a flame war over this) some scientists think that god is code.
-
Is that MD5 Hash comparison? Yes, a unique number is generated, it's called a GUID.
-
You don't even have to open the file you saved and save again. You can just export several times in a row and every file will be different. It isn't just header info or metadata that's changing -- the audio data itself is changing even if you are saving as uncompressed PCM.
-
There shouldn't be any rounding errors converting (in either direction) between 16 bit integer and 32 bit float (when no filters have been applied). Perhaps what is happening is the 32 bit to 16 bit conversion does some dithering which introduces a random variation on the least significant bits.
-
Sign up at the Audacity Forum and ask the actual developers what's going on.
http://forum.audacityteam.org/ -
Command line "FC /B FILEA.WAV FILEB.WAV". And a hex editor viewing both files side by side.
You're right. It even happens when the editing format is the same as the import and export formats. I created a 16 bit, 44,100 Hz, stereo WAV file, imported into Audacity set to work in 16 bit 44,100 Hz stereo, then exported the file four times in a row. Every file was different with noise ranging from about +/- 4 units.
There are two dithering setting in Audacity (Edit -> Preferences -> Quality) in a section called Conversion: Real Time and High Quality. It looks like Real Time applies to playback within the program, High Quality when the data is saved. The dithering is applied even if the working format is the same as the output format and no changes have been made, not just on "conversion" between float, 24 bit, and 16 bit. After disabling the High Quality Dithering the exported file is the same as the source.Last edited by jagabo; 22nd Nov 2010 at 06:47.
-
Investigating my hunch about dithering, I found that if you go into Preferences->Quality and set Dither for 'High-quality Conversion' (used on export to a file) to 'None', then exporting to 16-bit wav produces identical results each time.
Case proved? -
Oh, and after disabling the dithering setting the exported data was the identical as the imported data even when the input and output were 16 bit integer but the working format was float.
-
Thanks guys, it was the dithering causing the files to be different every time. I read that it introduces a random element.
Similar Threads
-
Syncing segments of video with audio differently (stretching, compressing)
By Kreachure in forum EditingReplies: 2Last Post: 5th Mar 2012, 11:27 -
how to convert and save audio & video files? how large of a HD?
By speone in forum Newbie / General discussionsReplies: 2Last Post: 15th Feb 2012, 13:55 -
Can Audacity edit AC3 files?
By Des in forum AudioReplies: 2Last Post: 11th Mar 2009, 17:32 -
Question about using Audacity to join mp3 files
By jimdagys in forum AudioReplies: 2Last Post: 25th Dec 2008, 07:21 -
Merging multiple differently formatted text subtitle files?
By fvisagie in forum SubtitleReplies: 9Last Post: 18th Aug 2008, 14:23