Help - Search - Members - Calendar
Full Version: Song fingerprinting tools
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2
musicmusic
I found an old copy of libFooID and decided to try and put it to some use. How is another question..

Anyway I came up with a little component that allows you to calculate FooIDs and save them to the file, as well as compare the FooID of two files. Some downloads below:

FooID binary (put this in your foobar2000 folder)
foobar2000 component version 0.3 (experimental)
foobar2000 component version 0.2 (experimental)


libFooID source

Update: Garf has restored the Foosic homepage now

I am not sure how this is useful.. Maybe finding matches within a set of files would be more useful (?) If someone actually downloads this have fun : P
Nemphael
Eager to try this. I've tried to get this working, but I can't. I've put the FooID folder in foobar2000 as specified and I slipped foo_biometric into components. Upon starting Foobar, I get an error:
CODE
Failed to load DLL: foo_biometric.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.

I'm using fb2k 0.9.5.4. Do I need to do something with the source code?

As for a suggestion: Would it be possible to generate an ID (As I suppose FooID means fingerprint) from the fingerprints so we can use other search utilities to search for matches as well?

It would also be useful to compare one file against, or compare fingerprints within, a set of files.

EDIT: Nevermind the error. Merely a mistunderstanding.
musicmusic
Hello,

Check that FooID.dll is in the same folder as foobar2000.exe. (OK, seems you have solved this now.)

If you run the save command it will save the fingerprint in the FINGERPRINT_FOOID field. But to compare two fingerprints you need to interpret the data, so plain text searching won't achieve anything. So maybe some APIs would be useful if anyone would actually use them tongue.gif

If you save the fingerprints first the compare command will use those instead of recalculating the fingerprint (that command doesn't save them).

Agree on the usefulness of comparing one file against a set or finding matches within a set.. The main obstacles are probably creating the UI for these things wink.gif
Nemphael
I doubt it, but would it be possible to compare fingerprints and find song with similar acoustic characters? Kind of like MusicIP's Mixer (earlier Music Magic Mixer), although I reckon they use another technique than fingerprint information for this.
foosion
QUOTE (Nemphael @ Aug 9 2008, 02:40) *
I doubt it, but would it be possible to compare fingerprints and find song with similar acoustic characters?
The libFooID documentation contains information on how to do this (see copy of FooID documentation on archive.org). Note that this is intended to identify different encodings or maybe even performances of the same song, it is not designed to be able to - say - correlate two songs containing violins.
hesher
This is genius! Where can i find more information about it?? I'd love to be able to "fingerprint" my mp3 library! (i know i have duplicates of alot of files)
Nemphael
I've tried running it to compare some files and I'm surprised at how well some of my acoustic vs. non-acoustic performances get a rather high score, despite notable differences in drums, electric guitar and some audience (3 Doors Down's Kryptonite 3:55 vs. Kryptonite (acoustic) 3:59 = 35%).

But I keep wondering - would it be possible to have a slider of some sort to change thresholds to, say, include less similar live/acoustic/instrumental performances?
musicmusic
QUOTE (hesher @ Aug 10 2008, 06:59) *
This is genius! Where can i find more information about it?? I'd love to be able to "fingerprint" my mp3 library! (i know i have duplicates of alot of files)
Hi.. if you want to know more about FooID foosion's link can tell you more, or a little bit of general information is available on Wikipedia.

Currently you can only compare two files at a time with the component.. something for multiple files will be added later.

QUOTE (Nemphael @ Aug 10 2008, 13:12) *
I've tried running it to compare some files and I'm surprised at how well some of my acoustic vs. non-acoustic performances get a rather high score, despite notable differences in drums, electric guitar and some audience (3 Doors Down's Kryptonite 3:55 vs. Kryptonite (acoustic) 3:59 = 35%).
I can get about 33% on different songs by the same artist, although they are slightly similar. But anyway I am not sure how significant or useful these low scores are.. testing on many files may give some answers.

QUOTE (Nemphael @ Aug 10 2008, 13:12) *
But I keep wondering - would it be possible to have a slider of some sort to change thresholds to, say, include less similar live/acoustic/instrumental performances?
for the two file compare it is not particularly useful, but for multi-file commands yes I was probably going to do that, as it would only return tracks within the set thresholds. As for whether changing the thresholds would have any useful effect, that is another question.. for reference the levels are currently set at:

no: 0 <= i < 50
maybe: 50 <= i < 75
yes: 75 <= i <= 100

where i is the given percentage
musicmusic
Version 0.2 released:
  • 'Save fingerprints to files' uses multiple threads where multiple CPU cores are available
  • Added multiple file 'Compare Files' command. Note: Generally the minimum threshold should not be set below 50% (and especially not 0% tongue.gif) If you are happy to tag your files with the fingerprints it is a good idea to run the save command first.
With the new multiple file mode I was able to do some more testing. My observations about match levels are below:

75-100%: Correct matches or slight variations of the same track (extra featured artist or other slight difference in vocals)
50-75%: Generally different versions of the same track (extra featured artist etc.), and a few correct positives.
0-50%: matches don't seem to be of any useful significance
Nemphael
I tried your new version and like the new mass comparison. I've noticed, though, that every match will show up twice. For instance, "Track a" will match "Track b", but at the same time "Track b" will match "Track a". Is this behavior intended?
Garf
Hey,

great that someone found a nice use for libFooID.

I will try to bring back the libFooID site. The fingerprint server probably will not come back. The resource usage on the server is just too big.
musicmusic
QUOTE (Nemphael @ Aug 15 2008, 11:07) *
I tried your new version and like the new mass comparison. I've noticed, though, that every match will show up twice. For instance, "Track a" will match "Track b", but at the same time "Track b" will match "Track a". Is this behavior intended?
It's kind of intended.. Song b may match some other songs that song a does not. It could group them all together but it somewhat reduces the quality of information provided, so I have not.

QUOTE (Garf @ Aug 15 2008, 11:23) *
Hey,

great that someone found a nice use for libFooID.

I will try to bring back the libFooID site. The fingerprint server probably will not come back. The resource usage on the server is just too big.
Hi Garf smile.gif Yes I surprised myself and found a few duplicates in my library blink.gif Yes it would be nice to get the libFooID site back wink.gif

Whilst I was looking around on the net, I found some discussion of an oddity in regress.c. On line 66, it does this test:
CODE
if (ssyy <= 0.0f + EPSILON)
and sets *r, but it then divides by ssyy and sets *r again. Basically, the test does nothing. It seemed there was a missing else statement so I changed that (in the downloads above also), but it would be nice if you could confirm.. smile.gif
Nemphael
After trying to remove some duplicates, I have a suggestion. The window notifying the user about duplicates isn't really useful, as you can only go to one file at the time. I see how this is useful, but it doesn't allow the user to compare the files himself on a grand scale. How about making a "duplicate-sorted" playlist with the results?
musicmusic
What about being able to play the tracks directly from the results window (double click) instead? That I will add anyway. Maybe a delete command on the shortcut menu as well.

Otherwise yes I could add a button to flatten the tree into a playlist, but the resultant playlist may be slightly confusing.
MartDann
I think all of your suggestions could be very usefull.
For example: I could make a run over my complete Music Lybrary, put all doubles in playlist und check this playlist later when i have time.
mpioner
musicmusic
Maybe you can make local version foosic.com?
Nemphael
With the ability to generate FooID fingerprint and possibly have a local Foosic database; what about making a database component to pick up where foo_custominfo left? It's a component I really wish further development in. FooIDs should allow the database to match up files and data which could allow, for instance, play count update of multiple song (released on multiple albums?), songs moved with Explorer or similar.
2E7AH
so, this component is only for finding duplicates among songs.

even if i set min threshold to 25, i'll only get songs which have a similar length, although not all tracks with similar length + some are without any audio similarities!?

i don't know the contents of fingerprint data (424 hex num: 3rd, 4th and 5th are length i guess) and i don't know those "algorithms" from foosion link + some kind of limitation to song length, but isn't there a way to code option about finding similar tracks in means of audio (music) content or something other than just looking for duplicates?

with no means to disrespect the work on this components, but for most duplicates search scripts are sufficient (and faster).
odyssey
QUOTE (Nemphael @ Aug 15 2008, 16:02) *
After trying to remove some duplicates, I have a suggestion. The window notifying the user about duplicates isn't really useful, as you can only go to one file at the time. I see how this is useful, but it doesn't allow the user to compare the files himself on a grand scale. How about making a "duplicate-sorted" playlist with the results?

I second this request, simply because I don't wanna delete all duplicates, but maybe I'll mark a track or do other stuff with it.
musicmusic
QUOTE (2E7AH @ Sep 1 2008, 02:27) *
even if i set min threshold to 25
You are not supposed to set it to 25 (for anything other than testing). See my table in post #8.

QUOTE (2E7AH @ Sep 1 2008, 02:27) *
with no means to disrespect the work on this components, but for most duplicates search scripts are sufficient (and faster).
I had a few duplicates under different song titles - how are you going to find that with a text search ?! Fingerprinting has other potential uses also which aren't exploited here. Maybe you don't find it useful but at least I do wink.gif
odyssey
QUOTE (musicmusic @ Oct 20 2008, 18:06) *
QUOTE (2E7AH @ Sep 1 2008, 02:27) *
with no means to disrespect the work on this components, but for most duplicates search scripts are sufficient (and faster).
I had a few duplicates under different song titles - how are you going to find that with a text search ?!

I had planned to use php's similar_text() to find duplicates smile.gif But still a fingerprint is more reliable.
musicmusic
I meant completely different.
2E7AH
i've read the posts, but i was playing with the component so i post some of that

QUOTE (musicmusic @ Oct 20 2008, 18:06) *
I had a few duplicates under different song titles - how are you going to find that with a text search ?!
QUOTE (2E7AH @ Sep 1 2008, 03:27) *
but for most duplicates search scripts are sufficient (and faster).
my library and my incomes are quite neat, so it's subjective matter anyway.
fingerprinting is time consuming.

perhaps i should have asked only my main question: isn't there a way to code option about finding similar tracks in means of audio (music) content or something other (not depending on track's length)?
i've read the posts #4 & #5

QUOTE (musicmusic @ Oct 20 2008, 18:06) *
Fingerprinting has other potential uses also which aren't exploited here.
can you explain, if it isn't too much trouble?
Nemphael
QUOTE (2E7AH @ Oct 21 2008, 07:31) *
perhaps i should have asked only my main question: isn't there a way to code option about finding similar tracks in means of audio (music) content or something other (not depending on track's length)?
i've read the posts #4 & #5


This is what foo_biometrics does - it creates fingerprints of audio data and compares them. It has a quick match of +-30 seconds, I believe (Could be extended, could it not? Any benefits from this, you think?), as it intends to identify duplicates tracks rather than to extract certain elements. If I'm not mistaken, foo_biometrics is built from FingerPrint.java, which to me looks more like a duplicate finder than an audio comparator.
OCedHrt
QUOTE (Garf @ Aug 15 2008, 11:23) *
Hey,

great that someone found a nice use for libFooID.

I will try to bring back the libFooID site. The fingerprint server probably will not come back. The resource usage on the server is just too big.


What kind of load are we looking at?
odyssey
musicmusic: Would you consider an update that improves the usability of matched dupes? I.e. putting the dupes into a playlist?
Nemphael
Will you consider checking one file against a dataset? For instance, I'd like to know how if I have any duplicates of file A in ABCADBB.
nilesr
I was wondering if anyone had a copy of the matching.zip file from the foosic website(now down). I have downloaded the one from archive.org but it said it was invalid archive when I tried to unzip(tried two different zip programs the others unzipped fine).
I have been playing with libfooid and would like to play with the matching portion of the library.

I have hosted a couple websites for years and would be more than happy to put up a mirror of the old foosic site, minus the database portion for people looking for the code a descriptions later on.

Niles
Garf
I restored the relevant part of http://foosic.org
nilesr
QUOTE (Garf @ Jan 15 2009, 17:15) *
I restored the relevant part of http://foosic.org



Great thanks.
sabelosimelane
QUOTE (MartDann @ Aug 17 2008, 19:24) *
I think all of your suggestions could be very usefull.
For example: I could make a run over my complete Music Lybrary, put all doubles in playlist und check this playlist later when i have time.


Could somebody help, I am a java developer and I'm trying to develop an application that compares two audio files acoustic fingerprints. When I tried loading the audio file from java, I got a FileFormatNotSupportedException. Has anyone been able to implement this in Java? Please help....thanx.
musicmusic
My bad, I just had a look and it seems the compiler settings weren't set sanely for this project. After correcting this, the compare fingerprints command takes nearly a quarter of the time it took before (for me anyway). New build to fix that in a couple of days wink.gif
odyssey
musicmusic, did you see this thread? I think it has great potential to use acoustic fingerprinting. Did you think through the possebility of an API for this?

What do you think about the possebility of storing an identifier to all clustered tracks specified by a certain threshold? That could help (at least me) creating playlists with duplicate tracks and sorting out in these. In addition something like "remove duplicates", but based on acoustic fingerprinting could be possible on playlists.
musicmusic
0.3 released:

-Comparing more than two pre-calcuated fingerprints takes about one-eight of the time it did before with the above change and some further optimisations
-Calculating fingerprints uses the given length instead of continuing to decode the remainder of the file to get the actual decoded length. Seems reasonable to me, and of course there is a performance benefit this way. If anyone has any opinion on this feel free to share it...
-Added a few extra actions previously mentioned in the more-than-two files compare fingerprint results display
Milloflex
Maybe try hosting it on a google app engine and see how long it lasts?

http://code.google.com/appengine/docs/what...eappengine.html

QUOTE (Garf @ Aug 15 2008, 11:23) *
Hey,

great that someone found a nice use for libFooID.

I will try to bring back the libFooID site. The fingerprint server probably will not come back. The resource usage on the server is just too big.


Garf
QUOTE (Milloflex @ Mar 15 2009, 13:42) *
Maybe try hosting it on a google app engine and see how long it lasts?

http://code.google.com/appengine/docs/what...eappengine.html


That requires Python, which would make it a factor 1000 slower than it already is. And the storage they provide is WAY too small for the db.
Garf
QUOTE (musicmusic @ Aug 15 2008, 12:38) *
Whilst I was looking around on the net, I found some discussion of an oddity in regress.c. On line 66, it does this test:
CODE
if (ssyy <= 0.0f + EPSILON)
and sets *r, but it then divides by ssyy and sets *r again. Basically, the test does nothing. It seemed there was a missing else statement so I changed that (in the downloads above also), but it would be nice if you could confirm.. smile.gif


Yes. There should be an else around the rest of the computation if ssyy = 0.

The code is doing a linear regression on the spectrum represented in dB, and calculating the regression coefficient. The spectrum might be all zeroes.
Nemphael
I still can't believe just how fast it's become - here it takes a mere 24 seconds to compare 14k tracks! Also, the new playlist interface is extremely useful. A big thank you from me!
MartDann
Wow, incredible fast.
Thank you very much for the new Version.
odyssey
musicmusic: Thanks for the ability to save a playlist! happy.gif Much appreciated - You probably just saved me a ton of space!
odyssey
I was comparing 32320 items in a playlist and after roughly 25%, foobar2000 hardcrashed with: The exception unknown software exception (0x0000409) occured in the application at location 0x0324731b. Click OK to terminate the program
musicmusic
Do you mean 0xC0000409? That's STATUS_STACK_BUFFER_OVERRUN... hmmm
"The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application."

Strange. Did all those files have the fingerprints saved to the file already?

I don't think there's anything wrong on my side, but I can't say what caused that.
odyssey
QUOTE (musicmusic @ Mar 20 2009, 14:19) *
Strange. Did all those files have the fingerprints saved to the file already?

I have a few possible causes wink.gif

1. I had streams in my selected items (Edit: Judging by the speed it took without those, they are likely the reason it failed at first wink.gif)
2. No, not all files actually had fingerprints

I'm trying again now... (Edit: Works fine!)

Is it possible to use NG grouping with the inserted silence entrys?
Nemphael
Transcoding means a change in audio data, which will yield a different fingerprint than the original. Some people, including myself, might forget this and have files with "invalid" fingerprints in their libraries. It's probably not very important, but how about an opinion to "verify fingerprints" for files? I'm sure this is kind of stupid (Workload and "Hey, it's the same song, so why care?"), as actually generating new fingerprints for all files might be faster, but It would at least not change files unnecessarily.

Upon testing something, I've found that different levels of FLAC compression will have different fingerprints. For instance, I tried converting some files (Originally FLACs at -8) to -0 through -7, then compared all eight. -0 through -2 had a 99.6% with -3 through -8. The first set had a 100% against each other (Comparing -0 through -2) and same for the other (-3 through -8), but not when comparing them to each other. I don't know if this signifies anything, but I'm kind of curious.
Patsoe
QUOTE (Nemphael @ May 24 2009, 13:41) *
Upon testing something, I've found that different levels of FLAC compression will have different fingerprints.


This would be a bug in the fingerprinting tool (or in the flac decoder, or something else in the chain, but a bug of some kind). In principle, fingerprints should be robust even on transcoding, because they are based on the spectral composition and not on the binary representation of the music, but in any case, there's no way fingerprints may differ between various levels of lossless compression.

The other explanation would be that your hardware is somehow failing...
Nemphael
I've tried this on two different computers, so I don't think it's my hardware. Using Foobar with the official flac.exe. What I'm curious about is how why it's usually always ~99.6% (Tried with some other files too - 99.6%~99.8% for these.)... When I decode a given "99.6% file" from -3 through -8, to -0, it'll give me a clean 100% when comparing it to -0 to -2 files.

Can anyone else confirm this? Convert a file so that you have one FLAC -0 and one FLAC -8, then compare them with foo_biometric.
musicmusic
I confirm, looking into it...
2E7AH
musicmusic, can fingerprint data be somehow interpreted?
I downloaded FingerPrint.java and ServerUtil.java in hope that I'll find the answer but I got lost with all those shifts and operators, which I don't understand
Is it built from 424 2-figure hex numbers, or something more complicated?

Why? - I was trying to represent the data with color, without some success and don't know if it's possible in the first place
odyssey
musicmusic: If you try to "Save fingerprints to file" on a streaming file (asx in my case), it will try to scan and then crash sometime. Can you fix it so it will simply ignore if you try to do something this stupid? smile.gif

(It's a real problem when I use it with New File Tagger that automatically saves fingerprints to new files)
musicmusic
Do you have a crash log? (Not sure if the crash submitter gives an ID/reference to look it up..)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.