Help - Search - Members - Calendar
Full Version: WMA Tag Metadata Editing
Hydrogenaudio Forums > Lossy Audio Compression > Other Lossy Codecs
Scotto
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

spoon
It should be a DWORD according to the specs.

edit: clarification: programs whould accept dword or string
Scotto
QUOTE(spoon @ Feb 25 2007, 12:51) *

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.
luks
QUOTE(spoon @ Feb 25 2007, 23:51) *

It should be a DWORD according to the specs.

Ehm, no. It should be string - http://msdn2.microsoft.com/en-au/library/aa392015.aspx
spoon
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.
Scotto
QUOTE(spoon @ Feb 26 2007, 04:55) *

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
<?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
<?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
Scotto
Upon further experimentation, it appears that the device is happy with tags as long as two things are true:
  1. WM/TrackNumber is stored as a DWORD
  2. WM/TrackNumber occurs before WM/Year in the header
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.