Bulk moving of MP3 tag info to WMA/FLAC files

Folks,

I've spent many hours with Mp3tag cleaning up the tags (and cover images) for about 100 albums. Now that all the MP3 files are in good shape I'm hoping to transfer as much of the tag information as possible to an identical set of files in WMA and in FLAC format. (These other formats have proved useful for different applications.)

Can anyone recommend the best way (if it is even possible) to do such a "bulk" transfer of tag info? (The WMA and FLAC files have exactly the same names as the MP3 files except, of course, the names end with WMA and FLAC, respectively.)

Many thanks,
Wayne

There 2 basic ways:

  1. Copy tags & Paste tags with the functions from the context menu of the files list.
    Provided you have loaded the source and the target files, and set them into an identical order, first copy the tags from the source files, then select the first set of target files and paste the tags, then select the second bunch and paste again.
    A very quick way if you have only few files to treat.

  2. Using the export function and Converter>Textfile-tag function.
    You have to take care that you include all fields in the export. Images do not get exported though
    Also, a plain text format (which is required) does not handle fields with line breaks. So to get fields like COMMENT or UNSYNCEDLYRICS properly into the export, you have to get rid of the linebreaks.

If you include the filename, then, on import, the correct data ends up in the file of the same name as mentioned in the record. YOu would have to replace the filename extensions in the export files prior to import.
The images have to be exported separately and re-imported separately.

The second method is worthwhile if you have really a lot of files to treat. For only a one-off or few files the first method would be much more convenient as you do not have the bother with the conversions.

Its your choice.

ohrenkino,

Thanks for the quick response! I tried the Copy/Paste (approach #1) and it seemed to work fine. However, that method is a bit slow and it would take a lot of time & effort to update 100+ albums. (Each album is in its own directory.) It seem, then, that approach #2 might be more appropriate in my case. As a test, I selected all the MP3 files in one folder (i.e. album) and did a File>Export. The resulting text file contained one line per song with the fields Artist, Album, Title, Track, Year, Genre. The filename itself was NOT included, even though the first field in the export template is:

$filename(txt,utf-8)$loop(%_path%)

Perhaps filenames would be included if I had selected the higher level directory that contains ALL the album directories? In that case I assume I'd be generating one large file containing the tag information for ALL the albums?

I'm not too familiar with the Export option, so I wondered it you can tell me how to add fields to be exported? Specifically, I'd like to export additional tags for Composer, Album Artist, and Disk #. Finally, I'm not at all clear as to how to actually Import the information once it has been written to a file?

I'm sorry to bother you with all these questions, but I'm more than a little confused by the documentation on the export/import features of Mp3tag!

Thanks again,
Wayne

The default csv-export (which is plain text, separated by semicolon) looks like this:

$filename(csv,utf-16)Title;Artist;Album;Track;Year;length;size;modifed;path;filename;
$loop(%_filename_ext%)%title%;%artist%;%album%;%track%;%year%;%_length_seconds%;%_file_size%;%_file_mod_date%;%_folderpath%;%_filename_ext%;
$loopend()

The first line contains a reminder, which fields you exported - this is plain text and appears as some kind of headline in the text file.
The next line is the more important one as this specifies, which fields should be exported. You enter the field variable names.
So, as you want to include composer, add %composer%, %discnumber% for disc # and %albumartist% for the album artist.
The fields for modification date and length are not sensible for this export.
A stripped down and modified second line may look like this:

$filename(csv,utf-16)Album Artist;Composer;Title;Artist;Album;Track;Year;Disk#filename;
$loop(%_filename_ext%)%albumartist%;%composer%;%title%;%artist%;%album%;%track%;%year%;%discnumber;%_filename_ext%;
$loopend()

The export is executed for all selected files, the export file is saved in the current work directory.

For import use the converter Text file - tag.
You have to enter a mask for the fields in the same sequence as you exported the data. You may copy&paste the fields list from the export-mask.
If you do not want to import certain fields, replace the field name with %dummy%.

I wrote down the limitations of this method in post #2 - but as there are workarounds for each speciality, no data is lost.

ohrenkino,

Sorry I didn't get back to you sooner, but it has taken a little time to rearrange my MP3 and WMA files to have exactly the same names (except for the file extension, of course) and to be in the same order. After making sure everything "lined up" I went to the top level directory that contains all the MP3 albums and did a csv export of all the tags (including the ones that I added to the default list). This generated a large mp3tag.csv file in that top level directory. I assume the next step is to do a global edit on this file to change the MP3 extensions to WMA and to fix the paths to be correct for the WMA files.

Questions (if I may):

  1. When I click on Convert>Text file - Tag I don't get any prompts to enter the file name to import or the format string for that file. When/how is the information to be given?

  2. Since full pathnames are present in the mp3tag.csv file, I don't assume it matters where the mp3tag.csv file itself is located when I do the import?

  3. I notice the mp3tag.csv file includes a lot of trailing blanks for many of the fields. In the past, when editing tags manually, I've had to make sure that I DON'T include trailing blanks. Otherwise, some media playing programs - RASPBMC on a Raspberry Pi - will not correctly display some of the information. Will the import operation "strip out" these trailing blanks, or will I have to edit the csv file manually to remove those blanks?

Many thanks once again,
Wayne

Well, you should. If you do not get a separate dialogue (similar to the other covert functions) then you probably have not selected at least one file.

Do not export the path (yes, it is part of the default file - but you are free to edit this file so that it really exports onlay and all those fields that you need. The filename itself should not contain any path information.

MP3tag exports the fields just as you either have filled them or as you have designed the export mask. MP3tag does not add any blanks on its own.

To find files with trailing or leading blanks in ARTIST use this filter:
"$if($eql($len(%artist%),$len($trim(%artist%))),1,0)" IS "0"
Any file that shows up, has additional blanks in the field ARTIST.
You may replace the reference to ARTIST by any other field that you want to check.

Success! Many thanks to ohrenkino for all his suggestions.

After a number of trials I've managed to get tags transferred from all my MP3 files to the WMA ones. However, the discussion at

forums.mp3tag.de/lofiversion/index.php/t9165.html

claims that absolute path names MUST be given in each line of the export file. (I was, in fact, unable to perform an import until I included %_path%.) The complete list of requirements given in the above discussion is:

  • No empty lines in the textfile. <= The csv file in my case
  • Identical amount of lines in textfile and selected tracks within Mp3tag.
  • Each line in the textfile must have an absolute filepath entry.
  • Import tag mask must have a "%_path%" entry.
  • The binding relation is the absolute filepath.

=================================================

For the benefit of anyone else who may be attempting a similar moving of tags, here is list of all the steps that I ended up performing:

  1. Make sure that the subdirectory names + filenames (except for the mp3/wma extensions, of course) are identical for both the MP3 and the WMA files. In my case, the MP3 files are stored in subdirectories (one subdirectory per album) of "F:\00-MP3 Music" and the WMA files are in subdirectories of "F:\00-WMA Music".

  2. Start Mp3tag and select the top-level directory (e.g. F:\00-MP3 Music) containing all the MP3 files. All the MP3 files should be listed in the right hand panel. Now select File>Export... and choose the csv option. Use the edit option (the icon with the pencil on the right side of the Export Configuration window) to select which tag fields you want transferred to the WMA files. In my case the new configuration is:

$filename(csv,utf-16)PathAlbumTitleArtistAlbumArtistComposerDiscnumberGenreTrack`Year

$loop(%_filename_ext%)%_path%%album%%title%%artist%%albumartist%%composer%%discnumber%%genre%%track%%year%

$loopend()build on %_date% with %_app% - the universal Tag editor - http://www.mp3tag.de/en/

where for clarity I've inserted a blank line between each "real" line. (Note the use of the odd character ` as a delimiter. This character is used because it does not occur in any other context.) It seems necessary to specify %_path% as one of the fields to be exported; otherwise, the fields to be exported are specific to a given situation.

  1. I gave the export file a name of "mp3tag.csv" and it will be stored in the current working directory (F:\00-MP3 Music, in my case).

  2. The export file needs to be edited as follows:

=> The top level directory name must be changed to specify the directory containing the WMA files. In my case, this meant changing F:\00-MP3 Music to F:\00-WMA Music.

=> All .mp3 file extensions must be changed to .wma

=> Delete the first & last lines of the csv file that just contain descriptive information.

=> Optionally, any extra spaces located BEFORE a ` delimiter character can be removed.

  1. Now the IMPORT can be attempted. Start Mp3tag and select the top-level WMA directory (F:\00-WMA Music, in my case). All the WMA files should be showing in the right hand panel. Use CTRL-A to select all these files. Now go to Convert > Text file - Tag. When prompted, enter the full pathname for the csv file that was edited in step #2. Then enter the appropriate template string to identify each field in that csv file. In my case, the template is:

%_path%%album%%title%%artist%%albumartist%%composer%%discnumber%%genre%%track%`%year%

Again, only the %_path% seems to be mandatory.

  1. At this point I'd STRONGLY suggest using the "Preview" option to make sure that that all is well. After generating the preview be sure to look at the BOTTOM of the displayed information to make sure no errors have been logged!

  2. Assuming the preview looks file, just click on the OK option to execute the import "for real"!

I can't guarantee that the above steps will work in all cases, but hopefully they will give sufficient guidance when similar operations are required.

Wayne