Manage a large collection of music

I would like to write my own application for streaming music for personal use, but I puzzle over how to manage it. Existing music and their location rarely change, but are still capable (capture file name, ID3 tags, / The Chemical Brothers instead of / Chemical Brothers). How will the community manage all these files? I can only collect a lot of information using the ID3 reader and my file system, but it would be nice to keep track of how often they play and what it is. Would using an iTunes.xml file be a good choice? Just storing my music in iTunes and based on the data of my web applications? I thought about keeping track of all my music on the md5 file and using this as a unique identifier, but if I change the ID3 tags, will it change the md5 value?

I suppose my real question is: how can you track a lot of music? Store meta information in a database? How can I connect a file and a db record - this is my real question or just use reading if necessary to configure the file system.

+1
source share
2 answers

I skipped part 2 of your question (md5 thing). I don’t think that the MD5 / SHA / ... solution will work well, because they do not allow you to find duplicates in your collection (for example, popular tracks that appear on many different samplers). And especially with large collections, something you will want to do someday.

There's a method called fingerprint that shows a lot of promises, look here for quick input. Even if there are slight differences in recording levels (for example, these popular “normalized” tracks), the acoustic fingerprint should remain unchanged - I say, it should, because none of the methods that I tested are really 100% error free. Another advantage of these sound fingerprints is that they can help you with tagging: a service like FreeDB will only work on full CDs, acoustic fingerprints can identify individual tracks.

0
source

For inspiration, and perhaps even for a complete solution, ampache . I don't know what you call big, but ampache (a php application supported by mysql db) easily handles music collections of tens of thousands of tracks.

Reecently I discovered SubSonic , and the website says: “Manage 100,000+ files in your music collection without harm” bt I haven not yet been able to check it. It is written in Java, and the source code looks pretty neat at first glance, so maybe there is inspiration there too.

0
source

Source: https://habr.com/ru/post/1302087/


All Articles