MPD and Tags

General Discussion about MPD – anything that doesn't fit in the other MPD forums.
Post Reply
conta
Posts: 100
Joined: October 31st, 2013, 4:59 pm

MPD and Tags

Post by conta »

Hi,
is there somebody, who has an overview of tags which can be used in MPD?
The whole thing sounds simple, but i don't think, that it really is...
To show you what i mean, please take a look at this site:

http://wiki.hydrogenaud.io/index.php?title=Tag_Mapping

In my music collection i have flac- and dsf-files, so i have to handle vorbis-comment and ID3v2.4 tags. ID3v2.4 works better for me than ID3v2.3 because the new one has a multi-"Genre" option.

I think it is important to know which tags can be used before you start tagging your files. So i would say it is a good idea to create a comparison-table to clarify, which values belongs to each other. In the first row there are the tag-names how you find them in the mpd.conf. In the second row comes the ID3v2.4-label and in the third row the vorbis-comment:

MPD -- ID3v2.4 -- vorbis-comment

artist -- TPE1 -- ARTIST
album -- TALB -- ALBUM
title -- TIT2 -- TITLE
track -- TRCK -- TRACKNUMBER
name -- ? -- ?
genre -- TCON -- GENRE
date -- TDRC -- DATE
composer -- TCOM -- COMPOSER
performer -- TMCL -- PERFORMER
disc -- TPOS -- DISCNUMBER
comment -- COMM -- COMMENT
artistsort -- TSOP -- ARTISTSORT
albumartist -- TPE2 -- ALBUMARTIST
albumartistsort -- TSO2 -- ALBUMARTISTSORT
musicbrainz_artistid -- diff -- n/a
musicbrainz_albumid -- diff -- n/a
musicbrainz_albumartistid -- diff -- n/a
musicbrainz_trackid -- diff -- n/a
musicbrainz_releasetrackid -- diff n/a

I hope the table is compleat - could somebody please confirm that?
Given that the musicbrainz-tags are created automatically, there are not that much tags to use. You can see on the HydrogenAudio-site how much tags are defined. Does anybody know, if its intended to add more usable tags to MPD in the future?
And does anybody know, what the "name"-tag is for?

skidoo
Posts: 208
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: MPD and Tags

Post by skidoo »

Use the source Luke :) See src/tag/TagId3.cxx (scan_id3_tag) TPE3 and TPE4 are mapped to MPD's performer tag.

And does anybody know, what the "name"-tag is for?
I would like to know that, too. No "name" entries in my tag_cache file.

conta
Posts: 100
Joined: October 31st, 2013, 4:59 pm

Re: MPD and Tags

Post by conta »

skidoo wrote:Use the source Luke :) See src/tag/TagId3.cxx (scan_id3_tag) TPE3 and TPE4 are mapped to MPD's performer tag.
Thanks for the advice skidoo. But sorry - cannot really read src/tag/TagId3.cxx. No programmer here... :oops:
Are you sure about TPE3 and TPE4? TPE3 normally is linked to "Conductor", but when i tag a "CONDUCTOR" in Vorbis-Comment (flac) there is no performer in MPD. With ID3 i did not try yet.
TPE4 normally is for Mix-/Remix-information?!

Do you maybe have some documentation about the usage of tags in MPD? I did not find anything. Thats the reason, why i made the list.

skidoo
Posts: 208
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: MPD and Tags

Post by skidoo »

Are you sure about TPE3 and TPE4?
Yes.

Code: Select all

tag_id3_import_text(tag, "TPE3", TAG_PERFORMER, handler, handler_ctx);
tag_id3_import_text(tag, "TPE4", TAG_PERFORMER, handler, handler_ctx);
TPE3 normally is linked to "Conductor" ... TPE4 normally is for Mix-/Remix-information?!
MPD is not a reference implementation for ID3...

when i tag a "CONDUCTOR" in Vorbis-Comment (flac) there is no performer in MPD.
As far as I can see there is only a "PERFORMER" field in Vorbis.

conta
Posts: 100
Joined: October 31st, 2013, 4:59 pm

Re: MPD and Tags

Post by conta »

skidoo wrote: As far as I can see there is only a "PERFORMER" field in Vorbis.
I don' think it is that easy. When you look at wikipedia:
https://en.wikipedia.org/wiki/Vorbis_comment
it say, that any tag name is allowed.
And when i tag a flac for example in mp3tag with a "PERFORMER"-tag and a "CONDUCTOR"-tag, i can read both tags in foobar2000.
It would be really fine to have some tag-documentation to clarify this chaos... :roll:

skidoo
Posts: 208
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: MPD and Tags

Post by skidoo »

https://en.wikipedia.org/wiki/Vorbis_comment
it say, that any tag name is allowed.
Of course you are right. My bad.

And when i tag a flac for example in mp3tag with a "PERFORMER"-tag and a "CONDUCTOR"-tag, i can read both tags in foobar2000. It would be really fine to have some tag-documentation to clarify this chaos...
Mapping Vorbis comments to the MPD world is straightforward. MPD reads artist,album,title,track,genre,date,composer,performer,disc (as seen in mpd.conf) all other comments are ignored.

Expanding MPDs metadata capabilities is not diffcult. Do you know any usefull metadata?

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: MPD and Tags

Post by nbpf »

@conta: I am using MPD since more than three years. It is a great tool but, in my opinion, its tags system is hardly usable for all but pop music. Since a few months, I am using MPD as a back-end for upmpdcli with MinimServer as a OpenHome server. I am extremely satisfied with the way MinimServer supports tagging my music collection. If you feel that (for whatever reasons) the MPD tag support is a limitation for you, have a look at

http://minimserver.com/ug-library.html

http://forum.minimserver.com/forumdisplay.php?fid=9

http://forum.musicpd.org/viewtopic.php?f=8&t=3909

http://forums.naimaudio.com/topic/minim ... ew-everard

Best,
nbpf

skidoo
Posts: 208
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: MPD and Tags

Post by skidoo »

It is really no rocket science to add additional metadata from ID3 and Vorbis Comments to MPD. If anyone is interested, I will provide patches next week.

@max: ok? Need to bump DB_FORMAT. Reread all metadata. Change behavior of MPDs "performer" and maybe some other stuff.

conta
Posts: 100
Joined: October 31st, 2013, 4:59 pm

Re: MPD and Tags

Post by conta »

Thanks a lot for you help and understanding skidoo

For me the following additional Tag would be enough:

Vorbis/MPD-name -- ID3v2.4
CONDUCTOR -- TPE3

AND i know, that this is kind of selfish... i am sure others will have different needs! :lol:
There are a lot of tags more which could be useful like
Orchestra
Soloist
Originaldate
Mood
etc.
but to my opinion its better to restrict the number of used tags. Otherwise the music collection gets to time-consuming.
But how i said - thats only my opinion!


@nbpf:

Thanks for your links! I have to take a close look to the minim-server - looks interesting! My actual situation is not really satisfying:
The tagging problems i had with MPD seem to be nearly solved, but on the other side i don't have a client which gives me the possibility to recognize all the different tags. I use MPDroid for Android on a Nexus 10, which is a very nice peace of software, but not very strong in the processing of tags. Till now i did not find a better client for Android.
Maybe its a good idea to change to UPnP. Do you know a good client for Android?

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: MPD and Tags

Post by nbpf »

conta wrote: ... My actual situation is not really satisfying: The tagging problems i had with MPD seem to be nearly solved, but on the other side i don't have a client which gives me the possibility to recognize all the different tags. I use MPDroid for Android on a Nexus 10, which is a very nice peace of software, but not very strong in the processing of tags. Till now i did not find a better client for Android.
Maybe its a good idea to change to UPnP. Do you know a good client for Android?
conta, if you really want to organize your music collection in a way that fits your needs, do yourself a favour and read the "Your music libary" and "Browsing your library" sections of the MinimServer documentation. The MinimServer documentation might seem intimidating at a first glance. But it is exemplary and, even if you are not going to install MinimServer, very instructing. Perhaps a disadvantage of MinimServer is that it is not open source. But it is extremely well maintained and, if you post a question on the MinimServer Forum, you will most likely get a competent and kind answer from the developer. The advantage of a solution based on MPD + upmpdcli and a UPnP/OpenHome server like MinimServer is that you do not need to make any change to your current MPD configuration. You can still control MPD with the MPD clients of your choice although, once you have tried MinimServer, you will likely not want to go back to MPD clients. Let me be very clear: MPD is a great system for music replay. But its system of hard wired tags is essentially unusable for organizing any music collection according to specific criteria. Another problem is that there is a great number of MPD clients. But only a few are well maintained and most graphical clients are just bad. As you have realized, adding one or more hard wired tags to MPD is not going to solve your problems either if these changes are not propagated to the MPD clients consistently. What would be needed is a mpd.conf section in which users can select which tags MPD should consider when parsing its music_directory. This set of tags would need to be exported to MPD clients which, of course, would have to be able to cope with a variable set of tags. I do not know MPDroid but, as I said, I found most graphical MPD clients to be lacking. On my Debian / GNU Linux laptop I use ncmpcpp to control MPD, my wife used MPad on her iPad. If you try MinimServer and you have an Android device, I would suggest that you install Bubble UPnP as a control point. This is at the moment probably the best control point for OpenHome servers and renderers. If you have non-OpenHome renderers in you LAN (Chromecast Audio, for example) you will be able to control them with an OpenHome compatible control point by installing Bubble UPnP Server on a computer in your LAN. If you need an iOS OpenHome compatible control point, I suggest to try Linn Kazoo, the Lumin app or the Audionet app. Best, nbpf

conta
Posts: 100
Joined: October 31st, 2013, 4:59 pm

Re: MPD and Tags

Post by conta »

Thanks for your long article nbpf!
Till now i did not consider UPnP, i always thought it is restricted to few formats (no flac, dsf, etc.). Now i did a little research about that theme and it looks quite promising. You are right, with MinimServer there is much more freedom in using tags and it seems that BubbleUPnP can read all the different tags also.
On the other hand things get more complicated with the extra-software. Meaning that there are more settings to handle and more problems to solve...
So i have to decide for me, how many tags i really need to be happy. I am still thinking that its maybe a good idea to have only a small number of them to avoid tagging becomes a science.
In classic music, for example, i could take orchestra, singer, soloists and even the conductor to a multi-"PERFORMER"-tag or i could provide a seperated tag for every position. I am still incertain which way to go.
My actual main problem is, that my client, MPDroid, is not very flexible. But i am not sure, if its necessary to change the whole system for that. Maybe there is a (for me) better client somewhere in development right now? :P

Btw: i think we have some "problems" in common - i read your thread in the MinimServer-forum about showing pdf-files when listening to music. I also thought about that, but it seems really hard to be successful with things like that, although it sounds only logical.
An other point for me is the presentation of the back-cover of the play-backed cd - it seems there is no software capable of these (for me) basic and reasonable things... :roll:

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: MPD and Tags

Post by nbpf »

conta wrote:Thanks for your long article nbpf! Till now i did not
consider UPnP, i always thought it is restricted to few formats (no
flac, dsf, etc.). Now i did a little research about that theme and it
looks quite promising. You are right, with MinimServer there is much
more freedom in using tags and it seems that BubbleUPnP can read all the
different tags also.
Every OpenHome control point will present to
the user all the browsing indexes made available by the server. From
this perspective, BubbleUPnP is as good as any other control point. Of
course, the way the contents are presentend and the browsing experience
can be very different for different control points. From this other viewpoint
BubbleUPnP is probably the first choice.
conta wrote: On the other hand things get more complicated with the
extra-software. Meaning that there are more settings to handle and more
problems to solve...
True. On the other hand, a good software
can also yield significant simplifications.
conta wrote: So i have to decide for me, how many tags i really need
to be happy. I am still thinking that its maybe a good idea to have only
a small number of them to avoid tagging becomes a science.
That's your choice. But the number of indexes is not a very relevant
measure of complexity, at least not from the user's perspective. With
MinimServer, one can add or remove an index by just opening the MinimWatch
icon and adding or removing an entry of the "indexTags" list.
conta wrote: In classic music, for example, i could take orchestra,
singer, soloists and even the conductor to a multi-"PERFORMER"-tag or i
could provide a seperated tag for every position. I am still incertain
which way to go.
No matter what you do: do not let your
indexing concept be informed by the software you use. This is the one of
the most severe mistakes one can do. Indexing a library should be informed
by your own preferences, interests and needs. Whether a software does or
does not support a given index should not have any bearing on whether to
use or not to use that index!
conta wrote: My actual main problem is, that my client, MPDroid, is
not very flexible. But i am not sure, if its necessary to change the
whole system for that. Maybe there is a (for me) better client somewhere
in development right now? :P
The limitations of MPDroid and
other MPD clients are primarily a consequence of the limitations of
libmpdclient. A new client would be subject to those same limitations.
conta wrote: Btw: i think we have some "problems" in common - i read
your thread in the MinimServer-forum about showing pdf-files when
listening to music. I also thought about that, but it seems really hard
to be successful with things like that, although it sounds only logical.
An other point for me is the presentation of the back-cover of the
play-backed cd - it seems there is no software capable of these (for me)
basic and reasonable things... :roll:
Right. As reported in
that thread, the only MPD client that I know to support displaying album
booklets is MPaD. My wife uses it on her iPad mini and it works quite
well. Unfortunately, its support for user-custmizable tagging is very
primitive and the program seem to be unsupported. I agree the landscape
of MPD clients is quite disappointing. A product that stands out is
ncmpcpp. It is textbased and, in my view, far superior to all graphical
MPD clients I have tested.

conta
Posts: 100
Joined: October 31st, 2013, 4:59 pm

Re: MPD and Tags

Post by conta »

@npbf:

Funny, how different the needs of a control point are. You like ncmpcpp - i would never use this for navigating in my music collection. I am more graphic-orientated, it's most important to see the covers of the albums because i often remember them more for their look than their title. :)
And i would really love to see more of the covers - backside, inside, artist, etc... For every album i additional stored a backside- and inside-jpg but till now i did not find a control-point to reproduce that. No, there is one software to make that possible - foobar2000 is very liberal and gives me the opportunity to see the different jpg's, but its windows-bound software and i can not use it for my android-nexus10.
Bad luck, that there is no control-point for android which give you the high level of menu-arrangement as foobar2000 does. IOS (MPaD and MPoD) is no alternative for me - i don't like IOS-devices, they are to restricted for me.
I know, that there is a future-project foobar for android, but i don't think that it will work as a control-point, but maybe.....? :P

@skidoo:

Thanks again for your effort to clarify the mpd-tagging!
Do you know maybe what the "name"-tag is for? Is a specific vorbis/id3-tag mapped to this mpd-tag?

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: MPD and Tags

Post by nbpf »

conta wrote:@npbf:

...
And i would really love to see more of the covers - backside, inside, artist, etc... For every album i additional stored a backside- and inside-jpg but till now i did not find a control-point to reproduce that. No, there is one software to make that possible - foobar2000 is very liberal and gives me the opportunity to see the different jpg's, but its windows-bound software and i can not use it for my android-nexus10.
You could perhaps replace the Nexus 10 with a Windows tablet. Another approach would be to control MPD from a Linux device. I do not particularly like GMPC and Cantata but, if you are after an MPD client with a graphical UI, you might like them. On a Linux device you could easily write a small script to fetch and display the booklet (or the backcover, etc.) of the currently playing album. Something like

Code: Select all

#!/bin/sh                                                                                                                 
                                                                                                                          
EXPECTED_NARGS=1                                                                                                          
musicdir="music"                                                                                                          
target="booklet.pdf"                                                                                                      
tmpfile="/home/nicola/tmp/$target"                                                                                        
viewer="xpdf -fullscreen"                                                                                                 
                                                                                                                          
if [ $# -ne $EXPECTED_NARGS ]                                                                                             
then                                                                                                                      
    echo "Usage: `basename $0` MPD-server"                                                                                
else                                                                                                                      
    if (nc -z $1 6600) 2>/dev/null                                                                                        
    then                                                                                                                  
        if (wget -q "http://$1/$musicdir/$(dirname "$(mpc -h $1 current --format '%file%')")/$target" -O $tmpfile)        
        then                                                                                                              
            $viewer $tmpfile; rm $tmpfile;                                                                                
        else                                                                                                              
            echo "error: Booklet not found"                                                                               
        fi                                                                                                                
    else                                                                                                                  
        echo "error: Failed to resolve host name"                                                                         
    fi                                                                                                                    
fi
should basically do the job. You could have a button on you desktop that just calls the script with a suitable argument. This way you would be able to visualize your booklet, back cover, etc. by just pressing a button. I use this approach on my laptop and works very nicely. I do not know whether mpc runs on Android. If so, it should not be difficult to port the script to Android. Best, nbpf

Merxrinc
Posts: 2
Joined: March 15th, 2016, 6:05 pm
Location: Russia

MPD and Tags

Post by Merxrinc »

I make heavy use of tags. I agree with the suggestions wsp and coolrat made in their posts.

Post Reply