Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 14th May 2012, 12:04   #1
airineiv
Junior Member
 
Join Date: May 2012
Posts: 1
Extract Metadata with Winamp plugin

Hello guys,

I have developed a winamp general purpose plugin in order to extract metadata from files played in Winamp. I succeeded to extract some metadata using IPC_GET_EXTENDED_FILE_INFOW, but some are not accesible with this kind of messages. I wrote the plugin in C++. I am a C++ programmer.

Here is the list of metadata I want to extract:
- Track Length
- Track BitRate
- MediaType (if it is audio or video)
- Audio Codec
- Track Location
- Track Title
- Track Artist
- Track Album
- Track Composer
- Track Genre
- Track Copyright
- Track Rating
- Track License
- Playlist title
- Playlist Author
- Playlist rating

The boldest ones I didn't succeed to extract in Winamp, and I waste of lot of time in searching in Winamp SDK and other resourses on Internet... but no result. Does any one know how to extract for example Audio Codec Name for an MP3 file? For example I would like to have in Audio Codec field something like "MPEG-1 layer 3".

Thanks in advance for any advices.

I can share some source code on request.

Vasile
airineiv is offline   Reply With Quote
Old 14th May 2012, 12:31   #2
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,204
(oh well, i'll delete the email i was in the process of doing as you've now posted here and provided more information than the email i got which i was running behind on replying to)

Track Length - %length%

Track BitRate - %bitrate%

MediaType - %type% (though it can indicate audio for some video formats)

Audio Codec - there is a %codec% place holder but it's never been implemented, the nearest alternative (if supported by the plug-in is using %family% which is cruder but might work for what you want).

Track Location - you'd need to know that and would depend on where you're getting the files from as to what / how that is obtained (if from Winamp at all).

Track Title - %title%

Track Artist - %artist%

Track Album - %album%

Track Composer - %composer% though is not widely supported.

Track Genre - %genre%

Track Copyright - not generally provided by any plug-in that i'm aware off.

Track Rating - %rating% as long as the plug-in supports it and that the media library is present - as most installs will use the media library to store the rating instead of it going into the actual file though there is a preference option to allow for the rating to be written into the file as well for a few Winamp versions now.

Track License - not possible to my knowledge

Playlist title - you'd need to use IPC_FORMAT_TITLE_EXTENDED as none of the official input plug-ins (and i doubt any 3rd party ones either) provide a pre-formatted title since the title can be anything based on the ATF string being used.

Playlist Author - there's no way to know who created a playlist, especially the main playlist editor which is just a temporary dumping ground.

Playlist rating - you'd need to parse all file and work out the equivalent average rating from all of the files %rating% values.


at least you've hopefully given up the idea of trying to scrape the alt+3 dialog contents which would failure as soon as most 3rd party input plug-ins (and some of the native plug-ins as well) are attempted to be accessed.

and as a note, there is no guarantee any format available in Winamp will provide all of the metadata information you're trying to get as it comes down to what has been implemented in the input plug-in for that format and especially when it comes to 3rd party plug-ins.

-daz
DrO is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump