Comparing Two FLAC Files

Jan 6, 2017 at 11:01 PM Thread Starter Post #1 of 12

firehawk65

New Head-Fier
Joined
Jan 26, 2016
Posts
8
Likes
11
I currently have a subscription with a music streaming service which allows me to stream FLAC. I have sniffed the packets coming into my network from the stream and acquired the FLAC files. I want to compare the FLAC I extracted, to the WEB FLAC that has been bought online and known to be Perfect, to determine if mine is also Perfect. I've copied over the exact same tags, and sometimes the file sizes are a tiny bit smaller/larger from each other. How do I properly compare the two FLAC files? I have tried going into audacity and zooming in really close to look at the wavelengths. They look very similar and I cannot tell if there are any differences between the two. Any help is much appreciated. Thanks for your help in advance!
 
Jan 7, 2017 at 1:42 AM Post #2 of 12
On Audacity, you can press Analyse --> Plot Spectrum and compare the output of both files (or at least part of them)
 
It should look like this:

 
Jan 7, 2017 at 4:24 PM Post #6 of 12
  That program looks like it's exactly what I'm looking for. Unfortunately i'm getting some "Error during difference extraction", so i'll have to tinker around with the program a bit. Thanks for the reply!

 
It can be temperamental, especially if sample drift correction is needed. But if it's having a hard time then trying it by hand will probably be even more than a nightmare. Good luck!
 
Jan 7, 2017 at 7:38 PM Post #7 of 12
  When you say "compare the output of both files", what should I be looking for, to determine if they are the same or if they are different?


You can check how those plots compare.
Maybe one roll off at, say 18kHz and the other one extends up to 35kHz.
 
Maybe they are different in the audible range as well.
 
I've overlapped two spectrum plots here for the song Smooth Operator in both cases (from different albums)
It's important that the scale is the same on both graphs, you can adjust the scale with the zoom.
In this case -90dB to -23dB is displayed

I've pressed imp pant on each of them, paste them on separate "Paint" windows, inverted the colour of one of them and then overlapped matching volume.
As you can see there's no perfect matching possible since the songs are different despite being the same song.
In this case the mastering is different on each recordings and that's why they differ.
 
Jan 8, 2017 at 12:19 AM Post #8 of 12
 
You can check how those plots compare.
Maybe one roll off at, say 18kHz and the other one extends up to 35kHz.
 
Maybe they are different in the audible range as well.
 
I've overlapped two spectrum plots here for the song Smooth Operator in both cases (from different albums)
It's important that the scale is the same on both graphs, you can adjust the scale with the zoom.
In this case -90dB to -23dB is displayed

I've pressed imp pant on each of them, paste them on separate "Paint" windows, inverted the colour of one of them and then overlapped matching volume.
As you can see there's no perfect matching possible since the songs are different despite being the same song.
In this case the mastering is different on each recordings and that's why they differ.

Thanks for the detailed reply. As far as I can tell, when I did the same, they looked nearly identical. I'm hopeful that the FLAC streamed is the same FLAC that is supplied when bought outright. I did try out one more method which I hope to get your opinion on. First, I imported both songs into audacity and used the option, "Split Stereo Track" to split the left and right channels. Then I muted one side, say the right channel on both songs. After that, I inverted the left channel of one of the songs and turned up the volume to see if I could hear any sounds. I could not hear anything at all which leads me to believe that the songs are identical to have the wavelengths completely cancel each other out like that. Would this be a strong enough argument to assume that the songs are one and the same?
 
Edit: I just realized I was being silly by splitting up the channels. Simply inverting the wavelength without splitting the channels achieved the same result. The point still stands which I hope to get your opinion on. 
 
Jan 8, 2017 at 12:27 AM Post #9 of 12
  Thanks for the detailed reply. As far as I can tell, when I did the same, they looked nearly identical. I'm hopeful that the FLAC streamed is the same FLAC that is supplied when bought outright. I did try out one more method which I hope to get your opinion on. First, I imported both songs into audacity and used the option, "Split Stereo Track" to split the left and right channels. Then I muted one side, say the right channel on both songs. After that, I inverted the left channel of one of the songs and turned up the volume to see if I could hear any sounds. I could not hear anything at all which leads me to believe that the songs are identical to have the wavelengths completely cancel each other out like that. Would this be a strong enough argument to assume that the songs are one and the same?
 
Edit: I just realized I was being silly by splitting up the channels. Simply inverting the wavelength without splitting the channels achieved the same result. The point still stands which I hope to get your opinion on. 


Strong enough I would say...
You can read about that method here:
https://hydrogenaud.io/index.php/topic,105377.0.html
 
Jan 8, 2017 at 12:37 AM Post #10 of 12
 
Strong enough I would say...
You can read about that method here:
https://hydrogenaud.io/index.php/topic,105377.0.html

That's great news to hear. I believe that I have done everything correctly to have achieved "Perfect nulling" as they have called it on that forum. Thanks so much for your help!
 
Jan 8, 2017 at 3:51 PM Post #11 of 12
For future references, I was given another method to compare the two files. Using the foobar2000 component, "Binary Comparator" I was able to determine that they were indeed identical. After installing the "Binary Comparator" component, I selected the two songs, right clicked and chose "Utilities" -> "Bit-compare tracks" from the context menu. I was presented with the message, "All tracks decoded fine, no differences found." which further leads me to believe that they are indeed identical.
 
Jan 8, 2017 at 10:51 PM Post #12 of 12
Just one more follow up. I was told that the only correct way to determine if two audio files are identical is to compare their hashes. This could be done by using another foobar2000 component called, "File Integrity Verifier". If they give the same hashes for both MD5 and CRC32, the files are identical. In my case, the hashes were the same and so the files are identical.
 
Binary Comparator: http://www.foobar2000.org/components/view/foo_bitcompare
File Integrity Verifier: https://www.foobar2000.org/components/view/foo_verifier
 

Users who are viewing this thread

Back
Top