问题
I know similar subjects have appeared in SO, but there wasn’t answer I am looking for. I need a Delphi library for reading tag information from music files. Currently I am using TJvID3v1 from JEDI library, but as far as I see, JEDI does not work with WMA files.
I have found some manuals on how to implement such tag reading, but most of them go quite low level (reading file byte-by-byte and analyzing). So, do you know of any Delphi library capable of reading that information? Support of OGG and other popular formats will be welcomed. We want to get artist name, album name, song title and maybe length of the track (this is not going to be next iTunes, we are writing security app to detect if users have warez on their company PC’s).
回答1:
It isn't a Delphi library specifically, but if MP3 and WMA are your key targets then you might also want to check out the Windows Media Format SDK
This provides COM interfaces that include an abstracted representation of tags in a media file - i.e. you deal with things in terms of Media Format SDK attributes, and the Media Format runtime takes care of handling those attributes appropriately according to the specific file type you are dealing with in any specific instance.
And of course it's free, being built into Windows itself.
回答2:
BASS Audio library - http://www.un4seen.com/
回答3:
I have found some solution - MPEG Audio Collection ( http://mac.sourceforge.net/ ). This pack contains TWMAfile component (orginaly by Jurgen Faul) which can be ported to Delphi 2009 (beware of Unicode). After some additions and bugfixes this class works well with WMA. Analyzing MP3 can be done using JEDI component.
As to OGG and other formats we will continue to work with MPEG Audio Collection and see what can be done with this library (looks a bit old, since last release was 5. October 2003).
来源:https://stackoverflow.com/questions/1406246/universal-mp3-and-wma-tag-reader-for-delphi