I am running Mediatomb on Ubuntu with the default import script for the audio files. However, Mediatomb seems to use the "composer" field in the tag as the "Artist" value. As a result, whe I click on "artist" in the web ui, I see the composer's names instead of the artist ones. To correct it, I have to manually replace the "composer" field with the artist name using easytag, but I would like to know how to solve this problem.
Well, that's interesting, because we have no code that would extract the composer tag. We use:
val = tag->artist();
There is no code that would specifically extract the composer…
What you can do is - setup the config.xml to tell us to extract additional keywords from id3, then you could use those keywords in your import.js script, have a look at section 6.2 of the docs, the supported keywords are:
TALB, TBPM, TCOM, TCON, TCOP, TDAT, TDLY, TENC, TEXT, TFLT, TIME, TIT1, TIT2, TIT3, TKEY, TLAN, TLEN, TMED, TOAL, TOFN, TOLY, TOPE, TORY, TOWN, TPE1, TPE2, TPE3, TPE4, TPOS, TPUB, TRCK, TRDA, TRSN, TRSO, TSIZ, TSRC, TSSE, TYER, TXXX
Why does it import the composer then?
Here's my import scipt, if that helps:
var desc = '';
// first gather data
var title = obj.meta[M_TITLE];
if (!title) title = obj.title;
var artist = obj.meta[M_ARTIST];
artist = 'Unknown';
artist_full = null;
artist_full = artist;
desc = artist;
var album = obj.meta[M_ALBUM];
album = 'Unknown';
album_full = null;
desc = desc + ', ' + album;
album_full = album;
desc = desc + ', ';
desc = desc + title;
var date = obj.meta[M_DATE];
date = 'Unknown';
date = getYear(date);
desc = desc + ', ' + date;
var genre = obj.meta[M_GENRE];
genre = 'Unknown';
desc = desc + ', ' + genre;
var description = obj.meta[M_DESCRIPTION];
obj.meta[M_DESCRIPTION] = desc;
I don't know what taglib is doing there, you can compile taglib to get this command line example program that they have and try it directly. MediaTomb is not parsing the tags itself, we are using libraries for that, if I ask for "artist" but get "composer" - first there is no way I would ever know, second - no clue why; because as I said, we are not doing any low level stuff with tags, we use id3 parsing libraries.
You could also try to compile MediaTomb without taglib, but with id3lib support and see if it is any better. I'd try the available command line tools first (there is some stuff that comes with id3lib) before going that route…
Ok, I'll take a look at how taglib is parsing the files. Thanks for clearing that up for me!
Do you have some news? I'm having the same behavior!
No, I didn't have time to look into it. If I find a solution I will post it.
I'm having the same problem…if it helps. I am running Ubuntu, and mediatomb is serving up the media in the directory that stores all my iTunes files. As best as I can tell any of my media stored as .mp3 returns the artist correctly, but anything stored as .m4a returns the composer instead. I guess that means there is an issue with taglib/id3lib, although I'm not sure which I am using.
(I just did an apt-get install mediatomb)
I am having exactly the same issue. iTunes mp4s sort by composer rather than artist. Tried varying versions of dependencies but no joy. Any help much appreciated!
Looks like taglib is innocent and FFMPEG's the culprit. see http://roundup.libav.org/issue1501
This is consistent with Mediatomb source code which tells me that (at least in the Debian Package) FFMPEG is used to interpret MP4.
I have had success the following way:
under debian squeeze, installed meditomb and ffmpeg sources, including build dependencies. Then did this:
@@ -1542,7 +1542,8 @@
case MKTAG(0xa9,'n','a','m'): key = "title"; break;
- case MKTAG(0xa9,'w','r','t'): key = "author"; break;
+ //case MKTAG(0xa9,'w','r','t'):
+ key = "author"; break;
case MKTAG(0xa9,'c','p','y'): key = "copyright"; break;
case MKTAG(0xa9,'i','n','f'): key = "comment"; break;
…and rebuilt ffmpeg and mediatomb packages (normal debian way). Don't know, whether mediatomb was actually necessary though. After removing the m4a tracks from the database and readding them again, I have my tracks sorted by artist, not composer.
The cause is, ffmpeg reads the tags from mp4 files in the order their appear in the file, and aggregates "ART", "wrt", and "aut" tags into one key "author", which is used by mediatomb as the artist. In iTunes files I figured, the order is "nam" (the tracks title), then ART, wrt, alb and so on. Can bee seen with "strings" or in mc. Here, it seems, ART gets overwritten by wrt.
To work around this and solve my problem, I just ignore wrt.
ffmpeg 0.8.3 (from wheezy I think, and called libav now) looks a lot different here. It seems to know way more tags in its internal data model and so does more fine specification rather then data reduction/aggregation:
case MKTAG(0xa9,'A','R','T'): key = "artist"; break;
case MKTAG( 'a','A','R','T'): key = "album_artist"; break;
case MKTAG(0xa9,'w','r','t'): key = "composer"; break;
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.