Jump to content

Null character used for multiple artists in ID3 tags (MP3 files) not parsing correctly


Recommended Posts

When using a null character for tagging multiple artists in MP3 files, the artists are not split as they should be. I do this by typing "\\" in the mp3tag program, which according to them inputs a null character as required by the ID3v2.4 specs for multiple artists although this is informally applied to ID3v2.3 as well. Splitting multiple artists works perfectly for FLAC files using this method. For MP3 files, using characters like ";" or "/" and defining them as a symbol to split artists in Poweramp works as well. The only thing that doesn't work is using null characters in MP3 files.

I believe this to be classified as a bug since the null character is what is specified for multiple artists in the ID3 specs and it is not working in Poweramp. I am hoping to see this bug fixed because I believe Poweramp is the best music player on Android, and the dev seems quite active responding to bugs and feature requests.

Poweramp build: 933
Device: Samsung Galaxy S8
Android version: 9
Steps to reproduce: Use null characters as delimiters for multiple artists in tags for MP3 files

Link to comment
Share on other sites

Null characters created via MP3Tag's "\\" separator should work fine, they were implemented in PA build 911 about six months ago (previously only multiple instances of the ARTIST tag in FLAC/Vorbis tags was supported). As you say, technically it's an ID3v2.4 feature, but it also works in 2.3. You do need to have something (normally a semicolon) saved in the 'Symbols to Split Multiple Artists' option though, otherwise the splitting feature won't be enabled at all.

What do you see in the Artist field when you try to view the Info/Tags data in PA for such a file? (Remember you may need to do a Full Rescan to update the scanned library data after making a change to a file).

Andre

Link to comment
Share on other sites

Hi Andre. Here's a couple pics of what I'm working with as well as my settings for splitting. I have done full rescans multiple times and still end up with artists unsplit for MP3s like this. At this point I'm thinking I should reset all Poweramp settings or reinstall the app if the feature should be working as you say.

Screenshot_20220518-163915_Poweramp.jpg

Screenshot_20220518-163942_Poweramp.jpg

Link to comment
Share on other sites

I have reinstalled the app so all my settings are freshly default and I have done a full scan. Still have the same issues, but here are my findings and observations:

  1. For FLAC, in PA, artists can be stored in multiple, separate ARTIST tags. Artists are shown in PA as separated with "; " (semicolon and space), so they are shown as "artist1; artist2". Although the multiple ARTIST tags are recognized and separated with a "; ", for some reason they are not split by default due to the underline going underneath the entire tag. Therefore, using default settings, multiple artists are not working. However, a workaround exists by adding ";" to the "Symbols to Split Multiple Artists" setting. After adding that, "artist1; artist2" are properly split into 2 separate artists shown by 2 underlines, one beneath each artist name. If this is intentionally done to support multiple artists in such a roundabout way, then ";" should be included in "Symbols to Split Multiple Artists" as the default setting.
  2. For MP3, in PA, null characters become replaced with a " " (space), so if an ARTIST tag was artist1<null>artist2 (or artist1\\artist2 in mp3tag for example), PA shows it as "artist1 artist2" and the multiple artists are not split due to the underline going underneath the entire tag. There will be no way to get this to work using the "Symbols to Split Multiple Artists" feature properly if any artist names include a space.
  3. It seems using the above findings, we can determine that at least for PA build 933, null characters for multiple artists are not supported for MP3 files only. It seems like the null characters in MP3 files are intended to be replaced by "; " so that the "Symbols to Split Multiple Artists" feature can split the artists with ";", but this is currently not the case.
  4. If null characters were supported properly for MP3 files and working in previous builds, then a regression in the source code probably occurred.
  5. Semicolon ";" should be included in "Symbols to Split Multiple Artists" as the default setting due to the way current support for multiple artists work.

Attached pics below show how this works for FLAC files with default settings and then with ";" added to "Symbols to Split Multiple Artists".

20220518_214817.jpg

20220518_214913.jpg

20220518_214927.jpg

20220518_214950.jpg

Link to comment
Share on other sites

It does sound like there's a problem with parsing your MP3 files. Could you post a sample of one that does not work for you? This is what a null-byte separated ID3 Artist tag looks like for me:

image.png


You are right that there needs to be something in the 'Symbols to Split Multiple Artists' option though, otherwise the scanner's entire splitting feature is disabled and Artist tags are always handled as one single item. When disabled, any instances of null bytes in MP3/ID3 tags will be replaced by spaces, and multiple FLAC/Vorbis ARTIST tags will be concatenated with "; " between each entry (and the whole field will show as underlined in Info/Tags, indicating PA is treating it as a single item).

Andre

Link to comment
Share on other sites

A bit off-topic, but when the artist splitting system was first introduced I suggested then that multiple individual items (e.g. separate content generated by null bytes in tags, or multiple ARTIST entries) should be delimited using a special/unique character, rather than inserting a semicolon or anything else that might occur in normal text. I suggested using a blob symbol, to make it clear that these are in fact individual items rather than one long string that has been parsed and split.

I still think that would make sense, e.g:

image.png

 

Andre

Link to comment
Share on other sites

The tagging data seems correct to me, but I too experience the same problem when I scan that MP3 file into PA - the null byte separator (or null two-bytes, as it's Unicode) is being ignored and treated as a space.

  | Artist = Bring Me The Horizon/BABYMETAL
  | - Tag 'TPE1' (67 bytes):
  |     0059: 01 ff fe 42 00 72 00 69 00 6e 00 67 00 20 00 4d [...B.r.i.n.g. .M]
  |     0069: 00 65 00 20 00 54 00 68 00 65 00 20 00 48 00 6f [.e. .T.h.e. .H.o]
  |     0079: 00 72 00 69 00 7a 00 6f 00 6e 00
00 00 ff fe 42 [.r.i.z.o.n.....B]
  |     0089: 00 41 00 42 00 59 00 4d 00 45 00 54 00 41 00 4c [.A.B.Y.M.E.T.A.L]
  |     0099: 00 00 00        
                               [...]

@maxmp one for you I'm afraid, there must be something strange elsewhere in the file format, but I don't know enough of the low-level detail to find it. Slightly modifying and re-saving the file in MP3Tag does not seem to resolve the problem.

Andre

Link to comment
Share on other sites

14 hours ago, PrinceMojo said:

I do this by typing "\\" in the mp3tag program, which according to them inputs a null character as required by the ID3v2.4 specs for multiple artists although this is informally applied to ID3v2.3 as well

@maxmp As a note to this, mp3tag only uses the "\\" internally as a split character reference. This data is not actually stored in the tag field, but rather forces the tag to insert a second/third/etc. field with same heading.

 

In the above file sample, the Artist "Bring Me The Horizon\\BABYMETAL" Results in two ARTIST fields;

ARTIST Bring Me The Horizon

ARTIST BABYMETAL

Link to comment
Share on other sites

5 minutes ago, MotleyG said:

In the above file sample, the Artist "Bring Me The Horizon\\BABYMETAL" Results in two ARTIST fields

It would for FLAC files where Vorbis tagging supports multiple instances of the same tag name, but in this case we're looking at an MP3 file (ID3 tagging) so should generate a null-byte separator within the single TPE1 tag. But for some reason PA is not parsing this particular file correctly, not sure why as yet.

Andre

Link to comment
Share on other sites

At this moment, for id3v2 only genre tag separates multiple tags by :

I added NUL separation with ; (as for other tagging schemes) for id3v2 as well - will be in builds 940+. As previously this will require adding ";" to the split symbols in Poweramp scanner settings.

Thanks for the request and test file.

Link to comment
Share on other sites

The original question in this thread was about null-byte separators in the Artist (TPE1) tag, which as far as I know should work for MP3 / ID3v2.3 tagging (it works for me anyway, without needing v2.4 spec files). However for some reason separated artists are not being generated by this sample ID3v2.3 file.

Andre

Link to comment
Share on other sites

2 hours ago, PrinceMojo said:

Since Max has indicated that this will be fixed in build 940+, I will mark his post as the solution. Thank you to everyone who participated in this thread.

OK, as long as you are happy that the problem is with splitting the Genre tag as Max mentioned, but I thought your issue was with multiple Artist names?

Andre

Link to comment
Share on other sites

8 hours ago, andrewilley said:

OK, as long as you are happy that the problem is with splitting the Genre tag as Max mentioned, but I thought your issue was with multiple Artist names?

Andre

Yes, my issue is with multiple artists.

On 5/19/2022 at 9:11 AM, maxmp said:

At this moment, for id3v2 only genre tag separates multiple tags by :

I added NUL separation with ; (as for other tagging schemes) for id3v2 as well - will be in builds 940+.

I interpreted this as "current versions of PA support multiple tags for genre and nothing else, but multiple artists (as well as other tags) would be included in future build 940+." If it is, then I think this solves my issue since multiple artists will be supported in the future builds. Otherwise, we could use some clarification from @maxmp and would still need a fix for multiple artists specifically.

Link to comment
Share on other sites

Support for null-byte separators to create multiple individual items within Artist (and other?) ID3 tags has been provided since PA build 911, which was released in August of last year:

image.png


What I'm not sure of is why your sample file is not working though, as my similar test files (also ID3v2.3) work fine with what looks like exactly the same binary formatting for the TPE1 tag.

This is your tag breakdown (which fails to split):

  | Artist = Bring Me The Horizon/BABYMETAL
  | - Tag 'TPE1' (67 bytes):
  |     01 ff fe 42 00 72 00 69 00 6e 00 67 00 20 00 4d [...B.r.i.n.g. .M]
  |     00 65 00 20 00 54 00 68 00 65 00 20 00 48 00 6f [.e. .T.h.e. .H.o]
  |     00 72 00 69 00 7a 00 6f 00 6e 00 
00 00 ff fe 42 [.r.i.z.o.n.....B]
  |     00 41 00 42 00 59 00 4d 00 45 00 54 00 41 00 4c [.A.B.Y.M.E.T.A.L]
  |     00 00 00                                        [...]

Versus one of my own MP3 files (which works):

  | Artist = David Bowie/Mick Jagger
  | - Tag 'TPE1' (53 bytes):
  |     01 ff fe 44 00 61 00 76 00 69 00 64 00 20 00 42 [...D.a.v.i.d. .B]
  |     00 6f 00 77 00 69 00 65 00
00 00 ff fe 4d 00 69 [.o.w.i.e.....M.i]
  |     00 63 00 6b 00 20 00 4a 00 61 00 67 00 67 00 65 [.c.k. .J.a.g.g.e]
  |     00 72 00 00 00                                  [.r...]


Andre

Link to comment
Share on other sites

Hmm, I've just re-checked my own file by removing it, copying over a new edit from MP3Tag, and doing a Full Rescan - and now PA is mis-reading that file too. I think something may have changed in the scanner, or perhaps in MP3Tag.

Before the rescan, my test file was showing (as per my 19 May screenshot) as:

image.png

Whereas today with a replaced file (with the above quoted TPE1 tag) after a rescan in build 939, it is showing as:

image.png

 

Perhaps Max found a general bug in the null-byte parsing code, and has fixed it for 940?

Andre

Link to comment
Share on other sites

Posted (edited)

I think it's some sort of bug as you said. I just tested a few different files by editing the artist tags using MusicBee instead of MP3Tag and it also failed to split the artists.

Edited by PrinceMojo
Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...