About MD5, I was worried about a case where a service that serves user-submitted files would be exploited by MD5 collisions, leading users to open files that might exploit decoder bugs to execute code. Far-fetched, I know, but the tradeoff didn't seem worth it. I'm not married to that decision, though.
The downside of course is this requires pre-calculation of the p-hash for every track to use. But I can't think of a music application that doesn't require some kind of "library loading" step, so perhaps this could be accomplished then?
Of course none of this mitigates your concern with decoder bugs resulting in RCE, but I think that's probably best handled elsewhere (for example, sandboxed upload validation in your hypothetical user-uploaded-files service).
Example: I just moved all mp3, m4a files to the microSD card on my android phone, keeping names and folders identical, but my playlists are all empty now. Thank you Samsung! grr..
Making a path independent, p-hash independent (but utilizing, if available, or requested) playlist format is what I'd really want. The metadata should always be saved inside the file because metadata get's lost when you change the program. Filling up an sqlite db with all the metadata saved in your audio files would only speed up meta-data management and sync, but remove it's control from you.
Features I think make sense to expect from a perfect music player (without vendor-lock-in), be it run on mobile, web, desktop, cli or as a daemon:
• Path independant, file-name independant (thanks to p-hash) playlist import & export
• Playlist export options for ie. Samsung Music Player, iTunes or whatever crap we're locked-in currently
• Save Metadata incl. rating always inside audio files, because metadata get's lost when you change the program
• Extract Metdata from audio files into a database for speed, management and easier sync into the files
• Audio-Fingerprint may allow detection of: duplicates (hash independant), similars, classify genre and map mood-maps
• Batch-Convert between flac,mp3,ogg,mp4,m4a if user wishes without stupid dialogues. 128Kbit LAME-encoded MP3s don't sound converted to "best quality ogg"..
• Create P-Hashes (or another perceptual hash) initially, when idle, periodically or when requested
Example playlist format:
estelle.mp3, audio-fingerprint, House-Playlist
wu-tang.mp3, audio-fingerprint, PartyNightCan you hear us underneath that pile of bike sheds?
It's only bikeshedding when the decision has to be made by community!
BUT... you have a defined schema, so it's probably to your advantage to use a storage format with a defined schema: ProtoBuf or Thrift. That would mean somebody trying to use your code would already have generated objects in their language.
As for the hashing algorithm, this is a good use for MD5 -- cheap and fast. You're unlikely to be concerned about somebody actively trying to generate the same checksum for two music files. For non-security (integrity verification) purposes, MD5 is still very appropriate.