tags written by id3tool not compatible with mpd

Cool stuff you can do with MPD. A place for you to put your hacks and patches, or be inspired by others'.
Post Reply
bcrowell2
Posts: 7
Joined: August 4th, 2014, 10:38 pm

tags written by id3tool not compatible with mpd

Post by bcrowell2 » August 6th, 2014, 6:01 pm

I ran into the following weird problem, and I thought the solution might be helpful to others. The symptom was that 80-90% of my mp3 files were being put in the mpd database without any tags. The problem turned out to be that I had added tags to these files using the linux command-line program id3tool, and the id3v1 tags written by id3tool don't seem to be reliably readable by the MAD library, which is what mpd uses. MAD reads them successfully from about 10-20% of the files, but fails the rest of the time. To fix the files, I used the id3v2 tool to convert the id3v1 tags to id3v2, e.g.:

Code: Select all

id3v2 -C young_zuma.mp3
I would guess this is a bug in either MAD or id3tool.

max
Forum team
Posts: 913
Joined: January 15th, 2013, 3:43 pm

Re: tags written by id3tool not compatible with mpd

Post by max » August 6th, 2014, 8:06 pm

bcrowell2 wrote:id3v1 tags written by id3tool don't seem to be reliably readable by the MAD library
No, libmad does not read tags.

bcrowell2
Posts: 7
Joined: August 4th, 2014, 10:38 pm

Re: tags written by id3tool not compatible with mpd

Post by bcrowell2 » August 7th, 2014, 1:02 am

OK. Here's what I observe:
$ id3tool a.mp3
Filename: a.mp3
Artist: Mingus
Album: At Antibes
Genre: Jazz (0x8)

$ madplay -o /dev/null a.mp3
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
Comment: Created by mp3cut (http://bl0rg.net/software/poc/)
^C
$ id3v2 -l a.mp3
id3v1 tag info for a.mp3:
Title : Artist: Mingus
Album : At Antibes Year: , Genre: Jazz (8)
Comment: Track: 0
a.mp3: No ID3v2 tag
This is a file whose tags were written by the id3tool command line utility. Id3tool can read them back, but madplay can't, and mpd can't. I don't know if madplay and mpd share the relevant code.

max
Forum team
Posts: 913
Joined: January 15th, 2013, 3:43 pm

Re: tags written by id3tool not compatible with mpd

Post by max » August 7th, 2014, 7:20 am

bcrowell2 wrote:This is a file whose tags were written by the id3tool command line utility. Id3tool can read them back, but madplay can't, and mpd can't. I don't know if madplay and mpd share the relevant code.
Note that madplay and libmad are different pieces of software. madplay uses libmad for decoding audio, and uses libid3tag for extracting ID3 tags. MPD also uses libmad for decoding audio and libid3tag for extracting ID3 tags. As I said, libmad is not involved in the ID3 part!

bcrowell2
Posts: 7
Joined: August 4th, 2014, 10:38 pm

Re: tags written by id3tool not compatible with mpd

Post by bcrowell2 » August 7th, 2014, 4:11 pm

OK, so it sounds like tags written by id3tool are not compatible with libid3tag.

Post Reply