Author Topic: Issue with "MOOD" tag when Importing Windows Media Player library to MB.  (Read 1890 times)

Mati

  • Newbie
  • *
  • Posts: 10
Importing of the WMP library to MusicBee went OK with the exception of the "MOOD" tag.

This field got populated with strange characters that look to me like Chinese.
For example:
"Mood" tag in WMP: dance3 too fast
was converted to:搀愀渀挀攀㌀ 琀漀漀 昀愀猀琀.

Any help with the issue ?

redwing

  • Guest
if you install Additional Tagging Tools plugin, it has "re-encode tags" command. Once you identify both original and incorrectly used codepage for the tag with a file, then you can select multiple files and apply it at once.

If that doesn't work, your WMP library might have been corrupted. In that case try rebuilding it with WMP and then import it again.
Last Edit: December 03, 2017, 12:31:11 AM by redwing

Mati

  • Newbie
  • *
  • Posts: 10
Thank you for your reply.
Some progress (but no cigar):
Using "re-encoding tags" it opened on Original encoding: "windows-1255"
When using Incorrectly used encoding "utf-16" it gave me the correct characters but with an extra space between each
i.e. in the above example: d a n c e 3   t o o  f a s t
when trying utf-32 it gave me 2 extra spaces. utf-8 was a mess.

I do not know what is the original encoding of "MOOD" in mp3 is in WMP. Is that windows-1255 ?

Would you know what is the "incorrect encoding" that MB would try on default when importing from WMP ?

Any further suggestions ?   
   

redwing

  • Guest
Can you try finding out code pages other than UTF for incorrectly used encoding? That would be easier.

It could be your Windows system locale setting (for non-Unicode apps) but I'm not sure how WMP tags are encoded.
Last Edit: December 03, 2017, 04:12:10 AM by redwing

Mati

  • Newbie
  • *
  • Posts: 10
Thanks again.
I will check tomorrow the locale encoding. good idea. It is already 06:30 in Israel. I am going to get some hours of sleep and continue afterwards and will report. Bye for now.   

redwing

  • Guest
It must be about endianness like this bug: https://getmusicbee.com/forum/index.php?topic=16182.0
I suggest you file a bug report to see if Steven can help.
But it's a still a mystery to me why it happens only to mood tag. Did you use your phone when tagging mood tag, or is it a plugin that writes the tag with WMP?

Mati

  • Newbie
  • *
  • Posts: 10
Hi & thanks again,

Some more facts: the problem exists only in the Mood tag and only in Mp3 files. It imported correctly WMA and also FLAC Mood tags.

I assume that the reason is in the unusual handling of the MOOD tag in WMP: 
The MOOD tag of MP3 files in WMP is implemented in a PRIV frame with key WM/MOOD. This is not the usual TMOD tag in current ID3 implementations. It was done for compatibility with previous versions of WMP predating the ID3 TMOD tag. Not many programs decipher that tag (not MP3tag for example).
Therefore I was pleasantly surprised that whoever wrote the import program for MB bothered to extract it altogether (albeit with the problem).

I think that you are right that ti has to do with endianness. I was not able to find a pair of encodings that solved the extra spaces by "reencodings'.

Just to reassure myself that the MOOD tag is not corrupted I tested the database in the only other program I know that can handle WMP mood tag: "tag&replace"  - and it appears correct in that program, no extra spaces.

So, I believe now that the import program of MB needs to be fixed as you indicated. I will follow your advice and file this bug report.

Thanks again for your good advice.   
 

redwing

  • Guest
I saw your bug report but Steven seems not so much interested in fixing the bug.

Here's a workaround.
Can you copy the field's values to a spreadsheet using either WMP or "tag&replace" you mentioned?
If so, you can copy the values to MB's mood tag using Additional Tagging Tools plugin.
First select all files in MB's main panel> copy the values to the clipboard from the spreadsheet> use "Copy tag" command from clipboard to mood tag.

Mati

  • Newbie
  • *
  • Posts: 10


Ohh, I just saw your message here, as I was checking only the bug forum.

Follow your suggestion I will check if WMP or Tag&replace can export the MOOD tag to a spreadsheet.


Interestingly , I tried unsuccessfully a similar workaround. Attempted to copy the MOOD tag to another unused tag (rights tag) using Tag&Replace,  planning then to import the files to MB and copy that tag to the MB MOOD tag.

However I did not know how to copy one tag into another in Tag&Replace automatically. I placed a question to their forum but did not receive an answer yet.


Thanks again for your reply

Mati

  • Newbie
  • *
  • Posts: 10
Just now I continued with my attempts and it seems that I managed to find a reasonable workaround.

my findings:
The MOOD tag in WMP - is written to the PRIV frame with key WM/MOOD. This is not the regular implementation of thie tag. (See my comment above). Turns out that each letter in that tag is separated by the NUL character. For example the word "dance" would show up in that tag as d(nul)a(nul)n(nul)c(nul)e(nul).

When one attempts to choose a different reencoding as suggested by redwing, the nul is interpreted as a space character,  ("d a n c e" in the above example) which is no good.

It would be possible I am sure to write a program that would skip the unnecessary nul characters, which I beleive is the highway solution.

Not ready for this project I chose a roundabout:
i used the only program that I know that deciphers correctly WMP MOOD tag, "tag&replace".
 
With "tag&replace" I copied all my MP3 file MOOD tags into the COPYRIGHT tag. Following a suggestion in another forum I chose the COPYRIGHT tag because it is a universal TAG that is implemented in most players.

The copy process of "Tag&Rename" not only copied correctly the MOOD tag into the COPYRIGHT tag but surprisingly also into the engMusicMatch_Mood frame. And it was copied correctly, without the unnecessary NULs.

After introducing the MP3 files again into the MB library, not only the COPYRIGHT tag showed correctly the MOOD content, but also MB updated the MOOD tag. It added that same content to the previously garbaged MOOD that was originally incorrectly encoded from the PRIV frame with key WM/MOOD fo the WMP.
In other words MB combined the content of both MOOD tags into the MOOD colomn in MB.

This MOOD tag is serviceable. YOu can just ignore the garbage at the end of each MOOD raw. At first I had in mind to leave that column as is thinking that if I copy the COPYRIGHT column back to the MOOD tag in MB it will overwrite the PRIV frame with key WM/MOOD to blank. If that would happen I would loose the MOOD tag when using WMP. However, luckily apparently this copy process leaves the PRIV frame with key WM/MOOD intact, while getting rid of the garbage characters in MB. So I intend to copy the COPYRIGHT tag into MOOD in MB.

In summary, this is a feasible roundabout way to copy MOOD form WMP to MB. However I think that it would be better to have MB fixed to be able to read WMP MOOD directly.
It is also not clear to me why Tag&replace uses the engMusicMatch_Mood frame, rather than the common TMOD for MOOD, and how MB knew to read and then add the information from two esoteric frames into its MOOD tag.
Perhaps someone here can enlighten all that.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
I have changed the encoding used from utf-16-be to utf-16-le which i believe will address this issue

https://getmusicbee.com/patches/MusicBee33_Patched.zip
unzip and replace the existing musicbee application files