Closed elomatreb closed 4 years ago
A sample file is necessary. Maybe you can copy the ID3 tag to another (empty?) mp3 file - I don't need your music payload, just an arbitrary file with the tag that reproduces the problem.
GitHub refuses to let me upload audio files for some reason, so I uploaded to them to my server for now: https://ole.bertr.am/files/demos.tar
Show me the part of the ID3v2.x specification which describes that multiple values for one TXXX
are separated by slash or null byte. I believe your files are bad, and MPD's behavior is correct, until I'm proven wrong.
See http://id3.org/id3v2.4.0-frames:
4.2. Text information frames \<Header for 'Text information frame', ID: "T000" - "TZZZ", excluding "TXXX" described in 4.2.6.>
Section 4.2 allows multiple values for T
frames, but that section explicitly excludes TXXX
. Now section 4.2.6 says:
4.2.6. User defined text information frame Value \<text string according to encoding>
Note the singular "Value" and "text string". Only one value allowed according to the specification.
In http://id3.org/id3v2.3.0 only a few text frames (such as TCOM
) are allowed to have multiple values, separated with a slash. However, section 4.2.2 says that TXXX
has one value.
Unless I'm missing something, your files are really bad. Therefore, I close this bug report, until proven wrong.
These files were tagged with Picard, the flagship MusicBrainz tagger.
In any case I can live with things being a single value if the spec forces them to be, but is there a possibility of not cutting off the value on v2.4 files? This would at least allow me to deal with this issue on the client side.
If you believe Picard is correct, show me the part of the specification - maybe my interpretation was wrong. If you believe Picard is not correct, report the bug to the Picard project. But what does not impress me at all is saying "the flagship this and that". That doesn't matter. What matters is who's buggy - MPD or Picard.
Related Picard ticket: https://tickets.metabrainz.org/browse/PICARD-990
I think it's pretty clear that the default behaviour of Picard is writing multi-valued TXXX tags that are not compliant with the ID3v2.4 spec. But it is not obvious to me how Picard should be changed.
As an MPD and MusicBrainz user I just want to get multiple MUSICBRAINZ_ARTISTID metadata values for a particular track at the MPD protocol level (so that the various database search commands work as expected). Most of my files are flac files and this is easily achieved today with vorbis comments and works very well.
So my question is, how should a user tag their MP3 files so that MPD recognizes multiple artist MBIDs (and multiple work MBIDs)? This does not appear to be possible by any method, which would seem to imply that there is no way this issue can be fixed in Picard (or any other tagger for that matter).
I ended up just maintaining a small client-side database of MusicBrainz metadata, populated from the web service using the track/recording ID fields. This makes database updates slow but at least it allows me to work around this.
Section 4.2 explicitly excludes TXXX because Text Information Frames contain only encoding and value, whereas User Defined Text Information frames contain encoding, description and value so they need their own section.
It is true that in the ID3v24 spec Text Information Frames says
text string(s) according to encoding
and User Defined Test Information Frames say
text string according to encoding
and I must admit I hadnt noticed this subtle difference before. But it also says
There may be more than one "TXXX" frame in each tag, but only one with the same description.
so if you should not have multiple frames with the same name to represent multiple values , then surely use of null value sis the sensible approach as used elsewhere.
But whether you are right or wrong about the authors original intentions this specification is over twenty years old and not being updated, seeing as he went from v22 to v23 and then v24 its reasonable to think he had a few mistakes left in v24.
I don't know of any other tool that allows multiple values in Text frames but not user defined frames -so with this approach you are just creating incompatbility between applications. My own jaudiotagger lib support multiple values, it is quite widely used and noone has ever filed a bug about this against it. I would ask that you add support for this to better support other applications, in turn making your application more useful.
Bug report
Describe the bug
The MusicBrainz tags containing artist IDs (MBIDs), both for the album and for individual tracks, can contain multiple values. In MP3 files, these are treated incorrectly.
Expected Behavior
In a FLAC file, the tag returns multiple values correctly (partial output of
currentsong
):Actual Behavior
In an MP3 file tagged with ID3v2.3, the values are joined with
/
and treated as one long value:In an MP3 file tagged with ID3v2.4, the values are separated with null-bytes, and the tag value is truncated before the first terminator:
This last behavior makes this behavior especially frustrating, because at least the long
/
-separated value can be parsed on the client side.Version
I can provide the sample files I used to generate the above results if necessary, but since they are actual recordings I wanted to avoid uploading them for now.