Author Topic: Tag Editor writes unwanted tags and wrecks multi-value tags  (Read 14676 times)

Boll Weevil

  • Jr. Member
  • **
  • Posts: 27
Hi!

While editing tags I noticed a very strange behavior. When I save edited tags, it also writes an unwanted tag ENCODER (TSSE). See screenshots. Maybe it's not a problem but as for me it is absolutely unnecessary and I spent a lot of time to clean my library from all garbage tags. Maybe it can be turned off somewhere, but I can't find where and how. And by the way, the encoder is wrong, actually it is LAME 3.100

And the second. When the tags are saved, by some reason multi-value fields are split in the way as you can see on screenshots. Again, for MB it is not a problem ad it still handles them correctly, but other software (MediaInfo, AIMP) only recognizes the first value (Rockabilly). TagScanner still recognizes both values and resaving tags with it can fix it and all values reappear in other software.

I don't use MB tag editor often, but from time to time I do, and now I don't have an idea how many files are affected and how to locate and fix them

Last Edit: November 01, 2021, 06:59:59 PM by Boll Weevil

frankz

  • Sr. Member
  • ****
  • Posts: 3834
The encoder tag is written by the encoder.

The multi value tags are actually multiple tags (multiple genre tags in your example) within the file, and are being displayed correctly here.  They are shown concatenated in the simple display.

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
If I am not mistaken, most mp3 encoders will write the encoder info in the header of the file itself.
You could use a hex editor to open the mp3 files and check what is in the header of these files.

MusicBee probably reads that info from the file and writes it to a tag so to make it a manageable tag field.
Which makes sense to me.

If I understand you correctly, you believe it should say 3.100 instead of 3.10 ?
If that's the case, you could post a wish for MB not to truncate such values to two digits behind the comma.

About the genre tag:
How were these genres added to these files in the first place?
It seems like it could be a matter of the separator being a semicolon only, while they should be a semicolon+space.
(  '; ' instead of ';'  )

edit, pressing 'post' alerts me that somebody answered already.
I'm in a lazy kind of mood and will press 'post' anyway ;-)

Boll Weevil

  • Jr. Member
  • **
  • Posts: 27
The encoder tag is written by the encoder.
The LAME tag has nothing with metadata, it is just a technical info and shouldn't be treated as a tag. At least until a user intentionally saves it as a ENCODER to metadata. Here it is written by MB tag editor, I'm 100% sure about it, because it wasn't there before I saved tags.

Quote
The multi value tags are actually multiple tags (multiple genre tags in your example) within the file, and are being displayed correctly here.
I believe it is only true to MB, because they don't display correctly in other players after the file have been edited by MB.

If I am not mistaken, most mp3 encoders will write the encoder info in the header of the file itself.

Yes, you're right, it is written in header and it is not editable and it should not be editable, since it is technical data. It should not be treated as an editable tag by tag editor unless user willingly fills ENCODER tag according to the data taken from header. I consider it useless, so I don't use ENCODER tag in my files.

Quote
If I understand you correctly, you believe it should say 3.100 instead of 3.10 ?
If that's the case, you could post a wish for MB not to truncate such values to two digits behind the comma.

In fact I don't want to see it at all among the tags in my files, but since it is displayed as a tag, well, let it be displayed correctly))

Quote
About the genre tag:
How were these genres added to these files in the first place?
It seems like it could be a matter of the separator being a semicolon only, while they should be a semicolon+space.
(  '; ' instead of ';'  )

It doesn't matter, semicolon only, or semicolon+space - the result is the same, only the first value appears in mentioned external apps. I just checked

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
If I am not mistaken, most mp3 encoders will write the encoder info in the header of the file itself.
Yes, you're right, it is written in header and it is not editable and it should not be editable, since it is technical data. It should not be treated as an editable tag by tag editor unless user willingly fills ENCODER tag according to the data taken from header. I consider it useless, so I don't use ENCODER tag in my files.
For many users (such as me) it is convenient that MusicBee distills this info from files and makes it available as a tag field.
Since you are bringing this up in 'bugs', what do you believe to be the bug exactly?

hiccup

  • Sr. Member
  • ****
  • Posts: 7790

How were these genres added to these files in the first place?
It seems like it could be a matter of the separator being a semicolon only, while they should be a semicolon+space.
(  '; ' instead of ';'  )

It doesn't matter, semicolon only, or semicolon+space - the result is the same, only the first value appears in mentioned external apps. I just checked
I see I am not the first one that observed this separator issue with your files:
https://getmusicbee.com/forum/index.php?topic=4451.msg185972#msg185972

Since you didn't answer the question how you are populating these tags in the first place, and this specific problem hasn't been raised before by anybody before, I can only estimate that the issue is on your side, and not related to something MB is doing wrong.
So unless you can provide detailed specifics, there is not much you are providing here that warrants this to be investigated as being a bug.

Boll Weevil

  • Jr. Member
  • **
  • Posts: 27
Quote
I see I am not the first one that observed this separator issue with your files
It is not an issue. The case that you mentioned was actually a bug and was fixed in the then next update. I never had any problems with tags separated with ";" only and they were handled correctly. Separator is ";" and using it with or without space is just a personal preference and it won't affect anything.
As for how I populate my tags, I think it doesn't matter as I use standard tag fields for all values, including genre(s). In the last couple of years I do it mostly with TagScanner, before my main tagging tool was Tag&Rename, and the most part of my library is tagged with it mostly manually, some part using Discogs and then fixed manually to meet my tagging preferences. That example file above also was tagged manually in TagScanner, then I just found and fixed a typo in MB and mentioned strange intervention into tags that I didn't edit.
Honestly I don't think that it matters how I populate my tags, I just don't want my tagger to add or remove particular tags without my permission. Neither I want my tagger to change some tags in the way that may seem useful for somebody.

Quote
For many users (such as me) it is convenient that MusicBee distills this info from files and makes it available as a tag field.
I don't have anything against making it available, I'm against making it obligatory.

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
I agree that the repopulation of the encoder tag is an annoyance, if probably not really a bug.

The multi value issue sounds like the difference between treating the tag as a single string vs actual multiple values separated by a null character. MusicBee displays the semicolon but once it has processed a multi value tag, the semicolon doesn't exist in the tag anymore, it's just a human-readable stand-in for display purposes. Not all software correctly reads multi value tags and will just stop at the first null separator.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

Boll Weevil

  • Jr. Member
  • **
  • Posts: 27
The multi value issue sounds like the difference between treating the tag as a single string vs actual multiple values separated by a null character. MusicBee displays the semicolon but once it has processed a multi value tag, the semicolon doesn't exist in the tag anymore, it's just a human-readable stand-in for display purposes. Not all software correctly reads multi value tags and will just stop at the first null separator.
Thank you for that explanation, I supposed that, but why MB doesn't leave multi valued tags as they are, I mean as a simple string where semicolon is semicolon and not just a viewable stand-in for something that just MB can understand. When I was just starting to use MB I just imported all my library, where all tags were populated in various tag editors. All semicolon-separated tags were imported unchanged and handled correctly, and I could still operate with them in other software.
By the way, I noticed that PUBLISHER tag with multiple values still stored as a simple string after saving it by MB

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
MusicBee is following the ID3 standard for tagging.
PUBLISHER (TPUB) is only supposed to be a single tag with a list of publishers.
GENRE (TCON) is supposed to be a multiple-entry tag with each value separated by a null frame.
MusicBee and my library - Making bee-utiful music together

leeuniverse

  • Jr. Member
  • **
  • Posts: 46
MusicBee is following the ID3 standard for tagging.
PUBLISHER (TPUB) is only supposed to be a single tag with a list of publishers.
GENRE (TCON) is supposed to be a multiple-entry tag with each value separated by a null frame.

Hello, I believe if we are using ID3 2.3 (which I am) MusicBee should NOT be saving with the NULL \\ backslashes.

In fact, this is also causing me a serious problem, because Mp3tag and MusicBrainz Picard DO NOT do what MusicBee is doing, and it's causing me all kinds of issues with displaying Genre tags in various places, in the programs themselves, etc.  It's how I ended up confused as heck as to what Tag Separators I should be using, and after some 100 hours of testing with all the different programs and tag variations, and questions on the subject at different forums, everyone said the SEMI-COLON was the most consistent and compatible separator to use.

.... and they were correct, including display in MusicBee.  More specifically, I do the Semi-Colon for all my general tags, and for Multi-Genres and Multi-Artists I do Semi-Colon and Space.
MusicBee interprets this well...

If I try to put \\ on my Genres in the different programs, NIGHTMARE's ensue in those not displaying well.

Mp3tag WILL create multi-Genre/Artist Tags if you within the program use \\'s.... and save,  But you're doing a "manual" bypass then.
Using the Semi-Colon or a few other things Mp3tag WILL save using those Separators, it will NOT "override" what you've put in the Tag like MusicBee is doing, saving the backslashes instead as separators.  Neither will Picard.  Picard unlike Mp3tag won't even create multi-tags if you save with backslashes...  It will all just be ONE Genre etc. tag text as entered.

Bottom line, this IS a BUG in MusicBee....  When ID3 2.3 editing is done, the program should ONLY be saving what we put in there and under ONE Tag.
I've noticed MusicBee doesn't do this for OTHER Tags also... such as Artist, the \\ backslashes are put in there on Save.  This should not happen.

So, this needs to be fixed ASAP...  2.4 is what's properly compatible with Multi-Tags... not 2.3.
BTW, I've noticed that when saving "Artwork" in MusicBee the proper saving is done, blackslashes are not added to the other tags, that I've noticed anyway.
Crap, that's wrong....  Son of a ****...  So THAT is how I've noticed some files still having \\'s when I removed them all.

So, I was wrong, even when saving Artwork backslashes ARE saved, replacing likely ALL other Tag Separators.  :(
The test I just did at least did so on my Artist and Genre Tags....

BTW, anyone that wants to verify what I'm saying, see here: https://community.metabrainz.org/t/multiple-artists-and-genres-as-multiple-tags/412255/4?u=leeuniverse
This guy is long brilliant all things Tagging etc., plus, I've verified it from experience, Picard and Mp3tag don't save with backslashes when ID3 2.3 is used.  They ONLY save what you've used as a separator.
Last Edit: November 03, 2021, 10:12:47 AM by leeuniverse

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Thank you for that explanation, I supposed that, but why MB doesn't leave multi valued tags as they are, I mean as a simple string where semicolon is semicolon and not just a viewable stand-in for something that just MB can understand.
Because this (i.e. the NUL character as separator [which admittedly is difficult to deal with in a non-programmatical context or as someone who does not deal with text formatting on a programming level regularly.... i.e. hardly any of us... and I had to spent dozens/hundreds of hours to understand this mess a bit better as well....]) is the official separator as per the id3 file specs!

everyone said the SEMI-COLON was the most consistent and compatible separator to use.
But then you would be NOT using the officiall sanctioned separator for id3 2.4... ? :P

So, this needs to be fixed ASAP...  2.4 is what's properly compatible with Multi-Tags... not 2.3.
No it doesn't [imo]!

id3 2.3 has had NO definition of an official multi-value tag separator  [and for this you're expecting Stephen/Musicbee to expose yet another customizable separator...?]
For id3 2.4 it was decided that multi-value is now supported, and the official separator is a NUL.
But afaik (and I would love to know if this is not true, or what the details were) nothing changed in the encoding of the fields itself.

So the Picard way is the super-correct way to handle this. i.e. to not support multi-value metadata on id2.3. at all... [but to leave it up to the user to inject custom separators that aren't a NUL...1]
BUT - and this is a big but...  then you have a mixture of 2.3 & 2.4 metadata separators on your files (and not everyone is super savy about the finer details, and who can blame anyone with the mess... ). So what the Picard way means is not having multi-value at all on 2.3 at all, or forcing a literal ; instead of a NUL into your files, ending up with a mix of separators across not only container formats, but also versions of the same container format.... which sounds much worse to me than having NULs consistently!

My interpretation is that Stephen decided to allow, the later officially declared, NUL character separator for all id3 versions, and I'd fully agree for convenience & consistency - and I have not found a technical issue with this even though I have a multitude of other programs consume the consistently NUL separated metadata on id3 2.3 headers (written in Musicbee & Foobar as well as Traktor, Serato as well as Rekordbox [not the later 3, as none have implemented any multi-value support yet...]).

c.
Last Edit: November 03, 2021, 05:27:20 PM by alec.tron

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
If I try to put \\ on my Genres in the different programs, NIGHTMARE's ensue in those not displaying well.
\\ is not a null character.
Some tagging programs do recognise it as such.
MB uses "; " for human-readable form.
MusicBee and my library - Making bee-utiful music together

Boll Weevil

  • Jr. Member
  • **
  • Posts: 27
So if there is no defined standard for separator in 2.3 then I guess there should be an option for a user to decide which one to use and it should not be replaced with null by default, but only by user's permission when they are confident of what they are doing. As far as I can see after a year of active use of MB, it perfectly handles multiple values written as a simple string with a popular ";" without replacing it with null

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1269
So if there is no defined standard for separator in 2.3 then I guess there should be an option for a user to decide which one to use and it should not be replaced with null by default, but only by user's permission when they are confident of what they are doing.

I think you have done just enough research on this subject to follow along the terminology of the topic, but to the point where the terms are still confusing you. The below quotes are very important, but maybe a little difficult to comprehend.

The multi value tags are actually multiple tags (multiple genre tags in your example) within the file, and are being displayed correctly here. They are shown concatenated in the simple display.

\\ is not a null character.
Some tagging programs do recognise it as such.
MB uses "; " for human-readable form.

As @alec.tron said, the concept of the null character can be difficult to grasp, at first. Over on the MP3TAG forum, I found what I believe to be a good thread for explaining the multiple value process as it relates to music tagging software and hopefully it'll clear some things up regarding the topic.

In particular...

Quote
Representation of the separator and the actual character sequence used are two different things. If you want the sequence to be entered from the keyboard, then the separator needs to be some common character(s). There's no reason, I suppose, why it couldn't be represented in some special way - bold or bright red, say. But that would take some additional real-time parsing of the field while the user enters characters, whereas the current implementation only has to parse the field when it's saved.

You're right that it's possible to have literal content that is indistinguishable from the special character sequence, but the question remains whether the sequence chosen presents a problem. I don't see why it should.

Long story short...

Quote
As far as I can see after a year of active use of MB, it perfectly handles multiple values written as a simple string with a popular ";" without replacing it with null

...the semi-colon used in a multiple value-capable field in MusicBee is the "representation of the separator." It is not the "actual character sequence." Computers cannot read input as a human does. A computer does not know what an "A" is. A computer does know what ";" is. A computer does not know what "null" is. How does a computer read input then? Using numbers. A computer reads ";" in this Simple Machines Forum comment as 59. But, in a multi-value field in MusicBee, the ";" is not read as 59. Instead, it is read as 0.
Last Edit: November 04, 2021, 02:07:01 PM by The Incredible Boom Boom