Mapping
User-defined field mappings
Mp3tag displays tag fields either directly with their corresponding name from the files (e.g., for files with APEv2 tags like Musepack or VorbisComments like OGG and FLAC) or uses a fixed mapping from format-specific
names to human-readable names (e.g., for ID3v2 identifiers or MP4 atoms). For example, the ID3v2 field TPE1
is mapped to ARTIST
in Mp3tag.
You can customize mappings from Mp3tag’s internal field name to a user-defined field name in case you need to make field names consistent across different types of tags (e.g., YEAR
in ID3v2 and DATE
in FLAC). Here, you can
create mappings for a specific tag type (APEv2, ID3v2, MP4, VorbisComment or WMA) and provide a Source name (Mp3tag’s name) and a Target name (your preferred field name).
After reading tags from files, Mp3tag translates all source field names to their respective target (and vice-versa when writing tags).
Please note that you can’t change the mapping of ID3v2 frame identifiers or MP4 atom names to Mp3tag’s internal field names.
Process when Reading mapped Fields
Imagine you want to use one field name YEAR
for the release year regardless of whether you are using MP3s (which already have YEAR
as Mp3tag’s name for release year) or FLACs (which have DATE
). To create this unique field that can be used accross the different formats, you need to create a new mapping for VorbisComment (since FLAC files use VorbisComments) and provide DATE
as Source (it is the name displayed in Mp3tag so far) and YEAR
as Target (this is the field name you like to use). When you now reload the files, you will notice that instead of DATE
the field is now displayed as YEAR
and you can use this in format strings and everywhere else without differentiating between tag formats.
Process when Saving mapped Fields
When you save tags that use a mapped field, Mp3tag applies the mapping in the reverse direction. So any field that uses the name provided as Target gets translated to the corresponding Source field name. It’s also possible to map multiple Source fields to one Target (e.g., DATE
and RELEASE
to YEAR
).
Please note that this implies that all Source fields are written on tag updates. Mapping one Source field to multiple Target fields is not supported.