How to compare mp3 programmatically

后端 未结 8 688
南笙
南笙 2020-12-29 00:25

I like to be able to compare mp3’s programmatically. The problem I don’t know by what. Header? Histogram? channels? Does anyone have experience with this subject?

8条回答
  •  臣服心动
    2020-12-29 01:05

    I guess there are a number of approaches you could take to this:

    1. Compare tags

    You could compare the data held in mp3's tags. The tags are held in the ID3 format. There are a number of libraries to help you access the tags, tagLib is a popular choice (TagLib Sharp for .net apps)

    2. Acoustic fingerprint

    This is by far the most robust method, allowing you to find matches regardless of the compression or even format. A unique fingerprint is created from the actual audio from the file allowing the song to be identified echoprint is an opensource example of this.

    3. Creating a hash from the file

    This is a quicker method allowing you to find file with content that matches exactly.


    Some further reading:

    • There's an interesting MSDN article about managing an mp3 collection (including reading the tags) here: link text (It's in visual basic but might still be useful.)

    • There's a little description of the file format here: link text

提交回复
热议问题