Mdp is a program for automatically setting music metadata for multiple files at once. It has a sparse command-line interface.
Dependencies
- chicken (in Debian install chicken-bin)
- TagLib (in Debian install libtagc0-dev)
- the programs depend on some chicken eggs. install using chicken-setup utility.
Download
I have a darcs repo on my (non-internet-connected) localhost.
Installation
make
then copy the binary («mdp«) and the man page (»mdp.1«) to their proper places in your path.
Usage
Create a text file where the first line is the artist name, the second line is the album name, and the other rows are the song titles.
If a particular track uses another artist than the one specified on
the first line, you can add it to the beginning of that song title
line, followed by the string " -/- ". The line should look like:
Special artist -/- Song name
It's fine to do this for all tracks, which is nice for »various artists«-type albums.
Then, just call mdp with the text file as it's first argument, and the songs (in order) as the following arguments. You need to specify the same number of song files as you have song title lines in your text file.
Please be mindful of character encoding issues in the text file. (Not important if you're only using standard American letters.)
Example:
% cd cranberries-wake_up_and_smell_the_coffee
% > /tmp/metadata
The Cranberries
Wake up and smell the coffee
Never grow old
Analyse
Time is ticking out
Dying inside
This is the day
The concept
Wake up and smell the coffee
Pretty eyes
I really hope
Every morning
Do you know
Carry on
Chocolate brown
Salvation (live)
Dolores O'Riordan -/- In the ghetto
% mdp /tmp/metadata *mp3
Mdp handles the same files that TagLib handles. This means (at least) oggs, mp3:s, mpc and flac.
It takes care of the tracknumbers for you automatically (by looking at the line number in the text file).
Planned features
- Support for year, version, comments...
- How about »TRACKTOTAL«? —Blenda
- Add support for TRACKTOTAL to TagLib's c-bindings and we'll see. Do all of the tag formats support it? —Sunnan
- ok, I've come up with a syntax for year, version, comments now so it will be implemented soon enough. TRACKTOTAL doesn't need a syntax but I still don't think it's in tag_c.h. —Sunnan
- ??? I've totally forgotten what syntax I planned to use!!!! —Sunnan
- »TagLib does not implement every feature of ID3v2, but does instead mades it possible for application authors to extend TagLib to support the specific features that they need in their applications.« In APEv2 tag (used by Musepack)/id3v2 you give a value of »tracknumber/tracktotal« to the Track/TRCK frame. BTW, I'm not sure APEv2 tag is supported by taglib. Are there any other metadata formats supported by TagLib? —Blenda
- TagLib works with Musepack files. Haven't tried with APE. Blx used strings to get tags out of apes. jag blir alltid knäpp när jag ser de jävla TRCK=3/12 tacggarna!
Copyright
This software is dedicated to the
Public Domain.
Authors
Mdp was written by the LNYC collective. Metaflac support was originally added by Blx.
FAQ
- What does Mdp mean?
- It means »metadata pariah«.
- Is it Mdp or mdp?
- Either is fine. The binary is called mdp.
Issues
- will be fixed shortly
- If there is no newline at EOF (you often get files like this in Emacs) the last byte of the file is stripped —Blenda
- (setq require-final-newline t)
- Thanks! I usually add a newline so I hadn't noticed this. I will add a check for this in the next version.
Comments
- The new version seems to properly keep old tags (like comments and such) and only modify the relevant tags —Blenda
- Yes. Do you like the way it works now? For a while it never destroyed old tags, only added tags (so you would end up with too many tags.) Before that it just stripped everything.
- I think the current behaviour is fine. If one would like to get rid of the old tags it's better to take care of that manually before running mdp. —Blenda
- Seems to work perfectly with FLAC files. —Blenda
- Is that regular FLACs or Ogg FLACs?
- Regular FLAC. I could try with Ogg FLACs later on, but I'm quite busy now. —Blenda
- No need, I just wanted to know which it was.
- I love this lil gem ♥
- åh tack blx! have you stopped using jabber? —Sunnan
- no i have not, but i've been experiencing some trouble with lost contacts. you could try adding me again. —Blx