Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WMA Tag Metadata Editing (Read 12227 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WMA Tag Metadata Editing

I have a challenge in editing the metadata tags in the headers of my wma collection. Here's my problem: I recently acquired a Sansa e130 portable. While it has very nice database features for sorting music based on the info in the tags, the built in software is not very robust. There are two things which will cause the player to catalog the tag information incorrectly: 1) the way that the track number is identified (string vs. dword, see below), and 2) the order in which the information is listed in the in the header. I would like to identify some way of modifying the tags of large groups of files with respect to fixing these two problems in each file's header, but have not yet found any appropriate tools. The ideal tool would allow for the user to configure both which entries are made in the metadata and the order of the entries.

Does anyone have any ideas of a tool which I can use to modify the metadata headers?

string vs. dword problem
For the track number information in the header, for whatever reason the Sansa software only works correctly if the track number is recorded as a "WMENC_LONG Name", as opposed to a "WMENC_STRING Name". That is, here is an example of a good entry: 
<WMENC_LONG Name="WM/TrackNumber" Value="11" />
And here is an example of a bad entry: 
<WMENC_STRING Name="WM/TrackNumber" Value="11" />

If I use MetadataEdit.exe which comes in the WMA SDK, WMENC_LONG shows up as dword, where WMENC_STRING shows up as string.

WMP writes the tracknumber as a dword, where the other software I have tried writes it as a string. This other software includes:
MP3Tag 2.37
TagScanner 4.9
Foobar2000
MediaMonkey

WMA Tag Metadata Editing

Reply #1
It should be a DWORD according to the specs.

edit: clarification: programs whould accept dword or string

WMA Tag Metadata Editing

Reply #2
It should be a DWORD according to the specs.

Unfortunately the programmers at Sandisk seem to have stuck to the specs more closely than anyone else. I forgot to mention- I also tried editing the tag using the DBPoweramp (R12) powerpack. Using the Edit ID Tag function, if I remove the track tag, then add it again, it also adds it as a STRING instead of a DWORD.


WMA Tag Metadata Editing

Reply #4
Microsoft say:

Many existing applications write the value for WM/Track as a DWORD. If you create an application that plays files from unknown sources, you should include code to handle both string and DWORD values.

So you have a situation where some programs will only accept string, some only dword. The majority will accept either.

Not only that there is WM/Track and WM/TrackNumber, one is zero based, which again many programs do not follow (expect the 0 based item to be 1 based).

Basically MS messed up with track number big time.

-------
In dBpoweramp R12 you can select dBpoweramp Configuration >> Codecs >> Advanced  then select 'as DWORD' for your track number.

We will release an update tag utility codec asap which would make your life easier, just 3 clicks to do your whole library.

WMA Tag Metadata Editing

Reply #5
We will release an update tag utility codec asap which would make your life easier, just 3 clicks to do your whole library.

Cool. Unfortunately, I haven't completely figured out the other half of the problem- the order that the metadata is written in. Here are examples of a header for a single track, one that worked with the player and one that does not. The only difference is that WM/Year was moved relative to the other entries. In fact, the one consistent thing that I have observed is that headers only work where WM/TrackNumber is before WM/Year. There may or may not be more to it than that, I have not yet done enough experimenting to be certain.

Header that music player doesn't like:
Code: [Select]
<?xml version="1.0"?>

<WMBasicEdit >
    <Attributes >
    <WMENC_STRING Name="WM/Year" Value="2003" />
    <WMENC_QWORD Name="WM/EncodingTime" Value="128146185120000000" />
    <WMENC_STRING Name="WM/UniqueFileIdentifier" Value="AMGa_id=R   659360;AMGp_id=P    22368;AMGt_id=T  6602170" />
    <WMENC_STRING Name="WM/Composer" Value="Ed Robertson" />
    <WMENC_STRING Name="WM/Publisher" Value="Reprise" />
    <WMENC_STRING Name="WM/Genre" Value="Rock" />
    <WMENC_STRING Name="WM/AlbumTitle" Value="Everything to Everyone" />
    <WMENC_STRING Name="WM/AlbumArtist" Value="Barenaked Ladies" />
    <WMENC_STRING Name="WM/Provider" Value="AMG" />
    <WMENC_STRING Name="WM/ProviderRating" Value="5" />
    <WMENC_STRING Name="WM/ProviderStyle" Value="Rock" />
    <WMENC_LONG Name="WM/TrackNumber" Value="10" />
        <WMENC_STRING Name="Title" Value="Aluminum" />
        <WMENC_STRING Name="Author" Value="Barenaked Ladies" />
        <WMENC_STRING Name="Copyright" />
        <WMENC_STRING Name="Description" />
        <WMENC_STRING Name="WM/ParentalRating" />
    </Attributes>

    <RemoveAllMarkers />
    <RemoveAllScripts />
</WMBasicEdit>

Header that works ok:
Code: [Select]
<?xml version="1.0"?>

<WMBasicEdit >
    <Attributes >
    <WMENC_QWORD Name="WM/EncodingTime" Value="128146185120000000" />
    <WMENC_STRING Name="WM/UniqueFileIdentifier" Value="AMGa_id=R   659360;AMGp_id=P    22368;AMGt_id=T  6602170" />
    <WMENC_STRING Name="WM/Composer" Value="Ed Robertson" />
    <WMENC_STRING Name="WM/Publisher" Value="Reprise" />
    <WMENC_STRING Name="WM/Genre" Value="Rock" />
    <WMENC_STRING Name="WM/AlbumTitle" Value="Everything to Everyone" />
    <WMENC_STRING Name="WM/AlbumArtist" Value="Barenaked Ladies" />
    <WMENC_STRING Name="WM/Provider" Value="AMG" />
    <WMENC_STRING Name="WM/ProviderRating" Value="5" />
    <WMENC_STRING Name="WM/ProviderStyle" Value="Rock" />
    <WMENC_LONG Name="WM/TrackNumber" Value="10" />
    <WMENC_STRING Name="WM/Year" Value="2003" />
        <WMENC_STRING Name="Title" Value="Aluminum" />
        <WMENC_STRING Name="Author" Value="Barenaked Ladies" />
        <WMENC_STRING Name="Copyright" />
        <WMENC_STRING Name="Description" />
        <WMENC_STRING Name="WM/ParentalRating" />
    </Attributes>

    <RemoveAllMarkers />
    <RemoveAllScripts />
</WMBasicEdit>


on edit: fixed my screwed up tags

WMA Tag Metadata Editing

Reply #6
Upon further experimentation, it appears that the device is happy with tags as long as two things are true:
  • WM/TrackNumber is stored as a DWORD
  • WM/TrackNumber occurs before WM/Year in the header

WMA Tag Metadata Editing

Reply #7
I purchased a refurbished Sansa e270 from Newegg and some of the albums come up as unknown. The player identifies the artist and the individual songs, but each album is listed as 'Unknown' and the song titles appear out of order.

Is there a program I can use to edit or correct the tags so the e270 will recognize the album and track numbers? Is there a way to use dBpoweramp Music Converter to edit the tags without transcoding the file?

WMA Tag Metadata Editing

Reply #8
Album is a pretty basic field that should not cause trouble.
Would help to have a bit more information from you.
Do you use a music player on the desktop or elsewhere that does recognize the album field correctly?
At the very least, you can check what value Explorer is showing.

What program did you use to tag the files.

terry

EDIT: you might also want to start a specific thread for this as it really does not follow from this thread title